增加更新提示关闭按钮
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled

为 AGC 更新提示增加可访问的 X 关闭按钮

补充关闭按钮的 hover、禁用与布局样式
This commit is contained in:
2026-09-03 12:16:44 +00:00
parent 4cd53688e9
commit 71eb3f240d
2 changed files with 32 additions and 1 deletions
@@ -1,5 +1,5 @@
import { listen } from '@tauri-apps/api/event';
import { Download, LoaderCircle } from 'lucide-react';
import { Download, LoaderCircle, X } from 'lucide-react';
import { useEffect, useState } from 'react';
import { APP_VERSION } from '../app/appMetadata';
@@ -117,6 +117,16 @@ export function AppUpdateNotice() {
>
{isDownloading ? '正在下载…' : '下载更新'}
</button>
<button
type="button"
className="app-update-close"
onClick={dismiss}
disabled={isDownloading}
aria-label="关闭更新提示"
title="关闭"
>
<X size={18} aria-hidden="true" />
</button>
</aside>
{downloadState !== 'idle' ? (
<div
+21
View File
@@ -75,6 +75,27 @@ body {
cursor: wait;
opacity: 0.65;
}
.app-update-notice .app-update-close {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
border: 0;
border-radius: 6px;
background: transparent;
color: #8d6a58;
cursor: pointer;
}
.app-update-notice .app-update-close:hover {
background: rgb(199 101 61 / 12%);
color: #4a220f;
}
.app-update-notice .app-update-close:disabled {
cursor: wait;
opacity: 0.5;
}
.app-update-overlay {
position: fixed;