From b615c1971a752e2a040c8049556da252ea9de3dd Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Fri, 23 Aug 2024 17:00:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7&=E9=80=80=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 8 ++--- src/page/Login/index.module.scss | 60 ++------------------------------ src/page/Login/index.tsx | 16 +++------ 3 files changed, 12 insertions(+), 72 deletions(-) diff --git a/main.js b/main.js index 74518f8..03ad5de 100644 --- a/main.js +++ b/main.js @@ -82,14 +82,14 @@ function createTray() { // icon: iconPath, }, { - label: '退出', click: async () => { - await mainWindow.webContents.send('onQuit'); + label: '最小化到系统托盘', click: () => { + mainWindow.hide(); }, // icon: iconPath, }, { - label: '最小化到系统托盘', click: () => { - mainWindow.hide(); + label: '退出', click: async () => { + quit() }, // icon: iconPath, }, diff --git a/src/page/Login/index.module.scss b/src/page/Login/index.module.scss index 3d92f32..4a220f3 100644 --- a/src/page/Login/index.module.scss +++ b/src/page/Login/index.module.scss @@ -67,63 +67,9 @@ @else if $i ==3 { flex-shrink: 0; - - .footer { - display: flex; - align-items: center; - - >div { - flex-grow: 1; - height: 1px; - background-color: #3F3F3F; - } - - >span { - flex-shrink: 0; - margin: 0 4px; - color: #7A7A7A; - font-size: 12px; - } - } - - .code { - display: flex; - align-items: center; - margin-top: 34px; - - @for $i from 1 through 2 { - >div:nth-child(#{$i}) { - @if $i ==1 { - flex-grow: 1; - } - - @else if $i ==2 { - - flex-shrink: 0; - cursor: pointer; - height: 44px; - line-height: 44px; - display: flex; - justify-content: center; - align-items: center; - background-color: #3A1457; - box-shadow: none; - border-radius: 10px; - width: 56px; - margin-left: 4px; - transition: 0.3s; - - &:hover { - background-color: lighten(#3A1457, 5%) !important; - } - - &:active { - background-color: darken(#3A1457, 5%) !important; - } - } - } - } - } + color: #ccc; + text-align: right; + font-size: 16px; } } } diff --git a/src/page/Login/index.tsx b/src/page/Login/index.tsx index 79dfb86..d1c1915 100644 --- a/src/page/Login/index.tsx +++ b/src/page/Login/index.tsx @@ -11,6 +11,7 @@ import { startSignalr } from '@/utils/package/signalr'; const Login: React.FC = () => { const navigate = useNavigate(); const [accountPasswordStatus, setAccountPasswordStatus] = useState(false); + const [version, setVersion] = useState('') const [operation, setOperation] = useState<{ isRememberPassword: boolean; isAutoLogin: boolean; @@ -61,6 +62,9 @@ const Login: React.FC = () => { }) } } + window.electron.getVersion().then(res => { + setVersion(res) + }) }, []); // 退出 @@ -222,17 +226,7 @@ const Login: React.FC = () => {
- {/*
-
- or -
-
*/} - {/*
-
- -
-
-
*/} + 版本号:{version}