From 9e8b4b2ca9bad6a914a3ff3343d4a9739a228ada Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 18 May 2026 15:35:47 +0000 Subject: [PATCH] feat(footer): help popover shows license state + Activate link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bump version to 3.0 (src/__init__.py). - Switch support address to support@unalogix.com. - Help popover now includes a License section that reads ``src.license.current_state()``: * When activated + valid: name + expiry date + days remaining. * Otherwise: "Not activated" + an ``Activate now →`` link pointing at ``./activate``. License-state queries are wrapped so a corrupted license file can't take the footer down — it falls through to the inactive branch. - Popover HTML is now built in Python (so the license branch lives in one place) and passed to the JS as a single string. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/__init__.py | 2 +- src/gui/components/_legacy.py | 76 +++++++++++++++++++++++++++-------- src/i18n/packs/en.json | 5 +++ src/i18n/packs/es.json | 5 +++ 4 files changed, 71 insertions(+), 17 deletions(-) diff --git a/src/__init__.py b/src/__init__.py index e2f2983..3495dfc 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -5,4 +5,4 @@ the Windows Inno Setup script, the macOS DMG packaging script, and the AppImage build. Bump here on release and CI propagates it. """ -__version__ = "1.0.0" +__version__ = "3.0" diff --git a/src/gui/components/_legacy.py b/src/gui/components/_legacy.py index b2f9668..218ba87 100644 --- a/src/gui/components/_legacy.py +++ b/src/gui/components/_legacy.py @@ -565,12 +565,58 @@ def render_sticky_footer() -> None: help_version = _html.escape( _t("footer.help_version").format(version=__version__) ) - support_email = "support@datatools.app" - help_support = _html.escape( - _t("footer.help_support").format(email=support_email) + support_email = "support@unalogix.com" + help_support_text = _t("footer.help_support").format(email=support_email) + help_support_html = _html.escape(help_support_text).replace( + _html.escape(support_email), + f'' + f'{_html.escape(support_email)}', ) + license_label = _html.escape(_t("footer.help_license_label")) help_dismiss = _html.escape(_t("footer.help_dismiss")) + # License section — read state and branch on activated/valid. The + # query is wrapped because a corrupted license file MUST NOT stop + # the footer from rendering; in that case we fall back to the + # "ask to activate" branch. + try: + from src.license import current_state as _license_state + state = _license_state() + except Exception: + state = None + + if state is not None and state.activated and state.valid: + active_line = _t("footer.help_license_active").format( + name=state.name or state.email or "—", + ) + expires_line = _t("footer.help_license_expires").format( + date=(state.expires_at or "")[:10], + days=state.days_remaining, + ) + license_html = ( + f'
' + f'{license_label}: {_html.escape(active_line)}
' + f'
' + f'{_html.escape(expires_line)}
' + ) + else: + inactive_line = _html.escape(_t("footer.help_license_inactive")) + activate_link = _html.escape(_t("footer.help_activate_link")) + license_html = ( + f'
' + f'{license_label}: {inactive_line}
' + f'' + ) + + popover_html = ( + f'
{help_title}
' + f'
{help_version}
' + f'{license_html}' + f'
{help_support_html}
' + f'' + ) + st.markdown( """