display time of last update and add reload button
This commit is contained in:
@@ -41,11 +41,16 @@ def my_get_locale():
|
||||
)
|
||||
|
||||
|
||||
def my_get_tz():
|
||||
return 'CET'
|
||||
|
||||
|
||||
app = Quart(__name__,
|
||||
template_folder='web/templates',
|
||||
static_folder='web/static')
|
||||
babel = Babel(app,
|
||||
locale_selector=my_get_locale,
|
||||
timezone_selector=my_get_tz,
|
||||
default_translation_directories='../translations')
|
||||
app.register_blueprint(web_routes)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from quart import Blueprint
|
||||
from quart import render_template, url_for
|
||||
from quart import send_from_directory
|
||||
from quart_babel import format_datetime
|
||||
import os
|
||||
|
||||
web_routes = Blueprint('web_routes', __name__)
|
||||
@@ -50,6 +51,7 @@ async def data_fetch():
|
||||
TsunCnt += 1
|
||||
return {
|
||||
"proxy-cnt": f"<h3>{TsunCnt}</h3>",
|
||||
"update-time": format_datetime(format="medium"),
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -24,7 +24,11 @@
|
||||
<!-- Top container -->
|
||||
<div class="w3-bar w3-top w3-black w3-large" style="z-index:4">
|
||||
<button class="w3-bar-item w3-button w3-hide-large w3-hover-none w3-hover-text-light-grey" onclick="w3_open();"><i class="fa fa-bars"></i> Menu</button>
|
||||
{% if fetch_url is defined %}
|
||||
<span class="w3-bar-item w3-right" onclick="fetch_data();"><span class="w3-hide-small">{{_('Updated:')}} </span><span id="update-time"></span> <i class="fa fa-rotate-right w3-medium"></i></span>
|
||||
{% else %}
|
||||
<span class="w3-bar-item w3-right">Logo</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Sidebar/menu -->
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: tsun-gen3-proxy 0.14.0\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2025-04-20 18:53+0200\n"
|
||||
"POT-Creation-Date: 2025-04-20 21:21+0200\n"
|
||||
"PO-Revision-Date: 2025-04-18 16:24+0200\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: de\n"
|
||||
@@ -19,6 +19,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.17.0\n"
|
||||
|
||||
#: src/web/templates/base.html.j2:27
|
||||
msgid "Updated:"
|
||||
msgstr "Aktualisiert:"
|
||||
|
||||
#: src/web/templates/base.html.j2:46
|
||||
msgid "Connections"
|
||||
msgstr "Verbindungen"
|
||||
|
||||
Reference in New Issue
Block a user