@danhachuel/thunderbolt 0.3.100 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/main.py +15 -4
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -23,6 +23,17 @@ try:
|
|
|
23
23
|
except (OSError, json.JSONDecodeError):
|
|
24
24
|
APP_VERSION = ""
|
|
25
25
|
|
|
26
|
+
|
|
27
|
+
def display_version(version: str) -> str:
|
|
28
|
+
"""Keep the project version label in the two-digit patch convention."""
|
|
29
|
+
parts = str(version or "").strip().split(".")
|
|
30
|
+
if len(parts) == 3 and all(part.isdigit() for part in parts):
|
|
31
|
+
return f"{int(parts[0])}.{int(parts[1])}.{int(parts[2]):02d}"
|
|
32
|
+
return str(version or "")
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
APP_VERSION_LABEL = display_version(APP_VERSION)
|
|
36
|
+
|
|
26
37
|
from hermes_ui.domain import STAGES, create_batch, create_channel, create_tasks_for_batch, delete_channel, delete_task, pipeline_summary, retry_task_with_current_settings, set_channel_defaults, transition_task, update_channel, update_channel_video
|
|
27
38
|
from hermes_ui.drafts import list_drafts, save_draft
|
|
28
39
|
from hermes_ui.automation_worker import load_worker_status
|
|
@@ -1303,11 +1314,11 @@ def render_dashboard():
|
|
|
1303
1314
|
st.session_state[checked_at_key] = time.monotonic()
|
|
1304
1315
|
version_status = st.session_state[cache_key]
|
|
1305
1316
|
if version_status.update_available:
|
|
1306
|
-
st.info(f"Nova versão disponível: {version_status.latest_version}. A versão actual é {
|
|
1317
|
+
st.info(f"Nova versão disponível: {display_version(version_status.latest_version)}. A versão actual é {APP_VERSION_LABEL or 'desconhecida'}.")
|
|
1307
1318
|
elif version_status.error:
|
|
1308
|
-
st.caption(f"Versão actual: {
|
|
1319
|
+
st.caption(f"Versão actual: {APP_VERSION_LABEL or 'desconhecida'} · verificação de actualização indisponível.")
|
|
1309
1320
|
else:
|
|
1310
|
-
st.caption(f"Versão actual: {
|
|
1321
|
+
st.caption(f"Versão actual: {APP_VERSION_LABEL or 'desconhecida'} · já está actualizada ({display_version(version_status.latest_version)}).")
|
|
1311
1322
|
update_result = st.session_state.get("home_update_result")
|
|
1312
1323
|
if update_result is not None:
|
|
1313
1324
|
if update_result.ok:
|
|
@@ -7093,7 +7104,7 @@ def main():
|
|
|
7093
7104
|
navigate(target)
|
|
7094
7105
|
|
|
7095
7106
|
with st.sidebar:
|
|
7096
|
-
version_markup = f'<span class="tb-brand-version">{
|
|
7107
|
+
version_markup = f'<span class="tb-brand-version">{APP_VERSION_LABEL}</span>' if APP_VERSION_LABEL else ""
|
|
7097
7108
|
st.markdown(f'<div class="tb-brand"><span class="tb-brand-name">Thunderbolt</span>{version_markup}</div>', unsafe_allow_html=True)
|
|
7098
7109
|
for target, icon, label in top_pages:
|
|
7099
7110
|
children = groups.get(target)
|
package/package.json
CHANGED