diff --git a/.github/workflows/publish-desktop.yml b/.github/workflows/publish-desktop-mac.yml similarity index 90% rename from .github/workflows/publish-desktop.yml rename to .github/workflows/publish-desktop-mac.yml index a8c1511b4..05e3a9555 100644 --- a/.github/workflows/publish-desktop.yml +++ b/.github/workflows/publish-desktop-mac.yml @@ -1,4 +1,4 @@ -name: Publish Desktop +name: Publish Mac on: push: @@ -6,7 +6,7 @@ on: - 'v*' jobs: - build: + Build: runs-on: macos-latest environment: build @@ -29,5 +29,6 @@ jobs: DP_KEY: ${{ secrets.DP_KEY }} GH_TOKEN: ${{ secrets.GH_TOKEN }} GH_REPOSITORY: ${{ github.repository }} - run: ./cmd electron all + run: | + ./cmd electron mac diff --git a/.github/workflows/publish-desktop-win.yml b/.github/workflows/publish-desktop-win.yml new file mode 100644 index 000000000..95cda98d1 --- /dev/null +++ b/.github/workflows/publish-desktop-win.yml @@ -0,0 +1,30 @@ +name: Publish Win + +on: + push: + tags: + - 'v*' + +jobs: + Build: + runs-on: windows-latest + environment: build + + if: startsWith(github.event.ref, 'refs/tags/v') + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Use Node.js 16.x + uses: actions/setup-node@v1 + with: + node-version: 16.x + + - name: Build + env: + DP_KEY: ${{ secrets.DP_KEY }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} + GH_REPOSITORY: ${{ github.repository }} + shell: bash + run: | + ./cmd electron win diff --git a/electron/build.js b/electron/build.js index ac094a32a..632f0e043 100644 --- a/electron/build.js +++ b/electron/build.js @@ -336,9 +336,11 @@ if (["dev"].includes(argv[2])) { notarize: false, } }, false, false) -} else if (["all"].includes(argv[2])) { +} else if (["all", "win", "mac"].includes(argv[2])) { // 自动编译 - platforms.forEach(platform => { + platforms.filter(p => { + return argv[2] === "all" || p.indexOf(argv[2]) !== -1 + }).forEach(platform => { config.app.forEach(data => { data.configure = { platform, diff --git a/electron/electron.js b/electron/electron.js index 7380e8b81..457ac5ae5 100644 --- a/electron/electron.js +++ b/electron/electron.js @@ -19,6 +19,7 @@ const spawn = require("child_process").spawn; const isMac = process.platform === 'darwin' const isWin = process.platform === 'win32' const allowedUrls = /^(?:https?|mailto|tel|callto):/i; +const allowedCalls = /^(?:mailto|tel|callto):/i; let enableStoreBkp = true; let dialogOpen = false; let enablePlugins = false; @@ -74,6 +75,9 @@ function createMainWindow() { const originalUA = mainWindow.webContents.session.getUserAgent() || mainWindow.webContents.getUserAgent() mainWindow.webContents.setUserAgent(originalUA + " MainTaskWindow/" + process.platform + "/" + os.arch() + "/1.0"); mainWindow.webContents.setWindowOpenHandler(({url}) => { + if (allowedCalls.test(url)) { + return {action: 'allow'} + } utils.onBeforeOpenWindow(mainWindow.webContents, url).then(() => { openExternal(url) }) @@ -184,6 +188,9 @@ function createSubWindow(args) { const originalUA = browser.webContents.session.getUserAgent() || browser.webContents.getUserAgent() browser.webContents.setUserAgent(originalUA + " SubTaskWindow/" + process.platform + "/" + os.arch() + "/1.0" + (args.userAgent ? (" " + args.userAgent) : "")); browser.webContents.setWindowOpenHandler(({url}) => { + if (allowedCalls.test(url)) { + return {action: 'allow'} + } utils.onBeforeOpenWindow(browser.webContents, url).then(() => { openExternal(url) }) @@ -361,6 +368,9 @@ function createWebWindow(args) { height: (webWindow.getContentBounds().height || 800) - webTabHeight, }) browserView.webContents.setWindowOpenHandler(({url}) => { + if (allowedCalls.test(url)) { + return {action: 'allow'} + } createWebWindow({url}) return {action: 'deny'} }) diff --git a/electron/package.json b/electron/package.json index dcd42a6ef..9bdc02ff5 100755 --- a/electron/package.json +++ b/electron/package.json @@ -32,7 +32,7 @@ "@electron-forge/maker-squirrel": "^7.3.0", "@electron-forge/maker-zip": "^7.3.0", "dotenv": "^16.3.1", - "electron": "^29.0.1", + "electron": "^29.1.0", "electron-builder": "^24.12.0", "electron-notarize": "^1.2.2", "form-data": "^4.0.0", @@ -45,7 +45,7 @@ "electron-log": "^5.1.1", "electron-screenshots-tool": "^1.1.2", "electron-squirrel-startup": "^1.0.0", - "electron-updater": "^6.1.7", + "electron-updater": "^6.1.8", "fs-extra": "^11.2.0", "pdf-lib": "^1.17.1", "request": "^2.88.2" diff --git a/package.json b/package.json index 3be04fbf0..a34ccdd14 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "css-loader": "^6.7.2", "dexie": "^3.2.3", "echarts": "^5.2.2", - "element-sea": "^2.15.10-6", + "element-sea": "^2.15.10-7", "file-loader": "^6.2.0", "highlight.js": "^11.7.0", "inquirer": "^8.2.0", @@ -49,7 +49,7 @@ "quill": "^1.3.7", "quill-mention-hi": "^3.1.0-4", "resolve-url-loader": "^4.0.0", - "sass": "~1.32.13", + "sass": "^1.71.1", "sass-loader": "^12.6.0", "stylus": "^0.59.0", "stylus-loader": "^7.1.0", diff --git a/public/site/css/download.css b/public/site/css/download.css index bf5cf4cd2..137dd874d 100644 --- a/public/site/css/download.css +++ b/public/site/css/download.css @@ -168,13 +168,15 @@ } .download-other-btn{ padding: 10px 16px; - color: var(--txt-gray-color); - opacity: .7; border-radius: 8px; margin-top: 64px; margin-bottom: 100px; } -.download-other-btn:hover{ +.download-other-btn span { + opacity: 0.7; + color: var(--txt-gray-color); +} +.download-other-btn:hover span { color: var(--txt-theme-color); opacity: 1; } diff --git a/public/site/css/log.css b/public/site/css/log.css index 46b0b9b91..b074d42b8 100644 --- a/public/site/css/log.css +++ b/public/site/css/log.css @@ -135,6 +135,11 @@ .logs-sticky{ position: sticky; top: 80px; + height: calc(100vh - 136px); +} +#help-l-ul{ + overflow-y: auto; + height: calc(100% - 36px); } .footer-layut{ border-top: var(--border-color) solid 1px; diff --git a/public/site/en/download.html b/public/site/en/download.html index d6d39e0ac..ea3446bd3 100644 --- a/public/site/en/download.html +++ b/public/site/en/download.html @@ -145,7 +145,7 @@