Skip to content

Commit 8b7f8ee

Browse files
committed
fix: remove unnecessary js libs + display expiry threshold
1 parent 8df1aba commit 8b7f8ee

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

myapp/templates/base.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,9 @@ <h5>VoucherVault {{ "VERSION"|env }}</h5>
213213
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
214214

215215
<!-- Vendor JS Files -->
216-
<script src="{% static 'assets/vendor/apexcharts/apexcharts.min.js' %}"></script>
217216
<script src="{% static 'assets/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script>
218217
<script src="{% static 'assets/vendor/chart.js/chart.umd.js' %}"></script>
219218
<script src="{% static 'assets/vendor/echarts/echarts.min.js' %}"></script>
220-
<script src="{% static 'assets/vendor/quill/quill.js' %}"></script>
221-
<script src="{% static 'assets/vendor/simple-datatables/simple-datatables.js' %}"></script>
222-
<script src="{% static 'assets/vendor/tinymce/tinymce.min.js' %}"></script>
223-
<script src="{% static 'assets/vendor/php-email-form/validate.js' %}"></script>
224219

225220
<!-- Template Main JS File -->
226221
<script src="{% static 'assets/js/main.js' %}"></script>

myapp/templates/update_apprise_urls.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{% extends "base.html" %}
22
{% load i18n %}
33
{% load static %}
4+
{% load extras %}
45

56
{% block content %}
67
<div class="pagetitle">
@@ -19,7 +20,7 @@
1920
<div class="card-body">
2021
<h6 class="card-title">{% trans "Configure Your Apprise URLs" %}</h6>
2122
<span>{% trans "These URLs will be used to send out personal expiry notifications. Leave empty to disable notifications." %}</span><p>
22-
23+
<p><span class="badge bg-info"><span class="badge bg-info">Expiry Threshold: {{ "EXPIRY_THRESHOLD"|env }}d</span></span></p>
2324
<!-- Apprise URLs Form -->
2425
<form method="POST" action="">
2526
{% csrf_token %}

myapp/templatetags/extras.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ def env(key):
1010
return settings.OIDC_ENABLED
1111
if key == "VERSION":
1212
return settings.VERSION
13+
if key == "EXPIRY_THRESHOLD":
14+
threshold_days = os.getenv('EXPIRY_THRESHOLD_DAYS', 30)
15+
return threshold_days
1316

1417
@register.filter()
1518
def comma_to_dot(value):

0 commit comments

Comments
 (0)