2025-07-15 11:43:28 +01:00
{% extends "base.html" %}
2025-05-09 16:31:14 +01:00
2025-07-15 11:43:28 +01:00
{% block title %}KTVManager{% endblock %}
{% block content %}
< h1 > Welcome {{ username }}!< / h1 >
< br >
< h2 > You have {{ accounts }} active accounts< / h2 >
< br >
{% if current_month_accounts %}
< h3 > Accounts Expiring Within 30 Days< / h3 >
< table class = "table table-bordered table-striped" >
< thead class = "thead-dark" >
< tr >
< th > Stream Name< / th >
< th > Username< / th >
< th > Expiry Date< / th >
< / tr >
< / thead >
< tbody >
{% for account in current_month_accounts %}
2025-05-09 16:31:14 +01:00
< tr >
2025-07-15 11:43:28 +01:00
< td > {{ account.stream }}< / td >
< td > {{ account.username }}< / td >
2025-07-15 14:02:52 +01:00
< td > {{ account.expiaryDate_rendered }} {% if account.days_to_expiry is defined %}< span style = "color: red;" > ({{ account.days_to_expiry }} days)< / span > {% endif %}< / td >
2025-05-09 16:31:14 +01:00
< / tr >
2025-07-15 11:43:28 +01:00
{% endfor %}
< / tbody >
< / table >
{% endif %}
{% if expired_accounts %}
< h3 > Expired Accounts< / h3 >
< table class = "table table-bordered table-striped" >
< thead class = "thead-dark" >
< tr >
< th > Stream Name< / th >
< th > Username< / th >
< th > Expiry Date< / th >
< / tr >
< / thead >
< tbody >
{% for account in expired_accounts %}
2025-05-09 16:31:14 +01:00
< tr >
2025-07-15 11:43:28 +01:00
< td > {{ account.stream }}< / td >
< td > {{ account.username }}< / td >
< td > {{ account.expiaryDate_rendered }}< / td >
2025-05-09 16:31:14 +01:00
< / tr >
2025-07-15 11:43:28 +01:00
{% endfor %}
< / tbody >
< / table >
{% endif %}
{% endblock %}
2025-05-09 16:31:14 +01:00
2025-07-15 11:43:28 +01:00
{% block scripts %}
< script >
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('{{ url_for("static", filename="service-worker.js") }}')
}
< / script >
{% endblock %}