diff --git a/apps/web-console/firmware-workbench.css b/apps/web-console/firmware-workbench.css index b335af6..e437e15 100644 --- a/apps/web-console/firmware-workbench.css +++ b/apps/web-console/firmware-workbench.css @@ -335,6 +335,20 @@ th:nth-child(4) { width: 28%; } th:nth-child(5) { width: 8%; } th:nth-child(6) { .table-actions svg { width: 13px; height: 13px; } .table-actions .publish-action { color: white; background: var(--primary); } .table-actions .delete-action { color: var(--danger); background: #fff0f1; } +.table-actions .notify-action { + flex: 0 0 42px; + width: 42px; + min-width: 42px; + height: 34px; + margin-left: auto; + padding: 6px; + border-radius: 8px; + color: #fff; + background: var(--primary); + box-shadow: 0 4px 10px rgba(40, 105, 232, .2); +} +.table-actions .notify-action svg { width: 20px; height: 20px; stroke-width: 2.25; } +.table-actions .notify-action:hover { background: color-mix(in srgb, var(--primary) 86%, #132447); } .baseline-protection { height: 26px; padding: 3px 6px; display: inline-flex; align-items: center; gap: 3px; color: var(--success); background: var(--success-soft); border-radius: 5px; font-size: 12px; white-space: nowrap; } .baseline-protection svg { width: 13px; } .status-badge[data-status="baseline"] { color: var(--success); border-color: #b9e5d3; background: var(--success-soft); } @@ -600,6 +614,10 @@ body.embedded .file-cell span { line-height: 1.15; } color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); } +:root[data-glass-theme="dark"] .table-actions .notify-action { + color: #fff; + background: color-mix(in srgb, var(--primary) 82%, #07101e); +} :root[data-glass-theme="dark"] .modal-backdrop { background: rgba(2, 5, 14, .68); } :root[data-glass-theme="dark"] .modal { background: var(--surface); } :root[data-glass-theme="dark"] .diff-panel p { color: var(--muted); } diff --git a/apps/web-console/firmware-workbench.html b/apps/web-console/firmware-workbench.html index 909f4a9..04fc4ad 100644 --- a/apps/web-console/firmware-workbench.html +++ b/apps/web-console/firmware-workbench.html @@ -8,7 +8,7 @@ 座椅固件开发工作台 · 511 工程 - + diff --git a/apps/web-console/firmware-workbench.js b/apps/web-console/firmware-workbench.js index 9b96ddd..92575ea 100644 --- a/apps/web-console/firmware-workbench.js +++ b/apps/web-console/firmware-workbench.js @@ -271,8 +271,8 @@ - ${artifact.status === "published" ? `` : ""} ${artifact.is_baseline ? `受保护` : ``} + ${artifact.status === "published" ? `` : ""} `).join(""); } diff --git a/apps/web-console/service-worker.js b/apps/web-console/service-worker.js index 833a5bd..78f0eed 100644 --- a/apps/web-console/service-worker.js +++ b/apps/web-console/service-worker.js @@ -1,4 +1,4 @@ -const CACHE_VERSION = "cognitive-agent-pad-v324-firmware-notification"; +const CACHE_VERSION = "cognitive-agent-pad-v325-notification-ui"; const SHELL_CACHE = `${CACHE_VERSION}-shell`; const RUNTIME_CACHE = `${CACHE_VERSION}-runtime`; const APP_SHELL = [ @@ -27,7 +27,7 @@ const APP_SHELL = [ "/firmware-workbench-entry.js?v=3", "/firmware-workbench.html", "/firmware-workbench-theme.js?v=1", - "/firmware-workbench.css?v=6", + "/firmware-workbench.css?v=7", "/firmware-workbench.js?v=4", "/assets/pets/self-extension-cat.png?v=3", "/assets/pets/self-extension-cat-entrance.png?v=3", diff --git a/tests/unit/test_firmware_workbench_frontend_contract.py b/tests/unit/test_firmware_workbench_frontend_contract.py index 163076e..cccb90f 100644 --- a/tests/unit/test_firmware_workbench_frontend_contract.py +++ b/tests/unit/test_firmware_workbench_frontend_contract.py @@ -58,7 +58,7 @@ def test_workbench_exposes_artifact_actions_and_always_starts_a_new_task() -> No "/firmware-workbench-entry.js?v=3", "/firmware-workbench.html", "/firmware-workbench-theme.js?v=1", - "/firmware-workbench.css?v=6", + "/firmware-workbench.css?v=7", "/firmware-workbench.js?v=4", ): assert f'"{asset}"' in worker @@ -107,3 +107,16 @@ def test_peer_dialogs_share_the_expanded_desktop_size_contract() -> None: assert 'width: min(960px, calc(100vw - 30px));' in extension assert 'width: min(1180px, calc(100vw - 28px));' in extension assert 'width: min(980px, calc(100vw - 32px));' in extension + + +def test_published_artifacts_expose_the_expanded_right_aligned_notify_action() -> None: + script = source("firmware-workbench.js") + styles = source("firmware-workbench.css") + + assert 'artifact.status === "published"' in script + assert 'class="notify-action"' in script + assert 'data-artifact-action="notify"' in script + assert 'margin-left: auto' in styles + assert 'flex: 0 0 42px' in styles + assert 'height: 34px' in styles + assert '.table-actions .notify-action svg { width: 20px; height: 20px;' in styles