mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
Merge commit '76570e2f1b72de50cb54c36229447eea69c59940' into pro
This commit is contained in:
commit
47832ececb
@ -1,4 +1,4 @@
|
|||||||
name: Publish Desktop
|
name: Publish Mac
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -6,7 +6,7 @@ on:
|
|||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
Build:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
environment: build
|
environment: build
|
||||||
|
|
||||||
@ -29,5 +29,6 @@ jobs:
|
|||||||
DP_KEY: ${{ secrets.DP_KEY }}
|
DP_KEY: ${{ secrets.DP_KEY }}
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
GH_REPOSITORY: ${{ github.repository }}
|
GH_REPOSITORY: ${{ github.repository }}
|
||||||
run: ./cmd electron all
|
run: |
|
||||||
|
./cmd electron mac
|
||||||
|
|
||||||
30
.github/workflows/publish-desktop-win.yml
vendored
Normal file
30
.github/workflows/publish-desktop-win.yml
vendored
Normal file
@ -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
|
||||||
6
electron/build.js
vendored
6
electron/build.js
vendored
@ -336,9 +336,11 @@ if (["dev"].includes(argv[2])) {
|
|||||||
notarize: false,
|
notarize: false,
|
||||||
}
|
}
|
||||||
}, false, 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 => {
|
config.app.forEach(data => {
|
||||||
data.configure = {
|
data.configure = {
|
||||||
platform,
|
platform,
|
||||||
|
|||||||
10
electron/electron.js
vendored
10
electron/electron.js
vendored
@ -19,6 +19,7 @@ const spawn = require("child_process").spawn;
|
|||||||
const isMac = process.platform === 'darwin'
|
const isMac = process.platform === 'darwin'
|
||||||
const isWin = process.platform === 'win32'
|
const isWin = process.platform === 'win32'
|
||||||
const allowedUrls = /^(?:https?|mailto|tel|callto):/i;
|
const allowedUrls = /^(?:https?|mailto|tel|callto):/i;
|
||||||
|
const allowedCalls = /^(?:mailto|tel|callto):/i;
|
||||||
let enableStoreBkp = true;
|
let enableStoreBkp = true;
|
||||||
let dialogOpen = false;
|
let dialogOpen = false;
|
||||||
let enablePlugins = false;
|
let enablePlugins = false;
|
||||||
@ -74,6 +75,9 @@ function createMainWindow() {
|
|||||||
const originalUA = mainWindow.webContents.session.getUserAgent() || mainWindow.webContents.getUserAgent()
|
const originalUA = mainWindow.webContents.session.getUserAgent() || mainWindow.webContents.getUserAgent()
|
||||||
mainWindow.webContents.setUserAgent(originalUA + " MainTaskWindow/" + process.platform + "/" + os.arch() + "/1.0");
|
mainWindow.webContents.setUserAgent(originalUA + " MainTaskWindow/" + process.platform + "/" + os.arch() + "/1.0");
|
||||||
mainWindow.webContents.setWindowOpenHandler(({url}) => {
|
mainWindow.webContents.setWindowOpenHandler(({url}) => {
|
||||||
|
if (allowedCalls.test(url)) {
|
||||||
|
return {action: 'allow'}
|
||||||
|
}
|
||||||
utils.onBeforeOpenWindow(mainWindow.webContents, url).then(() => {
|
utils.onBeforeOpenWindow(mainWindow.webContents, url).then(() => {
|
||||||
openExternal(url)
|
openExternal(url)
|
||||||
})
|
})
|
||||||
@ -184,6 +188,9 @@ function createSubWindow(args) {
|
|||||||
const originalUA = browser.webContents.session.getUserAgent() || browser.webContents.getUserAgent()
|
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.setUserAgent(originalUA + " SubTaskWindow/" + process.platform + "/" + os.arch() + "/1.0" + (args.userAgent ? (" " + args.userAgent) : ""));
|
||||||
browser.webContents.setWindowOpenHandler(({url}) => {
|
browser.webContents.setWindowOpenHandler(({url}) => {
|
||||||
|
if (allowedCalls.test(url)) {
|
||||||
|
return {action: 'allow'}
|
||||||
|
}
|
||||||
utils.onBeforeOpenWindow(browser.webContents, url).then(() => {
|
utils.onBeforeOpenWindow(browser.webContents, url).then(() => {
|
||||||
openExternal(url)
|
openExternal(url)
|
||||||
})
|
})
|
||||||
@ -361,6 +368,9 @@ function createWebWindow(args) {
|
|||||||
height: (webWindow.getContentBounds().height || 800) - webTabHeight,
|
height: (webWindow.getContentBounds().height || 800) - webTabHeight,
|
||||||
})
|
})
|
||||||
browserView.webContents.setWindowOpenHandler(({url}) => {
|
browserView.webContents.setWindowOpenHandler(({url}) => {
|
||||||
|
if (allowedCalls.test(url)) {
|
||||||
|
return {action: 'allow'}
|
||||||
|
}
|
||||||
createWebWindow({url})
|
createWebWindow({url})
|
||||||
return {action: 'deny'}
|
return {action: 'deny'}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
"@electron-forge/maker-squirrel": "^7.3.0",
|
"@electron-forge/maker-squirrel": "^7.3.0",
|
||||||
"@electron-forge/maker-zip": "^7.3.0",
|
"@electron-forge/maker-zip": "^7.3.0",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"electron": "^29.0.1",
|
"electron": "^29.1.0",
|
||||||
"electron-builder": "^24.12.0",
|
"electron-builder": "^24.12.0",
|
||||||
"electron-notarize": "^1.2.2",
|
"electron-notarize": "^1.2.2",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
@ -45,7 +45,7 @@
|
|||||||
"electron-log": "^5.1.1",
|
"electron-log": "^5.1.1",
|
||||||
"electron-screenshots-tool": "^1.1.2",
|
"electron-screenshots-tool": "^1.1.2",
|
||||||
"electron-squirrel-startup": "^1.0.0",
|
"electron-squirrel-startup": "^1.0.0",
|
||||||
"electron-updater": "^6.1.7",
|
"electron-updater": "^6.1.8",
|
||||||
"fs-extra": "^11.2.0",
|
"fs-extra": "^11.2.0",
|
||||||
"pdf-lib": "^1.17.1",
|
"pdf-lib": "^1.17.1",
|
||||||
"request": "^2.88.2"
|
"request": "^2.88.2"
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
"css-loader": "^6.7.2",
|
"css-loader": "^6.7.2",
|
||||||
"dexie": "^3.2.3",
|
"dexie": "^3.2.3",
|
||||||
"echarts": "^5.2.2",
|
"echarts": "^5.2.2",
|
||||||
"element-sea": "^2.15.10-6",
|
"element-sea": "^2.15.10-7",
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"highlight.js": "^11.7.0",
|
"highlight.js": "^11.7.0",
|
||||||
"inquirer": "^8.2.0",
|
"inquirer": "^8.2.0",
|
||||||
@ -49,7 +49,7 @@
|
|||||||
"quill": "^1.3.7",
|
"quill": "^1.3.7",
|
||||||
"quill-mention-hi": "^3.1.0-4",
|
"quill-mention-hi": "^3.1.0-4",
|
||||||
"resolve-url-loader": "^4.0.0",
|
"resolve-url-loader": "^4.0.0",
|
||||||
"sass": "~1.32.13",
|
"sass": "^1.71.1",
|
||||||
"sass-loader": "^12.6.0",
|
"sass-loader": "^12.6.0",
|
||||||
"stylus": "^0.59.0",
|
"stylus": "^0.59.0",
|
||||||
"stylus-loader": "^7.1.0",
|
"stylus-loader": "^7.1.0",
|
||||||
|
|||||||
8
public/site/css/download.css
vendored
8
public/site/css/download.css
vendored
@ -168,13 +168,15 @@
|
|||||||
}
|
}
|
||||||
.download-other-btn{
|
.download-other-btn{
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
color: var(--txt-gray-color);
|
|
||||||
opacity: .7;
|
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-top: 64px;
|
margin-top: 64px;
|
||||||
margin-bottom: 100px;
|
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);
|
color: var(--txt-theme-color);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
5
public/site/css/log.css
vendored
5
public/site/css/log.css
vendored
@ -135,6 +135,11 @@
|
|||||||
.logs-sticky{
|
.logs-sticky{
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 80px;
|
top: 80px;
|
||||||
|
height: calc(100vh - 136px);
|
||||||
|
}
|
||||||
|
#help-l-ul{
|
||||||
|
overflow-y: auto;
|
||||||
|
height: calc(100% - 36px);
|
||||||
}
|
}
|
||||||
.footer-layut{
|
.footer-layut{
|
||||||
border-top: var(--border-color) solid 1px;
|
border-top: var(--border-color) solid 1px;
|
||||||
|
|||||||
@ -145,7 +145,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a class="download-other-btn" href="https://www.dootask.com/desktop/publish/latest" target="_blank">Other Versions</a>
|
<a class="download-other-btn dow-animate-box" style="--delay: 0.5s;" href="https://www.dootask.com/desktop/publish/latest" target="_blank"><span>Other Versions</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -2440,6 +2440,18 @@
|
|||||||
"[data-id='" + `section-${i}` + "']"
|
"[data-id='" + `section-${i}` + "']"
|
||||||
);
|
);
|
||||||
elementsWithDataId[0]?.classList?.add("active");
|
elementsWithDataId[0]?.classList?.add("active");
|
||||||
|
//滚动设置
|
||||||
|
const liHight = elementsWithDataId[0]?.offsetTop;
|
||||||
|
const pHihtt = elementsWithDataId[0]?.parentNode.parentNode.offsetHeight;
|
||||||
|
const ulElement = document.getElementById('help-l-ul'); // 替换为你的 <div> 元素的 id
|
||||||
|
const scrollHeight = ulElement.scrollTop;
|
||||||
|
const ulHeight = ulElement.offsetHeight;
|
||||||
|
if (liHight > scrollHeight + ulHeight) {
|
||||||
|
ulElement.scrollTop += (pHihtt + 24);
|
||||||
|
}
|
||||||
|
if (liHight < scrollHeight) {
|
||||||
|
ulElement.scrollTop -= (pHihtt + 24);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -511,6 +511,18 @@ function scrollHandler(){
|
|||||||
rm()
|
rm()
|
||||||
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
|
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
|
||||||
elementsWithDataId[1]?.classList?.add("active");
|
elementsWithDataId[1]?.classList?.add("active");
|
||||||
|
//滚动设置
|
||||||
|
const liHight = elementsWithDataId[1]?.offsetTop;
|
||||||
|
const pHihtt = elementsWithDataId[1]?.offsetHeight;
|
||||||
|
const ulElement = document.getElementById('help-l-ul'); // 替换为你的 <div> 元素的 id
|
||||||
|
const scrollHeight = ulElement.scrollTop;
|
||||||
|
const ulHeight = ulElement.offsetHeight;
|
||||||
|
if (liHight > scrollHeight + ulHeight) {
|
||||||
|
ulElement.scrollTop += (pHihtt + pHihtt);
|
||||||
|
}
|
||||||
|
if (liHight < scrollHeight) {
|
||||||
|
ulElement.scrollTop -= (pHihtt + pHihtt);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -145,7 +145,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a class="download-other-btn" href="https://www.dootask.com/desktop/publish/latest" target="_blank">其他版本</a>
|
<a class="download-other-btn dow-animate-box" style="--delay: 0.5s;" href="https://www.dootask.com/desktop/publish/latest" target="_blank"><span>其他版本</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -816,6 +816,18 @@ function scrollHandler(){
|
|||||||
if (arrOffsetTop[i] > window.scrollY){
|
if (arrOffsetTop[i] > window.scrollY){
|
||||||
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
|
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
|
||||||
elementsWithDataId[0]?.classList?.add("active");
|
elementsWithDataId[0]?.classList?.add("active");
|
||||||
|
//滚动设置
|
||||||
|
const liHight = elementsWithDataId[0]?.offsetTop;
|
||||||
|
const pHihtt = elementsWithDataId[0]?.parentNode.parentNode.offsetHeight;
|
||||||
|
const ulElement = document.getElementById('help-l-ul'); // 替换为你的 <div> 元素的 id
|
||||||
|
const scrollHeight = ulElement.scrollTop;
|
||||||
|
const ulHeight = ulElement.offsetHeight;
|
||||||
|
if (liHight > scrollHeight + ulHeight) {
|
||||||
|
ulElement.scrollTop += (pHihtt + 24);
|
||||||
|
}
|
||||||
|
if (liHight < scrollHeight) {
|
||||||
|
ulElement.scrollTop -= (pHihtt + 24);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -509,6 +509,18 @@ function scrollHandler(){
|
|||||||
rm()
|
rm()
|
||||||
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
|
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
|
||||||
elementsWithDataId[1]?.classList?.add("active");
|
elementsWithDataId[1]?.classList?.add("active");
|
||||||
|
//滚动设置
|
||||||
|
const liHight = elementsWithDataId[1]?.offsetTop;
|
||||||
|
const pHihtt = elementsWithDataId[1]?.offsetHeight;
|
||||||
|
const ulElement = document.getElementById('help-l-ul'); // 替换为你的 <div> 元素的 id
|
||||||
|
const scrollHeight = ulElement.scrollTop;
|
||||||
|
const ulHeight = ulElement.offsetHeight;
|
||||||
|
if (liHight > scrollHeight + ulHeight) {
|
||||||
|
ulElement.scrollTop += (pHihtt + pHihtt);
|
||||||
|
}
|
||||||
|
if (liHight < scrollHeight) {
|
||||||
|
ulElement.scrollTop -= (pHihtt + pHihtt);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user