mirror of
https://github.com/caronc/apprise-api.git
synced 2025-08-23 12:20:20 +02:00
Underlining Apprise version info added to Frontend Display (#61)
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
from .utils import ConfigCache
|
from .utils import ConfigCache
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
import apprise
|
||||||
|
|
||||||
|
|
||||||
def stateful_mode(request):
|
def stateful_mode(request):
|
||||||
@@ -38,3 +39,10 @@ def config_lock(request):
|
|||||||
Returns the state of our global configuration lock
|
Returns the state of our global configuration lock
|
||||||
"""
|
"""
|
||||||
return {'CONFIG_LOCK': settings.APPRISE_CONFIG_LOCK}
|
return {'CONFIG_LOCK': settings.APPRISE_CONFIG_LOCK}
|
||||||
|
|
||||||
|
|
||||||
|
def apprise_version(request):
|
||||||
|
"""
|
||||||
|
Returns the current version of apprise loaded under the hood
|
||||||
|
"""
|
||||||
|
return {'APPRISE_VERSION': apprise.__version__}
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
<img class="left" src="{% static "logo.png" %}" alt="{% trans "Apprise Logo" %}" />
|
<img class="left" src="{% static "logo.png" %}" alt="{% trans "Apprise Logo" %}" />
|
||||||
</a>
|
</a>
|
||||||
<h1>{% trans "Apprise API" %}</h1>
|
<h1>{% trans "Apprise API" %}</h1>
|
||||||
|
<i>APPRISE v{{APPRISE_VERSION}}</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Page Layout here -->
|
<!-- Page Layout here -->
|
||||||
|
@@ -24,13 +24,6 @@
|
|||||||
Here is where you can store your Apprise configuration associated with the key <code>{{key}}</code>.
|
Here is where you can store your Apprise configuration associated with the key <code>{{key}}</code>.
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
{% blocktrans %}
|
|
||||||
You can always refer to the
|
|
||||||
<a href="https://github.com/caronc/apprise/wiki#notification-services">Apprise Wiki</a> if you're having
|
|
||||||
troubles assembling your URL(s).
|
|
||||||
{% endblocktrans %}
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
{% blocktrans %}
|
{% blocktrans %}
|
||||||
In the future you can return to this configuration screen at any time by placing the following into your
|
In the future you can return to this configuration screen at any time by placing the following into your
|
||||||
@@ -38,6 +31,24 @@
|
|||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
<code>{{request.scheme}}://{{request.META.HTTP_HOST}}{{BASE_URL}}/cfg/{{key}}</code>
|
<code>{{request.scheme}}://{{request.META.HTTP_HOST}}{{BASE_URL}}/cfg/{{key}}</code>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
{% blocktrans %}
|
||||||
|
Use the <strong><i class="material-icons">settings</i> Configuration</strong> section to prepare and save your Apprise configuration.
|
||||||
|
{% endblocktrans %}
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
{% blocktrans %}
|
||||||
|
<i class="material-icons">lightbulb_outline</i>You can always refer to the
|
||||||
|
<a href="https://github.com/caronc/apprise/wiki#notification-services">Apprise Wiki</a> if you're having troubles assembling your URL(s).
|
||||||
|
{% endblocktrans %}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{% blocktrans %}
|
||||||
|
Use the <strong><i class="material-icons">announcement</i> Notifications</strong> section to test out your saved configuration.
|
||||||
|
{% endblocktrans %}
|
||||||
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<div class="section no-config">
|
<div class="section no-config">
|
||||||
@@ -62,7 +73,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="has-config">
|
<div class="has-config">
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h5>{% trans "Working With Your Configuration" %}</h5>
|
<h5>{% trans "Working Remotely With Your Configuration" %}</h5>
|
||||||
<p>
|
<p>
|
||||||
{% blocktrans %}The following command would cause apprise to directly notify all of your services:{% endblocktrans %}
|
{% blocktrans %}The following command would cause apprise to directly notify all of your services:{% endblocktrans %}
|
||||||
<br />
|
<br />
|
||||||
|
@@ -76,6 +76,7 @@ TEMPLATES = [
|
|||||||
'core.context_processors.base_url',
|
'core.context_processors.base_url',
|
||||||
'api.context_processors.stateful_mode',
|
'api.context_processors.stateful_mode',
|
||||||
'api.context_processors.config_lock',
|
'api.context_processors.config_lock',
|
||||||
|
'api.context_processors.apprise_version',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@@ -3,6 +3,14 @@
|
|||||||
font-size: 2.1rem;
|
font-size: 2.1rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Apprise Version */
|
||||||
|
.nav i {
|
||||||
|
float: right;
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 0.7rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
@@ -42,6 +50,12 @@ textarea {
|
|||||||
padding: 1rem 2rem;
|
padding: 1rem 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#overview strong {
|
||||||
|
color: #004d40;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
.tabs .tab a{
|
.tabs .tab a{
|
||||||
border-radius: 25px 25px 0 0;
|
border-radius: 25px 25px 0 0;
|
||||||
color:#2bbbad;
|
color:#2bbbad;
|
||||||
|
Reference in New Issue
Block a user