From fa5d541e2b6062b5323782aab5ab66fd4e10412d Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Tue, 13 Aug 2024 16:11:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 3ce2ba4..905cb59 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -175,15 +175,19 @@ const App: React.FC = () => { if (isState) { setIsState(false) window.electron.onQuit(async () => { - if (storage.getItem('isTips') === 'true') { - const setting = JSON.parse(storage.getItem('setting') as string) - if (setting.closeSetting === 'hide') { - window.electron.setViewStatus(setting.closeSetting) - } else { - window.electron.quit() - } + if (location.hash.indexOf('/login') === 1) { + window.electron.quit() } else { - quitTipsRef.current.changeModal() + if (storage.getItem('isTips') === 'true') { + const setting = JSON.parse(storage.getItem('setting') as string) + if (setting.closeSetting === 'hide') { + window.electron.setViewStatus(setting.closeSetting) + } else { + window.electron.quit() + } + } else { + quitTipsRef.current.changeModal() + } } }) }