This commit is contained in:
Vanessa 2023-02-14 09:57:29 +08:00
parent 08b8f16caa
commit 75526007d7
3 changed files with 22 additions and 12 deletions

View file

@ -50,7 +50,7 @@
"@babel/preset-env": "^7.18.6", "@babel/preset-env": "^7.18.6",
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@simonwep/pickr": "^1.8.2", "@simonwep/pickr": "^1.8.2",
"@types/node": "^17.0.45", "@types/node": "^18.13.0",
"@typescript-eslint/eslint-plugin": "^5.30.6", "@typescript-eslint/eslint-plugin": "^5.30.6",
"@typescript-eslint/parser": "^5.30.6", "@typescript-eslint/parser": "^5.30.6",
"babel-loader": "^8.2.5", "babel-loader": "^8.2.5",

22
app/pnpm-lock.yaml generated
View file

@ -7,7 +7,7 @@ specifiers:
'@babel/runtime': ^7.18.6 '@babel/runtime': ^7.18.6
'@electron/remote': ^2.0.9 '@electron/remote': ^2.0.9
'@simonwep/pickr': ^1.8.2 '@simonwep/pickr': ^1.8.2
'@types/node': ^17.0.45 '@types/node': ^18.13.0
'@typescript-eslint/eslint-plugin': ^5.30.6 '@typescript-eslint/eslint-plugin': ^5.30.6
'@typescript-eslint/parser': ^5.30.6 '@typescript-eslint/parser': ^5.30.6
babel-loader: ^8.2.5 babel-loader: ^8.2.5
@ -47,7 +47,7 @@ devDependencies:
'@babel/preset-env': 7.18.6_@babel+core@7.18.6 '@babel/preset-env': 7.18.6_@babel+core@7.18.6
'@babel/runtime': 7.18.6 '@babel/runtime': 7.18.6
'@simonwep/pickr': 1.8.2 '@simonwep/pickr': 1.8.2
'@types/node': 17.0.45 '@types/node': 18.13.0
'@typescript-eslint/eslint-plugin': 5.30.6_2vt5mtrqleafs33qg2bhpmbaqm '@typescript-eslint/eslint-plugin': 5.30.6_2vt5mtrqleafs33qg2bhpmbaqm
'@typescript-eslint/parser': 5.30.6_4x5o4skxv6sl53vpwefgt23khm '@typescript-eslint/parser': 5.30.6_4x5o4skxv6sl53vpwefgt23khm
babel-loader: 8.2.5_fswvdo7jykdwhfxrdcvghfn6pa babel-loader: 8.2.5_fswvdo7jykdwhfxrdcvghfn6pa
@ -1465,14 +1465,14 @@ packages:
/@types/fs-extra/9.0.13: /@types/fs-extra/9.0.13:
resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==}
dependencies: dependencies:
'@types/node': 17.0.45 '@types/node': 18.13.0
dev: true dev: true
/@types/glob/7.2.0: /@types/glob/7.2.0:
resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==}
dependencies: dependencies:
'@types/minimatch': 3.0.5 '@types/minimatch': 3.0.5
'@types/node': 17.0.45 '@types/node': 18.13.0
dev: true dev: true
/@types/html-minifier-terser/6.1.0: /@types/html-minifier-terser/6.1.0:
@ -1486,7 +1486,7 @@ packages:
/@types/keyv/3.1.4: /@types/keyv/3.1.4:
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
dependencies: dependencies:
'@types/node': 17.0.45 '@types/node': 18.13.0
/@types/minimatch/3.0.5: /@types/minimatch/3.0.5:
resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==}
@ -1499,14 +1499,14 @@ packages:
/@types/node/16.11.43: /@types/node/16.11.43:
resolution: {integrity: sha512-GqWykok+3uocgfAJM8imbozrqLnPyTrpFlrryURQlw1EesPUCx5XxTiucWDSFF9/NUEXDuD4bnvHm8xfVGWTpQ==} resolution: {integrity: sha512-GqWykok+3uocgfAJM8imbozrqLnPyTrpFlrryURQlw1EesPUCx5XxTiucWDSFF9/NUEXDuD4bnvHm8xfVGWTpQ==}
/@types/node/17.0.45: /@types/node/18.13.0:
resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} resolution: {integrity: sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==}
/@types/plist/3.0.2: /@types/plist/3.0.2:
resolution: {integrity: sha512-ULqvZNGMv0zRFvqn8/4LSPtnmN4MfhlPNtJCTpKuIIxGVGZ2rYWzFXrvEBoh9CVyqSE7D6YFRJ1hydLHI6kbWw==} resolution: {integrity: sha512-ULqvZNGMv0zRFvqn8/4LSPtnmN4MfhlPNtJCTpKuIIxGVGZ2rYWzFXrvEBoh9CVyqSE7D6YFRJ1hydLHI6kbWw==}
requiresBuild: true requiresBuild: true
dependencies: dependencies:
'@types/node': 17.0.45 '@types/node': 18.13.0
xmlbuilder: 15.1.1 xmlbuilder: 15.1.1
dev: true dev: true
optional: true optional: true
@ -1514,7 +1514,7 @@ packages:
/@types/responselike/1.0.0: /@types/responselike/1.0.0:
resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==}
dependencies: dependencies:
'@types/node': 17.0.45 '@types/node': 18.13.0
/@types/verror/1.10.5: /@types/verror/1.10.5:
resolution: {integrity: sha512-9UjMCHK5GPgQRoNbqdLIAvAy0EInuiqbW0PBMtVP6B5B2HQJlvoJHM+KodPZMEjOa5VkSc+5LH7xy+cUzQdmHw==} resolution: {integrity: sha512-9UjMCHK5GPgQRoNbqdLIAvAy0EInuiqbW0PBMtVP6B5B2HQJlvoJHM+KodPZMEjOa5VkSc+5LH7xy+cUzQdmHw==}
@ -1536,7 +1536,7 @@ packages:
resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==}
requiresBuild: true requiresBuild: true
dependencies: dependencies:
'@types/node': 17.0.45 '@types/node': 18.13.0
optional: true optional: true
/@typescript-eslint/eslint-plugin/5.30.6_2vt5mtrqleafs33qg2bhpmbaqm: /@typescript-eslint/eslint-plugin/5.30.6_2vt5mtrqleafs33qg2bhpmbaqm:
@ -3733,7 +3733,7 @@ packages:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'} engines: {node: '>= 10.13.0'}
dependencies: dependencies:
'@types/node': 17.0.45 '@types/node': 18.13.0
merge-stream: 2.0.0 merge-stream: 2.0.0
supports-color: 8.1.1 supports-color: 8.1.1
dev: true dev: true

View file

@ -25,6 +25,7 @@ import {hasClosestByTag} from "../protyle/util/hasClosest";
import {deleteFiles} from "../editor/deleteFile"; import {deleteFiles} from "../editor/deleteFile";
import {getDockByType} from "../layout/util"; import {getDockByType} from "../layout/util";
import {Files} from "../layout/dock/Files"; import {Files} from "../layout/dock/Files";
import {openNewWindowById} from "../window/openNewWindow";
const initMultiMenu = (selectItemElements: NodeListOf<Element>) => { const initMultiMenu = (selectItemElements: NodeListOf<Element>) => {
const fileItemElement = Array.from(selectItemElements).find(item => { const fileItemElement = Array.from(selectItemElements).find(item => {
@ -342,6 +343,15 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement:
} }
}); });
} }
/// #if !BROWSER
openSubmenus.push({
label: window.siyuan.languages.openByNewWindow,
icon: "iconOpenWindow",
click() {
openNewWindowById(id);
}
})
/// #endif
openSubmenus.push({type: "separator"}); openSubmenus.push({type: "separator"});
openSubmenus.push({ openSubmenus.push({
icon: "iconPreview", icon: "iconPreview",