fix(updates): make install and discard read as one decision
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.main
parent
9950607cd4
commit
22ff93a5fc
|
|
@ -190,20 +190,30 @@ export function UpdatePanel({ feedUrl, autoCheck, onAutoCheckChange, system }: P
|
|||
|
||||
<div className="update-actions">
|
||||
{available && !verified ? (
|
||||
<button className="runtime-install" onClick={() => void download()} disabled={downloading}>
|
||||
{downloading ? <LoaderCircle size={12} className="spin" /> : <Download size={12} />}
|
||||
<button
|
||||
className="update-action is-commit"
|
||||
onClick={() => void download()}
|
||||
disabled={downloading}
|
||||
>
|
||||
{downloading ? <LoaderCircle size={13} className="spin" /> : <Download size={13} />}
|
||||
{downloading ? t("updateDownloading") : t("updateDownload")}
|
||||
</button>
|
||||
) : null}
|
||||
{verified ? (
|
||||
<button className="runtime-install" onClick={() => void install()} disabled={installing}>
|
||||
{installing ? <LoaderCircle size={12} className="spin" /> : <Check size={12} />}
|
||||
<button
|
||||
className="update-action is-commit"
|
||||
onClick={() => void install()}
|
||||
disabled={installing}
|
||||
>
|
||||
{installing ? <LoaderCircle size={13} className="spin" /> : <Check size={13} />}
|
||||
{installing ? t("updateInstalling") : t("updateInstall")}
|
||||
</button>
|
||||
) : null}
|
||||
{verified ? (
|
||||
<button className="settings-link" onClick={() => void clear()}>
|
||||
<X size={12} />
|
||||
{/* An install is a countdown to this process exiting, so the row drops the
|
||||
choice that only resets what is already decided. */}
|
||||
{verified && !installing ? (
|
||||
<button className="update-action" onClick={() => void clear()}>
|
||||
<X size={13} />
|
||||
{t("updateDiscard")}
|
||||
</button>
|
||||
) : null}
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ const messages: Record<Lang, Record<string, string>> = {
|
|||
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<Lang, Record<string, string>> = {
|
|||
updateDownload: "下载并校验",
|
||||
updateDownloading: "下载中…",
|
||||
updateInstall: "安装并重启",
|
||||
updateInstalling: "正在安装…完成后 Shift 会自动重启",
|
||||
updateInstalling: "正在安装…",
|
||||
updateDiscard: "放弃",
|
||||
updateVerified: "SHA256 与清单一致。",
|
||||
updateSigned: "清单签名已用发布公钥验证通过。",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue