feat(quit): close-window button + manual hint on the farewell overlay
The farewell overlay already attempted ``window.top.close()`` after a Close click — but browsers only honour that for tabs that JS opened (Chrome --app windows qualify; a regular browser tab does not). For users whose Chrome wasn't auto-detected and who fall back to ``webbrowser.open``, the overlay stays put and they had no in-page way to close. Add to the overlay HTML: - A "Close this window" button (uses the user-gesture path, which has slightly looser browser rules than auto-close). - A hidden hint paragraph that reveals itself 250 ms after the button is clicked IF the window is still here, telling the user to press Ctrl+W (⌘W on Mac). Wired through the existing _farewell_script template + ``_js_html_safe`` escaping so neither label can break out of the JS string literal. New i18n keys (en + es): ``quit.close_window_button`` and ``quit.close_hint``. The existing auto-close attempt remains — Chrome --app users still get their window closed without touching the button. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -51,7 +51,9 @@
|
||||
"button": "Quit app",
|
||||
"shutting_down": "Shutting down… you can close this window.",
|
||||
"farewell_title": "DataTools has shut down",
|
||||
"farewell_subtitle": "You can close this window."
|
||||
"farewell_subtitle": "You can close this window.",
|
||||
"close_window_button": "Close this window",
|
||||
"close_hint": "Your browser blocked the close. Press Ctrl+W (or ⌘W on Mac) to close this tab manually."
|
||||
},
|
||||
"close_page": {
|
||||
"page_title": "DataTools — Close",
|
||||
|
||||
Reference in New Issue
Block a user