From 72500850c2cf54db82e9158fe4cc0baf85d05035 Mon Sep 17 00:00:00 2001 From: TrumanDu Date: Tue, 31 Dec 2024 13:40:15 +0800 Subject: [PATCH] fix close issue --- .github/workflows/publish.yml | 20 ++++++++------------ package.json | 2 +- release/app/package-lock.json | 4 ++-- release/app/package.json | 2 +- src/main/dashboard.ts | 6 ++---- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f68d358..a0b7223 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,11 +7,15 @@ on: jobs: publish: - runs-on: ${{ matrix.os }} - strategy: matrix: - os: [macos-latest] + include: + - os: macos-latest + platform: mac + - os: windows-latest + platform: win + + runs-on: ${{ matrix.os }} steps: - name: Checkout git repo @@ -30,13 +34,5 @@ jobs: - name: Publish releases env: - # The APPLE_* values are used for auto updates signing - # APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASS }} - # APPLE_ID: ${{ secrets.APPLE_ID }} - # APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - # CSC_LINK: ${{ secrets.CSC_LINK }} - # CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} - # This is used for uploading release assets to github GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - npm exec electron-builder -- --publish always --win --mac --linux + run: npm exec electron-builder -- --publish always --${{ matrix.platform }} diff --git a/package.json b/package.json index 1c5dc82..8ab7a2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Toolkit", - "version": "0.1.2", + "version": "0.1.3", "description": "A toolkit for scalable desktop apps", "keywords": [ "electron", diff --git a/release/app/package-lock.json b/release/app/package-lock.json index 550669c..5970196 100644 --- a/release/app/package-lock.json +++ b/release/app/package-lock.json @@ -1,12 +1,12 @@ { "name": "Toolkit", - "version": "0.1.2", + "version": "0.1.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "Toolkit", - "version": "0.1.2", + "version": "0.1.3", "hasInstallScript": true, "license": "MIT" } diff --git a/release/app/package.json b/release/app/package.json index 766f5d3..04d181d 100644 --- a/release/app/package.json +++ b/release/app/package.json @@ -1,6 +1,6 @@ { "name": "Toolkit", - "version": "0.1.2", + "version": "0.1.3", "description": "A toolkit for scalable desktop apps", "license": "MIT", "author": { diff --git a/src/main/dashboard.ts b/src/main/dashboard.ts index 44d8ea1..70ef53b 100644 --- a/src/main/dashboard.ts +++ b/src/main/dashboard.ts @@ -31,10 +31,8 @@ const createDashboardWindow = async () => { newDashboardWindow.loadURL(resolveHtmlPath('dashboard.html')); newDashboardWindow.on('close', (event) => { - if (process.platform === 'darwin') { - event.preventDefault(); - newDashboardWindow?.hide(); - } + newDashboardWindow.hide(); + event.preventDefault(); }); // 当窗口准备好时,最大化窗口