From a0f84fd6e364daa4db50eac2291861ffa9da80c0 Mon Sep 17 00:00:00 2001 From: mango <1711456624@qq.com> Date: Wed, 5 Aug 2026 11:29:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(about):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97=E5=85=A5?= =?UTF-8?q?=E5=8F=A3=20(#834)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.tsx | 14 +++++++++++--- frontend/src/utils/aboutUpdateActions.test.ts | 10 ++++++++++ frontend/src/utils/aboutUpdateActions.ts | 5 +++++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 frontend/src/utils/aboutUpdateActions.test.ts create mode 100644 frontend/src/utils/aboutUpdateActions.ts diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 4bcf5b75..75e75b60 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -22,6 +22,10 @@ import { isReleaseNotesRead, markReleaseNotesRead, } from './utils/updateReleaseNotesReadState'; +import { + shouldShowFooterReleaseNotesAction, + type AboutUpdateActionsSurface, +} from './utils/aboutUpdateActions'; import { type DataSyncEntryMode } from './components/dataSyncEntryMode'; import DriverManagerModal from './components/DriverManagerModal'; import LinuxCJKFontBanner from './components/LinuxCJKFontBanner'; @@ -5408,14 +5412,17 @@ function App() { ) : null ); - const renderAboutUpdateActions = (closeAction?: React.ReactNode) => [ + const renderAboutUpdateActions = ( + surface: AboutUpdateActionsSurface, + closeAction?: React.ReactNode, + ) => [ isBackgroundProgressForLatestUpdate && !isLatestUpdateDownloaded ? ( } onClick={showUpdateDownloadProgress}>{t('app.about.action.download_progress')} ) : null, lastUpdateInfo?.hasUpdate && !isLatestUpdateDownloaded && !isBackgroundProgressForLatestUpdate ? ( ) : null, - renderReleaseNotesActionButton(), + shouldShowFooterReleaseNotesAction(surface) ? renderReleaseNotesActionButton() : null, } @@ -5812,7 +5819,7 @@ function App() {