From 22ff93a5fc184c7303fb5dc2f7a3e9bd2450e7f3 Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Mon, 26 Oct 2026 16:22:34 +0800 Subject: [PATCH] fix(updates): make install and discard read as one decision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The row under a verified download took both controls from the Runtime tab, where rows are dense: .runtime-install is 27px tall at 8.5px text and .settings-link is a bare 8.5px text link with no box at all. In the Updates panel, whose own status text, artifact chip and version pill are 12px, that produced an orange pill beside floating text - the pair did not look like one choice, and the text link did not read as a button you could press. They get their own .update-action now, sized to the 12px scale the panel already uses, and both take the same box so the eye groups them. The commit variant wears the app's existing primary gradient, so the action that does something is the loud one and Discard stays the quiet alternative. "放弃" also stops competing at the moment it stops meaning anything: once the handoff script is written the app is counting down to exit, so the row collapses to the single control still in play. update_clear only resets the status, so this is presentation, not a saved deletion. updateInstalling was a whole sentence inside a fixed-height pill, which is what made that button stretch unevenly against its neighbour. It is "正在安装…" now; the panel's own closing paragraph already says Shift will restart and interrupt a running conversion, so the button does not have to repeat it. --- src/components/UpdatePanel.tsx | 24 +++++++++++----- src/i18n.ts | 4 +-- src/styles.css | 51 +++++++++++++++++++++++++++++++++- 3 files changed, 69 insertions(+), 10 deletions(-) diff --git a/src/components/UpdatePanel.tsx b/src/components/UpdatePanel.tsx index f4aef73..634d7e5 100644 --- a/src/components/UpdatePanel.tsx +++ b/src/components/UpdatePanel.tsx @@ -190,20 +190,30 @@ export function UpdatePanel({ feedUrl, autoCheck, onAutoCheckChange, system }: P
{available && !verified ? ( - ) : null} {verified ? ( - ) : null} - {verified ? ( - ) : null} diff --git a/src/i18n.ts b/src/i18n.ts index 7088a72..fe072e3 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -208,7 +208,7 @@ const messages: Record> = { updateDownload: "Download & verify", updateDownloading: "Downloading…", updateInstall: "Install & relaunch", - updateInstalling: "Installing\u2026 Shift restarts when it is done", + updateInstalling: "Installing\u2026", updateDiscard: "Discard", updateVerified: "SHA256 matched the manifest.", updateSigned: "Manifest signature verified against the release key.", @@ -477,7 +477,7 @@ const messages: Record> = { updateDownload: "下载并校验", updateDownloading: "下载中…", updateInstall: "安装并重启", - updateInstalling: "正在安装…完成后 Shift 会自动重启", + updateInstalling: "正在安装…", updateDiscard: "放弃", updateVerified: "SHA256 与清单一致。", updateSigned: "清单签名已用发布公钥验证通过。", diff --git a/src/styles.css b/src/styles.css index a6ca171..7205c7d 100644 --- a/src/styles.css +++ b/src/styles.css @@ -4578,10 +4578,59 @@ body[data-view="radial"] .share-backdrop { .update-actions { display: flex; align-items: center; - gap: 10px; + gap: 8px; margin-top: 12px; } +/* The two ways an update can end. They sit in a panel whose own text is 12px, so + they are sized to that rather than to the Runtime tab's 8.5px rows they were + borrowed from, and both take the same box so the pair reads as a choice + instead of a button with a stray link beside it. */ +.update-action { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 6px; + height: 30px; + padding: 0 14px; + border: 1px solid rgba(91, 55, 35, 0.14); + border-radius: 9px; + color: #5f4437; + background: rgba(255, 255, 255, 0.72); + font-size: 12px; + font-weight: 640; + cursor: pointer; + transition: + border-color 0.16s ease, + background 0.16s ease, + box-shadow 0.16s ease; +} + +.update-action:hover:not(:disabled) { + border-color: rgba(242, 106, 51, 0.26); + background: #fff; + box-shadow: 0 6px 14px rgba(96, 56, 33, 0.1); +} + +.update-action:disabled { + cursor: default; + opacity: 0.72; +} + +.update-action.is-commit { + border-color: transparent; + color: #fff8f2; + background: linear-gradient(135deg, #ff8248, #eb5427); + box-shadow: 0 6px 16px rgba(228, 83, 39, 0.24); + font-weight: 700; +} + +.update-action.is-commit:hover:not(:disabled) { + border-color: transparent; + background: linear-gradient(135deg, #ff8e59, #f05c2b); + box-shadow: 0 8px 20px rgba(228, 83, 39, 0.3); +} + /* Capture result card: the four things a screenshot raises, one click each. */ .home-segment-after { margin-top: 12px;