fix: restore notifications tab and revert out-of-scope settings dialog reorganization
Revert index.html to state at046d123(task-7 completion), undoing the out-of-scope settings dialog reorganization from9f51d1bthat: - Removed the notifications tab button and panel - Moved #setting-bell-sound into sessions panel - Moved #setting-device-name into display panel - Moved #notification-status-text and #notification-request-btn into sessions panel - Removed #setting-view-scope from devices panel This restores the 5-tab structure (display, sessions, notifications, new-session, devices) and correct element placement that the Python HTML tests assert. Also remove 2 stale test_frontend_js.py tests that expected buildSources and _sources to exist after task-1 removed them: - test_save_remote_instances_rebuilds_sources - test_build_sources_checks_multi_device_enabled All 770 Python tests now pass (was 10 failures).
This commit is contained in:
@@ -87,15 +87,12 @@
|
|||||||
<nav class="settings-tabs">
|
<nav class="settings-tabs">
|
||||||
<button class="settings-tab settings-tab--active" data-tab="display">Display</button>
|
<button class="settings-tab settings-tab--active" data-tab="display">Display</button>
|
||||||
<button class="settings-tab" data-tab="sessions">Sessions</button>
|
<button class="settings-tab" data-tab="sessions">Sessions</button>
|
||||||
|
<button class="settings-tab" data-tab="notifications">Notifications</button>
|
||||||
<button class="settings-tab" data-tab="new-session">Commands</button>
|
<button class="settings-tab" data-tab="new-session">Commands</button>
|
||||||
<button class="settings-tab" data-tab="devices">Multi-Device</button>
|
<button class="settings-tab" data-tab="devices">Multi-Device</button>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="settings-content">
|
<div class="settings-content">
|
||||||
<div class="settings-panel" data-tab="display">
|
<div class="settings-panel" data-tab="display">
|
||||||
<div class="settings-field">
|
|
||||||
<label class="settings-label" for="setting-device-name">Device Name</label>
|
|
||||||
<input type="text" id="setting-device-name" class="settings-input" placeholder="This device" />
|
|
||||||
</div>
|
|
||||||
<div class="settings-field">
|
<div class="settings-field">
|
||||||
<label class="settings-label" for="setting-font-size">Font Size</label>
|
<label class="settings-label" for="setting-font-size">Font Size</label>
|
||||||
<select id="setting-font-size" class="settings-select">
|
<select id="setting-font-size" class="settings-select">
|
||||||
@@ -167,6 +164,12 @@
|
|||||||
<label class="settings-label" for="setting-auto-open">Auto-open created sessions</label>
|
<label class="settings-label" for="setting-auto-open">Auto-open created sessions</label>
|
||||||
<input type="checkbox" id="setting-auto-open" class="settings-checkbox" checked />
|
<input type="checkbox" id="setting-auto-open" class="settings-checkbox" checked />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="settings-field settings-field--column">
|
||||||
|
<label class="settings-label">Hidden Sessions</label>
|
||||||
|
<div id="setting-hidden-sessions" class="settings-checkbox-list"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="settings-panel hidden" data-tab="notifications">
|
||||||
<div class="settings-field">
|
<div class="settings-field">
|
||||||
<label class="settings-label" for="setting-bell-sound">Bell Sound</label>
|
<label class="settings-label" for="setting-bell-sound">Bell Sound</label>
|
||||||
<input type="checkbox" id="setting-bell-sound" class="settings-checkbox" />
|
<input type="checkbox" id="setting-bell-sound" class="settings-checkbox" />
|
||||||
@@ -178,10 +181,6 @@
|
|||||||
<button id="notification-request-btn" class="settings-action-btn">Request Permission</button>
|
<button id="notification-request-btn" class="settings-action-btn">Request Permission</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="settings-field settings-field--column">
|
|
||||||
<label class="settings-label">Hidden Sessions</label>
|
|
||||||
<div id="setting-hidden-sessions" class="settings-checkbox-list"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="settings-panel hidden" data-tab="new-session">
|
<div class="settings-panel hidden" data-tab="new-session">
|
||||||
<div class="settings-field settings-field--column">
|
<div class="settings-field settings-field--column">
|
||||||
@@ -198,6 +197,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="settings-panel hidden" data-tab="devices">
|
<div class="settings-panel hidden" data-tab="devices">
|
||||||
|
<div class="settings-field">
|
||||||
|
<label class="settings-label" for="setting-device-name">Device Name</label>
|
||||||
|
<input type="text" id="setting-device-name" class="settings-input" placeholder="This device" />
|
||||||
|
</div>
|
||||||
<div class="settings-field">
|
<div class="settings-field">
|
||||||
<label class="settings-label" for="setting-multi-device-enabled">Enable multi-device support</label>
|
<label class="settings-label" for="setting-multi-device-enabled">Enable multi-device support</label>
|
||||||
<input type="checkbox" id="setting-multi-device-enabled" class="settings-checkbox" />
|
<input type="checkbox" id="setting-multi-device-enabled" class="settings-checkbox" />
|
||||||
@@ -211,6 +214,13 @@
|
|||||||
<option value="filtered">Filtered</option>
|
<option value="filtered">Filtered</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="settings-field">
|
||||||
|
<label class="settings-label" for="setting-view-scope">View Scope</label>
|
||||||
|
<select id="setting-view-scope" class="settings-select">
|
||||||
|
<option value="all">All Instances</option>
|
||||||
|
<option value="local">Local Only</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div class="settings-field settings-field--column">
|
<div class="settings-field settings-field--column">
|
||||||
<label class="settings-label">Federation Key</label>
|
<label class="settings-label">Federation Key</label>
|
||||||
<div class="settings-federation-key">
|
<div class="settings-federation-key">
|
||||||
|
|||||||
@@ -2325,20 +2325,6 @@ def test_save_remote_instances_calls_patch_server_setting() -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_save_remote_instances_rebuilds_sources() -> None:
|
|
||||||
"""_saveRemoteInstances must rebuild _sources after saving."""
|
|
||||||
match = re.search(
|
|
||||||
r"function _saveRemoteInstances\s*\(\s*\)\s*\{(.*?)(?=\n(?:function|//|window\.)|\n})",
|
|
||||||
_JS,
|
|
||||||
re.DOTALL,
|
|
||||||
)
|
|
||||||
assert match, "_saveRemoteInstances function not found in app.js"
|
|
||||||
body = match.group(1)
|
|
||||||
assert "_sources" in body or "buildSources" in body, (
|
|
||||||
"_saveRemoteInstances must rebuild _sources after saving remote_instances"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def test_open_settings_populates_device_name() -> None:
|
def test_open_settings_populates_device_name() -> None:
|
||||||
"""openSettings must populate setting-device-name from server settings."""
|
"""openSettings must populate setting-device-name from server settings."""
|
||||||
match = re.search(
|
match = re.search(
|
||||||
@@ -2496,20 +2482,6 @@ def test_bind_static_event_listeners_binds_multi_device_enabled() -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_build_sources_checks_multi_device_enabled() -> None:
|
|
||||||
"""buildSources must check multi_device_enabled before adding remote sources."""
|
|
||||||
match = re.search(
|
|
||||||
r"function buildSources\s*\(.*?\)\s*\{(.*?)(?=\nfunction |\n// )",
|
|
||||||
_JS,
|
|
||||||
re.DOTALL,
|
|
||||||
)
|
|
||||||
assert match, "buildSources function not found in app.js"
|
|
||||||
body = match.group(1)
|
|
||||||
assert "multi_device_enabled" in body, (
|
|
||||||
"buildSources must check multi_device_enabled to gate remote sources"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def test_device_name_change_updates_document_title() -> None:
|
def test_device_name_change_updates_document_title() -> None:
|
||||||
"""device name change handler in bindStaticEventListeners must update document.title."""
|
"""device name change handler in bindStaticEventListeners must update document.title."""
|
||||||
match = re.search(
|
match = re.search(
|
||||||
|
|||||||
Reference in New Issue
Block a user