mirror of
https://github.com/fanchenio/DawnLauncher.git
synced 2025-09-14 13:56:46 +08:00
Compare commits
94 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5800cbbdaa | ||
![]() |
56517f059c | ||
![]() |
342d8939ab | ||
![]() |
92270def83 | ||
![]() |
881fbc9f56 | ||
![]() |
2cd721263e | ||
![]() |
ea851c652c | ||
![]() |
9243140d3b | ||
![]() |
36b77ce32b | ||
![]() |
d51a5404ee | ||
![]() |
018bd91931 | ||
![]() |
d4520eef0c | ||
![]() |
0c2ae8ae5b | ||
![]() |
07912ea276 | ||
![]() |
bebe8272cf | ||
![]() |
4e3947ab7e | ||
![]() |
5c791874c6 | ||
![]() |
a2ccd8670b | ||
![]() |
78cf39bec7 | ||
![]() |
62a1780197 | ||
![]() |
dd3cf64f5d | ||
![]() |
ed77cc4fb4 | ||
![]() |
0327dfc0cc | ||
![]() |
0ad813a315 | ||
![]() |
2ba01403a5 | ||
![]() |
f365005bd8 | ||
![]() |
3ffbd110dc | ||
![]() |
7ec78fef08 | ||
![]() |
b9ac69cf22 | ||
![]() |
c23e4f51f0 | ||
![]() |
a411674e3a | ||
![]() |
e1f896e963 | ||
![]() |
8228495918 | ||
![]() |
bcc5ad1989 | ||
![]() |
dd06149fb4 | ||
![]() |
0cb66ffaa5 | ||
![]() |
6386518171 | ||
![]() |
49124e7eeb | ||
![]() |
ac96cfd6be | ||
![]() |
950cff7a6c | ||
![]() |
f0eeea8483 | ||
![]() |
8c17275169 | ||
![]() |
6f04f8ccbd | ||
![]() |
8c6de3fdc2 | ||
![]() |
c170df8691 | ||
![]() |
2d82702efe | ||
![]() |
acb9231915 | ||
![]() |
fac3bda8f4 | ||
![]() |
333f0888be | ||
![]() |
a94d5a2244 | ||
![]() |
27a32c7eed | ||
![]() |
2cdefb513a | ||
![]() |
c9593f379f | ||
![]() |
df499a0517 | ||
![]() |
4048f4a230 | ||
![]() |
7c866f57b4 | ||
![]() |
e7ce285ae9 | ||
![]() |
d117397dc3 | ||
![]() |
6b71805274 | ||
![]() |
480f88d558 | ||
![]() |
37a62c1cb5 | ||
![]() |
fb0ce7d3ca | ||
![]() |
467f33bc99 | ||
![]() |
28f3ed000f | ||
![]() |
235f964198 | ||
![]() |
52847f8629 | ||
![]() |
a11913c785 | ||
![]() |
c683d0f167 | ||
![]() |
8a0d1ea08a | ||
![]() |
d655198b1d | ||
![]() |
607ff84af9 | ||
![]() |
ac9c8c834f | ||
![]() |
af25b93004 | ||
![]() |
90fdc9b8ac | ||
![]() |
ace6f282d0 | ||
![]() |
64007a12e9 | ||
![]() |
ee94f20392 | ||
![]() |
ca43708a22 | ||
![]() |
c73a2b3709 | ||
![]() |
90594e7f21 | ||
![]() |
5167e0c084 | ||
![]() |
88b5fa8a15 | ||
![]() |
da4a19f81a | ||
![]() |
87ab4e3060 | ||
![]() |
e6289d0344 | ||
![]() |
ffd7c1d8df | ||
![]() |
f40cab0107 | ||
![]() |
26ae2093e3 | ||
![]() |
dfe16dd36c | ||
![]() |
d6894662ea | ||
![]() |
f556343883 | ||
![]() |
82f5fe8cfe | ||
![]() |
1d1edb95e7 | ||
![]() |
da23211600 |
18
.vscode/c_cpp_properties.json
vendored
Normal file
18
.vscode/c_cpp_properties.json
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "windows-gcc-x64",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**"
|
||||||
|
],
|
||||||
|
"compilerPath": "gcc",
|
||||||
|
"cStandard": "${default}",
|
||||||
|
"cppStandard": "${default}",
|
||||||
|
"intelliSenseMode": "windows-gcc-x64",
|
||||||
|
"compilerArgs": [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
23
.vscode/launch.json
vendored
23
.vscode/launch.json
vendored
@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"compounds": [
|
"compounds": [
|
||||||
{
|
{
|
||||||
@ -45,9 +42,27 @@
|
|||||||
"<node_internals>/**",
|
"<node_internals>/**",
|
||||||
"${workspaceRoot}/node_modules/**",
|
"${workspaceRoot}/node_modules/**",
|
||||||
"${workspaceRoot}/dist-electron/**",
|
"${workspaceRoot}/dist-electron/**",
|
||||||
// Skip files in host(VITE_DEV_SERVER_URL)
|
|
||||||
"http://127.0.0.1:3344/**"
|
"http://127.0.0.1:3344/**"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "C/C++ Runner: Debug Session",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [],
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": true,
|
||||||
|
"cwd": "d:/GITHUB-DAWN-LAUNCHER/DawnLauncher",
|
||||||
|
"program": "d:/GITHUB-DAWN-LAUNCHER/DawnLauncher/build/Debug/outDebug",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"miDebuggerPath": "gdb",
|
||||||
|
"setupCommands": [
|
||||||
|
{
|
||||||
|
"description": "Enable pretty-printing for gdb",
|
||||||
|
"text": "-enable-pretty-printing",
|
||||||
|
"ignoreFailures": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
59
.vscode/settings.json
vendored
59
.vscode/settings.json
vendored
@ -9,5 +9,62 @@
|
|||||||
],
|
],
|
||||||
"url": "https://json.schemastore.org/electron-builder"
|
"url": "https://json.schemastore.org/electron-builder"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"C_Cpp_Runner.msvcBatchPath": "",
|
||||||
|
"C_Cpp_Runner.cCompilerPath": "gcc",
|
||||||
|
"C_Cpp_Runner.cppCompilerPath": "g++",
|
||||||
|
"C_Cpp_Runner.debuggerPath": "gdb",
|
||||||
|
"C_Cpp_Runner.cStandard": "",
|
||||||
|
"C_Cpp_Runner.cppStandard": "",
|
||||||
|
"C_Cpp_Runner.useMsvc": false,
|
||||||
|
"C_Cpp_Runner.warnings": [
|
||||||
|
"-Wall",
|
||||||
|
"-Wextra",
|
||||||
|
"-Wpedantic",
|
||||||
|
"-Wshadow",
|
||||||
|
"-Wformat=2",
|
||||||
|
"-Wcast-align",
|
||||||
|
"-Wconversion",
|
||||||
|
"-Wsign-conversion",
|
||||||
|
"-Wnull-dereference"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.msvcWarnings": [
|
||||||
|
"/W4",
|
||||||
|
"/permissive-",
|
||||||
|
"/w14242",
|
||||||
|
"/w14287",
|
||||||
|
"/w14296",
|
||||||
|
"/w14311",
|
||||||
|
"/w14826",
|
||||||
|
"/w44062",
|
||||||
|
"/w44242",
|
||||||
|
"/w14905",
|
||||||
|
"/w14906",
|
||||||
|
"/w14263",
|
||||||
|
"/w44265",
|
||||||
|
"/w14928"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.enableWarnings": true,
|
||||||
|
"C_Cpp_Runner.warningsAsError": false,
|
||||||
|
"C_Cpp_Runner.compilerArgs": [],
|
||||||
|
"C_Cpp_Runner.linkerArgs": [],
|
||||||
|
"C_Cpp_Runner.includePaths": [],
|
||||||
|
"C_Cpp_Runner.includeSearch": [
|
||||||
|
"*",
|
||||||
|
"**/*"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.excludeSearch": [
|
||||||
|
"**/build",
|
||||||
|
"**/build/**",
|
||||||
|
"**/.*",
|
||||||
|
"**/.*/**",
|
||||||
|
"**/.vscode",
|
||||||
|
"**/.vscode/**"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.useAddressSanitizer": false,
|
||||||
|
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
||||||
|
"C_Cpp_Runner.useLeakSanitizer": false,
|
||||||
|
"C_Cpp_Runner.showCompilationTime": false,
|
||||||
|
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
||||||
|
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
||||||
}
|
}
|
@ -1,9 +1,5 @@
|
|||||||
# [简体中文](https://github.com/fanchenio/DawnLauncher) | English
|
# [简体中文](https://github.com/fanchenio/DawnLauncher) | English
|
||||||
|
|
||||||
# Update
|
|
||||||
|
|
||||||
After disappearing for more than three months, I refactored the `Dawn Launcher` code. Because I had no experience in developing `NodeJS` and `Electron` at the beginning, `Vue` was not well written, and the code was a bit sloppy, so I carried out Code refactoring, the new version uses `Electron26 + Vite + Vue3 + TS`, the UI framework uses `Naive`, regarding the native API, I switched from `C++` to `Rust`, and the database switched from `electron-store` With `SQLite3`, the language has also added `English`.
|
|
||||||
|
|
||||||
# Dawn Launcher
|
# Dawn Launcher
|
||||||
|
|
||||||
The `Windows` quick launch tool helps you organize your messy desktop, manage your desktop shortcuts by category, and keep your desktop clean and tidy.
|
The `Windows` quick launch tool helps you organize your messy desktop, manage your desktop shortcuts by category, and keep your desktop clean and tidy.
|
||||||
@ -12,7 +8,7 @@ Supports associated folders (real-time synchronization of folder contents), quic
|
|||||||
|
|
||||||
# Technology Stack
|
# Technology Stack
|
||||||
|
|
||||||
`Electron + Vite + Vue3 + TS`
|
`Electron + Vite + Vue3 + TS + Rust`
|
||||||
|
|
||||||
# Support Platform
|
# Support Platform
|
||||||
|
|
||||||
@ -31,14 +27,6 @@ Supports associated folders (real-time synchronization of folder contents), quic
|
|||||||
|
|
||||||
[dawnlauncher.com](https://dawnlauncher.com/)
|
[dawnlauncher.com](https://dawnlauncher.com/)
|
||||||
|
|
||||||
# Donate(Wechat)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
# Donate(Alipay)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
|
|
||||||

|

|
||||||
@ -71,6 +59,10 @@ Supports associated folders (real-time synchronization of folder contents), quic
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
# License
|
## Stargazers over time
|
||||||
|
|
||||||
|
[](https://starchart.cc/fanchenio/DawnLauncher)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
MIT License
|
MIT License
|
||||||
|
20
README.md
20
README.md
@ -1,9 +1,5 @@
|
|||||||
# 简体中文 | [English](https://github.com/fanchenio/DawnLauncher/blob/main/README-ENGLISH.md)
|
# 简体中文 | [English](https://github.com/fanchenio/DawnLauncher/blob/main/README-ENGLISH.md)
|
||||||
|
|
||||||
# 更新
|
|
||||||
|
|
||||||
消失了三个多月,我将`Dawn Launcher`代码进行重构,因为一开始没有开发`NodeJS`和`Electron`的经验,`Vue`也写的不好,代码写的有些潦草,所以进行了代码重构,新版使用了`Electron26 + Vite + Vue3 + TS`,UI 框架使用了`Naive`,关于原生 API 方面,我从`C++`切换到了 `Rust`,数据库从`electron-store`切换到了`SQLite3`,语言也新增了`英语`。
|
|
||||||
|
|
||||||
# Dawn Launcher
|
# Dawn Launcher
|
||||||
|
|
||||||
`Windows`快捷启动工具,帮助您整理杂乱无章的桌面,分门别类管理您的桌面快捷方式,让您的桌面保持干净整洁。
|
`Windows`快捷启动工具,帮助您整理杂乱无章的桌面,分门别类管理您的桌面快捷方式,让您的桌面保持干净整洁。
|
||||||
@ -12,7 +8,7 @@
|
|||||||
|
|
||||||
# 技术栈
|
# 技术栈
|
||||||
|
|
||||||
`Electron + Vite + Vue3 + TS`
|
`Electron + Vite + Vue3 + TS + Rust`
|
||||||
|
|
||||||
# 支持平台
|
# 支持平台
|
||||||
|
|
||||||
@ -35,14 +31,6 @@
|
|||||||
|
|
||||||
369652112
|
369652112
|
||||||
|
|
||||||
# 捐赠(微信)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
# 捐赠(支付宝)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
# 界面
|
# 界面
|
||||||
|
|
||||||

|

|
||||||
@ -75,6 +63,10 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
# License
|
## Stargazers over time
|
||||||
|
|
||||||
|
[](https://starchart.cc/fanchenio/DawnLauncher)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
MIT License
|
MIT License
|
||||||
|
@ -5,8 +5,8 @@ let simplifiedChinese = {
|
|||||||
address: "地址",
|
address: "地址",
|
||||||
aggregateClassification: "聚合分类",
|
aggregateClassification: "聚合分类",
|
||||||
aggregateClassificationPrompt1:
|
aggregateClassificationPrompt1:
|
||||||
"聚合分类可以将所有分类下的项目聚合到一起,按照设定的排序方式、项目数量进行排序和显示。",
|
"聚合分类会将所有分类下项目聚合到一起,按照设定的排序方式、项目数量进行显示。",
|
||||||
aggregateClassificationPrompt2: "当前分类为父级分类,不能设置聚合分类。",
|
aggregateClassificationPrompt2: "当前分类是父级分类,不能设置为聚合分类。",
|
||||||
aggregateClassificationPrompt3:
|
aggregateClassificationPrompt3:
|
||||||
"当前设置排序为按打开次数,需开启设置-项目-记录打开次数。",
|
"当前设置排序为按打开次数,需开启设置-项目-记录打开次数。",
|
||||||
aggregateClassificationPrompt4:
|
aggregateClassificationPrompt4:
|
||||||
@ -22,7 +22,7 @@ let simplifiedChinese = {
|
|||||||
associateFolderPrompt1:
|
associateFolderPrompt1:
|
||||||
"关联文件夹可以实时监控指定文件夹内的变化并同步到对应分类中。",
|
"关联文件夹可以实时监控指定文件夹内的变化并同步到对应分类中。",
|
||||||
associateFolderPrompt2: "需要隐藏的文件/文件夹名称,多个按英文逗号分割",
|
associateFolderPrompt2: "需要隐藏的文件/文件夹名称,多个按英文逗号分割",
|
||||||
associateFolderPrompt3: "当前分类为父级分类,不能设置关联文件夹。",
|
associateFolderPrompt3: "当前分类是父级分类,不能设置为关联文件夹。",
|
||||||
associateFolderPrompt4: "目标路径不存在。",
|
associateFolderPrompt4: "目标路径不存在。",
|
||||||
associateFolderPrompt5: "目标路径必须是文件夹。",
|
associateFolderPrompt5: "目标路径必须是文件夹。",
|
||||||
associateFolderPrompt6:
|
associateFolderPrompt6:
|
||||||
@ -33,15 +33,14 @@ let simplifiedChinese = {
|
|||||||
backgroundIcon: "背景图标",
|
backgroundIcon: "背景图标",
|
||||||
backgroundImage: "背景图",
|
backgroundImage: "背景图",
|
||||||
backgroundImageMode: "背景图模式",
|
backgroundImageMode: "背景图模式",
|
||||||
backgroundImagePostion: "背景图定位",
|
backgroundImagePosition: "背景图定位",
|
||||||
backgroundImageTransparent: "背景图透明",
|
backgroundImageTransparency: "背景图透明度",
|
||||||
backgroundTransparent: "背景透明",
|
|
||||||
backup: "备份",
|
backup: "备份",
|
||||||
backupRestoreData: "备份/还原数据",
|
backupRestoreData: "备份/还原数据",
|
||||||
backupRestoreDataPrompt:
|
backupRestoreDataPrompt:
|
||||||
"如果要还原1.2.3及之前版本的备份数据,请在还原时选择导入JSON格式的文件。",
|
"如果要还原 1.2.3 及之前版本的数据,请在还原时选择导入 JSON 格式的文件。",
|
||||||
batchConvertAbsolutePath: "转为绝对路径",
|
batchConvertAbsolutePath: "批量转为绝对路径",
|
||||||
batchConvertRelativePath: "转为相对路径",
|
batchConvertRelativePath: "批量转为相对路径",
|
||||||
batchCopyTo: "批量复制到",
|
batchCopyTo: "批量复制到",
|
||||||
batchDelete: "批量删除",
|
batchDelete: "批量删除",
|
||||||
batchDeletePrompt: "是否批量删除项目?",
|
batchDeletePrompt: "是否批量删除项目?",
|
||||||
@ -52,7 +51,7 @@ let simplifiedChinese = {
|
|||||||
bottom: "底部",
|
bottom: "底部",
|
||||||
byInitialLetter: "按首字母",
|
byInitialLetter: "按首字母",
|
||||||
byLastOpen: "按最后打开",
|
byLastOpen: "按最后打开",
|
||||||
byOpenNumber: "按打开次数",
|
byOpenCount: "按打开次数",
|
||||||
calculator: "计算器",
|
calculator: "计算器",
|
||||||
cancel: "取消",
|
cancel: "取消",
|
||||||
cancelBatchOperation: "取消批量操作",
|
cancelBatchOperation: "取消批量操作",
|
||||||
@ -70,16 +69,20 @@ let simplifiedChinese = {
|
|||||||
colonKeywordSpace: "冒号 + 关键字 + 空格",
|
colonKeywordSpace: "冒号 + 关键字 + 空格",
|
||||||
color: "颜色",
|
color: "颜色",
|
||||||
columnNumber: "列数",
|
columnNumber: "列数",
|
||||||
|
commandLine: "命令行",
|
||||||
|
commandLinePrompt1: '在"快速搜索"或"搜索"中使用"> + 空格"进入命令行模式。',
|
||||||
commandPrompt: "命令提示符",
|
commandPrompt: "命令提示符",
|
||||||
computer: "计算机",
|
computer: "计算机",
|
||||||
computerManagement: "计算机管理",
|
computerManagement: "计算机管理",
|
||||||
controlPanel: "控制面板",
|
controlPanel: "控制面板",
|
||||||
convertAbsolutePath: "转为绝对路径",
|
convertAbsolutePath: "转为绝对路径",
|
||||||
convertRelativePath: "转为相对路径",
|
convertRelativePath: "转为相对路径",
|
||||||
|
copy: "复制",
|
||||||
copyFullPath: "复制完整路径",
|
copyFullPath: "复制完整路径",
|
||||||
copyTo: "复制到",
|
copyTo: "复制到",
|
||||||
createShortcut: "创建快捷方式",
|
createShortcut: "创建快捷方式",
|
||||||
ctrlNumberKey: "Ctrl + 数字键",
|
ctrlNumberKey: "Ctrl + 数字键",
|
||||||
|
cut: "剪切",
|
||||||
default: "默认",
|
default: "默认",
|
||||||
defaultIcon: "默认图标",
|
defaultIcon: "默认图标",
|
||||||
delayDisplay: "延迟显示",
|
delayDisplay: "延迟显示",
|
||||||
@ -88,9 +91,10 @@ let simplifiedChinese = {
|
|||||||
deleteClassificationPrompt: "是否删除当前分类?",
|
deleteClassificationPrompt: "是否删除当前分类?",
|
||||||
deleteIcon: "删除图标",
|
deleteIcon: "删除图标",
|
||||||
deleteItemPrompt: "是否删除当前项目?",
|
deleteItemPrompt: "是否删除当前项目?",
|
||||||
|
deleteHistory: "删除历史记录",
|
||||||
description: "描述",
|
description: "描述",
|
||||||
display: "显示",
|
display: "显示",
|
||||||
displayMainWindow: "显示主界面",
|
displayMainInterface: "显示主界面",
|
||||||
documents: "文档",
|
documents: "文档",
|
||||||
doubleClickOpen: "双击打开",
|
doubleClickOpen: "双击打开",
|
||||||
doubleClickTaskbar: "双击任务栏",
|
doubleClickTaskbar: "双击任务栏",
|
||||||
@ -105,6 +109,7 @@ let simplifiedChinese = {
|
|||||||
editSubclassification: "编辑子分类",
|
editSubclassification: "编辑子分类",
|
||||||
emptyRecycleBin: "清空回收站",
|
emptyRecycleBin: "清空回收站",
|
||||||
enable: "启用",
|
enable: "启用",
|
||||||
|
enableQuickSearch: "启用快速搜索",
|
||||||
english: "英语",
|
english: "英语",
|
||||||
excludeSearch: "排除搜索",
|
excludeSearch: "排除搜索",
|
||||||
exit: "退出",
|
exit: "退出",
|
||||||
@ -132,10 +137,12 @@ let simplifiedChinese = {
|
|||||||
globalShortcutKey: "全局快捷键",
|
globalShortcutKey: "全局快捷键",
|
||||||
hiddenItems: "隐藏项",
|
hiddenItems: "隐藏项",
|
||||||
hideEllipses: "隐藏省略号",
|
hideEllipses: "隐藏省略号",
|
||||||
hideLoseFocus: "失去焦点后隐藏",
|
hideLoseFocus: "失去焦点隐藏",
|
||||||
hideName: "隐藏名称",
|
hideName: "隐藏名称",
|
||||||
hideTray: "隐藏托盘图标",
|
hideTray: "隐藏托盘图标",
|
||||||
hideWindowCollapseSubClassification: "隐藏窗口时收起子分类",
|
hideTaskbar: "隐藏任务栏",
|
||||||
|
hideWindowCollapseSubClassification: "隐藏窗口收起子分类",
|
||||||
|
hideWindowAfterOpen: "打开后隐藏窗口",
|
||||||
history: "历史记录",
|
history: "历史记录",
|
||||||
hover: "悬停",
|
hover: "悬停",
|
||||||
icon: "图标",
|
icon: "图标",
|
||||||
@ -175,7 +182,7 @@ let simplifiedChinese = {
|
|||||||
name: "名称",
|
name: "名称",
|
||||||
network: "网络",
|
network: "网络",
|
||||||
networkIcon: "网络图标",
|
networkIcon: "网络图标",
|
||||||
networkIconPrompt1: "支持JPG/JPEG/GIF/PNG/ICO/SVG/WEBP格式图片。",
|
networkIconPrompt1: "支持 JPG/JPEG/GIF/PNG/ICO/SVG/WEBP 格式图片。",
|
||||||
networkShareCenter: "网络和共享中心",
|
networkShareCenter: "网络和共享中心",
|
||||||
newClassification: "新建分类",
|
newClassification: "新建分类",
|
||||||
newClassificationName: "新分类",
|
newClassificationName: "新分类",
|
||||||
@ -186,29 +193,32 @@ let simplifiedChinese = {
|
|||||||
normal: "普通",
|
normal: "普通",
|
||||||
notDisturb: "勿扰模式",
|
notDisturb: "勿扰模式",
|
||||||
notDisturbPrompt:
|
notDisturbPrompt:
|
||||||
"开启勿扰模式后,计算机在游戏、应用全屏模式下不会弹出Dawn Launcher窗口。",
|
"开启勿扰模式后,计算机在游戏、应用全屏模式下不会弹出 Dawn Launcher 窗口。",
|
||||||
notFoundFile: "找不到指定的文件",
|
notFoundFile: "找不到指定的文件",
|
||||||
notFoundFolder: "找不到指定的文件夹",
|
notFoundFolder: "找不到指定的文件夹",
|
||||||
|
notTransparent: "不透明",
|
||||||
number: "数量",
|
number: "数量",
|
||||||
numberKey: "数字键",
|
numberKey: "数字键",
|
||||||
officialWebsite: "官方网站",
|
officialWebsite: "官方网站",
|
||||||
ok: "确定",
|
ok: "确定",
|
||||||
open: "打开",
|
open: "打开",
|
||||||
openAfterHideMainInterface: "打开后隐藏主界面",
|
|
||||||
openAfterHideQuickSearchWindow: "打开后隐藏窗口",
|
|
||||||
openFileLocation: "打开文件所在位置",
|
openFileLocation: "打开文件所在位置",
|
||||||
openNow: "仅剩一项时立即打开",
|
openNow: "仅剩一项立即打开",
|
||||||
openNumber: "打开次数",
|
openCount: "打开次数",
|
||||||
parameters: "参数",
|
parameters: "参数",
|
||||||
password: "密码",
|
password: "密码",
|
||||||
pasteIcon: "粘贴图标",
|
pasteIcon: "粘贴图标",
|
||||||
|
paste: "粘贴",
|
||||||
|
path: "路径",
|
||||||
powerOptions: "电源选项",
|
powerOptions: "电源选项",
|
||||||
|
powerShell: "PowerShell",
|
||||||
programsFeatures: "程序和功能",
|
programsFeatures: "程序和功能",
|
||||||
proxy: "代理",
|
proxy: "代理",
|
||||||
proxyPrompt:
|
proxyPrompt:
|
||||||
"仅支持HTTP代理,填写“地址”时需要带通信协议和端口,例如:http://127.0.0.1:7890,如果没有用户名和密码,为空即可。",
|
'仅支持 HTTP 代理,填写"地址"时需要带通信协议和端口,例如:http://127.0.0.1:7890,如果没有用户名和密码,为空即可。',
|
||||||
|
prompt: "提示",
|
||||||
quickSearch: "快速搜索",
|
quickSearch: "快速搜索",
|
||||||
recordOpenNumber: "记录打开次数",
|
recordOpenCount: "记录打开次数",
|
||||||
recycleBin: "回收站",
|
recycleBin: "回收站",
|
||||||
refreshIcon: "刷新图标",
|
refreshIcon: "刷新图标",
|
||||||
registryEditor: "注册表编辑器",
|
registryEditor: "注册表编辑器",
|
||||||
@ -219,7 +229,6 @@ let simplifiedChinese = {
|
|||||||
restart: "重启",
|
restart: "重启",
|
||||||
restore: "还原",
|
restore: "还原",
|
||||||
restoreDataPrompt: "还原数据失败。",
|
restoreDataPrompt: "还原数据失败。",
|
||||||
rewardSponsor: "打赏&赞助",
|
|
||||||
right: "右侧",
|
right: "右侧",
|
||||||
roundedCorners: "圆角",
|
roundedCorners: "圆角",
|
||||||
runAsAdministrator: "以管理员身份运行",
|
runAsAdministrator: "以管理员身份运行",
|
||||||
@ -254,6 +263,7 @@ let simplifiedChinese = {
|
|||||||
showHide: "显示/隐藏",
|
showHide: "显示/隐藏",
|
||||||
showOnlyFiles: "只显示文件",
|
showOnlyFiles: "只显示文件",
|
||||||
showOnlyFolders: "只显示文件夹",
|
showOnlyFolders: "只显示文件夹",
|
||||||
|
showPath: "显示路径",
|
||||||
shutdown: "关机",
|
shutdown: "关机",
|
||||||
simplifiedChinese: "简体中文",
|
simplifiedChinese: "简体中文",
|
||||||
size: "尺寸",
|
size: "尺寸",
|
||||||
@ -266,10 +276,9 @@ let simplifiedChinese = {
|
|||||||
startupTray: "启动后最小化到系统托盘",
|
startupTray: "启动后最小化到系统托盘",
|
||||||
subclassification: "子分类",
|
subclassification: "子分类",
|
||||||
svgIcon: "SVG图标",
|
svgIcon: "SVG图标",
|
||||||
svgIconPrompt1: "输入SVG代码后,需要先点击“校验代码”按钮。",
|
svgIconPrompt1: '输入 SVG 代码后,需要先点击"校验代码"按钮。',
|
||||||
switch: "切换",
|
switch: "切换",
|
||||||
switchClassificationCollapseOtherSubClassification:
|
switchClassificationCollapseOtherSubClassification: "切换分类收起其他子分类",
|
||||||
"切换分类时收起其他子分类",
|
|
||||||
switchEnglish: "显示窗口时将输入法切换为英文模式",
|
switchEnglish: "显示窗口时将输入法切换为英文模式",
|
||||||
system: "系统",
|
system: "系统",
|
||||||
target: "目标",
|
target: "目标",
|
||||||
@ -280,14 +289,14 @@ let simplifiedChinese = {
|
|||||||
title: "标题",
|
title: "标题",
|
||||||
top: "顶部",
|
top: "顶部",
|
||||||
traditionalChinese: "繁体中文",
|
traditionalChinese: "繁体中文",
|
||||||
|
transparent: "透明",
|
||||||
turnOffMonitor: "关闭显示器",
|
turnOffMonitor: "关闭显示器",
|
||||||
unlockClassification: "解锁分类",
|
unlockClassification: "解锁分类",
|
||||||
unlockItem: "解锁项目",
|
unlockItem: "解锁项目",
|
||||||
uploadIcon: "上传图标",
|
uploadIcon: "上传图标",
|
||||||
url: "网址",
|
url: "网址",
|
||||||
useItemOpen: "从程序外拖动文件到项目图标上时用此项目打开文件",
|
useItemOpen: "从程序外拖动文件到项目图标上用此项目打开文件",
|
||||||
useProxy: "使用代理",
|
useProxy: "使用代理",
|
||||||
useQuickSearch: "使用快速搜索",
|
|
||||||
username: "用户名",
|
username: "用户名",
|
||||||
update: "更新",
|
update: "更新",
|
||||||
webSearch: "网络搜索",
|
webSearch: "网络搜索",
|
||||||
@ -296,6 +305,7 @@ let simplifiedChinese = {
|
|||||||
webSearchModePrompt2: "{w}为搜索关键字。",
|
webSearchModePrompt2: "{w}为搜索关键字。",
|
||||||
width: "宽度",
|
width: "宽度",
|
||||||
window: "窗口",
|
window: "窗口",
|
||||||
|
windowTransparency: "窗口透明度",
|
||||||
zoom: "缩放",
|
zoom: "缩放",
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -305,8 +315,8 @@ let traditionalChinese = {
|
|||||||
address: "地址",
|
address: "地址",
|
||||||
aggregateClassification: "聚合分類",
|
aggregateClassification: "聚合分類",
|
||||||
aggregateClassificationPrompt1:
|
aggregateClassificationPrompt1:
|
||||||
"聚合分類可以將所有分類下的項目聚合到一起,按照設定的排序方式、項目數量進行排序和顯示。",
|
"聚合分類會將所有分類下項目聚合到一起,按照設定的排序方式、項目數量進行顯示。",
|
||||||
aggregateClassificationPrompt2: "當前分類為父級分類,不能設置聚合分類。",
|
aggregateClassificationPrompt2: "當前分類是父級分類,不能設置為聚合分類。",
|
||||||
aggregateClassificationPrompt3:
|
aggregateClassificationPrompt3:
|
||||||
"當前設置排序為按打開次數,需開啟設置-項目-記錄打開次數。",
|
"當前設置排序為按打開次數,需開啟設置-項目-記錄打開次數。",
|
||||||
aggregateClassificationPrompt4:
|
aggregateClassificationPrompt4:
|
||||||
@ -322,7 +332,7 @@ let traditionalChinese = {
|
|||||||
associateFolderPrompt1:
|
associateFolderPrompt1:
|
||||||
"關聯文件夾可以實時監控指定文件夾內的變化並同步到對應分類中。",
|
"關聯文件夾可以實時監控指定文件夾內的變化並同步到對應分類中。",
|
||||||
associateFolderPrompt2: "需要隱藏的文件/文件夾名稱,多個按英文逗號分割",
|
associateFolderPrompt2: "需要隱藏的文件/文件夾名稱,多個按英文逗號分割",
|
||||||
associateFolderPrompt3: "當前分類為父級分類,不能設置關聯文件夾。",
|
associateFolderPrompt3: "當前分類是父級分類,不能設置為關聯文件夾。",
|
||||||
associateFolderPrompt4: "目標路徑不存在。",
|
associateFolderPrompt4: "目標路徑不存在。",
|
||||||
associateFolderPrompt5: "目標路徑必須是文件夾。",
|
associateFolderPrompt5: "目標路徑必須是文件夾。",
|
||||||
associateFolderPrompt6:
|
associateFolderPrompt6:
|
||||||
@ -333,15 +343,14 @@ let traditionalChinese = {
|
|||||||
backgroundIcon: "背景圖標",
|
backgroundIcon: "背景圖標",
|
||||||
backgroundImage: "背景圖",
|
backgroundImage: "背景圖",
|
||||||
backgroundImageMode: "背景圖模式",
|
backgroundImageMode: "背景圖模式",
|
||||||
backgroundImagePostion: "背景圖定位",
|
backgroundImagePosition: "背景圖定位",
|
||||||
backgroundImageTransparent: "背景圖透明",
|
backgroundImageTransparency: "背景圖透明度",
|
||||||
backgroundTransparent: "背景透明",
|
|
||||||
backup: "備份",
|
backup: "備份",
|
||||||
backupRestoreData: "備份/還原數據",
|
backupRestoreData: "備份/還原數據",
|
||||||
backupRestoreDataPrompt:
|
backupRestoreDataPrompt:
|
||||||
"如果要還原1.2.3及之前版本的備份數據,請在還原時選擇導入JSON格式的文件。",
|
"如果要還原 1.2.3 及之前版本的數據,請在還原時選擇導入 JSON 格式的文件。",
|
||||||
batchConvertAbsolutePath: "轉為絕對路徑",
|
batchConvertAbsolutePath: "批量轉為絕對路徑",
|
||||||
batchConvertRelativePath: "轉為相對路徑",
|
batchConvertRelativePath: "批量轉為相對路徑",
|
||||||
batchCopyTo: "批量復製到",
|
batchCopyTo: "批量復製到",
|
||||||
batchDelete: "批量刪除",
|
batchDelete: "批量刪除",
|
||||||
batchDeletePrompt: "是否批量刪除項目?",
|
batchDeletePrompt: "是否批量刪除項目?",
|
||||||
@ -352,7 +361,7 @@ let traditionalChinese = {
|
|||||||
bottom: "底部",
|
bottom: "底部",
|
||||||
byInitialLetter: "按首字母",
|
byInitialLetter: "按首字母",
|
||||||
byLastOpen: "按最後打開",
|
byLastOpen: "按最後打開",
|
||||||
byOpenNumber: "按打開次數",
|
byOpenCount: "按打開次數",
|
||||||
calculator: "計算器",
|
calculator: "計算器",
|
||||||
cancel: "取消",
|
cancel: "取消",
|
||||||
cancelBatchOperation: "取消批量操作",
|
cancelBatchOperation: "取消批量操作",
|
||||||
@ -370,16 +379,20 @@ let traditionalChinese = {
|
|||||||
colonKeywordSpace: "冒號 + 關鍵字 + 空格",
|
colonKeywordSpace: "冒號 + 關鍵字 + 空格",
|
||||||
color: "顏色",
|
color: "顏色",
|
||||||
columnNumber: "列數",
|
columnNumber: "列數",
|
||||||
|
commandLine: "命令行",
|
||||||
|
commandLinePrompt1: '在"快速搜索"或"搜索"中使用"> + 空格"進入命令行模式。',
|
||||||
commandPrompt: "命令提示符",
|
commandPrompt: "命令提示符",
|
||||||
computer: "計算機",
|
computer: "計算機",
|
||||||
computerManagement: "計算機管理",
|
computerManagement: "計算機管理",
|
||||||
controlPanel: "控製面板",
|
controlPanel: "控製面板",
|
||||||
convertAbsolutePath: "轉為絕對路徑",
|
convertAbsolutePath: "轉為絕對路徑",
|
||||||
convertRelativePath: "轉為相對路徑",
|
convertRelativePath: "轉為相對路徑",
|
||||||
|
copy: "復製",
|
||||||
copyFullPath: "復製完整路徑",
|
copyFullPath: "復製完整路徑",
|
||||||
copyTo: "復製到",
|
copyTo: "復製到",
|
||||||
createShortcut: "創建快捷方式",
|
createShortcut: "創建快捷方式",
|
||||||
ctrlNumberKey: "Ctrl + 數字鍵",
|
ctrlNumberKey: "Ctrl + 數字鍵",
|
||||||
|
cut: "剪切",
|
||||||
default: "默認",
|
default: "默認",
|
||||||
defaultIcon: "默認圖標",
|
defaultIcon: "默認圖標",
|
||||||
delayDisplay: "延遲顯示",
|
delayDisplay: "延遲顯示",
|
||||||
@ -388,9 +401,10 @@ let traditionalChinese = {
|
|||||||
deleteClassificationPrompt: "是否刪除當前分類?",
|
deleteClassificationPrompt: "是否刪除當前分類?",
|
||||||
deleteIcon: "刪除圖標",
|
deleteIcon: "刪除圖標",
|
||||||
deleteItemPrompt: "是否刪除當前項目?",
|
deleteItemPrompt: "是否刪除當前項目?",
|
||||||
|
deleteHistory: "刪除歷史記錄",
|
||||||
description: "描述",
|
description: "描述",
|
||||||
display: "顯示",
|
display: "顯示",
|
||||||
displayMainWindow: "顯示主界面",
|
displayMainInterface: "顯示主界面",
|
||||||
documents: "文檔",
|
documents: "文檔",
|
||||||
doubleClickOpen: "雙擊打開",
|
doubleClickOpen: "雙擊打開",
|
||||||
doubleClickTaskbar: "雙擊任務欄",
|
doubleClickTaskbar: "雙擊任務欄",
|
||||||
@ -405,6 +419,7 @@ let traditionalChinese = {
|
|||||||
editSubclassification: "編輯子分類",
|
editSubclassification: "編輯子分類",
|
||||||
emptyRecycleBin: "清空回收站",
|
emptyRecycleBin: "清空回收站",
|
||||||
enable: "啟用",
|
enable: "啟用",
|
||||||
|
enableQuickSearch: "啟用快速搜索",
|
||||||
english: "英語",
|
english: "英語",
|
||||||
excludeSearch: "排除搜索",
|
excludeSearch: "排除搜索",
|
||||||
exit: "退出",
|
exit: "退出",
|
||||||
@ -432,10 +447,12 @@ let traditionalChinese = {
|
|||||||
globalShortcutKey: "全局快捷鍵",
|
globalShortcutKey: "全局快捷鍵",
|
||||||
hiddenItems: "隱藏項",
|
hiddenItems: "隱藏項",
|
||||||
hideEllipses: "隱藏省略號",
|
hideEllipses: "隱藏省略號",
|
||||||
hideLoseFocus: "失去焦點後隱藏",
|
hideLoseFocus: "失去焦點隱藏",
|
||||||
hideName: "隱藏名稱",
|
hideName: "隱藏名稱",
|
||||||
hideTray: "隱藏托盤圖標",
|
hideTray: "隱藏托盤圖標",
|
||||||
hideWindowCollapseSubClassification: "隱藏窗口時收起子分類",
|
hideTaskbar: "隱藏任務欄",
|
||||||
|
hideWindowCollapseSubClassification: "隱藏窗口收起子分類",
|
||||||
|
hideWindowAfterOpen: "打開後隱藏窗口",
|
||||||
history: "歷史記錄",
|
history: "歷史記錄",
|
||||||
hover: "懸停",
|
hover: "懸停",
|
||||||
icon: "圖標",
|
icon: "圖標",
|
||||||
@ -475,7 +492,7 @@ let traditionalChinese = {
|
|||||||
name: "名稱",
|
name: "名稱",
|
||||||
network: "網絡",
|
network: "網絡",
|
||||||
networkIcon: "網絡圖標",
|
networkIcon: "網絡圖標",
|
||||||
networkIconPrompt1: "支持JPG/JPEG/GIF/PNG/ICO/SVG/WEBP格式圖片。",
|
networkIconPrompt1: "支持 JPG/JPEG/GIF/PNG/ICO/SVG/WEBP 格式圖片。",
|
||||||
networkShareCenter: "網絡和共享中心",
|
networkShareCenter: "網絡和共享中心",
|
||||||
newClassification: "新建分類",
|
newClassification: "新建分類",
|
||||||
newClassificationName: "新分類",
|
newClassificationName: "新分類",
|
||||||
@ -486,29 +503,32 @@ let traditionalChinese = {
|
|||||||
normal: "普通",
|
normal: "普通",
|
||||||
notDisturb: "勿擾模式",
|
notDisturb: "勿擾模式",
|
||||||
notDisturbPrompt:
|
notDisturbPrompt:
|
||||||
"開啟勿擾模式後,計算機在遊戲、應用全屏模式下不會彈出Dawn Launcher窗口。",
|
"開啟勿擾模式後,計算機在遊戲、應用全屏模式下不會彈出 Dawn Launcher 窗口。",
|
||||||
notFoundFile: "找不到指定的文件",
|
notFoundFile: "找不到指定的文件",
|
||||||
notFoundFolder: "找不到指定的文件夾",
|
notFoundFolder: "找不到指定的文件夾",
|
||||||
|
notTransparent: "不透明",
|
||||||
number: "數量",
|
number: "數量",
|
||||||
numberKey: "數字鍵",
|
numberKey: "數字鍵",
|
||||||
officialWebsite: "官方網站",
|
officialWebsite: "官方網站",
|
||||||
ok: "確定",
|
ok: "確定",
|
||||||
open: "打開",
|
open: "打開",
|
||||||
openAfterHideMainInterface: "打開後隱藏主界面",
|
|
||||||
openAfterHideQuickSearchWindow: "打開後隱藏窗口",
|
|
||||||
openFileLocation: "打開文件所在位置",
|
openFileLocation: "打開文件所在位置",
|
||||||
openNow: "僅剩一項時立即打開",
|
openNow: "僅剩一項立即打開",
|
||||||
openNumber: "打開次數",
|
openCount: "打開次數",
|
||||||
parameters: "參數",
|
parameters: "參數",
|
||||||
password: "密碼",
|
password: "密碼",
|
||||||
pasteIcon: "粘貼圖標",
|
pasteIcon: "粘貼圖標",
|
||||||
|
paste: "粘貼",
|
||||||
|
path: "路徑",
|
||||||
powerOptions: "電源選項",
|
powerOptions: "電源選項",
|
||||||
|
powerShell: "PowerShell",
|
||||||
programsFeatures: "程序和功能",
|
programsFeatures: "程序和功能",
|
||||||
proxy: "代理",
|
proxy: "代理",
|
||||||
proxyPrompt:
|
proxyPrompt:
|
||||||
"僅支持HTTP代理,填寫「地址」時需要帶通信協議和端口,例如:http://127.0.0.1:7890,如果沒有用戶名和密碼,為空即可。",
|
'僅支持 HTTP 代理,填寫"地址"時需要帶通信協議和端口,例如:http://127.0.0.1:7890,如果沒有用戶名和密碼,為空即可。',
|
||||||
|
prompt: "提示",
|
||||||
quickSearch: "快速搜索",
|
quickSearch: "快速搜索",
|
||||||
recordOpenNumber: "記錄打開次數",
|
recordOpenCount: "記錄打開次數",
|
||||||
recycleBin: "回收站",
|
recycleBin: "回收站",
|
||||||
refreshIcon: "刷新圖標",
|
refreshIcon: "刷新圖標",
|
||||||
registryEditor: "註冊表編輯器",
|
registryEditor: "註冊表編輯器",
|
||||||
@ -519,7 +539,6 @@ let traditionalChinese = {
|
|||||||
restart: "重啟",
|
restart: "重啟",
|
||||||
restore: "還原",
|
restore: "還原",
|
||||||
restoreDataPrompt: "還原數據失敗。",
|
restoreDataPrompt: "還原數據失敗。",
|
||||||
rewardSponsor: "打賞&贊助",
|
|
||||||
right: "右側",
|
right: "右側",
|
||||||
roundedCorners: "圓角",
|
roundedCorners: "圓角",
|
||||||
runAsAdministrator: "以管理員身份運行",
|
runAsAdministrator: "以管理員身份運行",
|
||||||
@ -554,6 +573,7 @@ let traditionalChinese = {
|
|||||||
showHide: "顯示/隱藏",
|
showHide: "顯示/隱藏",
|
||||||
showOnlyFiles: "只顯示文件",
|
showOnlyFiles: "只顯示文件",
|
||||||
showOnlyFolders: "只顯示文件夾",
|
showOnlyFolders: "只顯示文件夾",
|
||||||
|
showPath: "顯示路徑",
|
||||||
shutdown: "關機",
|
shutdown: "關機",
|
||||||
simplifiedChinese: "簡體中文",
|
simplifiedChinese: "簡體中文",
|
||||||
size: "尺寸",
|
size: "尺寸",
|
||||||
@ -566,10 +586,9 @@ let traditionalChinese = {
|
|||||||
startupTray: "啟動後最小化到系統托盤",
|
startupTray: "啟動後最小化到系統托盤",
|
||||||
subclassification: "子分類",
|
subclassification: "子分類",
|
||||||
svgIcon: "SVG圖標",
|
svgIcon: "SVG圖標",
|
||||||
svgIconPrompt1: "輸入SVG代碼後,需要先點擊「校驗代碼」按鈕。",
|
svgIconPrompt1: '輸入 SVG 代碼後,需要先點擊"校驗代碼"按鈕。',
|
||||||
switch: "切換",
|
switch: "切換",
|
||||||
switchClassificationCollapseOtherSubClassification:
|
switchClassificationCollapseOtherSubClassification: "切換分類收起其他子分類",
|
||||||
"切換分類時收起其他子分類",
|
|
||||||
switchEnglish: "顯示窗口時將輸入法切換為英文模式",
|
switchEnglish: "顯示窗口時將輸入法切換為英文模式",
|
||||||
system: "系統",
|
system: "系統",
|
||||||
target: "目標",
|
target: "目標",
|
||||||
@ -580,14 +599,14 @@ let traditionalChinese = {
|
|||||||
title: "標題",
|
title: "標題",
|
||||||
top: "頂部",
|
top: "頂部",
|
||||||
traditionalChinese: "繁體中文",
|
traditionalChinese: "繁體中文",
|
||||||
|
transparent: "透明",
|
||||||
turnOffMonitor: "關閉顯示器",
|
turnOffMonitor: "關閉顯示器",
|
||||||
unlockClassification: "解鎖分類",
|
unlockClassification: "解鎖分類",
|
||||||
unlockItem: "解鎖項目",
|
unlockItem: "解鎖項目",
|
||||||
uploadIcon: "上傳圖標",
|
uploadIcon: "上傳圖標",
|
||||||
url: "網址",
|
url: "網址",
|
||||||
useItemOpen: "從程序外拖動文件到項目圖標上時用此項目打開文件",
|
useItemOpen: "從程序外拖動文件到項目圖標上用此項目打開文件",
|
||||||
useProxy: "使用代理",
|
useProxy: "使用代理",
|
||||||
useQuickSearch: "使用快速搜索",
|
|
||||||
username: "用戶名",
|
username: "用戶名",
|
||||||
update: "更新",
|
update: "更新",
|
||||||
webSearch: "網絡搜索",
|
webSearch: "網絡搜索",
|
||||||
@ -596,6 +615,7 @@ let traditionalChinese = {
|
|||||||
webSearchModePrompt2: "{w}為搜索關鍵字。",
|
webSearchModePrompt2: "{w}為搜索關鍵字。",
|
||||||
width: "寬度",
|
width: "寬度",
|
||||||
window: "窗口",
|
window: "窗口",
|
||||||
|
windowTransparency: "窗口透明度",
|
||||||
zoom: "縮放",
|
zoom: "縮放",
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -606,44 +626,44 @@ let english = {
|
|||||||
address: "Address",
|
address: "Address",
|
||||||
aggregateClassification: "Aggregate Classification",
|
aggregateClassification: "Aggregate Classification",
|
||||||
aggregateClassificationPrompt1:
|
aggregateClassificationPrompt1:
|
||||||
"Aggregation classification can aggregate items under all categories together, sort and display them according to the set sorting method and number of items.",
|
"Aggregate classification will combine items from all classifications and display them according to the set sorting order and item count.",
|
||||||
aggregateClassificationPrompt2:
|
aggregateClassificationPrompt2:
|
||||||
"The current classification is the parent classification, and aggregate classification cannot be set.",
|
"The current classification is a parent classification and cannot be set as an aggregate classification.",
|
||||||
aggregateClassificationPrompt3:
|
aggregateClassificationPrompt3:
|
||||||
"The current settings are sorted by the number of opens. You need to enable Settings-Item-Open Count the number of opens.",
|
"The current sorting is set to by open count. You need to enable Settings - Item - Record open count.",
|
||||||
aggregateClassificationPrompt4:
|
aggregateClassificationPrompt4:
|
||||||
"Setting an aggregation classification will clear all items under the original classification. Please operate with caution. Are you sure?",
|
"Setting an aggregate classification will clear all items under the original classification. Please proceed with caution. Are you sure?",
|
||||||
align: "Align",
|
align: "Align",
|
||||||
all: "All",
|
all: "All",
|
||||||
altNumberKey: "Alt + Number Key",
|
altNumberKey: "Alt + Number Key",
|
||||||
alwaysCenter: "Always Center",
|
alwaysCenter: "Always Center",
|
||||||
alwaysTop: "Always Top",
|
alwaysTop: "Always on Top",
|
||||||
appearance: "Appearance",
|
appearance: "Appearance",
|
||||||
appx: "Appx",
|
appx: "Appx",
|
||||||
associateFolder: "Associate Folder",
|
associateFolder: "Associate Folder",
|
||||||
associateFolderPrompt1:
|
associateFolderPrompt1:
|
||||||
"Associate folder can monitor changes in the specified folder in real time and synchronize them to the corresponding classification.",
|
"Associate folder can monitor changes in the specified folder in real-time and synchronize them with the corresponding classification.",
|
||||||
associateFolderPrompt2:
|
associateFolderPrompt2:
|
||||||
"Name of the file/folder to be hidden, multiple separated by commas",
|
"Name of the file/folder to be hidden, multiple separated by commas",
|
||||||
associateFolderPrompt3:
|
associateFolderPrompt3:
|
||||||
"The current classification is the parent classification and associate folder cannot be set.",
|
"The current classification is a parent classification and cannot be set as an associate folder.",
|
||||||
associateFolderPrompt4: "The target path does not exist.",
|
associateFolderPrompt4: "The target path does not exist.",
|
||||||
associateFolderPrompt5: "The destination path must be a folder.",
|
associateFolderPrompt5: "The destination path must be a folder.",
|
||||||
associateFolderPrompt6:
|
associateFolderPrompt6:
|
||||||
"Setting the associate folder will clear all items under the original classification. Please operate with caution. Are you sure?",
|
"Setting an associate folder will clear all items under the original classification. Please proceed with caution. Are you sure?",
|
||||||
associateFolderPrompt7:
|
associateFolderPrompt7:
|
||||||
"The target path is empty. The current classification will be automatically converted to a normal classification. Are you sure?",
|
"The target path is empty. The current classification will be automatically converted to a regular classification. Are you sure?",
|
||||||
autoSwitchClassification: "Auto Switch Classification on Scroll",
|
autoSwitchClassification:
|
||||||
|
"Automatically switch classification when the item list scrolls to the bottom or top",
|
||||||
backgroundIcon: "Background Icon",
|
backgroundIcon: "Background Icon",
|
||||||
backgroundImage: "Background Image",
|
backgroundImage: "Background Image",
|
||||||
backgroundImageMode: "Background Image Mode",
|
backgroundImageMode: "Background Image Mode",
|
||||||
backgroundImagePostion: "Background Image Postion",
|
backgroundImagePosition: "Background Image Position",
|
||||||
backgroundImageTransparent: "Background Image Transparent",
|
backgroundImageTransparency: "Background Image Transparency",
|
||||||
backgroundTransparent: "Background Transparent",
|
|
||||||
backup: "Backup",
|
backup: "Backup",
|
||||||
backupRestoreData: "Backup/Restore Data",
|
backupRestoreData: "Backup/Restore Data",
|
||||||
backupRestoreDataPrompt:
|
backupRestoreDataPrompt:
|
||||||
"If you want to restore the backup data of versions 1.2.3 and earlier, please choose to import a file in JSON format when restoring.",
|
"To restore data from version 1.2.3 and earlier, please choose to import a JSON file during the restoration process.",
|
||||||
batchConvertAbsolutePath: "Batch Convert to Absolute Path",
|
batchConvertAbsolutePath: "Batch Convert to Absolute Path",
|
||||||
batchConvertRelativePath: "Batch Convert to Relative Path",
|
batchConvertRelativePath: "Batch Convert to Relative Path",
|
||||||
batchCopyTo: "Batch Copy to",
|
batchCopyTo: "Batch Copy to",
|
||||||
@ -654,9 +674,9 @@ let english = {
|
|||||||
batchRefreshIcon: "Batch Refresh Icon",
|
batchRefreshIcon: "Batch Refresh Icon",
|
||||||
borderColor: "Border Color",
|
borderColor: "Border Color",
|
||||||
bottom: "Bottom",
|
bottom: "Bottom",
|
||||||
byInitialLetter: "by Initial Letter",
|
byInitialLetter: "By Initial Letter",
|
||||||
byLastOpen: "by Last Open",
|
byLastOpen: "By Last Open",
|
||||||
byOpenNumber: "by Open Count",
|
byOpenCount: "By Open Count",
|
||||||
calculator: "Calculator",
|
calculator: "Calculator",
|
||||||
cancel: "Cancel",
|
cancel: "Cancel",
|
||||||
cancelBatchOperation: "Cancel Batch Operation",
|
cancelBatchOperation: "Cancel Batch Operation",
|
||||||
@ -665,10 +685,10 @@ let english = {
|
|||||||
checkInvalidItem: "Check for Invalid Items",
|
checkInvalidItem: "Check for Invalid Items",
|
||||||
checkUpdates: "Check Updates",
|
checkUpdates: "Check Updates",
|
||||||
checkUpdatesPrompt1:
|
checkUpdatesPrompt1:
|
||||||
'Check that there is a new version, click "OK" to jump to the official website to download the latest version.',
|
"A new version has been detected. Click 'OK' to go to the official website and download the latest version.",
|
||||||
checkUpdatesPrompt2: "It is currently the latest version.",
|
checkUpdatesPrompt2: "You are already on the latest version.",
|
||||||
checkUpdatesPrompt3:
|
checkUpdatesPrompt3:
|
||||||
"Failed to check for updates, please confirm the network.",
|
"Update check failed. Please check your network connection.",
|
||||||
classification: "Classification",
|
classification: "Classification",
|
||||||
clear: "Clear",
|
clear: "Clear",
|
||||||
close: "Close",
|
close: "Close",
|
||||||
@ -676,16 +696,21 @@ let english = {
|
|||||||
colonKeywordSpace: "Colon + Keyword + Space",
|
colonKeywordSpace: "Colon + Keyword + Space",
|
||||||
color: "Color",
|
color: "Color",
|
||||||
columnNumber: "Column Number",
|
columnNumber: "Column Number",
|
||||||
|
commandLine: "Command Line",
|
||||||
|
commandLinePrompt1:
|
||||||
|
'Use "> + Space" in "Quick Search" or "Search" to enter command-line mode.',
|
||||||
commandPrompt: "Command Prompt",
|
commandPrompt: "Command Prompt",
|
||||||
computer: "Computer",
|
computer: "Computer",
|
||||||
computerManagement: "Computer Management",
|
computerManagement: "Computer Management",
|
||||||
controlPanel: "Control Panel",
|
controlPanel: "Control Panel",
|
||||||
convertAbsolutePath: "Convert to Absolute Path",
|
convertAbsolutePath: "Convert to Absolute Path",
|
||||||
convertRelativePath: "Convert to Relative Path",
|
convertRelativePath: "Convert to Relative Path",
|
||||||
|
copy: "Copy",
|
||||||
copyFullPath: "Copy Full Path",
|
copyFullPath: "Copy Full Path",
|
||||||
copyTo: "Copy to",
|
copyTo: "Copy to",
|
||||||
createShortcut: "Create Shortcut",
|
createShortcut: "Create Shortcut",
|
||||||
ctrlNumberKey: "Ctrl + Number Key",
|
ctrlNumberKey: "Ctrl + Number Key",
|
||||||
|
cut: "Cut",
|
||||||
default: "Default",
|
default: "Default",
|
||||||
defaultIcon: "Default Icon",
|
defaultIcon: "Default Icon",
|
||||||
delayDisplay: "Delay Display",
|
delayDisplay: "Delay Display",
|
||||||
@ -694,16 +719,17 @@ let english = {
|
|||||||
deleteClassificationPrompt: "Delete current classification?",
|
deleteClassificationPrompt: "Delete current classification?",
|
||||||
deleteIcon: "Delete Icon",
|
deleteIcon: "Delete Icon",
|
||||||
deleteItemPrompt: "Delete current item?",
|
deleteItemPrompt: "Delete current item?",
|
||||||
|
deleteHistory: "Delete History",
|
||||||
description: "Description",
|
description: "Description",
|
||||||
display: "Display",
|
display: "Display",
|
||||||
displayMainWindow: "Display Main Interface",
|
displayMainInterface: "Display Main Interface",
|
||||||
documents: "Documents",
|
documents: "Documents",
|
||||||
doubleClickOpen: "Double Click Open",
|
doubleClickOpen: "Double Click Open",
|
||||||
doubleClickTaskbar: "Double Click Taskbar",
|
doubleClickTaskbar: "Double Click Taskbar",
|
||||||
downloadImagePrompt1: "Failed to download image.",
|
downloadImagePrompt1: "Failed to download image.",
|
||||||
downloadImagePrompt2: "The link is not in image format.",
|
downloadImagePrompt2: "The link is not in image format.",
|
||||||
dontPromptAgain: "Don't prompt again",
|
dontPromptAgain: "Don't prompt again",
|
||||||
edgeAutoHide: "Auto Hide at Desktop Edge",
|
edgeAutoHide: "Automatically hide when docked to the edge of the desktop",
|
||||||
edgeDock: "Edge Dock",
|
edgeDock: "Edge Dock",
|
||||||
edit: "Edit",
|
edit: "Edit",
|
||||||
editClassification: "Edit Classification",
|
editClassification: "Edit Classification",
|
||||||
@ -711,6 +737,7 @@ let english = {
|
|||||||
editSubclassification: "Edit Subclassification",
|
editSubclassification: "Edit Subclassification",
|
||||||
emptyRecycleBin: "Empty Recycle Bin",
|
emptyRecycleBin: "Empty Recycle Bin",
|
||||||
enable: "Enable",
|
enable: "Enable",
|
||||||
|
enableQuickSearch: "Enable Quick Search",
|
||||||
english: "English",
|
english: "English",
|
||||||
excludeSearch: "Exclude Search",
|
excludeSearch: "Exclude Search",
|
||||||
exit: "Exit",
|
exit: "Exit",
|
||||||
@ -738,22 +765,24 @@ let english = {
|
|||||||
globalShortcutKey: "Global Shortcut Key",
|
globalShortcutKey: "Global Shortcut Key",
|
||||||
hiddenItems: "Hidden Items",
|
hiddenItems: "Hidden Items",
|
||||||
hideEllipses: "Hide Ellipses",
|
hideEllipses: "Hide Ellipses",
|
||||||
hideLoseFocus: "Hide After Lose Focus",
|
hideLoseFocus: "Loss of Focus Hide",
|
||||||
hideName: "Hide Name",
|
hideName: "Hide Name",
|
||||||
hideTray: "Hide Tray",
|
hideTray: "Hide Tray Icon",
|
||||||
|
hideTaskbar: "Hide Taskbar",
|
||||||
hideWindowCollapseSubClassification:
|
hideWindowCollapseSubClassification:
|
||||||
"Collapse Subclassification when Hide Window",
|
"Collapse subclassifications when the window is hidden",
|
||||||
|
hideWindowAfterOpen: "Hide Window After Opening",
|
||||||
history: "History",
|
history: "History",
|
||||||
hover: "Hover",
|
hover: "Hover",
|
||||||
icon: "Icon",
|
icon: "Icon",
|
||||||
imageLink: "Image Link",
|
imageLink: "Image Link",
|
||||||
item: "Item",
|
item: "Item",
|
||||||
itemAddEditPrompt1:
|
itemAddEditPrompt1:
|
||||||
"After selecting the fixed icon, the current project will not participate in refreshing the icon.",
|
"After selecting a fixed icon, the current item will not participate in icon refreshing.",
|
||||||
itemAddEditPrompt2: "Leave it blank if there are no special requirements",
|
itemAddEditPrompt2: "Leave empty if there are no special requirements",
|
||||||
itemAddEditPrompt3: "Add successfully.",
|
itemAddEditPrompt3: "Add successfully.",
|
||||||
itemAddEditPrompt4: "The target does not exist.",
|
itemAddEditPrompt4: "The target does not exist.",
|
||||||
itemAddEditPrompt5: "Failed to obtain URL information.",
|
itemAddEditPrompt5: "Failed to retrieve website information.",
|
||||||
itemList: "Item List",
|
itemList: "Item List",
|
||||||
keyword: "Keyword",
|
keyword: "Keyword",
|
||||||
keywordSpace: "Leyword + Space",
|
keywordSpace: "Leyword + Space",
|
||||||
@ -783,7 +812,7 @@ let english = {
|
|||||||
name: "Name",
|
name: "Name",
|
||||||
network: "Network",
|
network: "Network",
|
||||||
networkIcon: "Network Icon",
|
networkIcon: "Network Icon",
|
||||||
networkIconPrompt1: "Supports JPG/JPEG/GIF/PNG/ICO/SVG/WEBP format images.",
|
networkIconPrompt1: "Supports JPG/JPEG/GIF/PNG/ICO/SVG/WEBP image formats.",
|
||||||
networkShareCenter: "Network Share Center",
|
networkShareCenter: "Network Share Center",
|
||||||
newClassification: "New Classification",
|
newClassification: "New Classification",
|
||||||
newClassificationName: "New Classification",
|
newClassificationName: "New Classification",
|
||||||
@ -794,29 +823,32 @@ let english = {
|
|||||||
normal: "Normal",
|
normal: "Normal",
|
||||||
notDisturb: "Not Disturb Mode",
|
notDisturb: "Not Disturb Mode",
|
||||||
notDisturbPrompt:
|
notDisturbPrompt:
|
||||||
"After turning on Do Not Disturb mode, the Dawn Launcher window will not pop up when the computer is in full-screen mode for games or applications.",
|
"After enabling Do Not Disturb mode, Dawn Launcher will not pop up during full-screen games or applications.",
|
||||||
notFoundFile: "The file specified cannot be found",
|
notFoundFile: "The file specified cannot be found",
|
||||||
notFoundFolder: "The specified folder cannot be found",
|
notFoundFolder: "The specified folder cannot be found",
|
||||||
|
notTransparent: "Not Transparent",
|
||||||
number: "Number",
|
number: "Number",
|
||||||
numberKey: "Number Key",
|
numberKey: "Number Key",
|
||||||
officialWebsite: "Official Website",
|
officialWebsite: "Official Website",
|
||||||
ok: "OK",
|
ok: "OK",
|
||||||
open: "Open",
|
open: "Open",
|
||||||
openAfterHideMainInterface: "Hide Main Interface After Open",
|
|
||||||
openAfterHideQuickSearchWindow: "Hide Window After Open",
|
|
||||||
openFileLocation: "Open File Location",
|
openFileLocation: "Open File Location",
|
||||||
openNow: "Open when Only One Item",
|
openNow: "Only one item left to open immediately",
|
||||||
openNumber: "Open Count",
|
openCount: "Open Count",
|
||||||
parameters: "Parameters",
|
parameters: "Parameters",
|
||||||
password: "Password",
|
password: "Password",
|
||||||
pasteIcon: "Paste Icon",
|
pasteIcon: "Paste Icon",
|
||||||
|
paste: "Paste",
|
||||||
|
path: "Path",
|
||||||
powerOptions: "Power Options",
|
powerOptions: "Power Options",
|
||||||
|
powerShell: "PowerShell",
|
||||||
programsFeatures: "Programs Features",
|
programsFeatures: "Programs Features",
|
||||||
proxy: "Proxy",
|
proxy: "Proxy",
|
||||||
proxyPrompt:
|
proxyPrompt:
|
||||||
'Only HTTP proxy is supported. When filling in the "address", you need to include the communication protocol and port, for example: http://127.0.0.1:7890. If there is no username and password, just leave it blank.',
|
'Only HTTP proxy is supported. When filling in the "address", you need to include the communication protocol and port, for example: http://127.0.0.1:7890. If there is no username and password, just leave it blank.',
|
||||||
|
prompt: "Prompt",
|
||||||
quickSearch: "Quick Search",
|
quickSearch: "Quick Search",
|
||||||
recordOpenNumber: "Record Open Count",
|
recordOpenCount: "Record Open Count",
|
||||||
recycleBin: "Recycle Bin",
|
recycleBin: "Recycle Bin",
|
||||||
refreshIcon: "Refresh Icon",
|
refreshIcon: "Refresh Icon",
|
||||||
registryEditor: "Registry Editor",
|
registryEditor: "Registry Editor",
|
||||||
@ -827,7 +859,6 @@ let english = {
|
|||||||
restart: "Restart",
|
restart: "Restart",
|
||||||
restore: "Restore",
|
restore: "Restore",
|
||||||
restoreDataPrompt: "Failed to restore data.",
|
restoreDataPrompt: "Failed to restore data.",
|
||||||
rewardSponsor: "Reward&Sponsor",
|
|
||||||
right: "Right",
|
right: "Right",
|
||||||
roundedCorners: "Rounded Corners",
|
roundedCorners: "Rounded Corners",
|
||||||
runAsAdministrator: "Run as Administrator",
|
runAsAdministrator: "Run as Administrator",
|
||||||
@ -868,10 +899,11 @@ let english = {
|
|||||||
'It conflicts with the "Show/Hide" shortcut key in "Settings-Quick Search", please reset it.',
|
'It conflicts with the "Show/Hide" shortcut key in "Settings-Quick Search", please reset it.',
|
||||||
shortcutKeyPrompt7: "Invaild symbol.",
|
shortcutKeyPrompt7: "Invaild symbol.",
|
||||||
show: "Show",
|
show: "Show",
|
||||||
showFollowMousePosition: "Follows Mouse Position on Display",
|
showFollowMousePosition: "Follow the mouse position when displayed",
|
||||||
showHide: "Show/Hide",
|
showHide: "Show/Hide",
|
||||||
showOnlyFiles: "Show Only Files",
|
showOnlyFiles: "Show Only Files",
|
||||||
showOnlyFolders: "Show Only Folders",
|
showOnlyFolders: "Show Only Folders",
|
||||||
|
showPath: "Show Path",
|
||||||
shutdown: "Shutdown",
|
shutdown: "Shutdown",
|
||||||
simplifiedChinese: "Simplified Chinese",
|
simplifiedChinese: "Simplified Chinese",
|
||||||
size: "Size",
|
size: "Size",
|
||||||
@ -881,15 +913,16 @@ let english = {
|
|||||||
startLocation: "Start Location",
|
startLocation: "Start Location",
|
||||||
startMenu: "Start Menu",
|
startMenu: "Start Menu",
|
||||||
startup: "Startup",
|
startup: "Startup",
|
||||||
startupTray: "Minimize to System Tray on Startup",
|
startupTray: "Minimize to system tray on startup",
|
||||||
subclassification: "Subclassification",
|
subclassification: "Subclassification",
|
||||||
svgIcon: "SVG Icon",
|
svgIcon: "SVG Icon",
|
||||||
svgIconPrompt1:
|
svgIconPrompt1:
|
||||||
'After entering the SVG code, you need to click the "Check Code" button first.',
|
'After entering SVG code, you need to click the "Validate Code" button first.',
|
||||||
switch: "Switch",
|
switch: "Switch",
|
||||||
switchClassificationCollapseOtherSubClassification:
|
switchClassificationCollapseOtherSubClassification:
|
||||||
"Collapse Other Subclassification on Classification Switch",
|
"Collapse other subclassifications when switching classifications",
|
||||||
switchEnglish: "Switch to English Input on Window Display",
|
switchEnglish:
|
||||||
|
"Switch the input method to English mode when the window is displayed",
|
||||||
system: "System",
|
system: "System",
|
||||||
target: "Target",
|
target: "Target",
|
||||||
taskManager: "Task Manager",
|
taskManager: "Task Manager",
|
||||||
@ -899,14 +932,15 @@ let english = {
|
|||||||
title: "Title",
|
title: "Title",
|
||||||
top: "Top",
|
top: "Top",
|
||||||
traditionalChinese: "Traditional Chinese",
|
traditionalChinese: "Traditional Chinese",
|
||||||
|
transparent: "Transparent",
|
||||||
turnOffMonitor: "Turn Off Monitor",
|
turnOffMonitor: "Turn Off Monitor",
|
||||||
unlockClassification: "Unlock Classification",
|
unlockClassification: "Unlock Classification",
|
||||||
unlockItem: "Unlock Item",
|
unlockItem: "Unlock Item",
|
||||||
uploadIcon: "Upload Icon",
|
uploadIcon: "Upload Icon",
|
||||||
url: "URL",
|
url: "URL",
|
||||||
useItemOpen: "Use This Item to Open Dragged Files",
|
useItemOpen:
|
||||||
|
"Open files with this item when dragging files from outside the program to the item icon",
|
||||||
useProxy: "Use Proxy",
|
useProxy: "Use Proxy",
|
||||||
useQuickSearch: "Use Quick Search",
|
|
||||||
username: "Username",
|
username: "Username",
|
||||||
update: "Update",
|
update: "Update",
|
||||||
webSearch: "Web Search",
|
webSearch: "Web Search",
|
||||||
@ -915,6 +949,7 @@ let english = {
|
|||||||
webSearchModePrompt2: "{w} is the search keyword.",
|
webSearchModePrompt2: "{w} is the search keyword.",
|
||||||
width: "Width",
|
width: "Width",
|
||||||
window: "Window",
|
window: "Window",
|
||||||
|
windowTransparency: "Window Transparency",
|
||||||
zoom: "Zoom",
|
zoom: "Zoom",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,83 +3,83 @@ import { Theme } from "../../types/setting";
|
|||||||
const themeList: Array<Theme> = [
|
const themeList: Array<Theme> = [
|
||||||
{
|
{
|
||||||
name: "#FFFFFF",
|
name: "#FFFFFF",
|
||||||
mainFontColor: "#505050FF",
|
mainFontColor: "#505050",
|
||||||
secondFontColor: "#505050FF",
|
secondFontColor: "#505050",
|
||||||
mainBackgroundColor: "#FFFFFFFF",
|
mainBackgroundColor: "#FFFFFF",
|
||||||
secondBackgroundColor: "#DCDEDFFF",
|
secondBackgroundColor: "#DCDEDF",
|
||||||
borderColor: "#F0F0F0FF",
|
borderColor: "#F0F0F0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "#2B2B2B",
|
name: "#2B2B2B",
|
||||||
mainFontColor: "#BBBBBBFF",
|
mainFontColor: "#BBBBBB",
|
||||||
secondFontColor: "#BBBBBBFF",
|
secondFontColor: "#BBBBBB",
|
||||||
mainBackgroundColor: "#2B2B2BFF",
|
mainBackgroundColor: "#2B2B2B",
|
||||||
secondBackgroundColor: "#3C3F41FF",
|
secondBackgroundColor: "#3C3F41",
|
||||||
borderColor: "#3C3F41FF",
|
borderColor: "#373737",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "#508CC8",
|
name: "#508CC8",
|
||||||
mainFontColor: "#FFFFFFFF",
|
mainFontColor: "#FFFFFF",
|
||||||
secondFontColor: "#FFFFFFFF",
|
secondFontColor: "#FFFFFF",
|
||||||
mainBackgroundColor: "#508CC8FF",
|
mainBackgroundColor: "#508CC8",
|
||||||
secondBackgroundColor: "#6FA0D2FF",
|
secondBackgroundColor: "#6FA0D2",
|
||||||
borderColor: "#6FA0D2FF",
|
borderColor: "#5A94CD",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "#024351",
|
name: "#024351",
|
||||||
mainFontColor: "#FFFFFFFF",
|
mainFontColor: "#FFFFFF",
|
||||||
secondFontColor: "#FFFFFFFF",
|
secondFontColor: "#FFFFFF",
|
||||||
mainBackgroundColor: "#024351FF",
|
mainBackgroundColor: "#024351",
|
||||||
secondBackgroundColor: "#025A6CFF",
|
secondBackgroundColor: "#025A6C",
|
||||||
borderColor: "#025A6CFF",
|
borderColor: "#064D5C",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "#516FA3",
|
name: "#516FA3",
|
||||||
mainFontColor: "#FFFFFFFF",
|
mainFontColor: "#FFFFFF",
|
||||||
secondFontColor: "#FFFFFFFF",
|
secondFontColor: "#FFFFFF",
|
||||||
mainBackgroundColor: "#516FA3FF",
|
mainBackgroundColor: "#516FA3",
|
||||||
secondBackgroundColor: "#91A8D0FF",
|
secondBackgroundColor: "#91A8D0",
|
||||||
borderColor: "#91A8D0FF",
|
borderColor: "#5D78A7",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "#45326E",
|
name: "#45326E",
|
||||||
mainFontColor: "#FFFFFFFF",
|
mainFontColor: "#FFFFFF",
|
||||||
secondFontColor: "#FFFFFFFF",
|
secondFontColor: "#FFFFFF",
|
||||||
mainBackgroundColor: "#45326EFF",
|
mainBackgroundColor: "#45326E",
|
||||||
secondBackgroundColor: "#5F4B8BFF",
|
secondBackgroundColor: "#5F4B8B",
|
||||||
borderColor: "#5F4B8BFF",
|
borderColor: "#4C3A73",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "#693030",
|
name: "#693030",
|
||||||
mainFontColor: "#FFFFFFFF",
|
mainFontColor: "#FFFFFF",
|
||||||
secondFontColor: "#FFFFFFFF",
|
secondFontColor: "#FFFFFF",
|
||||||
mainBackgroundColor: "#693030FF",
|
mainBackgroundColor: "#693030",
|
||||||
secondBackgroundColor: "#955151FF",
|
secondBackgroundColor: "#955151",
|
||||||
borderColor: "#803A3AFF",
|
borderColor: "#733535",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "#9F2F4A",
|
name: "#9F2F4A",
|
||||||
mainFontColor: "#FFFFFFFF",
|
mainFontColor: "#FFFFFF",
|
||||||
secondFontColor: "#FFFFFFFF",
|
secondFontColor: "#FFFFFF",
|
||||||
mainBackgroundColor: "#9F2F4AFF",
|
mainBackgroundColor: "#9F2F4A",
|
||||||
secondBackgroundColor: "#EA6F8CFF",
|
secondBackgroundColor: "#EA6F8C",
|
||||||
borderColor: "#AD3350FF",
|
borderColor: "#AD3350",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "#000000,#FFDB00",
|
name: "#000000,#FFDB00",
|
||||||
mainFontColor: "#B3B3B3FF",
|
mainFontColor: "#B3B3B3",
|
||||||
secondFontColor: "#000000FF",
|
secondFontColor: "#000000",
|
||||||
mainBackgroundColor: "#000000FF",
|
mainBackgroundColor: "#000000",
|
||||||
secondBackgroundColor: "#FFDB00FF",
|
secondBackgroundColor: "#FFDB00",
|
||||||
borderColor: "#1D1D1DFF",
|
borderColor: "#1D1D1D",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "#000000,#FFFFFF",
|
name: "#000000,#FFFFFF",
|
||||||
mainFontColor: "#B3B3B3FF",
|
mainFontColor: "#B3B3B3",
|
||||||
secondFontColor: "#000000FF",
|
secondFontColor: "#000000",
|
||||||
mainBackgroundColor: "#000000FF",
|
mainBackgroundColor: "#000000",
|
||||||
secondBackgroundColor: "#FFFFFFFF",
|
secondBackgroundColor: "#FFFFFF",
|
||||||
borderColor: "#1D1D1DFF",
|
borderColor: "#1D1D1D",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ function convert<F, T>(from: F): T {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
function isAbsolutePath(path: string) {
|
function isAbsolutePath(path: string) {
|
||||||
const regex = /^[a-zA-Z]:\\/;
|
const regex = /^[a-zA-Z]:\\|^\\\\/;
|
||||||
return regex.test(path);
|
return regex.test(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
Appearance,
|
Appearance,
|
||||||
Classification,
|
Classification,
|
||||||
|
CommandLine,
|
||||||
General,
|
General,
|
||||||
Item,
|
Item,
|
||||||
Network,
|
Network,
|
||||||
@ -31,6 +32,7 @@ function getGeneral({
|
|||||||
lockSize = false,
|
lockSize = false,
|
||||||
hideLoseFocus = false,
|
hideLoseFocus = false,
|
||||||
hideTray = false,
|
hideTray = false,
|
||||||
|
hideTaskbar = true,
|
||||||
fixedPosition = false,
|
fixedPosition = false,
|
||||||
alwaysCenter = false,
|
alwaysCenter = false,
|
||||||
showHideMouseWheelClick = false,
|
showHideMouseWheelClick = false,
|
||||||
@ -53,6 +55,7 @@ function getGeneral({
|
|||||||
lockSize?: boolean | null;
|
lockSize?: boolean | null;
|
||||||
hideLoseFocus?: boolean | null;
|
hideLoseFocus?: boolean | null;
|
||||||
hideTray?: boolean | null;
|
hideTray?: boolean | null;
|
||||||
|
hideTaskbar?: boolean | null;
|
||||||
fixedPosition?: boolean | null;
|
fixedPosition?: boolean | null;
|
||||||
alwaysCenter?: boolean | null;
|
alwaysCenter?: boolean | null;
|
||||||
showHideMouseWheelClick?: boolean | null;
|
showHideMouseWheelClick?: boolean | null;
|
||||||
@ -76,6 +79,7 @@ function getGeneral({
|
|||||||
lockSize: lockSize ?? false,
|
lockSize: lockSize ?? false,
|
||||||
hideLoseFocus: hideLoseFocus ?? false,
|
hideLoseFocus: hideLoseFocus ?? false,
|
||||||
hideTray: hideTray ?? false,
|
hideTray: hideTray ?? false,
|
||||||
|
hideTaskbar: hideTaskbar ?? true,
|
||||||
fixedPosition: fixedPosition ?? false,
|
fixedPosition: fixedPosition ?? false,
|
||||||
alwaysCenter: alwaysCenter ?? false,
|
alwaysCenter: alwaysCenter ?? false,
|
||||||
showHideMouseWheelClick: showHideMouseWheelClick ?? false,
|
showHideMouseWheelClick: showHideMouseWheelClick ?? false,
|
||||||
@ -220,6 +224,7 @@ function getItem({
|
|||||||
fontSize = 14,
|
fontSize = 14,
|
||||||
fontWeight = 400,
|
fontWeight = 400,
|
||||||
fontLineHeight = 1.25,
|
fontLineHeight = 1.25,
|
||||||
|
promptShowPath = false,
|
||||||
}: {
|
}: {
|
||||||
layout?: string | null;
|
layout?: string | null;
|
||||||
iconSize?: number | null;
|
iconSize?: number | null;
|
||||||
@ -236,6 +241,7 @@ function getItem({
|
|||||||
fontSize?: number | null;
|
fontSize?: number | null;
|
||||||
fontWeight?: number | null;
|
fontWeight?: number | null;
|
||||||
fontLineHeight?: number | null;
|
fontLineHeight?: number | null;
|
||||||
|
promptShowPath?: boolean | null;
|
||||||
}): Item {
|
}): Item {
|
||||||
return {
|
return {
|
||||||
layout: layout ?? "tile",
|
layout: layout ?? "tile",
|
||||||
@ -253,6 +259,7 @@ function getItem({
|
|||||||
fontSize: fontSize ?? 14,
|
fontSize: fontSize ?? 14,
|
||||||
fontWeight: fontWeight ?? 400,
|
fontWeight: fontWeight ?? 400,
|
||||||
fontLineHeight: fontLineHeight ?? 1.25,
|
fontLineHeight: fontLineHeight ?? 1.25,
|
||||||
|
promptShowPath: promptShowPath ?? false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,6 +278,7 @@ function getQuickSearch({
|
|||||||
useItemOpen = false,
|
useItemOpen = false,
|
||||||
openAfterHideQuickSearchWindow = true,
|
openAfterHideQuickSearchWindow = true,
|
||||||
matchConditionsRemark = false,
|
matchConditionsRemark = false,
|
||||||
|
width = 600,
|
||||||
}: {
|
}: {
|
||||||
enable?: boolean | null;
|
enable?: boolean | null;
|
||||||
showHideShortcutKey?: string | null;
|
showHideShortcutKey?: string | null;
|
||||||
@ -282,6 +290,7 @@ function getQuickSearch({
|
|||||||
useItemOpen?: boolean | null;
|
useItemOpen?: boolean | null;
|
||||||
openAfterHideQuickSearchWindow?: boolean | null;
|
openAfterHideQuickSearchWindow?: boolean | null;
|
||||||
matchConditionsRemark?: boolean | null;
|
matchConditionsRemark?: boolean | null;
|
||||||
|
width?: number | null;
|
||||||
}): QuickSearch {
|
}): QuickSearch {
|
||||||
return {
|
return {
|
||||||
enable: enable ?? true,
|
enable: enable ?? true,
|
||||||
@ -294,6 +303,7 @@ function getQuickSearch({
|
|||||||
useItemOpen: useItemOpen ?? false,
|
useItemOpen: useItemOpen ?? false,
|
||||||
openAfterHideQuickSearchWindow: openAfterHideQuickSearchWindow ?? true,
|
openAfterHideQuickSearchWindow: openAfterHideQuickSearchWindow ?? true,
|
||||||
matchConditionsRemark: matchConditionsRemark ?? false,
|
matchConditionsRemark: matchConditionsRemark ?? false,
|
||||||
|
width: width ?? 600,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,6 +324,20 @@ function getWebSearch({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 命令行
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function getCommandLine({
|
||||||
|
defaultUse = "cmd",
|
||||||
|
}: {
|
||||||
|
defaultUse?: string | null;
|
||||||
|
}): CommandLine {
|
||||||
|
return {
|
||||||
|
defaultUse: defaultUse ?? "cmd",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 网络
|
* 网络
|
||||||
* @returns
|
* @returns
|
||||||
@ -374,6 +398,9 @@ function getSetting(setting: Setting | null): Setting {
|
|||||||
webSearch: getWebSearch(
|
webSearch: getWebSearch(
|
||||||
setting && setting.webSearch ? setting.webSearch : {}
|
setting && setting.webSearch ? setting.webSearch : {}
|
||||||
),
|
),
|
||||||
|
commandLine: getCommandLine(
|
||||||
|
setting && setting.commandLine ? setting.commandLine : {}
|
||||||
|
),
|
||||||
network: getNetwork(setting && setting.network ? setting.network : {}),
|
network: getNetwork(setting && setting.network ? setting.network : {}),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { resolve, dirname, parse } from "node:path";
|
import { resolve, dirname, parse, join } from "node:path";
|
||||||
import { isAbsolutePath } from "../../commons/utils/common";
|
import { isAbsolutePath } from "../../commons/utils/common";
|
||||||
import mime from "mime";
|
import mime from "mime";
|
||||||
import { readFileSync } from "node:fs";
|
import { readFileSync } from "node:fs";
|
||||||
|
import icojs from "icojs";
|
||||||
|
|
||||||
// 图标格式
|
// 图标格式
|
||||||
const iconExts = ["jpg", "jpeg", "png", "gif", "ico", "svg", "webp"];
|
const iconExts = ["jpg", "jpeg", "png", "gif", "ico", "svg", "webp"];
|
||||||
@ -59,12 +60,21 @@ function getURLParams(paramsMap: Map<string, any>) {
|
|||||||
function parseEnvPath(path: string) {
|
function parseEnvPath(path: string) {
|
||||||
// 尝试解析路径中的环境变量
|
// 尝试解析路径中的环境变量
|
||||||
let parsedPath = parse(path);
|
let parsedPath = parse(path);
|
||||||
let isBase = false;
|
// 路径数组
|
||||||
let pathArr: Array<string> = [];
|
let pathArr: Array<string> = [];
|
||||||
|
// 判断是否是网络路径,以\\开头
|
||||||
|
let isNetwork = false;
|
||||||
|
if (path.indexOf("\\\\") === 0) {
|
||||||
|
isNetwork = true;
|
||||||
|
}
|
||||||
|
// 是否是一级路径
|
||||||
|
let isBase = false;
|
||||||
if (!parsedPath.dir || parsedPath.dir.trim() === "") {
|
if (!parsedPath.dir || parsedPath.dir.trim() === "") {
|
||||||
|
// 如果为空代表路径只有一级,也就是当前文件本身,比如C:/1.txt
|
||||||
pathArr = parsedPath.base.split("\\");
|
pathArr = parsedPath.base.split("\\");
|
||||||
isBase = true;
|
isBase = true;
|
||||||
} else {
|
} else {
|
||||||
|
// 不为空代表有父级目录
|
||||||
pathArr = parsedPath.dir.split("\\");
|
pathArr = parsedPath.dir.split("\\");
|
||||||
}
|
}
|
||||||
// 新路径
|
// 新路径
|
||||||
@ -93,22 +103,24 @@ function parseEnvPath(path: string) {
|
|||||||
if (!isBase) {
|
if (!isBase) {
|
||||||
newPathArr.push(parsedPath.base);
|
newPathArr.push(parsedPath.base);
|
||||||
}
|
}
|
||||||
// 拼接并返回
|
// 拼接
|
||||||
return newPathArr.join("\\");
|
let newPath = join(...newPathArr);
|
||||||
|
// 如果是网络路径,在最前面加\\
|
||||||
|
if (isNetwork) {
|
||||||
|
newPath = "\\\\" + newPath;
|
||||||
|
}
|
||||||
|
return newPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取绝对路径
|
* 解析路径
|
||||||
* @param path
|
* @returns
|
||||||
*/
|
*/
|
||||||
function getAbsolutePath(path: string) {
|
function parsePath(path: string) {
|
||||||
if (!isAbsolutePath(path)) {
|
|
||||||
// 尝试解析环境变量
|
// 尝试解析环境变量
|
||||||
let newPath = parseEnvPath(path);
|
path = parseEnvPath(path);
|
||||||
// 判断解析之后的路径是否是绝对路径
|
// 是否是相对路径
|
||||||
if (isAbsolutePath(newPath)) {
|
if (!isAbsolutePath(path)) {
|
||||||
return newPath;
|
|
||||||
} else {
|
|
||||||
return resolve(
|
return resolve(
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
? resolve(".")
|
? resolve(".")
|
||||||
@ -116,7 +128,6 @@ function getAbsolutePath(path: string) {
|
|||||||
path
|
path
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +135,7 @@ function getAbsolutePath(path: string) {
|
|||||||
* 获取文件图标
|
* 获取文件图标
|
||||||
* @param filePath
|
* @param filePath
|
||||||
*/
|
*/
|
||||||
function getFileIcon(filePath: string | null) {
|
async function getFileIcon(filePath: string | null) {
|
||||||
// 图标
|
// 图标
|
||||||
let icon: string | null = null;
|
let icon: string | null = null;
|
||||||
if (filePath) {
|
if (filePath) {
|
||||||
@ -133,6 +144,16 @@ function getFileIcon(filePath: string | null) {
|
|||||||
if (iconExts.includes(ext)) {
|
if (iconExts.includes(ext)) {
|
||||||
// 读取文件
|
// 读取文件
|
||||||
let buffer = readFileSync(filePath);
|
let buffer = readFileSync(filePath);
|
||||||
|
if (ext === "ico") {
|
||||||
|
let images = await icojs.parseICO(buffer);
|
||||||
|
const largestImage = images.reduce((max, current) => {
|
||||||
|
if (current.width * current.height > max.width * max.height) {
|
||||||
|
return current;
|
||||||
|
}
|
||||||
|
return max;
|
||||||
|
});
|
||||||
|
buffer = Buffer.from(largestImage.buffer);
|
||||||
|
}
|
||||||
icon =
|
icon =
|
||||||
"data:" +
|
"data:" +
|
||||||
mime.getType(filePath) +
|
mime.getType(filePath) +
|
||||||
@ -146,10 +167,4 @@ function getFileIcon(filePath: string | null) {
|
|||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export { getURLParams, parsePath, getFileIcon, iconExts, getRandomUserAgent };
|
||||||
getURLParams,
|
|
||||||
getAbsolutePath,
|
|
||||||
getFileIcon,
|
|
||||||
iconExts,
|
|
||||||
getRandomUserAgent,
|
|
||||||
};
|
|
||||||
|
@ -24,7 +24,11 @@ function createWindow() {
|
|||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
focusable: true,
|
focusable: true,
|
||||||
show: false,
|
show: false,
|
||||||
backgroundColor: getMainBackgorunColor(),
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
|
backgroundColor:
|
||||||
|
global.setting.appearance.transparency === 1
|
||||||
|
? getMainBackgorunColor()
|
||||||
|
: null,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
preload: join(__dirname, "../preload/index.js"),
|
preload: join(__dirname, "../preload/index.js"),
|
||||||
|
@ -14,7 +14,7 @@ import { getDataSqlite3 } from "../../commons/betterSqlite3";
|
|||||||
let db = getDataSqlite3();
|
let db = getDataSqlite3();
|
||||||
|
|
||||||
// 分类表名
|
// 分类表名
|
||||||
let classificationTableName = "classification";
|
let tableName = "classification";
|
||||||
|
|
||||||
// 查询字段
|
// 查询字段
|
||||||
let selectColumn =
|
let selectColumn =
|
||||||
@ -41,7 +41,7 @@ function getClassification(row: any): Classification {
|
|||||||
*/
|
*/
|
||||||
function init() {
|
function init() {
|
||||||
// sql
|
// sql
|
||||||
let sql = `CREATE TABLE IF NOT EXISTS ${classificationTableName} (
|
let sql = `CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
parent_id INTEGER,
|
parent_id INTEGER,
|
||||||
name TEXT NOT NULL,
|
name TEXT NOT NULL,
|
||||||
@ -53,7 +53,7 @@ function init() {
|
|||||||
// 运行
|
// 运行
|
||||||
db.exec(sql);
|
db.exec(sql);
|
||||||
// 查询有多少条数据
|
// 查询有多少条数据
|
||||||
sql = `SELECT COUNT(id) count FROM ${classificationTableName}`;
|
sql = `SELECT COUNT(id) count FROM ${tableName}`;
|
||||||
let row: any = db.prepare(sql).get();
|
let row: any = db.prepare(sql).get();
|
||||||
let count = row.count as number;
|
let count = row.count as number;
|
||||||
if (count === 0) {
|
if (count === 0) {
|
||||||
@ -70,7 +70,7 @@ function list(parentId: number | null = null) {
|
|||||||
// 参数
|
// 参数
|
||||||
let params = [];
|
let params = [];
|
||||||
// sql
|
// sql
|
||||||
let sql = `SELECT ${selectColumn} FROM ${classificationTableName}`;
|
let sql = `SELECT ${selectColumn} FROM ${tableName}`;
|
||||||
if (parentId) {
|
if (parentId) {
|
||||||
sql += " WHERE parent_id = ?";
|
sql += " WHERE parent_id = ?";
|
||||||
params.push(parentId);
|
params.push(parentId);
|
||||||
@ -103,7 +103,7 @@ function add(
|
|||||||
// 获取序号
|
// 获取序号
|
||||||
let newOrder = getMaxOrder(parentId) + 1;
|
let newOrder = getMaxOrder(parentId) + 1;
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `INSERT INTO ${classificationTableName} (parent_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`) VALUES (?, ?, ?, ?, ?, ?, ?)`;
|
let sql = `INSERT INTO ${tableName} (parent_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`) VALUES (?, ?, ?, ?, ?, ?, ?)`;
|
||||||
// 运行
|
// 运行
|
||||||
let id = db
|
let id = db
|
||||||
.prepare(sql)
|
.prepare(sql)
|
||||||
@ -146,7 +146,7 @@ function add(
|
|||||||
*/
|
*/
|
||||||
function update(classification: Classification) {
|
function update(classification: Classification) {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `UPDATE ${classificationTableName} SET name = ?, type = ?, data = ?, shortcut_key = ?, global_shortcut_key = ? WHERE id = ?`;
|
let sql = `UPDATE ${tableName} SET name = ?, type = ?, data = ?, shortcut_key = ?, global_shortcut_key = ? WHERE id = ?`;
|
||||||
// 运行
|
// 运行
|
||||||
return (
|
return (
|
||||||
db
|
db
|
||||||
@ -169,7 +169,7 @@ function update(classification: Classification) {
|
|||||||
*/
|
*/
|
||||||
function updateData(id: number, data: ClassificationData) {
|
function updateData(id: number, data: ClassificationData) {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `UPDATE ${classificationTableName} SET data = ? WHERE id = ?`;
|
let sql = `UPDATE ${tableName} SET data = ? WHERE id = ?`;
|
||||||
return db.prepare(sql).run(JSON.stringify(data), id).changes > 0;
|
return db.prepare(sql).run(JSON.stringify(data), id).changes > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ function updateData(id: number, data: ClassificationData) {
|
|||||||
*/
|
*/
|
||||||
function selectById(id: number): Classification | null {
|
function selectById(id: number): Classification | null {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `SELECT ${selectColumn} FROM ${classificationTableName} WHERE id = ?`;
|
let sql = `SELECT ${selectColumn} FROM ${tableName} WHERE id = ?`;
|
||||||
// 运行
|
// 运行
|
||||||
let row = db.prepare(sql).get(id);
|
let row = db.prepare(sql).get(id);
|
||||||
// 返回
|
// 返回
|
||||||
@ -201,7 +201,7 @@ function del(id: number) {
|
|||||||
// 查询有无子分类
|
// 查询有无子分类
|
||||||
let childList = list(classifictaion.id);
|
let childList = list(classifictaion.id);
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `DELETE FROM ${classificationTableName} WHERE id = ? or parent_id = ?`;
|
let sql = `DELETE FROM ${tableName} WHERE id = ? or parent_id = ?`;
|
||||||
// 运行
|
// 运行
|
||||||
let res = db.prepare(sql).run(id, id).changes > 0;
|
let res = db.prepare(sql).run(id, id).changes > 0;
|
||||||
if (res) {
|
if (res) {
|
||||||
@ -256,14 +256,14 @@ function updateOrder(
|
|||||||
newOrder = getMaxOrder(parentId) + 1;
|
newOrder = getMaxOrder(parentId) + 1;
|
||||||
}
|
}
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `UPDATE ${classificationTableName} SET \`order\` = ? WHERE id = ?`;
|
let sql = `UPDATE ${tableName} SET \`order\` = ? WHERE id = ?`;
|
||||||
// 更新排序
|
// 更新排序
|
||||||
db.prepare(sql).run(newOrder, fromClassification.id);
|
db.prepare(sql).run(newOrder, fromClassification.id);
|
||||||
// 判断新序号和老序号之间的数据是+1还是-1
|
// 判断新序号和老序号之间的数据是+1还是-1
|
||||||
if (newOrder > fromClassification.order) {
|
if (newOrder > fromClassification.order) {
|
||||||
// 新序号和老序号之间数据,序号-1
|
// 新序号和老序号之间数据,序号-1
|
||||||
let params = [fromClassification.order, newOrder, fromClassification.id];
|
let params = [fromClassification.order, newOrder, fromClassification.id];
|
||||||
sql = `UPDATE ${classificationTableName} SET \`order\` = \`order\` - 1 WHERE \`order\` > ? AND \`order\` <= ? AND id != ?`;
|
sql = `UPDATE ${tableName} SET \`order\` = \`order\` - 1 WHERE \`order\` > ? AND \`order\` <= ? AND id != ?`;
|
||||||
if (parentId) {
|
if (parentId) {
|
||||||
sql += " AND parent_id = ?";
|
sql += " AND parent_id = ?";
|
||||||
params.push(parentId);
|
params.push(parentId);
|
||||||
@ -274,7 +274,7 @@ function updateOrder(
|
|||||||
} else {
|
} else {
|
||||||
// 新序号和老序号之间数据,序号+1
|
// 新序号和老序号之间数据,序号+1
|
||||||
let params = [newOrder, fromClassification.order, fromClassification.id];
|
let params = [newOrder, fromClassification.order, fromClassification.id];
|
||||||
sql = `UPDATE ${classificationTableName} SET \`order\` = \`order\` + 1 WHERE \`order\` >= ? AND \`order\` < ? AND id != ?`;
|
sql = `UPDATE ${tableName} SET \`order\` = \`order\` + 1 WHERE \`order\` >= ? AND \`order\` < ? AND id != ?`;
|
||||||
if (parentId) {
|
if (parentId) {
|
||||||
sql += " AND parent_id = ?";
|
sql += " AND parent_id = ?";
|
||||||
params.push(parentId);
|
params.push(parentId);
|
||||||
@ -298,7 +298,7 @@ function reorder(parentId: number | null) {
|
|||||||
// 开启事务
|
// 开启事务
|
||||||
db.transaction(() => {
|
db.transaction(() => {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `UPDATE ${classificationTableName} SET \`order\` = ? WHERE id = ?`;
|
let sql = `UPDATE ${tableName} SET \`order\` = ? WHERE id = ?`;
|
||||||
// 更新序号
|
// 更新序号
|
||||||
for (let i = 0; i < classificationList.length; i++) {
|
for (let i = 0; i < classificationList.length; i++) {
|
||||||
db.prepare(sql).run(i + 1, classificationList[i].id);
|
db.prepare(sql).run(i + 1, classificationList[i].id);
|
||||||
@ -312,7 +312,7 @@ function reorder(parentId: number | null) {
|
|||||||
*/
|
*/
|
||||||
function getMaxOrder(parentId: number | null) {
|
function getMaxOrder(parentId: number | null) {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `SELECT MAX(\`order\`) \`order\` FROM ${classificationTableName}`;
|
let sql = `SELECT MAX(\`order\`) \`order\` FROM ${tableName}`;
|
||||||
if (parentId) {
|
if (parentId) {
|
||||||
sql += " WHERE parent_id = ?";
|
sql += " WHERE parent_id = ?";
|
||||||
} else {
|
} else {
|
||||||
@ -337,7 +337,7 @@ function updateIcon(id: number, icon: string | null) {
|
|||||||
let classification = selectById(id);
|
let classification = selectById(id);
|
||||||
if (classification) {
|
if (classification) {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `UPDATE ${classificationTableName} SET data = ? WHERE id = ?`;
|
let sql = `UPDATE ${tableName} SET data = ? WHERE id = ?`;
|
||||||
// 更新图标
|
// 更新图标
|
||||||
classification.data.icon = icon;
|
classification.data.icon = icon;
|
||||||
return (
|
return (
|
||||||
|
@ -49,7 +49,11 @@ function createAddEditWindow(id: number | null, parentId: number | null) {
|
|||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
focusable: true,
|
focusable: true,
|
||||||
show: false,
|
show: false,
|
||||||
backgroundColor: getMainBackgorunColor(),
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
|
backgroundColor:
|
||||||
|
global.setting.appearance.transparency === 1
|
||||||
|
? getMainBackgorunColor()
|
||||||
|
: null,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
preload: join(__dirname, "../preload/index.js"),
|
preload: join(__dirname, "../preload/index.js"),
|
||||||
@ -113,7 +117,11 @@ function createSetIconWindow(id: number) {
|
|||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
focusable: true,
|
focusable: true,
|
||||||
show: false,
|
show: false,
|
||||||
backgroundColor: getMainBackgorunColor(),
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
|
backgroundColor:
|
||||||
|
global.setting.appearance.transparency === 1
|
||||||
|
? getMainBackgorunColor()
|
||||||
|
: null,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
preload: join(__dirname, "../preload/index.js"),
|
preload: join(__dirname, "../preload/index.js"),
|
||||||
@ -172,7 +180,11 @@ function createAssociateFolderWindow(id: number) {
|
|||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
focusable: true,
|
focusable: true,
|
||||||
show: false,
|
show: false,
|
||||||
backgroundColor: getMainBackgorunColor(),
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
|
backgroundColor:
|
||||||
|
global.setting.appearance.transparency === 1
|
||||||
|
? getMainBackgorunColor()
|
||||||
|
: null,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
preload: join(__dirname, "../preload/index.js"),
|
preload: join(__dirname, "../preload/index.js"),
|
||||||
@ -236,7 +248,11 @@ function createAggregateWindow(id: number) {
|
|||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
focusable: true,
|
focusable: true,
|
||||||
show: false,
|
show: false,
|
||||||
backgroundColor: getMainBackgorunColor(),
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
|
backgroundColor:
|
||||||
|
global.setting.appearance.transparency === 1
|
||||||
|
? getMainBackgorunColor()
|
||||||
|
: null,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
preload: join(__dirname, "../preload/index.js"),
|
preload: join(__dirname, "../preload/index.js"),
|
||||||
@ -528,7 +544,7 @@ function getItemSortMenu(classification: Classification) {
|
|||||||
if (global.setting.item.openNumber) {
|
if (global.setting.item.openNumber) {
|
||||||
submenus.push(
|
submenus.push(
|
||||||
new MenuItem({
|
new MenuItem({
|
||||||
label: global.language.byOpenNumber,
|
label: global.language.byOpenCount,
|
||||||
icon:
|
icon:
|
||||||
classification.data.itemSort === "openNumber" && !hasChild
|
classification.data.itemSort === "openNumber" && !hasChild
|
||||||
? getDot()
|
? getDot()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Menu, MenuItem, ipcMain, dialog } from "electron";
|
import { Menu, MenuItem, ipcMain } from "electron";
|
||||||
import { Classification } from "../../../types/classification";
|
import { Classification } from "../../../types/classification";
|
||||||
import {
|
import {
|
||||||
createAddEditWindow,
|
createAddEditWindow,
|
||||||
@ -27,7 +27,12 @@ import {
|
|||||||
batchUpdateFixed,
|
batchUpdateFixed,
|
||||||
} from "./data";
|
} from "./data";
|
||||||
import { setShortcutKey } from "../setting";
|
import { setShortcutKey } from "../setting";
|
||||||
import { closeWindow, getDot, sendToWebContent } from "../commons/index";
|
import {
|
||||||
|
closeWindow,
|
||||||
|
getDot,
|
||||||
|
sendToWebContent,
|
||||||
|
showMessageBoxSync,
|
||||||
|
} from "../commons/index";
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
// 获取分类列表
|
// 获取分类列表
|
||||||
@ -248,13 +253,12 @@ export default function () {
|
|||||||
new MenuItem({
|
new MenuItem({
|
||||||
label: global.language.delete,
|
label: global.language.delete,
|
||||||
click: () => {
|
click: () => {
|
||||||
let res = dialog.showMessageBoxSync(global.mainWindow, {
|
let res = showMessageBoxSync(
|
||||||
message: global.language.deleteClassificationPrompt,
|
"mainWindow",
|
||||||
buttons: [global.language.ok, global.language.cancel],
|
global.language.deleteClassificationPrompt,
|
||||||
type: "question",
|
"question",
|
||||||
noLink: true,
|
[global.language.ok, global.language.cancel]
|
||||||
cancelId: 1,
|
);
|
||||||
});
|
|
||||||
if (res === 0) {
|
if (res === 0) {
|
||||||
// 删除数据
|
// 删除数据
|
||||||
if (del(classification.id)) {
|
if (del(classification.id)) {
|
||||||
|
@ -6,7 +6,17 @@ import retry from "retry";
|
|||||||
import request from "request";
|
import request from "request";
|
||||||
import * as cheerio from "cheerio";
|
import * as cheerio from "cheerio";
|
||||||
import { isAbsolutePath } from "../../../commons/utils/common";
|
import { isAbsolutePath } from "../../../commons/utils/common";
|
||||||
import { BrowserWindow, app, dialog, nativeImage, nativeTheme } from "electron";
|
import {
|
||||||
|
BrowserWindow,
|
||||||
|
Display,
|
||||||
|
OpenDialogOptions,
|
||||||
|
SaveDialogOptions,
|
||||||
|
app,
|
||||||
|
dialog,
|
||||||
|
nativeImage,
|
||||||
|
nativeTheme,
|
||||||
|
screen,
|
||||||
|
} from "electron";
|
||||||
import { getRandomUserAgent, iconExts } from "../../commons/utils";
|
import { getRandomUserAgent, iconExts } from "../../commons/utils";
|
||||||
import URI from "urijs";
|
import URI from "urijs";
|
||||||
import { hideMainWindow } from "../main";
|
import { hideMainWindow } from "../main";
|
||||||
@ -73,6 +83,8 @@ function downloadImage(windowName: string, url: string) {
|
|||||||
headers: {
|
headers: {
|
||||||
"User-Agent": getRandomUserAgent(),
|
"User-Agent": getRandomUserAgent(),
|
||||||
},
|
},
|
||||||
|
maxRedirects: 5,
|
||||||
|
jar: true,
|
||||||
},
|
},
|
||||||
function (error, response, body) {
|
function (error, response, body) {
|
||||||
if (operation.retry(error)) {
|
if (operation.retry(error)) {
|
||||||
@ -139,6 +151,8 @@ function getURLInfo(windowName: string, url: string, redirect: boolean) {
|
|||||||
headers: {
|
headers: {
|
||||||
"User-Agent": getRandomUserAgent(),
|
"User-Agent": getRandomUserAgent(),
|
||||||
},
|
},
|
||||||
|
maxRedirects: 5,
|
||||||
|
jar: true,
|
||||||
},
|
},
|
||||||
function (error, response, body) {
|
function (error, response, body) {
|
||||||
if (operation.retry(error)) {
|
if (operation.retry(error)) {
|
||||||
@ -195,6 +209,9 @@ function analysisHTML(windowName: string, url: string, data: string) {
|
|||||||
let $ = cheerio.load(data);
|
let $ = cheerio.load(data);
|
||||||
// 获取标题
|
// 获取标题
|
||||||
result.name = $("head").find("title").text();
|
result.name = $("head").find("title").text();
|
||||||
|
if (!result.name || result.name.trim() === "") {
|
||||||
|
result.name = $("title").text();
|
||||||
|
}
|
||||||
// 获取图标URL
|
// 获取图标URL
|
||||||
let iconURL: string | null = null;
|
let iconURL: string | null = null;
|
||||||
let icon = $("link[rel='icon']");
|
let icon = $("link[rel='icon']");
|
||||||
@ -237,6 +254,8 @@ function analysisHTML(windowName: string, url: string, data: string) {
|
|||||||
headers: {
|
headers: {
|
||||||
"User-Agent": getRandomUserAgent(),
|
"User-Agent": getRandomUserAgent(),
|
||||||
},
|
},
|
||||||
|
maxRedirects: 5,
|
||||||
|
jar: true,
|
||||||
},
|
},
|
||||||
function (error, response, body) {
|
function (error, response, body) {
|
||||||
if (operation.retry(error)) {
|
if (operation.retry(error)) {
|
||||||
@ -256,6 +275,9 @@ function analysisHTML(windowName: string, url: string, data: string) {
|
|||||||
result.status = true;
|
result.status = true;
|
||||||
sendUrlInfo(windowName, result);
|
sendUrlInfo(windowName, result);
|
||||||
} else {
|
} else {
|
||||||
|
if (result.name && result.name.trim() !== "") {
|
||||||
|
result.status = true;
|
||||||
|
}
|
||||||
sendUrlInfo(windowName, result);
|
sendUrlInfo(windowName, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -414,20 +436,6 @@ function openAfterHideWindow(type: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 错误提示框
|
|
||||||
* @param windowName
|
|
||||||
* @param message
|
|
||||||
*/
|
|
||||||
function showErrorMessageBox(windowName: string, message: string) {
|
|
||||||
dialog.showMessageBoxSync(getWindow(windowName), {
|
|
||||||
message: message,
|
|
||||||
buttons: [global.language.ok],
|
|
||||||
type: "error",
|
|
||||||
noLink: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重启
|
* 重启
|
||||||
*/
|
*/
|
||||||
@ -463,6 +471,103 @@ function getMainBackgorunColor() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取窗口所在的屏幕
|
||||||
|
*/
|
||||||
|
function getWindowInScreen(window: BrowserWindow) {
|
||||||
|
let inDisplays: Array<Display> = [];
|
||||||
|
let displays = screen.getAllDisplays();
|
||||||
|
let bounds = window.getBounds();
|
||||||
|
for (let display of displays) {
|
||||||
|
let workArea = display.workArea;
|
||||||
|
if (
|
||||||
|
((workArea.x <= bounds.x && workArea.x + workArea.width >= bounds.x) ||
|
||||||
|
(workArea.x <= bounds.x + bounds.width &&
|
||||||
|
workArea.x + workArea.width >= bounds.x + bounds.width)) &&
|
||||||
|
((workArea.y <= bounds.y && workArea.y + workArea.height >= bounds.y) ||
|
||||||
|
(workArea.y <= bounds.y + bounds.height &&
|
||||||
|
workArea.y + workArea.height >= bounds.y + bounds.height))
|
||||||
|
) {
|
||||||
|
inDisplays.push(display);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return inDisplays;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用对话框
|
||||||
|
*/
|
||||||
|
function showMessageBoxSync(
|
||||||
|
windowName: string,
|
||||||
|
message: string,
|
||||||
|
type: "error" | "question" | "info",
|
||||||
|
buttons: Array<string> | null
|
||||||
|
) {
|
||||||
|
// 记录状态
|
||||||
|
if (windowName === "mainWindow") {
|
||||||
|
global.mainWindowShowDialog = true;
|
||||||
|
}
|
||||||
|
let res = dialog.showMessageBoxSync(getWindow(windowName), {
|
||||||
|
title: "Dawn Launcher",
|
||||||
|
message: message,
|
||||||
|
buttons: buttons,
|
||||||
|
type: type,
|
||||||
|
noLink: true,
|
||||||
|
cancelId: 1,
|
||||||
|
});
|
||||||
|
// 删除状态
|
||||||
|
if (windowName === "mainWindow") {
|
||||||
|
global.mainWindowShowDialog = false;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 错误对话框
|
||||||
|
*/
|
||||||
|
function showErrorMessageBox(windowName: string, message: string) {
|
||||||
|
showMessageBoxSync(windowName, message, "error", [global.language.ok]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件保存对话框
|
||||||
|
*/
|
||||||
|
function showSaveDialogSync(windowName: string, options: SaveDialogOptions) {
|
||||||
|
// 记录状态
|
||||||
|
if (windowName === "mainWindow") {
|
||||||
|
global.mainWindowShowDialog = true;
|
||||||
|
}
|
||||||
|
let path = dialog.showSaveDialogSync(getWindow(windowName), options);
|
||||||
|
// 删除状态
|
||||||
|
if (windowName === "mainWindow") {
|
||||||
|
global.mainWindowShowDialog = false;
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选择文件/文件夹对话框
|
||||||
|
*/
|
||||||
|
function showOpenDialogSync(windowName: string, options: OpenDialogOptions) {
|
||||||
|
// 记录状态
|
||||||
|
if (windowName === "mainWindow") {
|
||||||
|
global.mainWindowShowDialog = true;
|
||||||
|
}
|
||||||
|
let pathList = dialog.showOpenDialogSync(getWindow(windowName), options);
|
||||||
|
// 删除状态
|
||||||
|
if (windowName === "mainWindow") {
|
||||||
|
global.mainWindowShowDialog = false;
|
||||||
|
}
|
||||||
|
return pathList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 窗口是否存在
|
||||||
|
*/
|
||||||
|
function mainWindowExist() {
|
||||||
|
return global.mainWindow && !global.mainWindow.isDestroyed();
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
downloadImage,
|
downloadImage,
|
||||||
getURLInfo,
|
getURLInfo,
|
||||||
@ -474,8 +579,13 @@ export {
|
|||||||
sendToWebContent,
|
sendToWebContent,
|
||||||
closeAllChildProcess,
|
closeAllChildProcess,
|
||||||
openAfterHideWindow,
|
openAfterHideWindow,
|
||||||
showErrorMessageBox,
|
|
||||||
relaunch,
|
relaunch,
|
||||||
getUserDataPath,
|
getUserDataPath,
|
||||||
getMainBackgorunColor,
|
getMainBackgorunColor,
|
||||||
|
getWindowInScreen,
|
||||||
|
showMessageBoxSync,
|
||||||
|
showErrorMessageBox,
|
||||||
|
showSaveDialogSync,
|
||||||
|
showOpenDialogSync,
|
||||||
|
mainWindowExist,
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { app, dialog, ipcMain, OpenDialogSyncOptions, shell } from "electron";
|
import { app, ipcMain, Menu, OpenDialogSyncOptions, shell } from "electron";
|
||||||
import { getFileIcon } from "../../commons/utils";
|
import { getFileIcon } from "../../commons/utils";
|
||||||
import mime from "mime";
|
import mime from "mime";
|
||||||
import { ShortcutInfo } from "../../../types/common";
|
import { ShortcutInfo } from "../../../types/common";
|
||||||
@ -8,9 +8,10 @@ import {
|
|||||||
getURLInfo,
|
getURLInfo,
|
||||||
sendToWebContent,
|
sendToWebContent,
|
||||||
showErrorMessageBox,
|
showErrorMessageBox,
|
||||||
|
showMessageBoxSync,
|
||||||
|
showOpenDialogSync,
|
||||||
} from ".";
|
} from ".";
|
||||||
import { statSync } from "node:fs";
|
import { statSync } from "node:fs";
|
||||||
import { getWindow } from "../commons/index";
|
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
// emit
|
// emit
|
||||||
@ -23,23 +24,17 @@ export default function () {
|
|||||||
});
|
});
|
||||||
// 信息提示框
|
// 信息提示框
|
||||||
ipcMain.on("showInfoMessageBox", (event, args) => {
|
ipcMain.on("showInfoMessageBox", (event, args) => {
|
||||||
dialog.showMessageBoxSync(getWindow(args.windowName), {
|
showMessageBoxSync(args.windowName, args.message, "info", [
|
||||||
message: args.message,
|
global.language.ok,
|
||||||
buttons: [global.language.ok],
|
]);
|
||||||
type: "info",
|
|
||||||
noLink: true,
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
// 对话框
|
// 对话框
|
||||||
ipcMain.on("showConfirmBox", (event, args) => {
|
ipcMain.on("showConfirmBox", (event, args) => {
|
||||||
// 弹出对话框
|
// 弹出对话框
|
||||||
let res = dialog.showMessageBoxSync(getWindow(args.windowName), {
|
let res = showMessageBoxSync(args.windowName, args.message, "question", [
|
||||||
message: args.message,
|
global.language.ok,
|
||||||
buttons: [global.language.ok, global.language.cancel],
|
global.language.cancel,
|
||||||
type: "question",
|
]);
|
||||||
noLink: true,
|
|
||||||
cancelId: 1,
|
|
||||||
});
|
|
||||||
event.returnValue = res === 0;
|
event.returnValue = res === 0;
|
||||||
});
|
});
|
||||||
// 选择文件
|
// 选择文件
|
||||||
@ -57,10 +52,7 @@ export default function () {
|
|||||||
} else {
|
} else {
|
||||||
options.defaultPath = app.getPath("desktop");
|
options.defaultPath = app.getPath("desktop");
|
||||||
}
|
}
|
||||||
let filePathList = dialog.showOpenDialogSync(
|
let filePathList = showOpenDialogSync(windowName, options);
|
||||||
getWindow(windowName),
|
|
||||||
options
|
|
||||||
);
|
|
||||||
if (filePathList && filePathList.length > 0) {
|
if (filePathList && filePathList.length > 0) {
|
||||||
let filePath = filePathList[0];
|
let filePath = filePathList[0];
|
||||||
if (target) {
|
if (target) {
|
||||||
@ -94,7 +86,7 @@ export default function () {
|
|||||||
} else {
|
} else {
|
||||||
options.defaultPath = app.getPath("desktop");
|
options.defaultPath = app.getPath("desktop");
|
||||||
}
|
}
|
||||||
let dirPathList = dialog.showOpenDialogSync(getWindow(windowName), options);
|
let dirPathList = showOpenDialogSync(windowName, options);
|
||||||
if (dirPathList && dirPathList.length > 0) {
|
if (dirPathList && dirPathList.length > 0) {
|
||||||
let dirPath = dirPathList[0];
|
let dirPath = dirPathList[0];
|
||||||
event.returnValue = dirPath;
|
event.returnValue = dirPath;
|
||||||
@ -103,14 +95,14 @@ export default function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 获取图标
|
// 获取图标
|
||||||
ipcMain.on("getFileIcon", (event, args) => {
|
ipcMain.on("getFileIcon", async (event, args) => {
|
||||||
// 窗口名称
|
// 窗口名称
|
||||||
let windowName: string = args.windowName;
|
let windowName: string = args.windowName;
|
||||||
// 路径
|
// 路径
|
||||||
let filePath: string | null = args.path;
|
let filePath: string | null = args.path;
|
||||||
if (filePath) {
|
if (filePath) {
|
||||||
// 图标
|
// 图标
|
||||||
let icon: string | null = getFileIcon(filePath);
|
let icon: string | null = await getFileIcon(filePath);
|
||||||
// 发送到页面
|
// 发送到页面
|
||||||
sendToWebContent(windowName, "onGetFileIcon", icon);
|
sendToWebContent(windowName, "onGetFileIcon", icon);
|
||||||
}
|
}
|
||||||
@ -163,4 +155,33 @@ export default function () {
|
|||||||
ipcMain.on("exit", () => {
|
ipcMain.on("exit", () => {
|
||||||
app.quit();
|
app.quit();
|
||||||
});
|
});
|
||||||
|
// 运行
|
||||||
|
ipcMain.on("run", (event, args) => {
|
||||||
|
global.addon.shellExecute(
|
||||||
|
args.operation,
|
||||||
|
args.target,
|
||||||
|
args.params ?? "",
|
||||||
|
app.getPath("home")
|
||||||
|
);
|
||||||
|
});
|
||||||
|
// 文本框菜单
|
||||||
|
ipcMain.on("textRightMenu", (event, args) => {
|
||||||
|
// 菜单
|
||||||
|
let menu = Menu.buildFromTemplate([
|
||||||
|
{
|
||||||
|
role: "cut",
|
||||||
|
label: global.language.cut,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: "copy",
|
||||||
|
label: global.language.copy,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: "paste",
|
||||||
|
label: global.language.paste,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
// 显示
|
||||||
|
menu.popup();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,11 @@ function createBackupRestoreDataWindow() {
|
|||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
focusable: true,
|
focusable: true,
|
||||||
show: false,
|
show: false,
|
||||||
backgroundColor: getMainBackgorunColor(),
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
|
backgroundColor:
|
||||||
|
global.setting.appearance.transparency === 1
|
||||||
|
? getMainBackgorunColor()
|
||||||
|
: null,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
preload: join(__dirname, "../preload/index.js"),
|
preload: join(__dirname, "../preload/index.js"),
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
import { dialog, ipcMain } from "electron";
|
import { ipcMain } from "electron";
|
||||||
import { backupData, createBackupRestoreDataWindow } from ".";
|
import { backupData, createBackupRestoreDataWindow } from ".";
|
||||||
import { closeWindow, relaunch, showErrorMessageBox } from "../commons";
|
import {
|
||||||
|
closeWindow,
|
||||||
|
relaunch,
|
||||||
|
showErrorMessageBox,
|
||||||
|
showOpenDialogSync,
|
||||||
|
showSaveDialogSync,
|
||||||
|
} from "../commons";
|
||||||
import { restore } from "./data";
|
import { restore } from "./data";
|
||||||
|
import { rmSync } from "node:fs";
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
// 创建备份/恢复数据窗口
|
// 创建备份/恢复数据窗口
|
||||||
@ -21,11 +28,18 @@ export default function () {
|
|||||||
// 备份数据
|
// 备份数据
|
||||||
ipcMain.on("backupData", () => {
|
ipcMain.on("backupData", () => {
|
||||||
try {
|
try {
|
||||||
let filePath = dialog.showSaveDialogSync(global.backupRestoreDataWindow, {
|
let filePath = showSaveDialogSync("backupRestoreDataWindow", {
|
||||||
defaultPath: "Data",
|
defaultPath: "Data",
|
||||||
filters: [{ name: "DB", extensions: ["db"] }],
|
filters: [{ name: "DB", extensions: ["db"] }],
|
||||||
});
|
});
|
||||||
if (filePath && filePath.trim() !== "") {
|
if (filePath && filePath.trim() !== "") {
|
||||||
|
try {
|
||||||
|
rmSync(filePath);
|
||||||
|
} catch (e) {
|
||||||
|
if (process.env.NODE_ENV === "development") {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
backupData(filePath).finally(() => {
|
backupData(filePath).finally(() => {
|
||||||
// 关闭备份/恢复窗口
|
// 关闭备份/恢复窗口
|
||||||
closeWindow(global.backupRestoreDataWindow);
|
closeWindow(global.backupRestoreDataWindow);
|
||||||
@ -40,12 +54,9 @@ export default function () {
|
|||||||
// 恢复数据
|
// 恢复数据
|
||||||
ipcMain.on("restoreData", () => {
|
ipcMain.on("restoreData", () => {
|
||||||
try {
|
try {
|
||||||
let filePathList = dialog.showOpenDialogSync(
|
let filePathList = showOpenDialogSync("backupRestoreDataWindow", {
|
||||||
global.backupRestoreDataWindow,
|
|
||||||
{
|
|
||||||
filters: [{ name: "Data", extensions: ["db", "json"] }],
|
filters: [{ name: "Data", extensions: ["db", "json"] }],
|
||||||
}
|
});
|
||||||
);
|
|
||||||
if (filePathList && filePathList.length > 0) {
|
if (filePathList && filePathList.length > 0) {
|
||||||
let filePath = filePathList[0];
|
let filePath = filePathList[0];
|
||||||
if (restore(filePath)) {
|
if (restore(filePath)) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { app, BrowserWindow, dialog } from "electron";
|
import { app, BrowserWindow, dialog } from "electron";
|
||||||
import { release } from "node:os";
|
import { join, dirname, basename } from "node:path";
|
||||||
import { join, dirname } from "node:path";
|
|
||||||
import indexIpcEvent from "./main/ipcEvent";
|
import indexIpcEvent from "./main/ipcEvent";
|
||||||
import classificationIpcEvent from "./classification/ipcEvent";
|
import classificationIpcEvent from "./classification/ipcEvent";
|
||||||
import { init as classificationDataInit } from "./classification/data";
|
import { init as classificationDataInit } from "./classification/data";
|
||||||
@ -9,7 +8,10 @@ import { initSystemItem } from "./item/commons/data";
|
|||||||
import commonIpcEvent from "./commons/ipcEvent";
|
import commonIpcEvent from "./commons/ipcEvent";
|
||||||
import itemIpcEvent from "./item/ipcEvent";
|
import itemIpcEvent from "./item/ipcEvent";
|
||||||
import settingIpcEvent from "./setting/ipcEvent";
|
import settingIpcEvent from "./setting/ipcEvent";
|
||||||
import { init as settingDataInit } from "./setting/data";
|
import {
|
||||||
|
init as settingDataInit,
|
||||||
|
update as updateSetting,
|
||||||
|
} from "./setting/data";
|
||||||
import { setShortcutKey } from "./setting";
|
import { setShortcutKey } from "./setting";
|
||||||
import searchIpcEvent from "./search/ipcEvent";
|
import searchIpcEvent from "./search/ipcEvent";
|
||||||
import { createMainWindow } from "./main";
|
import { createMainWindow } from "./main";
|
||||||
@ -26,6 +28,7 @@ if (
|
|||||||
) {
|
) {
|
||||||
app.setPath("appData", join(dirname(process.execPath), "data"));
|
app.setPath("appData", join(dirname(process.execPath), "data"));
|
||||||
app.setPath("userData", join(dirname(process.execPath), "data"));
|
app.setPath("userData", join(dirname(process.execPath), "data"));
|
||||||
|
app.setPath("sessionData", join(dirname(process.execPath), "data"));
|
||||||
}
|
}
|
||||||
|
|
||||||
process.env.DIST_ELECTRON = join(__dirname, "..");
|
process.env.DIST_ELECTRON = join(__dirname, "..");
|
||||||
@ -37,8 +40,13 @@ process.env.VITE_PUBLIC = process.env.VITE_DEV_SERVER_URL
|
|||||||
// 解决透明窗口闪烁
|
// 解决透明窗口闪烁
|
||||||
app.commandLine.appendSwitch("wm-window-animations-disabled");
|
app.commandLine.appendSwitch("wm-window-animations-disabled");
|
||||||
|
|
||||||
// Disable GPU Acceleration for Windows 7
|
// 初始化设置数据
|
||||||
if (release().startsWith("6.1")) app.disableHardwareAcceleration();
|
settingDataInit();
|
||||||
|
// 如果主窗口是非透明窗口的话,禁止GPU加速,解决白屏问题。
|
||||||
|
// 如果主窗口是透明窗口的话,将除主窗口外的窗口都改为透明度0.99,解决解决白屏问题。
|
||||||
|
if (global.setting.appearance.transparency === 1) {
|
||||||
|
app.disableHardwareAcceleration();
|
||||||
|
}
|
||||||
|
|
||||||
// Set application name for Windows 10+ notifications
|
// Set application name for Windows 10+ notifications
|
||||||
if (process.platform === "win32") app.setAppUserModelId(app.getName());
|
if (process.platform === "win32") app.setAppUserModelId(app.getName());
|
||||||
@ -54,10 +62,26 @@ if (!app.requestSingleInstanceLock()) {
|
|||||||
// process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
|
// process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
try {
|
try {
|
||||||
|
// 禁止多开
|
||||||
|
const instanceLock = app.requestSingleInstanceLock();
|
||||||
|
if (!instanceLock) {
|
||||||
|
app.quit();
|
||||||
|
return;
|
||||||
|
}
|
||||||
// addon
|
// addon
|
||||||
global.addon = require("../../native/addon.node");
|
global.addon = require("../../native/addon.node");
|
||||||
// 初始化数据
|
if (global.first) {
|
||||||
settingDataInit();
|
// 首次添加,判断系统语言
|
||||||
|
if (app.getLocale().toLowerCase().indexOf("zh-") === 0) {
|
||||||
|
// 简体中文
|
||||||
|
global.setting.general.language = "SimplifiedChinese";
|
||||||
|
} else {
|
||||||
|
// 英文
|
||||||
|
global.setting.general.language = "English";
|
||||||
|
}
|
||||||
|
// 修改
|
||||||
|
updateSetting(global.setting);
|
||||||
|
}
|
||||||
// 获取语言
|
// 获取语言
|
||||||
global.language = getLanguage(global.setting.general.language);
|
global.language = getLanguage(global.setting.general.language);
|
||||||
// 禁用debugtron
|
// 禁用debugtron
|
||||||
@ -67,7 +91,7 @@ app.whenReady().then(() => {
|
|||||||
arg.indexOf("--inspect") !== -1 ||
|
arg.indexOf("--inspect") !== -1 ||
|
||||||
arg.indexOf("--remote-debugging-port") !== -1
|
arg.indexOf("--remote-debugging-port") !== -1
|
||||||
) {
|
) {
|
||||||
dialog.showMessageBoxSync(null, {
|
dialog.showMessageBoxSync({
|
||||||
message: "达咩呦达咩达咩~",
|
message: "达咩呦达咩达咩~",
|
||||||
buttons: [global.language.ok],
|
buttons: [global.language.ok],
|
||||||
type: "error",
|
type: "error",
|
||||||
@ -77,12 +101,6 @@ app.whenReady().then(() => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 禁止多开
|
|
||||||
const instanceLock = app.requestSingleInstanceLock();
|
|
||||||
if (!instanceLock) {
|
|
||||||
app.quit();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
classificationDataInit();
|
classificationDataInit();
|
||||||
itemDataInit();
|
itemDataInit();
|
||||||
@ -104,6 +122,16 @@ app.whenReady().then(() => {
|
|||||||
}
|
}
|
||||||
// 设置快捷键
|
// 设置快捷键
|
||||||
setShortcutKey();
|
setShortcutKey();
|
||||||
|
// 每次开启软件时都设置一次开机启动选项
|
||||||
|
if (process.env.NODE_ENV !== "development") {
|
||||||
|
const exeName = basename(process.execPath);
|
||||||
|
app.setLoginItemSettings({
|
||||||
|
openAtLogin: global.setting.general.startup,
|
||||||
|
openAsHidden: false,
|
||||||
|
path: process.execPath,
|
||||||
|
args: ["--processStart", `"${exeName}"`],
|
||||||
|
});
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
@ -7,7 +7,7 @@ import { getDataSqlite3 } from "../../commons/betterSqlite3";
|
|||||||
let db = getDataSqlite3();
|
let db = getDataSqlite3();
|
||||||
|
|
||||||
// 项目表名
|
// 项目表名
|
||||||
let itemTableName = "item";
|
let tableName = "item";
|
||||||
|
|
||||||
// 查询字段
|
// 查询字段
|
||||||
let selectColumn =
|
let selectColumn =
|
||||||
@ -36,7 +36,7 @@ function getItem(row: any): Item {
|
|||||||
*/
|
*/
|
||||||
function init() {
|
function init() {
|
||||||
// sql
|
// sql
|
||||||
let sql = `CREATE TABLE IF NOT EXISTS ${itemTableName} (
|
let sql = `CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
classification_id INTEGER NOT NULL,
|
classification_id INTEGER NOT NULL,
|
||||||
name TEXT NOT NULL,
|
name TEXT NOT NULL,
|
||||||
@ -58,7 +58,7 @@ function add(item: Item, reuseId: boolean = false) {
|
|||||||
// 获取序号
|
// 获取序号
|
||||||
let newOrder = getMaxOrder(item.classificationId) + 1;
|
let newOrder = getMaxOrder(item.classificationId) + 1;
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `INSERT INTO ${itemTableName}
|
let sql = `INSERT INTO ${tableName}
|
||||||
(classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
|
(classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
|
||||||
VALUES (?, ?, ?, ?, ?, ?, ?)`;
|
VALUES (?, ?, ?, ?, ?, ?, ?)`;
|
||||||
// 参数
|
// 参数
|
||||||
@ -73,7 +73,7 @@ function add(item: Item, reuseId: boolean = false) {
|
|||||||
];
|
];
|
||||||
// 重复使用ID
|
// 重复使用ID
|
||||||
if (reuseId && item.id) {
|
if (reuseId && item.id) {
|
||||||
sql = `INSERT INTO ${itemTableName}
|
sql = `INSERT INTO ${tableName}
|
||||||
(id, classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
|
(id, classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
|
||||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`;
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`;
|
||||||
params.unshift(item.id);
|
params.unshift(item.id);
|
||||||
@ -108,7 +108,7 @@ function batchAdd(
|
|||||||
// 循环添加
|
// 循环添加
|
||||||
for (let item of itemList) {
|
for (let item of itemList) {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `INSERT INTO ${itemTableName}
|
let sql = `INSERT INTO ${tableName}
|
||||||
(classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
|
(classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
|
||||||
VALUES (?, ?, ?, ?, ?, ?, ?)`;
|
VALUES (?, ?, ?, ?, ?, ?, ?)`;
|
||||||
// 参数
|
// 参数
|
||||||
@ -123,7 +123,7 @@ function batchAdd(
|
|||||||
];
|
];
|
||||||
// 重复使用ID
|
// 重复使用ID
|
||||||
if (reuseId && item.id) {
|
if (reuseId && item.id) {
|
||||||
sql = `INSERT INTO ${itemTableName}
|
sql = `INSERT INTO ${tableName}
|
||||||
(id, classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
|
(id, classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
|
||||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`;
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`;
|
||||||
params.unshift(item.id);
|
params.unshift(item.id);
|
||||||
@ -133,6 +133,7 @@ function batchAdd(
|
|||||||
if (id) {
|
if (id) {
|
||||||
item.id = id;
|
item.id = id;
|
||||||
item.order = newOrder;
|
item.order = newOrder;
|
||||||
|
item.classificationId = classificationId;
|
||||||
resultList.push(item);
|
resultList.push(item);
|
||||||
}
|
}
|
||||||
newOrder++;
|
newOrder++;
|
||||||
@ -147,7 +148,7 @@ function batchAdd(
|
|||||||
*/
|
*/
|
||||||
function update(item: Item) {
|
function update(item: Item) {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `UPDATE ${itemTableName}
|
let sql = `UPDATE ${tableName}
|
||||||
SET name = ?,
|
SET name = ?,
|
||||||
data = ?,
|
data = ?,
|
||||||
shortcut_key = ?,
|
shortcut_key = ?,
|
||||||
@ -177,7 +178,7 @@ function updateClassificationId(
|
|||||||
newClassificationId: number
|
newClassificationId: number
|
||||||
) {
|
) {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `UPDATE ${itemTableName}
|
let sql = `UPDATE ${tableName}
|
||||||
SET classification_id = ?
|
SET classification_id = ?
|
||||||
WHERE classification_id = ?`;
|
WHERE classification_id = ?`;
|
||||||
// 运行
|
// 运行
|
||||||
@ -193,7 +194,7 @@ function updateClassificationId(
|
|||||||
*/
|
*/
|
||||||
function updateData(id: number, itemData: ItemData) {
|
function updateData(id: number, itemData: ItemData) {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `UPDATE ${itemTableName}
|
let sql = `UPDATE ${tableName}
|
||||||
SET data = ?
|
SET data = ?
|
||||||
WHERE id = ?`;
|
WHERE id = ?`;
|
||||||
// 运行
|
// 运行
|
||||||
@ -206,7 +207,7 @@ function updateData(id: number, itemData: ItemData) {
|
|||||||
*/
|
*/
|
||||||
function getMaxOrder(classificationId: number) {
|
function getMaxOrder(classificationId: number) {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `SELECT MAX(\`order\`) \`order\` FROM ${itemTableName} WHERE classification_id = ?`;
|
let sql = `SELECT MAX(\`order\`) \`order\` FROM ${tableName} WHERE classification_id = ?`;
|
||||||
// 运行
|
// 运行
|
||||||
let row: any = db.prepare(sql).get(classificationId);
|
let row: any = db.prepare(sql).get(classificationId);
|
||||||
if (row && row.order) {
|
if (row && row.order) {
|
||||||
@ -222,7 +223,7 @@ function getMaxOrder(classificationId: number) {
|
|||||||
*/
|
*/
|
||||||
function selectById(id: number): Item | null {
|
function selectById(id: number): Item | null {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `SELECT ${selectColumn} FROM ${itemTableName} WHERE id = ?`;
|
let sql = `SELECT ${selectColumn} FROM ${tableName} WHERE id = ?`;
|
||||||
// 运行
|
// 运行
|
||||||
let row = db.prepare(sql).get(id);
|
let row = db.prepare(sql).get(id);
|
||||||
// 返回
|
// 返回
|
||||||
@ -244,7 +245,7 @@ function list(simple: boolean = false, classificationId: number | null = null) {
|
|||||||
// sql
|
// sql
|
||||||
let sql = `SELECT ${
|
let sql = `SELECT ${
|
||||||
simple ? simpleSelectColumn : selectColumn
|
simple ? simpleSelectColumn : selectColumn
|
||||||
} FROM ${itemTableName}`;
|
} FROM ${tableName}`;
|
||||||
if (classificationId) {
|
if (classificationId) {
|
||||||
sql += " WHERE classification_id = ?";
|
sql += " WHERE classification_id = ?";
|
||||||
params.push(classificationId);
|
params.push(classificationId);
|
||||||
@ -269,7 +270,7 @@ function selectByIdList(simple: boolean, idList: Array<number>) {
|
|||||||
// sql
|
// sql
|
||||||
let sql = `SELECT ${
|
let sql = `SELECT ${
|
||||||
simple ? simpleSelectColumn : selectColumn
|
simple ? simpleSelectColumn : selectColumn
|
||||||
} FROM ${itemTableName} WHERE id IN (`;
|
} FROM ${tableName} WHERE id IN (`;
|
||||||
for (let i = 0; i < idList.length; i++) {
|
for (let i = 0; i < idList.length; i++) {
|
||||||
sql += "?";
|
sql += "?";
|
||||||
if (i !== idList.length - 1) {
|
if (i !== idList.length - 1) {
|
||||||
@ -307,7 +308,7 @@ function del(id: number) {
|
|||||||
let item = selectById(id);
|
let item = selectById(id);
|
||||||
if (item) {
|
if (item) {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `DELETE FROM ${itemTableName} WHERE id = ?`;
|
let sql = `DELETE FROM ${tableName} WHERE id = ?`;
|
||||||
// 运行
|
// 运行
|
||||||
let res = db.prepare(sql).run(id).changes > 0;
|
let res = db.prepare(sql).run(id).changes > 0;
|
||||||
if (res) {
|
if (res) {
|
||||||
@ -322,13 +323,41 @@ function del(id: number) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
function batchDel(idList: Array<number>) {
|
||||||
|
// 批量查询
|
||||||
|
let itemList = selectByIdList(true, idList);
|
||||||
|
// 参数
|
||||||
|
let params = itemList.map((item) => item.id).join(",");
|
||||||
|
// SQL
|
||||||
|
let sql = `DELETE FROM ${tableName} WHERE id in (${params})`;
|
||||||
|
// 运行
|
||||||
|
let res = db.prepare(sql).run().changes > 0;
|
||||||
|
if (res) {
|
||||||
|
// 提取分类ID
|
||||||
|
let classificationIdList = new Set<number>();
|
||||||
|
itemList.forEach((item) => {
|
||||||
|
classificationIdList.add(item.classificationId);
|
||||||
|
});
|
||||||
|
// 更新序号
|
||||||
|
classificationIdList.forEach((classificationId) => {
|
||||||
|
reorder(classificationId);
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
* @param classificationId
|
* @param classificationId
|
||||||
*/
|
*/
|
||||||
function deleteByClassificationId(classificationId: number) {
|
function deleteByClassificationId(classificationId: number) {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `DELETE FROM ${itemTableName} WHERE classification_id = ?`;
|
let sql = `DELETE FROM ${tableName} WHERE classification_id = ?`;
|
||||||
// 运行
|
// 运行
|
||||||
return db.prepare(sql).run(classificationId).changes > 0;
|
return db.prepare(sql).run(classificationId).changes > 0;
|
||||||
}
|
}
|
||||||
@ -343,7 +372,7 @@ function reorder(classification_id: number) {
|
|||||||
// 开启事务
|
// 开启事务
|
||||||
db.transaction(() => {
|
db.transaction(() => {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `UPDATE ${itemTableName} SET \`order\` = ? WHERE id = ?`;
|
let sql = `UPDATE ${tableName} SET \`order\` = ? WHERE id = ?`;
|
||||||
// 更新序号
|
// 更新序号
|
||||||
for (let i = 0; i < itemList.length; i++) {
|
for (let i = 0; i < itemList.length; i++) {
|
||||||
db.prepare(sql).run(i + 1, itemList[i].id);
|
db.prepare(sql).run(i + 1, itemList[i].id);
|
||||||
@ -396,7 +425,7 @@ function updateOrder(
|
|||||||
// 开启事务
|
// 开启事务
|
||||||
db.transaction(() => {
|
db.transaction(() => {
|
||||||
// SQL
|
// SQL
|
||||||
let sql = `UPDATE ${itemTableName} SET \`order\` = ?, classification_id = ? WHERE id = ?`;
|
let sql = `UPDATE ${tableName} SET \`order\` = ?, classification_id = ? WHERE id = ?`;
|
||||||
// 更新序号
|
// 更新序号
|
||||||
for (let i = 0; i < toItemList.length; i++) {
|
for (let i = 0; i < toItemList.length; i++) {
|
||||||
db.prepare(sql).run(i + 1, toClassificationId, toItemList[i].id);
|
db.prepare(sql).run(i + 1, toClassificationId, toItemList[i].id);
|
||||||
@ -418,6 +447,7 @@ export {
|
|||||||
batchAdd,
|
batchAdd,
|
||||||
update,
|
update,
|
||||||
del,
|
del,
|
||||||
|
batchDel,
|
||||||
selectById,
|
selectById,
|
||||||
selectByIdList,
|
selectByIdList,
|
||||||
deleteByClassificationId,
|
deleteByClassificationId,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { BrowserWindow, shell, dialog, app } from "electron";
|
import { BrowserWindow, shell, app } from "electron";
|
||||||
import { join } from "node:path";
|
import { extname, join } from "node:path";
|
||||||
import { getAbsolutePath, getURLParams } from "../../commons/utils";
|
import { parsePath, getURLParams, getFileIcon } from "../../commons/utils";
|
||||||
import { Item } from "../../../types/item";
|
import { Item } from "../../../types/item";
|
||||||
import {
|
import {
|
||||||
batchAdd,
|
batchAdd,
|
||||||
@ -11,12 +11,14 @@ import {
|
|||||||
updateData,
|
updateData,
|
||||||
updateOrder,
|
updateOrder,
|
||||||
} from "./data";
|
} from "./data";
|
||||||
import { accessSync, writeFile, statSync, readFileSync } from "node:fs";
|
import { writeFile, statSync, readFileSync, accessSync } from "node:fs";
|
||||||
import mime from "mime";
|
import mime from "mime";
|
||||||
import {
|
import {
|
||||||
deleteExtname,
|
deleteExtname,
|
||||||
|
getFileName,
|
||||||
getItemName,
|
getItemName,
|
||||||
isAbsolutePath,
|
isAbsolutePath,
|
||||||
|
newItem,
|
||||||
} from "../../../commons/utils/common";
|
} from "../../../commons/utils/common";
|
||||||
import { iconExts } from "../../commons/utils";
|
import { iconExts } from "../../commons/utils";
|
||||||
import { addAssociateFolderWatcher } from "../classification";
|
import { addAssociateFolderWatcher } from "../classification";
|
||||||
@ -25,8 +27,11 @@ import {
|
|||||||
convertPath,
|
convertPath,
|
||||||
getMainBackgorunColor,
|
getMainBackgorunColor,
|
||||||
sendToWebContent,
|
sendToWebContent,
|
||||||
|
showMessageBoxSync,
|
||||||
|
showSaveDialogSync,
|
||||||
} from "../commons/index";
|
} from "../commons/index";
|
||||||
import { fork } from "../../commons/utilityProcessUtils";
|
import { fork } from "../../commons/utilityProcessUtils";
|
||||||
|
import { ShortcutInfo } from "../../../types/common";
|
||||||
|
|
||||||
// 窗口
|
// 窗口
|
||||||
let itemAddEditWindow: BrowserWindow | null = null;
|
let itemAddEditWindow: BrowserWindow | null = null;
|
||||||
@ -57,7 +62,11 @@ async function createAddEditWindow(
|
|||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
focusable: true,
|
focusable: true,
|
||||||
show: false,
|
show: false,
|
||||||
backgroundColor: getMainBackgorunColor(),
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
|
backgroundColor:
|
||||||
|
global.setting.appearance.transparency === 1
|
||||||
|
? getMainBackgorunColor()
|
||||||
|
: null,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
preload: join(__dirname, "../preload/index.js"),
|
preload: join(__dirname, "../preload/index.js"),
|
||||||
@ -117,7 +126,11 @@ async function createNetworkIconWindow() {
|
|||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
focusable: true,
|
focusable: true,
|
||||||
show: false,
|
show: false,
|
||||||
backgroundColor: getMainBackgorunColor(),
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
|
backgroundColor:
|
||||||
|
global.setting.appearance.transparency === 1
|
||||||
|
? getMainBackgorunColor()
|
||||||
|
: null,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
preload: join(__dirname, "../preload/index.js"),
|
preload: join(__dirname, "../preload/index.js"),
|
||||||
@ -168,7 +181,11 @@ async function createSVGIconWindow() {
|
|||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
focusable: true,
|
focusable: true,
|
||||||
show: false,
|
show: false,
|
||||||
backgroundColor: getMainBackgorunColor(),
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
|
backgroundColor:
|
||||||
|
global.setting.appearance.transparency === 1
|
||||||
|
? getMainBackgorunColor()
|
||||||
|
: null,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
preload: join(__dirname, "../preload/index.js"),
|
preload: join(__dirname, "../preload/index.js"),
|
||||||
@ -210,7 +227,7 @@ function copy(idList: Array<number>, toClassificationId: number) {
|
|||||||
let itemList = selectByIdList(false, idList);
|
let itemList = selectByIdList(false, idList);
|
||||||
if (itemList.length > 0) {
|
if (itemList.length > 0) {
|
||||||
// 清空打开信息
|
// 清空打开信息
|
||||||
resultList.forEach((item) => clearOpenInfo(item));
|
itemList.forEach((item) => clearOpenInfo(item));
|
||||||
// 批量添加
|
// 批量添加
|
||||||
resultList = batchAdd(toClassificationId, itemList);
|
resultList = batchAdd(toClassificationId, itemList);
|
||||||
}
|
}
|
||||||
@ -246,14 +263,9 @@ function move(idList: Array<number>, toClassificationId: number) {
|
|||||||
* @param classificationId
|
* @param classificationId
|
||||||
* @param pathList
|
* @param pathList
|
||||||
*/
|
*/
|
||||||
function drop(classificationId: number, pathList: Array<string>) {
|
async function drop(classificationId: number, pathList: Array<string>) {
|
||||||
fork(
|
// 获取项目信息
|
||||||
"getDropItemInfo",
|
let resultList = await getDropItemInfo(classificationId, pathList);
|
||||||
{
|
|
||||||
classificationId,
|
|
||||||
pathList,
|
|
||||||
},
|
|
||||||
(resultList: Array<Item>) => {
|
|
||||||
// 添加项目
|
// 添加项目
|
||||||
let itemList = batchAdd(classificationId, resultList);
|
let itemList = batchAdd(classificationId, resultList);
|
||||||
// 发送消息到页面
|
// 发送消息到页面
|
||||||
@ -262,8 +274,6 @@ function drop(classificationId: number, pathList: Array<string>) {
|
|||||||
clear: false,
|
clear: false,
|
||||||
classificationId: null,
|
classificationId: null,
|
||||||
});
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -309,10 +319,15 @@ function updateOpenInfo(type: string, id: number) {
|
|||||||
*/
|
*/
|
||||||
function run(
|
function run(
|
||||||
type: string,
|
type: string,
|
||||||
operation: "open" | "runas" | "openFileLocation",
|
operation: "open" | "runas" | "openFileLocation" | "explore",
|
||||||
item: Item
|
item: Item
|
||||||
) {
|
) {
|
||||||
if (item.data) {
|
if (item.data) {
|
||||||
|
if (operation === "open" && item.data.runAsAdmin) {
|
||||||
|
operation = "runas";
|
||||||
|
} else if (operation === "open" && item.type === 1) {
|
||||||
|
operation = "explore";
|
||||||
|
}
|
||||||
// 更新打开信息
|
// 更新打开信息
|
||||||
updateOpenInfo(type, item.id);
|
updateOpenInfo(type, item.id);
|
||||||
// 判断类型
|
// 判断类型
|
||||||
@ -326,7 +341,7 @@ function run(
|
|||||||
// 获取绝对路径
|
// 获取绝对路径
|
||||||
if (item.type === 0 || item.type === 1) {
|
if (item.type === 0 || item.type === 1) {
|
||||||
// 获取路径
|
// 获取路径
|
||||||
item.data.target = getAbsolutePath(item.data.target);
|
item.data.target = parsePath(item.data.target);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// 判断文件或文件夹是否存在
|
// 判断文件或文件夹是否存在
|
||||||
@ -352,13 +367,9 @@ function run(
|
|||||||
message = global.language.notFoundFolder;
|
message = global.language.notFoundFolder;
|
||||||
}
|
}
|
||||||
message += '"' + item.data.target + '"';
|
message += '"' + item.data.target + '"';
|
||||||
dialog.showMessageBox(global.mainWindow, {
|
showMessageBoxSync("mainWindow", message, "error", [
|
||||||
title: "Dawn Launcher",
|
global.language.ok,
|
||||||
message: message,
|
]);
|
||||||
buttons: [global.language.ok],
|
|
||||||
type: "error",
|
|
||||||
noLink: true,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -429,7 +440,7 @@ function exportIcon(item: Item) {
|
|||||||
}
|
}
|
||||||
// 弹出文件对话框保存
|
// 弹出文件对话框保存
|
||||||
if (extensionName && content) {
|
if (extensionName && content) {
|
||||||
let path = dialog.showSaveDialogSync(global.mainWindow, {
|
let path = showSaveDialogSync("mainWindow", {
|
||||||
defaultPath: "icon",
|
defaultPath: "icon",
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
@ -496,7 +507,7 @@ async function createShortcut(item: Item) {
|
|||||||
let target = item.data.target;
|
let target = item.data.target;
|
||||||
if (item.type === 0 || item.type === 1) {
|
if (item.type === 0 || item.type === 1) {
|
||||||
// 获取绝对路径
|
// 获取绝对路径
|
||||||
target = getAbsolutePath(target);
|
target = parsePath(target);
|
||||||
}
|
}
|
||||||
// 保存路径
|
// 保存路径
|
||||||
let savePath =
|
let savePath =
|
||||||
@ -664,6 +675,119 @@ function clearOpenInfo(item: Item) {
|
|||||||
item.data.quickSearchLastOpen = 0;
|
item.data.quickSearchLastOpen = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除历史记录
|
||||||
|
* @param itemId
|
||||||
|
*/
|
||||||
|
function deleteQuickSearchHistory(itemId: number) {
|
||||||
|
// 查询
|
||||||
|
let item = selectById(itemId);
|
||||||
|
if (item) {
|
||||||
|
// 重置历史记录
|
||||||
|
item.data.quickSearchLastOpen = 0;
|
||||||
|
item.data.quickSearchOpenNumber = 0;
|
||||||
|
// 更新
|
||||||
|
updateData(itemId, item.data);
|
||||||
|
// 通知主页面
|
||||||
|
sendToWebContent("mainWindow", "onUpdateOpenInfo", {
|
||||||
|
id: itemId,
|
||||||
|
quickSearchOpenNumber: item.data.quickSearchOpenNumber,
|
||||||
|
quickSearchLastOpen: item.data.quickSearchLastOpen,
|
||||||
|
type: "quickSearch",
|
||||||
|
});
|
||||||
|
// 通知快速搜索页面
|
||||||
|
sendToWebContent("quickSearchWindow", "onUpdateOpenInfo", {
|
||||||
|
id: itemId,
|
||||||
|
quickSearchOpenNumber: item.data.quickSearchOpenNumber,
|
||||||
|
quickSearchLastOpen: item.data.quickSearchLastOpen,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过路径获取项目信息
|
||||||
|
* @param classificationId
|
||||||
|
* @param pathList
|
||||||
|
*/
|
||||||
|
async function getDropItemInfo(
|
||||||
|
classificationId: number,
|
||||||
|
pathList: Array<string>
|
||||||
|
) {
|
||||||
|
// 项目列表
|
||||||
|
let itemList: Array<Item> = [];
|
||||||
|
// 解析文件信息并添加项目
|
||||||
|
for (const path of pathList) {
|
||||||
|
try {
|
||||||
|
// item
|
||||||
|
let item = newItem({ classificationId });
|
||||||
|
// 目标
|
||||||
|
item.data.target = path;
|
||||||
|
// 名称
|
||||||
|
item.name = getFileName(item.data.target);
|
||||||
|
// 判断是否是快捷方式,如果是的话,需要获取真实路径
|
||||||
|
if (mime.getType(path) === "application/x-ms-shortcut") {
|
||||||
|
// 快捷方式
|
||||||
|
// 获取真实文件路径和参数
|
||||||
|
let shortcutInfo: ShortcutInfo | null =
|
||||||
|
global.addon.getShortcutFileInfo(path);
|
||||||
|
if (shortcutInfo) {
|
||||||
|
// 路径
|
||||||
|
if (shortcutInfo.target) {
|
||||||
|
item.data.target = shortcutInfo.target;
|
||||||
|
}
|
||||||
|
// 参数
|
||||||
|
if (shortcutInfo.arguments) {
|
||||||
|
item.data.params = shortcutInfo.arguments;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取图标
|
||||||
|
item.data.icon = await getFileIcon(item.data.target);
|
||||||
|
// 获取后缀,判断是否是url
|
||||||
|
let ext = extname(item.data.target);
|
||||||
|
if (ext && ext.toLowerCase() === ".url") {
|
||||||
|
// url
|
||||||
|
let url = parseUrlFileContent(readFileSync(item.data.target, "utf-8"));
|
||||||
|
if (url && url.trim() !== "") {
|
||||||
|
item.data.target = url;
|
||||||
|
item.type = 2;
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 文件类型
|
||||||
|
let stats = statSync(item.data.target);
|
||||||
|
item.type = stats.isFile() ? 0 : 1;
|
||||||
|
}
|
||||||
|
// 去掉后缀
|
||||||
|
if (item.type === 0 || item.type === 2) {
|
||||||
|
item.name = deleteExtname(item.name);
|
||||||
|
}
|
||||||
|
// push
|
||||||
|
itemList.push(item);
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
return itemList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析.url文件内容以获取URL
|
||||||
|
* @param content
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function parseUrlFileContent(content: string) {
|
||||||
|
if (content) {
|
||||||
|
const lines = content.split("\n");
|
||||||
|
for (const line of lines) {
|
||||||
|
if (line.startsWith("URL=")) {
|
||||||
|
const url = line.substring(4).trim();
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
createAddEditWindow,
|
createAddEditWindow,
|
||||||
createNetworkIconWindow,
|
createNetworkIconWindow,
|
||||||
@ -681,4 +805,5 @@ export {
|
|||||||
getClipboardImageFile,
|
getClipboardImageFile,
|
||||||
pasteIcon,
|
pasteIcon,
|
||||||
checkInvalid,
|
checkInvalid,
|
||||||
|
deleteQuickSearchHistory,
|
||||||
};
|
};
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import {
|
import {
|
||||||
Menu,
|
Menu,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
dialog,
|
|
||||||
ipcMain,
|
ipcMain,
|
||||||
clipboard,
|
clipboard,
|
||||||
MenuItemConstructorOptions,
|
MenuItemConstructorOptions,
|
||||||
} from "electron";
|
} from "electron";
|
||||||
import { getAbsolutePath } from "../../commons/utils";
|
import { parsePath } from "../../commons/utils";
|
||||||
import {
|
import {
|
||||||
convertTarget,
|
convertTarget,
|
||||||
createAddEditWindow,
|
createAddEditWindow,
|
||||||
@ -22,13 +21,22 @@ import {
|
|||||||
getClipboardImageFile,
|
getClipboardImageFile,
|
||||||
pasteIcon,
|
pasteIcon,
|
||||||
updateOpenInfo,
|
updateOpenInfo,
|
||||||
|
deleteQuickSearchHistory,
|
||||||
} from ".";
|
} from ".";
|
||||||
import {
|
import {
|
||||||
getAppxItemList,
|
getAppxItemList,
|
||||||
getStartMenuItemList,
|
getStartMenuItemList,
|
||||||
getSystemItemList,
|
getSystemItemList,
|
||||||
} from "./commons";
|
} from "./commons";
|
||||||
import { add, del, list, selectById, update, updateOrder } from "./data";
|
import {
|
||||||
|
add,
|
||||||
|
batchDel,
|
||||||
|
del,
|
||||||
|
list,
|
||||||
|
selectById,
|
||||||
|
update,
|
||||||
|
updateOrder,
|
||||||
|
} from "./data";
|
||||||
import { Item } from "../../../types/item";
|
import { Item } from "../../../types/item";
|
||||||
import { getFileExtname, isAbsolutePath } from "../../../commons/utils/common";
|
import { getFileExtname, isAbsolutePath } from "../../../commons/utils/common";
|
||||||
import {
|
import {
|
||||||
@ -50,6 +58,7 @@ import {
|
|||||||
closeWindow,
|
closeWindow,
|
||||||
openAfterHideWindow,
|
openAfterHideWindow,
|
||||||
sendToWebContent,
|
sendToWebContent,
|
||||||
|
showMessageBoxSync,
|
||||||
} from "../commons/index";
|
} from "../commons/index";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -171,11 +180,20 @@ export default function () {
|
|||||||
if (!classification) {
|
if (!classification) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 鼠标位置
|
||||||
|
let point = global.addon.getCursorPoint();
|
||||||
// 菜单
|
// 菜单
|
||||||
let menuList: Array<MenuItem> = [];
|
let menuList: Array<MenuItem> = [];
|
||||||
// 组装菜单
|
// 组装菜单
|
||||||
if (!batchOperation) {
|
if (!batchOperation) {
|
||||||
if (item) {
|
if (item) {
|
||||||
|
// 查询页面分类信息
|
||||||
|
let pageClassification = selectClassificationById(
|
||||||
|
args.pageClassificationId
|
||||||
|
);
|
||||||
|
if (!pageClassification && type === "main") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 后缀
|
// 后缀
|
||||||
let ext: string | null = null;
|
let ext: string | null = null;
|
||||||
// 排除
|
// 排除
|
||||||
@ -184,7 +202,11 @@ export default function () {
|
|||||||
}
|
}
|
||||||
// "打开"菜单
|
// "打开"菜单
|
||||||
let openMenu = false;
|
let openMenu = false;
|
||||||
if (item.type === 0 && ext && (ext === "exe" || ext === "bat")) {
|
if (
|
||||||
|
item.type === 0 ||
|
||||||
|
item.type === 4 ||
|
||||||
|
(item.type === 3 && item.data.target === "cmd.exe")
|
||||||
|
) {
|
||||||
menuList.push(
|
menuList.push(
|
||||||
new MenuItem({
|
new MenuItem({
|
||||||
label: global.language.runAsAdministrator,
|
label: global.language.runAsAdministrator,
|
||||||
@ -233,10 +255,12 @@ export default function () {
|
|||||||
label: global.language.explorerMenu,
|
label: global.language.explorerMenu,
|
||||||
click: () => {
|
click: () => {
|
||||||
// 获取当前窗口所在屏幕
|
// 获取当前窗口所在屏幕
|
||||||
let screen = getWindowInScreen();
|
let display = getWindowInScreen(
|
||||||
|
type === "main" ? global.mainWindow : global.quickSearchWindow
|
||||||
|
);
|
||||||
let scaleFactor = 1;
|
let scaleFactor = 1;
|
||||||
if (screen && screen.length > 0) {
|
if (display && display.length > 0) {
|
||||||
scaleFactor = screen[0].scaleFactor;
|
scaleFactor = display[0].scaleFactor;
|
||||||
}
|
}
|
||||||
// 弹出资源管理器菜单
|
// 弹出资源管理器菜单
|
||||||
sendToWebContent(
|
sendToWebContent(
|
||||||
@ -251,12 +275,17 @@ export default function () {
|
|||||||
global.addon.disableMouseHook();
|
global.addon.disableMouseHook();
|
||||||
// 弹出资源管理器菜单
|
// 弹出资源管理器菜单
|
||||||
global.addon.explorerContextMenu(
|
global.addon.explorerContextMenu(
|
||||||
global.mainWindow.getNativeWindowHandle().readInt32LE(0),
|
(type === "main"
|
||||||
|
? global.mainWindow
|
||||||
|
: global.quickSearchWindow
|
||||||
|
)
|
||||||
|
.getNativeWindowHandle()
|
||||||
|
.readInt32LE(0),
|
||||||
item.type === 0 || item.type === 1
|
item.type === 0 || item.type === 1
|
||||||
? getAbsolutePath(item.data.target)
|
? parsePath(item.data.target)
|
||||||
: item.data.target,
|
: item.data.target,
|
||||||
args.x * scaleFactor,
|
point[0],
|
||||||
args.y * scaleFactor
|
point[1]
|
||||||
);
|
);
|
||||||
// 开启鼠标HOOK
|
// 开启鼠标HOOK
|
||||||
global.addon.enableMouseHook();
|
global.addon.enableMouseHook();
|
||||||
@ -282,7 +311,7 @@ export default function () {
|
|||||||
click: () => {
|
click: () => {
|
||||||
clipboard.writeText(
|
clipboard.writeText(
|
||||||
item.type === 0 || item.type === 1
|
item.type === 0 || item.type === 1
|
||||||
? getAbsolutePath(item.data.target)
|
? parsePath(item.data.target)
|
||||||
: item.data.target
|
: item.data.target
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -293,7 +322,8 @@ export default function () {
|
|||||||
if (
|
if (
|
||||||
type === "main" &&
|
type === "main" &&
|
||||||
(item.type === 0 || item.type === 1) &&
|
(item.type === 0 || item.type === 1) &&
|
||||||
classification.type === 0
|
classification.type === 0 &&
|
||||||
|
pageClassification.type === 0
|
||||||
) {
|
) {
|
||||||
menuList.push(
|
menuList.push(
|
||||||
new MenuItem({
|
new MenuItem({
|
||||||
@ -310,7 +340,7 @@ export default function () {
|
|||||||
);
|
);
|
||||||
pathMenu = true;
|
pathMenu = true;
|
||||||
}
|
}
|
||||||
if (item.type === 0 || item.type === 1 || item.type === 2) {
|
if (item.type === 0 || item.type === 1) {
|
||||||
menuList.push(
|
menuList.push(
|
||||||
new MenuItem({
|
new MenuItem({
|
||||||
label: global.language.createShortcut,
|
label: global.language.createShortcut,
|
||||||
@ -324,7 +354,11 @@ export default function () {
|
|||||||
if (pathMenu) {
|
if (pathMenu) {
|
||||||
menuList.push(new MenuItem({ type: "separator" }));
|
menuList.push(new MenuItem({ type: "separator" }));
|
||||||
}
|
}
|
||||||
if (type === "main") {
|
if (
|
||||||
|
type === "main" &&
|
||||||
|
classification.type === 0 &&
|
||||||
|
pageClassification.type === 0
|
||||||
|
) {
|
||||||
// "图标"菜单
|
// "图标"菜单
|
||||||
let existPasteIcon = false;
|
let existPasteIcon = false;
|
||||||
// 获取剪切板图片文件
|
// 获取剪切板图片文件
|
||||||
@ -360,7 +394,9 @@ export default function () {
|
|||||||
if (
|
if (
|
||||||
type === "main" &&
|
type === "main" &&
|
||||||
(item.type === 0 || item.type === 1) &&
|
(item.type === 0 || item.type === 1) &&
|
||||||
!item.data.fixedIcon
|
!item.data.fixedIcon &&
|
||||||
|
classification.type === 0 &&
|
||||||
|
pageClassification.type === 0
|
||||||
) {
|
) {
|
||||||
menuList.push(
|
menuList.push(
|
||||||
new MenuItem({
|
new MenuItem({
|
||||||
@ -371,7 +407,11 @@ export default function () {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (type === "main" && classification.type === 0) {
|
if (
|
||||||
|
type === "main" &&
|
||||||
|
classification.type === 0 &&
|
||||||
|
pageClassification.type === 0
|
||||||
|
) {
|
||||||
menuList.push(new MenuItem({ type: "separator" }));
|
menuList.push(new MenuItem({ type: "separator" }));
|
||||||
menuList.push(
|
menuList.push(
|
||||||
new MenuItem({
|
new MenuItem({
|
||||||
@ -398,13 +438,12 @@ export default function () {
|
|||||||
new MenuItem({
|
new MenuItem({
|
||||||
label: global.language.delete,
|
label: global.language.delete,
|
||||||
click: () => {
|
click: () => {
|
||||||
let res = dialog.showMessageBoxSync(global.mainWindow, {
|
let res = showMessageBoxSync(
|
||||||
message: global.language.deleteItemPrompt,
|
"mainWindow",
|
||||||
buttons: [global.language.ok, global.language.cancel],
|
global.language.deleteItemPrompt,
|
||||||
type: "question",
|
"question",
|
||||||
noLink: true,
|
[global.language.ok, global.language.cancel]
|
||||||
cancelId: 1,
|
);
|
||||||
});
|
|
||||||
if (res === 0) {
|
if (res === 0) {
|
||||||
// 删除数据
|
// 删除数据
|
||||||
del(item.id);
|
del(item.id);
|
||||||
@ -540,20 +579,17 @@ export default function () {
|
|||||||
new MenuItem({
|
new MenuItem({
|
||||||
label: global.language.batchDelete,
|
label: global.language.batchDelete,
|
||||||
click: () => {
|
click: () => {
|
||||||
let res = dialog.showMessageBoxSync(global.mainWindow, {
|
let res = showMessageBoxSync(
|
||||||
message: global.language.batchDeletePrompt,
|
"mainWindow",
|
||||||
buttons: [global.language.ok, global.language.cancel],
|
global.language.batchDeletePrompt,
|
||||||
type: "question",
|
"question",
|
||||||
noLink: true,
|
[global.language.ok, global.language.cancel]
|
||||||
cancelId: 1,
|
);
|
||||||
});
|
|
||||||
if (res === 0) {
|
if (res === 0) {
|
||||||
for (const id of batchSelectedIdList) {
|
// 批量删除
|
||||||
// 删除数据
|
batchDel(batchSelectedIdList);
|
||||||
del(id);
|
|
||||||
// 快捷键
|
// 快捷键
|
||||||
setShortcutKey();
|
setShortcutKey();
|
||||||
}
|
|
||||||
// 通知前端删除数据
|
// 通知前端删除数据
|
||||||
sendToWebContent(
|
sendToWebContent(
|
||||||
"mainWindow",
|
"mainWindow",
|
||||||
@ -665,7 +701,7 @@ export default function () {
|
|||||||
}
|
}
|
||||||
let icon = join(process.env.VITE_PUBLIC, "drag-and-drop.png");
|
let icon = join(process.env.VITE_PUBLIC, "drag-and-drop.png");
|
||||||
event.sender.startDrag({
|
event.sender.startDrag({
|
||||||
file: getAbsolutePath(item.data.target),
|
file: parsePath(item.data.target),
|
||||||
icon: icon,
|
icon: icon,
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
@ -677,4 +713,8 @@ export default function () {
|
|||||||
ipcMain.on("updateItemOpenInfo", (event, args) => {
|
ipcMain.on("updateItemOpenInfo", (event, args) => {
|
||||||
updateOpenInfo(args.type, args.id);
|
updateOpenInfo(args.type, args.id);
|
||||||
});
|
});
|
||||||
|
// 删除历史记录
|
||||||
|
ipcMain.on("deleteQuickSearchHistory", (event, args) => {
|
||||||
|
deleteQuickSearchHistory(args);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,13 @@ import {
|
|||||||
import { createSettingWindow } from "../setting";
|
import { createSettingWindow } from "../setting";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import cacheData from "../commons/cacheData";
|
import cacheData from "../commons/cacheData";
|
||||||
import { getMainBackgorunColor, sendToWebContent } from "../commons";
|
import {
|
||||||
|
getMainBackgorunColor,
|
||||||
|
getWindowInScreen,
|
||||||
|
mainWindowExist,
|
||||||
|
sendToWebContent,
|
||||||
|
} from "../commons";
|
||||||
|
import { release } from "node:os";
|
||||||
|
|
||||||
// 窗口
|
// 窗口
|
||||||
let mainWindow: BrowserWindow | null = null;
|
let mainWindow: BrowserWindow | null = null;
|
||||||
@ -36,11 +42,12 @@ function createMainWindow() {
|
|||||||
minimizable: false,
|
minimizable: false,
|
||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
transparent: global.setting.appearance.transparency < 1,
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
skipTaskbar: true,
|
skipTaskbar: global.setting.general.hideTaskbar,
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
global.setting.appearance.transparency === 1
|
global.setting.appearance.transparency === 1
|
||||||
? getMainBackgorunColor()
|
? getMainBackgorunColor()
|
||||||
: null,
|
: null,
|
||||||
|
icon: join(process.env.VITE_PUBLIC, "logo.ico"),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
backgroundThrottling: false,
|
backgroundThrottling: false,
|
||||||
@ -59,11 +66,6 @@ function createMainWindow() {
|
|||||||
global.addon.removeWindowAnimation(
|
global.addon.removeWindowAnimation(
|
||||||
mainWindow.getNativeWindowHandle().readInt32LE(0)
|
mainWindow.getNativeWindowHandle().readInt32LE(0)
|
||||||
);
|
);
|
||||||
// 恢复上一次的位置
|
|
||||||
let bounds = cacheData.cacheStore.get("mainWindowBounds");
|
|
||||||
if (bounds) {
|
|
||||||
mainWindow.setBounds(bounds);
|
|
||||||
}
|
|
||||||
// 永远居中不可移动
|
// 永远居中不可移动
|
||||||
if (global.setting.general.alwaysCenter) {
|
if (global.setting.general.alwaysCenter) {
|
||||||
mainWindow.setMovable(false);
|
mainWindow.setMovable(false);
|
||||||
@ -74,16 +76,45 @@ function createMainWindow() {
|
|||||||
if (global.setting.general.alwaysTop) {
|
if (global.setting.general.alwaysTop) {
|
||||||
mainWindow.setAlwaysOnTop(true, "screen-saver");
|
mainWindow.setAlwaysOnTop(true, "screen-saver");
|
||||||
}
|
}
|
||||||
|
// 恢复上一次的位置
|
||||||
|
let bounds: any = cacheData.cacheStore.get("mainWindowBounds");
|
||||||
// 锁定尺寸
|
// 锁定尺寸
|
||||||
if (!global.setting.general.lockSize) {
|
|
||||||
mainWindow.setResizable(!global.setting.general.lockSize);
|
mainWindow.setResizable(!global.setting.general.lockSize);
|
||||||
|
// 如果是锁定尺寸的话,使用锁定尺寸来设置窗口尺寸
|
||||||
|
if (global.setting.general.lockSize) {
|
||||||
|
let lockSizeBounds: any = cacheData.cacheStore.get(
|
||||||
|
"mainWindowLockSizeBounds"
|
||||||
|
);
|
||||||
|
if (lockSizeBounds) {
|
||||||
|
if (bounds) {
|
||||||
|
bounds.width = lockSizeBounds.width;
|
||||||
|
bounds.height = lockSizeBounds.height;
|
||||||
|
} else {
|
||||||
|
bounds = {
|
||||||
|
width: lockSizeBounds.width,
|
||||||
|
height: lockSizeBounds.height,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (bounds) {
|
||||||
|
cacheData.cacheStore.set("mainWindowLockSizeBounds", bounds);
|
||||||
|
} else {
|
||||||
|
cacheData.cacheStore.set(
|
||||||
|
"mainWindowLockSizeBounds",
|
||||||
|
mainWindow.getBounds()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bounds) {
|
||||||
|
mainWindow.setBounds(bounds);
|
||||||
}
|
}
|
||||||
// 托盘
|
// 托盘
|
||||||
createTray(!global.setting.general.hideTray);
|
createTray(!global.setting.general.hideTray);
|
||||||
// 永远居中
|
// 永远居中
|
||||||
alwaysCenter();
|
alwaysCenter();
|
||||||
// 判断窗口位置
|
// 判断窗口位置
|
||||||
let displays = getWindowInScreen();
|
let displays = getWindowInScreen(mainWindow);
|
||||||
if (displays.length === 0) {
|
if (displays.length === 0) {
|
||||||
// 代表窗口的位置不再任一屏幕内,将窗口位置移动到主窗口
|
// 代表窗口的位置不再任一屏幕内,将窗口位置移动到主窗口
|
||||||
mainWindow.center();
|
mainWindow.center();
|
||||||
@ -109,13 +140,7 @@ function createMainWindow() {
|
|||||||
// 失去焦点
|
// 失去焦点
|
||||||
mainWindow.on("blur", () => {
|
mainWindow.on("blur", () => {
|
||||||
if (global.setting.general.edgeAutoHide && global.blurHide) {
|
if (global.setting.general.edgeAutoHide && global.blurHide) {
|
||||||
let scaleFactor = screen.getPrimaryDisplay().scaleFactor;
|
autoHide(0, false);
|
||||||
autoHide(
|
|
||||||
screen.getCursorScreenPoint().x * scaleFactor,
|
|
||||||
screen.getCursorScreenPoint().y * scaleFactor,
|
|
||||||
0,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
mainWindow.isVisible() &&
|
mainWindow.isVisible() &&
|
||||||
@ -123,7 +148,10 @@ function createMainWindow() {
|
|||||||
!global.setting.general.alwaysTop
|
!global.setting.general.alwaysTop
|
||||||
) {
|
) {
|
||||||
// 如果当前还有打开的子窗口就不执行失去焦点隐藏
|
// 如果当前还有打开的子窗口就不执行失去焦点隐藏
|
||||||
if (mainWindow.getChildWindows().length === 0) {
|
if (
|
||||||
|
mainWindow.getChildWindows().length === 0 &&
|
||||||
|
!global.mainWindowShowDialog
|
||||||
|
) {
|
||||||
hideMainWindow();
|
hideMainWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -153,31 +181,45 @@ function createMainWindow() {
|
|||||||
sendToWebContent("mainWindow", "onCollapseSubClassification", {});
|
sendToWebContent("mainWindow", "onCollapseSubClassification", {});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// 主窗口关闭事件
|
||||||
|
mainWindow.on("closed", () => {
|
||||||
|
app.quit();
|
||||||
|
});
|
||||||
// 创建鼠标hook
|
// 创建鼠标hook
|
||||||
|
let mousedownClassName = null;
|
||||||
addon.createMouseHook((...args: any[]) => {
|
addon.createMouseHook((...args: any[]) => {
|
||||||
let res = JSON.parse(args[1]);
|
let res = JSON.parse(args[1]);
|
||||||
let event: string = res.event;
|
let event: string = res.event;
|
||||||
let x: number = res.x;
|
let x: number = res.x;
|
||||||
let y: number = res.y;
|
let y: number = res.y;
|
||||||
|
let className: string =
|
||||||
|
!res.class_name || res.class_name.trim() === ""
|
||||||
|
? null
|
||||||
|
: res.class_name.trim();
|
||||||
// 1左键 2右键 3滚轮
|
// 1左键 2右键 3滚轮
|
||||||
let button: number = res.button;
|
let button: number = res.button;
|
||||||
if (event === "mousemove") {
|
if (event === "mousemove") {
|
||||||
// 鼠标移动
|
// 鼠标移动
|
||||||
if (!global.blurHide) {
|
if (!global.blurHide) {
|
||||||
// 停靠在桌面边缘时自动隐藏
|
// 停靠在桌面边缘时自动隐藏
|
||||||
autoHide(x, y, 40, true);
|
autoHide(20, true);
|
||||||
}
|
}
|
||||||
} else if (event === "mousedown") {
|
} else if (event === "mousedown") {
|
||||||
// 鼠标按下
|
// 鼠标按下
|
||||||
|
if (button === 1) {
|
||||||
|
mousedownClassName = className;
|
||||||
|
}
|
||||||
} else if (event === "mouseup") {
|
} else if (event === "mouseup") {
|
||||||
// 鼠标抬起
|
// 鼠标抬起
|
||||||
if (button === 3) {
|
if (button === 1) {
|
||||||
|
// 双击任务栏
|
||||||
|
doubleClickTaskbar(mousedownClassName, className);
|
||||||
|
} else if (button === 3) {
|
||||||
// 中间单击
|
// 中间单击
|
||||||
// 显示隐藏窗口
|
|
||||||
showHideMouseWheelClick();
|
showHideMouseWheelClick();
|
||||||
}
|
}
|
||||||
// 双击任务栏
|
// 失去焦点隐藏
|
||||||
doubleClickTaskbar(button);
|
onBlurHide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 禁用标题栏右键
|
// 禁用标题栏右键
|
||||||
@ -192,18 +234,65 @@ function createMainWindow() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失去焦点隐藏
|
||||||
|
*/
|
||||||
|
function onBlurHide() {
|
||||||
|
if (
|
||||||
|
mainWindowExist() &&
|
||||||
|
global.mainWindow.isVisible() &&
|
||||||
|
global.setting.general.hideLoseFocus &&
|
||||||
|
!global.setting.general.alwaysTop &&
|
||||||
|
global.mainWindow.getChildWindows().length === 0 &&
|
||||||
|
!global.mainWindowShowDialog &&
|
||||||
|
!hasCursorPosWindow(global.mainWindow)
|
||||||
|
) {
|
||||||
|
// 隐藏窗口
|
||||||
|
hideMainWindow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断鼠标是否在置顶的窗口范围内
|
||||||
|
*/
|
||||||
|
function hasCursorPosWindow(window: BrowserWindow) {
|
||||||
|
if (window && !window.isDestroyed() && window.isVisible()) {
|
||||||
|
// 获取鼠标位置
|
||||||
|
let point = screen.getCursorScreenPoint();
|
||||||
|
// 窗口位置信息
|
||||||
|
let bounds = window.getBounds();
|
||||||
|
// 判断鼠标是否在窗口以外
|
||||||
|
if (
|
||||||
|
point.x < bounds.x ||
|
||||||
|
point.x > bounds.x + bounds.width ||
|
||||||
|
point.y < bounds.y ||
|
||||||
|
point.y > bounds.y + bounds.height
|
||||||
|
) {
|
||||||
|
// 窗口以外
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
// 窗口以内
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示窗口之前
|
* 显示窗口之前
|
||||||
* @param blurHide
|
* @param blurHide
|
||||||
|
* @param autoHide
|
||||||
* @param selectedClassificationId
|
* @param selectedClassificationId
|
||||||
*/
|
*/
|
||||||
function showMainWindowBefore(
|
function showMainWindowBefore(
|
||||||
blurHide: boolean,
|
blurHide: boolean,
|
||||||
|
autoHide = false,
|
||||||
selectedClassificationId: number | null = null
|
selectedClassificationId: number | null = null
|
||||||
) {
|
) {
|
||||||
// 向主窗口发送通知
|
// 向主窗口发送通知
|
||||||
sendToWebContent("mainWindow", "onShowMainWindowBefore", {
|
sendToWebContent("mainWindow", "onShowMainWindowBefore", {
|
||||||
blurHide,
|
blurHide,
|
||||||
|
autoHide,
|
||||||
selectedClassificationId,
|
selectedClassificationId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -211,8 +300,12 @@ function showMainWindowBefore(
|
|||||||
/**
|
/**
|
||||||
* 显示窗口
|
* 显示窗口
|
||||||
* @param blurHide
|
* @param blurHide
|
||||||
|
* @param autoHide
|
||||||
*/
|
*/
|
||||||
function showMainWindow(blurHide: boolean) {
|
function showMainWindow(blurHide: boolean, autoHide = false) {
|
||||||
|
if (!mainWindowExist()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// flag
|
// flag
|
||||||
let flag = true;
|
let flag = true;
|
||||||
// 是否开启勿扰模式
|
// 是否开启勿扰模式
|
||||||
@ -221,22 +314,20 @@ function showMainWindow(blurHide: boolean) {
|
|||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!autoHide) {
|
||||||
// 显示时跟随鼠标位置
|
// 显示时跟随鼠标位置
|
||||||
showFollowMousePosition();
|
showFollowMousePosition();
|
||||||
|
}
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
if (!global.setting.general.alwaysTop) {
|
||||||
|
global.mainWindow.setAlwaysOnTop(true, "screen-saver");
|
||||||
|
}
|
||||||
global.mainWindow.show();
|
global.mainWindow.show();
|
||||||
// 如果没有设置置顶时,显示窗口先置顶一下,再取消
|
|
||||||
if (!global.mainWindow.isAlwaysOnTop) {
|
|
||||||
mainWindow.setAlwaysOnTop(true, "screen-saver");
|
|
||||||
mainWindow.setAlwaysOnTop(false);
|
|
||||||
}
|
|
||||||
global.mainWindow.focus();
|
global.mainWindow.focus();
|
||||||
global.blurHide = blurHide;
|
if (!global.setting.general.alwaysTop) {
|
||||||
if (blurHide) {
|
global.mainWindow.setAlwaysOnTop(false);
|
||||||
global.blurHide = true;
|
|
||||||
} else {
|
|
||||||
global.blurHide = false;
|
|
||||||
}
|
}
|
||||||
|
global.blurHide = blurHide;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,7 +335,7 @@ function showMainWindow(blurHide: boolean) {
|
|||||||
* 隐藏窗口
|
* 隐藏窗口
|
||||||
*/
|
*/
|
||||||
function hideMainWindow() {
|
function hideMainWindow() {
|
||||||
if (global.mainWindow.isVisible()) {
|
if (mainWindowExist() && global.mainWindow.isVisible()) {
|
||||||
global.mainWindow.hide();
|
global.mainWindow.hide();
|
||||||
global.blurHide = false;
|
global.blurHide = false;
|
||||||
}
|
}
|
||||||
@ -298,39 +389,20 @@ function createTray(show: boolean) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取窗口所在的屏幕
|
|
||||||
*/
|
|
||||||
function getWindowInScreen() {
|
|
||||||
let inDisplays: Array<Display> = [];
|
|
||||||
let displays = screen.getAllDisplays();
|
|
||||||
let bounds = global.mainWindow.getBounds();
|
|
||||||
for (let display of displays) {
|
|
||||||
let workArea = display.workArea;
|
|
||||||
if (
|
|
||||||
((workArea.x <= bounds.x && workArea.x + workArea.width >= bounds.x) ||
|
|
||||||
(workArea.x <= bounds.x + bounds.width &&
|
|
||||||
workArea.x + workArea.width >= bounds.x + bounds.width)) &&
|
|
||||||
((workArea.y <= bounds.y && workArea.y + workArea.height >= bounds.y) ||
|
|
||||||
(workArea.y <= bounds.y + bounds.height &&
|
|
||||||
workArea.y + workArea.height >= bounds.y + bounds.height))
|
|
||||||
) {
|
|
||||||
inDisplays.push(display);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return inDisplays;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 边缘吸附
|
* 边缘吸附
|
||||||
* @param display
|
* @param display
|
||||||
|
* @param workArea
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
function edgeAdsorb(display: Display | null) {
|
function edgeAdsorb(display: Display | null, workArea = false) {
|
||||||
|
if (!mainWindowExist()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 如果勾选停靠在桌面边缘时自动隐藏,放行
|
// 如果勾选停靠在桌面边缘时自动隐藏,放行
|
||||||
if (
|
if (
|
||||||
global.mainWindow.isDestroyed() ||
|
!global.setting.general.edgeAdsorb &&
|
||||||
(!global.setting.general.edgeAdsorb && !global.setting.general.edgeAutoHide)
|
!global.setting.general.edgeAutoHide
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -338,37 +410,80 @@ function edgeAdsorb(display: Display | null) {
|
|||||||
// 清空方向
|
// 清空方向
|
||||||
global.mainWindowDirection = null;
|
global.mainWindowDirection = null;
|
||||||
// 屏幕
|
// 屏幕
|
||||||
let displays = display ? [display] : getWindowInScreen();
|
let displays = display ? [display] : getWindowInScreen(global.mainWindow);
|
||||||
if (displays.length > 1 || displays.length === 0) {
|
if (displays.length > 1 || displays.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 获取屏幕工作区域
|
// 屏幕区域
|
||||||
let workArea = displays[0].workArea;
|
let displayBounds = workArea ? displays[0].workArea : displays[0].bounds;
|
||||||
// 窗口位置信息
|
// 窗口位置信息
|
||||||
let bounds = global.mainWindow.getBounds();
|
let bounds = global.mainWindow.getBounds();
|
||||||
if (bounds.x + bounds.width >= workArea.x + workArea.width) {
|
if (bounds.x <= displayBounds.x && bounds.y <= displayBounds.y) {
|
||||||
|
// 左上角
|
||||||
|
global.mainWindow.setBounds({ x: displayBounds.x, y: displayBounds.y });
|
||||||
|
global.mainWindowDirection = "leftTop";
|
||||||
|
global.blurHide = false;
|
||||||
|
} else if (
|
||||||
|
bounds.x + bounds.width >= displayBounds.x + displayBounds.width &&
|
||||||
|
bounds.y <= displayBounds.y
|
||||||
|
) {
|
||||||
|
// 右上角
|
||||||
|
global.mainWindow.setBounds({
|
||||||
|
x: displayBounds.x + displayBounds.width - bounds.width,
|
||||||
|
y: displayBounds.y,
|
||||||
|
});
|
||||||
|
global.mainWindowDirection = "rightTop";
|
||||||
|
global.blurHide = false;
|
||||||
|
} else if (
|
||||||
|
bounds.x <= displayBounds.x &&
|
||||||
|
bounds.y + bounds.height >= displayBounds.y + displayBounds.height
|
||||||
|
) {
|
||||||
|
// 左下角
|
||||||
|
global.mainWindow.setBounds({
|
||||||
|
x: displayBounds.x,
|
||||||
|
y: displayBounds.y + displayBounds.height - bounds.height,
|
||||||
|
});
|
||||||
|
global.mainWindowDirection = "leftBottom";
|
||||||
|
global.blurHide = false;
|
||||||
|
} else if (
|
||||||
|
bounds.x + bounds.width >= displayBounds.x + displayBounds.width &&
|
||||||
|
bounds.y + bounds.height >= displayBounds.y + displayBounds.height
|
||||||
|
) {
|
||||||
|
// 右下角
|
||||||
|
global.mainWindow.setBounds({
|
||||||
|
x: displayBounds.x + displayBounds.width - bounds.width,
|
||||||
|
y: displayBounds.y + displayBounds.height - bounds.height,
|
||||||
|
});
|
||||||
|
global.mainWindowDirection = "rightBottom";
|
||||||
|
global.blurHide = false;
|
||||||
|
} else if (bounds.x <= displayBounds.x) {
|
||||||
|
// 左侧
|
||||||
|
global.mainWindow.setBounds({ x: displayBounds.x });
|
||||||
|
global.mainWindowDirection = "left";
|
||||||
|
global.blurHide = false;
|
||||||
|
} else if (
|
||||||
|
bounds.x + bounds.width >=
|
||||||
|
displayBounds.x + displayBounds.width
|
||||||
|
) {
|
||||||
// 右侧
|
// 右侧
|
||||||
global.mainWindow.setBounds({
|
global.mainWindow.setBounds({
|
||||||
x: workArea.x + workArea.width - bounds.width,
|
x: displayBounds.x + displayBounds.width - bounds.width,
|
||||||
});
|
});
|
||||||
global.mainWindowDirection = "right";
|
global.mainWindowDirection = "right";
|
||||||
global.blurHide = false;
|
global.blurHide = false;
|
||||||
} else if (bounds.x <= workArea.x) {
|
} else if (
|
||||||
// 左侧
|
bounds.y + bounds.height >=
|
||||||
global.mainWindow.setBounds({ x: workArea.x });
|
displayBounds.y + displayBounds.height
|
||||||
global.mainWindowDirection = "left";
|
) {
|
||||||
global.blurHide = false;
|
|
||||||
}
|
|
||||||
if (bounds.y + bounds.height >= workArea.y + workArea.height) {
|
|
||||||
// 底部
|
// 底部
|
||||||
global.mainWindow.setBounds({
|
global.mainWindow.setBounds({
|
||||||
y: workArea.y + workArea.height - bounds.height,
|
y: displayBounds.y + displayBounds.height - bounds.height,
|
||||||
});
|
});
|
||||||
global.mainWindowDirection = "bottom";
|
global.mainWindowDirection = "bottom";
|
||||||
global.blurHide = false;
|
global.blurHide = false;
|
||||||
} else if (bounds.y <= workArea.y) {
|
} else if (bounds.y <= displayBounds.y) {
|
||||||
// 顶部
|
// 顶部
|
||||||
global.mainWindow.setBounds({ y: workArea.y });
|
global.mainWindow.setBounds({ y: displayBounds.y });
|
||||||
global.mainWindowDirection = "top";
|
global.mainWindowDirection = "top";
|
||||||
global.blurHide = false;
|
global.blurHide = false;
|
||||||
}
|
}
|
||||||
@ -384,6 +499,9 @@ function edgeAdsorb(display: Display | null) {
|
|||||||
* 显示时跟随鼠标位置
|
* 显示时跟随鼠标位置
|
||||||
*/
|
*/
|
||||||
function showFollowMousePosition() {
|
function showFollowMousePosition() {
|
||||||
|
if (!mainWindowExist()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 当永远居中、固定位置勾选后不能使用显示时跟随鼠标位置
|
// 当永远居中、固定位置勾选后不能使用显示时跟随鼠标位置
|
||||||
if (
|
if (
|
||||||
!global.setting.general.alwaysCenter &&
|
!global.setting.general.alwaysCenter &&
|
||||||
@ -398,13 +516,15 @@ function showFollowMousePosition() {
|
|||||||
let y = Math.round(bounds.height / 2);
|
let y = Math.round(bounds.height / 2);
|
||||||
// 设置窗口位置
|
// 设置窗口位置
|
||||||
global.mainWindow.setPosition(point.x - x, point.y - y);
|
global.mainWindow.setPosition(point.x - x, point.y - y);
|
||||||
|
// 调整窗口位置并显示时会出现闪屏的情况
|
||||||
|
// https://github.com/electron/electron/issues/10862
|
||||||
for (let i = 0; i < 10; i++) {
|
for (let i = 0; i < 10; i++) {
|
||||||
global.mainWindow.setSize(bounds.width, bounds.height);
|
global.mainWindow.setSize(bounds.width, bounds.height);
|
||||||
}
|
}
|
||||||
// 获取当前鼠标所在屏幕
|
// 获取当前鼠标所在屏幕
|
||||||
let display = screen.getDisplayNearestPoint(point);
|
let display = screen.getDisplayNearestPoint(point);
|
||||||
// 边缘吸附
|
// 边缘吸附
|
||||||
edgeAdsorb(display);
|
edgeAdsorb(display, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,6 +532,9 @@ function showFollowMousePosition() {
|
|||||||
* 中间单击显示/隐藏窗口
|
* 中间单击显示/隐藏窗口
|
||||||
*/
|
*/
|
||||||
function showHideMouseWheelClick() {
|
function showHideMouseWheelClick() {
|
||||||
|
if (!mainWindowExist()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (global.setting.general.showHideMouseWheelClick) {
|
if (global.setting.general.showHideMouseWheelClick) {
|
||||||
if (global.mainWindow.isVisible()) {
|
if (global.mainWindow.isVisible()) {
|
||||||
hideMainWindow();
|
hideMainWindow();
|
||||||
@ -425,65 +548,101 @@ function showHideMouseWheelClick() {
|
|||||||
* 永远居中
|
* 永远居中
|
||||||
*/
|
*/
|
||||||
function alwaysCenter() {
|
function alwaysCenter() {
|
||||||
|
if (!mainWindowExist()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (global.setting.general.alwaysCenter) {
|
if (global.setting.general.alwaysCenter) {
|
||||||
mainWindow.center();
|
global.mainWindow.center();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 边缘自动隐藏
|
* 边缘自动隐藏
|
||||||
* @param x
|
|
||||||
* @param y
|
|
||||||
* @param size
|
* @param size
|
||||||
* @param timer 是否启用延迟显示/隐藏
|
* @param timer 是否启用延迟显示/隐藏
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
function autoHide(x: number, y: number, size: number, timer: boolean) {
|
function autoHide(size: number, timer: boolean) {
|
||||||
if (global.mainWindow.isDestroyed() || !global.setting.general.edgeAutoHide) {
|
if (!mainWindowExist()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!global.setting.general.edgeAutoHide) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 当有子窗口时不自动隐藏
|
// 当有子窗口时不自动隐藏
|
||||||
if (mainWindow.getChildWindows().length > 0) {
|
if (
|
||||||
|
global.mainWindow.getChildWindows().length > 0 ||
|
||||||
|
global.mainWindowShowDialog
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
let x = screen.getCursorScreenPoint().x;
|
||||||
|
let y = screen.getCursorScreenPoint().y;
|
||||||
try {
|
try {
|
||||||
// 屏幕
|
// 屏幕
|
||||||
let displays = getWindowInScreen();
|
let displays = getWindowInScreen(global.mainWindow);
|
||||||
if (displays.length > 1 || displays.length === 0) {
|
if (displays.length > 1 || displays.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 工作区域
|
// 屏幕区域
|
||||||
let workArea = displays[0].workArea;
|
let displayBounds = displays[0].bounds;
|
||||||
// 缩放比例
|
|
||||||
let scaleFactor = displays[0].scaleFactor;
|
|
||||||
// 窗口位置信息
|
// 窗口位置信息
|
||||||
let bounds = mainWindow.getBounds();
|
let bounds = global.mainWindow.getBounds();
|
||||||
if (mainWindow.isVisible()) {
|
if (global.mainWindow.isVisible()) {
|
||||||
let flag = false;
|
let flag = false;
|
||||||
if (bounds.x + bounds.width >= workArea.x + workArea.width) {
|
if (bounds.x === displayBounds.x && bounds.y === displayBounds.y) {
|
||||||
|
// 左上角
|
||||||
|
flag =
|
||||||
|
x >= bounds.x + bounds.width + size ||
|
||||||
|
y >= bounds.y + bounds.height + size;
|
||||||
|
} else if (
|
||||||
|
bounds.x + bounds.width === displayBounds.x + displayBounds.width &&
|
||||||
|
bounds.y === displayBounds.y
|
||||||
|
) {
|
||||||
|
// 右上角
|
||||||
|
flag = x <= bounds.x - size || y >= bounds.y + bounds.height + size;
|
||||||
|
} else if (
|
||||||
|
bounds.x === displayBounds.x &&
|
||||||
|
bounds.y + bounds.height === displayBounds.y + displayBounds.height
|
||||||
|
) {
|
||||||
|
// 左下角
|
||||||
|
flag = x >= bounds.x + bounds.width + size || y <= bounds.y - size;
|
||||||
|
} else if (
|
||||||
|
bounds.x + bounds.width === displayBounds.x + displayBounds.width &&
|
||||||
|
bounds.y + bounds.height === displayBounds.y + displayBounds.height
|
||||||
|
) {
|
||||||
|
// 右下角
|
||||||
|
flag = x <= bounds.x - size || y <= bounds.y - size;
|
||||||
|
} else if (
|
||||||
|
bounds.x + bounds.width >=
|
||||||
|
displayBounds.x + displayBounds.width
|
||||||
|
) {
|
||||||
// 右侧
|
// 右侧
|
||||||
flag =
|
flag =
|
||||||
x <= bounds.x * scaleFactor - size ||
|
x <= bounds.x - size ||
|
||||||
y <= bounds.y * scaleFactor - size ||
|
y <= bounds.y - size ||
|
||||||
y >= (bounds.y + bounds.height) * scaleFactor + size;
|
y >= bounds.y + bounds.height + size;
|
||||||
} else if (bounds.x === workArea.x) {
|
} else if (bounds.x === displayBounds.x) {
|
||||||
// 左侧
|
// 左侧
|
||||||
flag =
|
flag =
|
||||||
x > (bounds.x + bounds.width) * scaleFactor + size ||
|
x > bounds.x + bounds.width + size ||
|
||||||
y <= bounds.y * scaleFactor - size ||
|
y <= bounds.y - size ||
|
||||||
y >= (bounds.y + bounds.height) * scaleFactor + size;
|
y >= bounds.y + bounds.height + size;
|
||||||
} else if (bounds.y + bounds.height >= workArea.y + workArea.height) {
|
} else if (
|
||||||
|
bounds.y + bounds.height >=
|
||||||
|
displayBounds.y + displayBounds.height
|
||||||
|
) {
|
||||||
// 底部
|
// 底部
|
||||||
flag =
|
flag =
|
||||||
y < bounds.y * scaleFactor - size ||
|
y < bounds.y - size ||
|
||||||
x <= bounds.x * scaleFactor - size ||
|
x <= bounds.x - size ||
|
||||||
x >= (bounds.x + bounds.width) * scaleFactor + size;
|
x >= bounds.x + bounds.width + size;
|
||||||
} else if (bounds.y === workArea.y) {
|
} else if (bounds.y === displayBounds.y) {
|
||||||
// 顶部
|
// 顶部
|
||||||
flag =
|
flag =
|
||||||
y > (bounds.y + bounds.height) * scaleFactor + size ||
|
y > bounds.y + bounds.height + size ||
|
||||||
x <= bounds.x * scaleFactor - size ||
|
x <= bounds.x - size ||
|
||||||
x >= (bounds.x + bounds.width) * scaleFactor + size;
|
x >= bounds.x + bounds.width + size;
|
||||||
}
|
}
|
||||||
if (flag && !global.classificationRightMenu && !global.itemRightMenu) {
|
if (flag && !global.classificationRightMenu && !global.itemRightMenu) {
|
||||||
if (
|
if (
|
||||||
@ -507,39 +666,63 @@ function autoHide(x: number, y: number, size: number, timer: boolean) {
|
|||||||
} else {
|
} else {
|
||||||
if (global.mainWindowDirection) {
|
if (global.mainWindowDirection) {
|
||||||
let flag = false;
|
let flag = false;
|
||||||
let scaleFactorX = bounds.x * scaleFactor;
|
|
||||||
let scaleFactorY = bounds.y * scaleFactor;
|
|
||||||
let windowWidthPosition = (bounds.x + bounds.width) * scaleFactor;
|
|
||||||
let windowHeightPosition = (bounds.y + bounds.height) * scaleFactor;
|
|
||||||
if (
|
if (
|
||||||
global.mainWindowDirection === "right" &&
|
global.mainWindowDirection === "leftTop" &&
|
||||||
x >= windowWidthPosition - 1 &&
|
x === displayBounds.x &&
|
||||||
y >= scaleFactorY &&
|
y === displayBounds.y
|
||||||
y <= windowHeightPosition
|
|
||||||
) {
|
) {
|
||||||
// 右侧
|
// 左上角
|
||||||
|
flag = true;
|
||||||
|
} else if (
|
||||||
|
global.mainWindowDirection === "rightTop" &&
|
||||||
|
x === displayBounds.x + displayBounds.width - 1 &&
|
||||||
|
y === displayBounds.y
|
||||||
|
) {
|
||||||
|
// 右上角
|
||||||
|
flag = true;
|
||||||
|
} else if (
|
||||||
|
global.mainWindowDirection === "leftBottom" &&
|
||||||
|
x === displayBounds.x &&
|
||||||
|
y === displayBounds.y + displayBounds.height - 1
|
||||||
|
) {
|
||||||
|
// 左下角
|
||||||
|
flag = true;
|
||||||
|
} else if (
|
||||||
|
global.mainWindowDirection === "rightBottom" &&
|
||||||
|
x === displayBounds.x + displayBounds.width - 1 &&
|
||||||
|
y === displayBounds.y + displayBounds.height - 1
|
||||||
|
) {
|
||||||
|
// 右下角
|
||||||
flag = true;
|
flag = true;
|
||||||
} else if (
|
} else if (
|
||||||
global.mainWindowDirection === "left" &&
|
global.mainWindowDirection === "left" &&
|
||||||
x <= workArea.x &&
|
x <= displayBounds.x &&
|
||||||
y >= scaleFactorY &&
|
y >= bounds.y &&
|
||||||
y <= windowHeightPosition
|
y <= bounds.y + bounds.height
|
||||||
) {
|
) {
|
||||||
// 左侧
|
// 左侧
|
||||||
flag = true;
|
flag = true;
|
||||||
|
} else if (
|
||||||
|
global.mainWindowDirection === "right" &&
|
||||||
|
x >= bounds.x + bounds.width - 1 &&
|
||||||
|
y >= bounds.y &&
|
||||||
|
y <= bounds.y + bounds.height
|
||||||
|
) {
|
||||||
|
// 右侧
|
||||||
|
flag = true;
|
||||||
} else if (
|
} else if (
|
||||||
global.mainWindowDirection === "bottom" &&
|
global.mainWindowDirection === "bottom" &&
|
||||||
y >= windowHeightPosition - 1 &&
|
y >= bounds.y + bounds.height - 1 &&
|
||||||
x >= scaleFactorX &&
|
x >= bounds.x &&
|
||||||
x <= windowWidthPosition
|
x <= bounds.x + bounds.width
|
||||||
) {
|
) {
|
||||||
// 底部
|
// 底部
|
||||||
flag = true;
|
flag = true;
|
||||||
} else if (
|
} else if (
|
||||||
global.mainWindowDirection === "top" &&
|
global.mainWindowDirection === "top" &&
|
||||||
y <= workArea.y &&
|
y <= displayBounds.y &&
|
||||||
x >= scaleFactorX &&
|
x >= bounds.x &&
|
||||||
x <= windowWidthPosition
|
x <= bounds.x + bounds.width
|
||||||
) {
|
) {
|
||||||
// 顶部
|
// 顶部
|
||||||
flag = true;
|
flag = true;
|
||||||
@ -552,11 +735,11 @@ function autoHide(x: number, y: number, size: number, timer: boolean) {
|
|||||||
) {
|
) {
|
||||||
// 延迟显示
|
// 延迟显示
|
||||||
global.autoHideTimer = setTimeout(function () {
|
global.autoHideTimer = setTimeout(function () {
|
||||||
showMainWindowBefore(false);
|
showMainWindowBefore(false, true);
|
||||||
}, global.setting.general.delayDisplayMs);
|
}, global.setting.general.delayDisplayMs);
|
||||||
} else if (!timer || global.setting.general.delayDisplayMs === 0) {
|
} else if (!timer || global.setting.general.delayDisplayMs === 0) {
|
||||||
// 显示
|
// 显示
|
||||||
showMainWindowBefore(false);
|
showMainWindowBefore(false, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 清空timer
|
// 清空timer
|
||||||
@ -576,100 +759,59 @@ function autoHide(x: number, y: number, size: number, timer: boolean) {
|
|||||||
/**
|
/**
|
||||||
* 双击任务栏显示/隐藏
|
* 双击任务栏显示/隐藏
|
||||||
*/
|
*/
|
||||||
function doubleClickTaskbar(button: number) {
|
function doubleClickTaskbar(
|
||||||
|
mousedownClassName: string | null,
|
||||||
|
className: string | null
|
||||||
|
) {
|
||||||
|
if (!mainWindowExist()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 必须开启设置
|
// 必须开启设置
|
||||||
if (!global.setting.general.showHideDoubleClickTaskbar) {
|
if (!global.setting.general.showHideDoubleClickTaskbar) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 不是左键的话
|
|
||||||
if (button !== 1) {
|
|
||||||
// 清除timeout
|
|
||||||
clearTimeout(global.doubleClickTaskbarTimer);
|
|
||||||
// 清空计数
|
|
||||||
global.doubleClickTaskbarCounter = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 获取屏幕
|
// 获取屏幕
|
||||||
let displays = getWindowInScreen();
|
let displays = getWindowInScreen(global.mainWindow);
|
||||||
if (displays.length > 1 || displays.length === 0) {
|
if (
|
||||||
|
displays.length > 1 ||
|
||||||
|
displays.length === 0 ||
|
||||||
|
(className !== "Shell_TrayWnd" && className !== "Shell_SecondaryTrayWnd")
|
||||||
|
) {
|
||||||
// 清除timeout
|
// 清除timeout
|
||||||
clearTimeout(global.doubleClickTaskbarTimer);
|
clearTimeout(global.doubleClickTaskbarTimer);
|
||||||
// 清空计数
|
// 清空计数
|
||||||
global.doubleClickTaskbarCounter = 0;
|
global.doubleClickTaskbarCounter = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 获取鼠标位置
|
// 必须是指定Class
|
||||||
let point = screen.getCursorScreenPoint();
|
|
||||||
// 判断鼠标是否在当前屏幕内
|
|
||||||
if (
|
if (
|
||||||
point.x >= displays[0].bounds.x &&
|
(release().startsWith("10.0.1") &&
|
||||||
point.x <= displays[0].bounds.x + displays[0].bounds.width &&
|
global.addon.getCursorPosWindowClassName().indexOf("MSTask") >= 0) ||
|
||||||
point.y >= displays[0].bounds.y &&
|
(release().startsWith("10.0.2") &&
|
||||||
point.y <= displays[0].bounds.y + displays[0].bounds.height
|
global.addon.getCursorPosWindowClassName() !== "TrayNotifyWnd")
|
||||||
) {
|
) {
|
||||||
// 判断是否双击在任务栏上
|
|
||||||
let flag = false;
|
|
||||||
// 判断任务栏在哪一侧
|
|
||||||
if (displays[0].bounds.height > displays[0].workArea.height) {
|
|
||||||
if (displays[0].bounds.y === displays[0].workArea.y) {
|
|
||||||
// 底部
|
|
||||||
let top = displays[0].workArea.y + displays[0].workArea.height;
|
|
||||||
let bottom = displays[0].bounds.y + displays[0].bounds.height;
|
|
||||||
if (point.y >= top && point.y <= bottom) {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 顶部
|
|
||||||
if (
|
|
||||||
point.y >= displays[0].bounds.y &&
|
|
||||||
point.y <= displays[0].workArea.y
|
|
||||||
) {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (displays[0].bounds.width > displays[0].workArea.width) {
|
|
||||||
if (displays[0].bounds.x === displays[0].workArea.x) {
|
|
||||||
// 右侧
|
|
||||||
let left = displays[0].workArea.x + displays[0].workArea.width;
|
|
||||||
let right = displays[0].bounds.x + displays[0].bounds.width;
|
|
||||||
if (point.x >= left && point.x <= right) {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 左侧
|
|
||||||
if (
|
|
||||||
point.x >= displays[0].bounds.x &&
|
|
||||||
point.x <= displays[0].workArea.x
|
|
||||||
) {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (flag) {
|
|
||||||
// 监听双击
|
// 监听双击
|
||||||
if (!global.doubleClickTaskbarCounter) {
|
if (!global.doubleClickTaskbarCounter) {
|
||||||
global.doubleClickTaskbarCounter = 0;
|
global.doubleClickTaskbarCounter = 0;
|
||||||
}
|
}
|
||||||
// +1
|
// +1
|
||||||
global.doubleClickTaskbarCounter++;
|
global.doubleClickTaskbarCounter++;
|
||||||
// 等于2就是双击
|
|
||||||
if (
|
if (
|
||||||
global.doubleClickTaskbarCounter &&
|
global.doubleClickTaskbarCounter &&
|
||||||
global.doubleClickTaskbarCounter === 2
|
global.doubleClickTaskbarCounter === 2 &&
|
||||||
|
(mousedownClassName === "Shell_TrayWnd" ||
|
||||||
|
mousedownClassName === "Shell_SecondaryTrayWnd")
|
||||||
) {
|
) {
|
||||||
// 清除timeout
|
// 清除timeout
|
||||||
clearTimeout(global.doubleClickTaskbarTimer);
|
clearTimeout(global.doubleClickTaskbarTimer);
|
||||||
// 清空计数
|
// 清空计数
|
||||||
global.doubleClickTaskbarCounter = 0;
|
global.doubleClickTaskbarCounter = 0;
|
||||||
// 判断点击的窗口ClassName
|
// 显示或隐藏
|
||||||
let className = global.addon.getCursorPosWindowClassName();
|
if (global.mainWindow.isVisible()) {
|
||||||
if (className.indexOf("MSTask") >= 0 || className === "Shell_TrayWnd") {
|
|
||||||
if (mainWindow.isVisible()) {
|
|
||||||
hideMainWindow();
|
hideMainWindow();
|
||||||
} else {
|
} else {
|
||||||
showMainWindowBefore(false);
|
showMainWindowBefore(false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// 间隔为500毫秒,如果超过500毫秒就代表不是双击
|
// 间隔为500毫秒,如果超过500毫秒就代表不是双击
|
||||||
global.doubleClickTaskbarTimer = setTimeout(function () {
|
global.doubleClickTaskbarTimer = setTimeout(function () {
|
||||||
@ -682,12 +824,6 @@ function doubleClickTaskbar(button: number) {
|
|||||||
// 清空计数
|
// 清空计数
|
||||||
global.doubleClickTaskbarCounter = 0;
|
global.doubleClickTaskbarCounter = 0;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// 清除timeout
|
|
||||||
clearTimeout(global.doubleClickTaskbarTimer);
|
|
||||||
// 清空计数
|
|
||||||
global.doubleClickTaskbarCounter = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
@ -2,11 +2,12 @@ import { ipcMain } from "electron";
|
|||||||
import { createTray, hideMainWindow, showMainWindow } from "./index";
|
import { createTray, hideMainWindow, showMainWindow } from "./index";
|
||||||
import { initAssociateFolder } from "../classification";
|
import { initAssociateFolder } from "../classification";
|
||||||
import { checkInvalid } from "../item";
|
import { checkInvalid } from "../item";
|
||||||
|
import { getWindow } from "../commons";
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
// 显示窗口
|
// 显示窗口
|
||||||
ipcMain.on("showMainWindow", (event, args) => {
|
ipcMain.on("showMainWindow", (event, args) => {
|
||||||
showMainWindow(args.blurHide);
|
showMainWindow(args.blurHide, args.autoHide);
|
||||||
});
|
});
|
||||||
// 隐藏窗口
|
// 隐藏窗口
|
||||||
ipcMain.on("hideMainWindow", () => {
|
ipcMain.on("hideMainWindow", () => {
|
||||||
@ -16,6 +17,13 @@ export default function () {
|
|||||||
ipcMain.on("setTray", (event, args) => {
|
ipcMain.on("setTray", (event, args) => {
|
||||||
createTray(args);
|
createTray(args);
|
||||||
});
|
});
|
||||||
|
// 任务栏
|
||||||
|
ipcMain.on("setTaskbar", (event, args) => {
|
||||||
|
let window = getWindow("mainWindow");
|
||||||
|
if (window) {
|
||||||
|
window.setSkipTaskbar(args);
|
||||||
|
}
|
||||||
|
});
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
ipcMain.on("mainWindowInitData", () => {
|
ipcMain.on("mainWindowInitData", () => {
|
||||||
// 初始化关联文件夹
|
// 初始化关联文件夹
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
import { BrowserWindow, shell } from "electron";
|
import { BrowserWindow, shell, screen } from "electron";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import { getMainBackgorunColor, sendToWebContent } from "../commons";
|
import {
|
||||||
|
getMainBackgorunColor,
|
||||||
|
getWindowInScreen,
|
||||||
|
sendToWebContent,
|
||||||
|
} from "../commons";
|
||||||
import cacheData from "../commons/cacheData";
|
import cacheData from "../commons/cacheData";
|
||||||
|
|
||||||
// 窗口
|
// 窗口
|
||||||
@ -14,7 +18,7 @@ function createQuickSearchWindow() {
|
|||||||
global.quickSearchWindowInit = false;
|
global.quickSearchWindowInit = false;
|
||||||
quickSearchWindow = global.quickSearchWindow = new BrowserWindow({
|
quickSearchWindow = global.quickSearchWindow = new BrowserWindow({
|
||||||
title: "Dawn Launcher",
|
title: "Dawn Launcher",
|
||||||
width: 600,
|
width: global.setting.quickSearch.width,
|
||||||
height: 44,
|
height: 44,
|
||||||
type: "toolbar",
|
type: "toolbar",
|
||||||
frame: false,
|
frame: false,
|
||||||
@ -24,7 +28,11 @@ function createQuickSearchWindow() {
|
|||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
alwaysOnTop: true,
|
alwaysOnTop: true,
|
||||||
backgroundColor: getMainBackgorunColor(),
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
|
backgroundColor:
|
||||||
|
global.setting.appearance.transparency === 1
|
||||||
|
? getMainBackgorunColor()
|
||||||
|
: null,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
backgroundThrottling: false,
|
backgroundThrottling: false,
|
||||||
@ -113,7 +121,43 @@ function showQuickSearchWindowBefore() {
|
|||||||
* 显示快速搜索窗口
|
* 显示快速搜索窗口
|
||||||
*/
|
*/
|
||||||
function showQuickSearchWindow() {
|
function showQuickSearchWindow() {
|
||||||
|
// flag
|
||||||
|
let flag = true;
|
||||||
|
// 是否开启勿扰模式
|
||||||
|
if (global.setting.general.notDisturb) {
|
||||||
|
if (global.addon.isFullscreen()) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag) {
|
||||||
|
// 获取鼠标所在的屏幕
|
||||||
|
let currentDisplay = screen.getDisplayNearestPoint(
|
||||||
|
screen.getCursorScreenPoint()
|
||||||
|
);
|
||||||
|
// 获取窗口所在的屏幕
|
||||||
|
let windowDisplay = getWindowInScreen(quickSearchWindow);
|
||||||
|
if (windowDisplay.length === 0) {
|
||||||
|
// 代表窗口的位置不再任一屏幕内,将窗口位置移动到主窗口
|
||||||
|
quickSearchWindow.center();
|
||||||
|
} else if (
|
||||||
|
(windowDisplay.length === 1 &&
|
||||||
|
currentDisplay.id !== windowDisplay[0].id) ||
|
||||||
|
windowDisplay.length > 1
|
||||||
|
) {
|
||||||
|
// 在鼠标所在的屏幕显示
|
||||||
|
let workArea = currentDisplay.workArea;
|
||||||
|
let bounds = quickSearchWindow.getBounds();
|
||||||
|
let x = Math.round(workArea.x + workArea.width / 2 - bounds.width / 2);
|
||||||
|
let y = Math.round(workArea.y + workArea.height / 2 - 44 / 2);
|
||||||
|
quickSearchWindow.setPosition(x, y);
|
||||||
|
for (let i = 0; i < 10; i++) {
|
||||||
|
quickSearchWindow.setSize(global.setting.quickSearch.width, 44);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 显示
|
||||||
|
quickSearchWindow.setBounds({ width: global.setting.quickSearch.width });
|
||||||
quickSearchWindow.show();
|
quickSearchWindow.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,4 +18,8 @@ export default function () {
|
|||||||
ipcMain.on("setQuickSearchWindowHeight", (event, args) => {
|
ipcMain.on("setQuickSearchWindowHeight", (event, args) => {
|
||||||
global.quickSearchWindow.setBounds({ height: args });
|
global.quickSearchWindow.setBounds({ height: args });
|
||||||
});
|
});
|
||||||
|
// 设置快速搜索窗口宽度
|
||||||
|
ipcMain.on("setQuickSearchWindowWidth", (event, args) => {
|
||||||
|
global.quickSearchWindow.setBounds({ width: args });
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { Setting } from "../../../types/setting";
|
import { Setting } from "../../../types/setting";
|
||||||
import { getSetting } from "../../../commons/utils/setting";
|
import { getSetting } from "../../../commons/utils/setting";
|
||||||
import { getDataSqlite3 } from "../../commons/betterSqlite3";
|
import { getDataSqlite3 } from "../../commons/betterSqlite3";
|
||||||
|
import { app } from "electron";
|
||||||
|
|
||||||
// 获取数据库
|
// 获取数据库
|
||||||
let db = getDataSqlite3();
|
let db = getDataSqlite3();
|
||||||
@ -58,6 +59,8 @@ function add(setting: Setting) {
|
|||||||
let id = db.prepare(sql).run(1, JSON.stringify(setting)).lastInsertRowid;
|
let id = db.prepare(sql).run(1, JSON.stringify(setting)).lastInsertRowid;
|
||||||
if (id) {
|
if (id) {
|
||||||
global.setting = setting;
|
global.setting = setting;
|
||||||
|
// 添加设置被视为首次打开软件
|
||||||
|
global.first = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -5,7 +5,11 @@ import { hideMainWindow, showMainWindowBefore } from "../main/index";
|
|||||||
import { list as selectClassificationList } from "../classification/data";
|
import { list as selectClassificationList } from "../classification/data";
|
||||||
import { list as selectItemList } from "../item/data";
|
import { list as selectItemList } from "../item/data";
|
||||||
import { run } from "../item";
|
import { run } from "../item";
|
||||||
import { closeWindow, getMainBackgorunColor } from "../commons/index";
|
import {
|
||||||
|
closeWindow,
|
||||||
|
getMainBackgorunColor,
|
||||||
|
mainWindowExist,
|
||||||
|
} from "../commons/index";
|
||||||
import {
|
import {
|
||||||
createQuickSearchWindow,
|
createQuickSearchWindow,
|
||||||
hideQuickSearchWindow,
|
hideQuickSearchWindow,
|
||||||
@ -34,7 +38,11 @@ function createSettingWindow() {
|
|||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
skipTaskbar: true,
|
skipTaskbar: true,
|
||||||
show: false,
|
show: false,
|
||||||
backgroundColor: getMainBackgorunColor(),
|
transparent: global.setting.appearance.transparency < 1,
|
||||||
|
backgroundColor:
|
||||||
|
global.setting.appearance.transparency === 1
|
||||||
|
? getMainBackgorunColor()
|
||||||
|
: null,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
preload: join(__dirname, "../preload/index.js"),
|
preload: join(__dirname, "../preload/index.js"),
|
||||||
@ -76,13 +84,18 @@ function setShortcutKey(setting: Setting = global.setting) {
|
|||||||
setting.general.showHideShortcutKey.trim() !== ""
|
setting.general.showHideShortcutKey.trim() !== ""
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
globalShortcut.register(setting.general.showHideShortcutKey, () => {
|
globalShortcut.register(
|
||||||
|
setting.general.showHideShortcutKey.replace("Win", "Super"),
|
||||||
|
() => {
|
||||||
|
if (mainWindowExist()) {
|
||||||
if (global.mainWindow.isVisible()) {
|
if (global.mainWindow.isVisible()) {
|
||||||
hideMainWindow();
|
hideMainWindow();
|
||||||
} else {
|
} else {
|
||||||
showMainWindowBefore(true);
|
showMainWindowBefore(true);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
@ -94,10 +107,15 @@ function setShortcutKey(setting: Setting = global.setting) {
|
|||||||
for (const classification of classificationList) {
|
for (const classification of classificationList) {
|
||||||
if (classification.globalShortcutKey && classification.shortcutKey) {
|
if (classification.globalShortcutKey && classification.shortcutKey) {
|
||||||
try {
|
try {
|
||||||
globalShortcut.register(classification.shortcutKey, () => {
|
globalShortcut.register(
|
||||||
|
classification.shortcutKey.replace("Win", "Super"),
|
||||||
|
() => {
|
||||||
|
if (mainWindowExist()) {
|
||||||
// 分类
|
// 分类
|
||||||
showMainWindowBefore(true, classification.id);
|
showMainWindowBefore(true, false, classification.id);
|
||||||
});
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
@ -110,10 +128,25 @@ function setShortcutKey(setting: Setting = global.setting) {
|
|||||||
for (const item of itemList) {
|
for (const item of itemList) {
|
||||||
if (item.globalShortcutKey && item.shortcutKey) {
|
if (item.globalShortcutKey && item.shortcutKey) {
|
||||||
try {
|
try {
|
||||||
globalShortcut.register(item.shortcutKey, () => {
|
globalShortcut.register(
|
||||||
|
item.shortcutKey.replace("Win", "Super"),
|
||||||
|
() => {
|
||||||
|
if (mainWindowExist()) {
|
||||||
|
// flag
|
||||||
|
let flag = true;
|
||||||
|
// 是否开启勿扰模式
|
||||||
|
if (global.setting.general.notDisturb) {
|
||||||
|
if (global.addon.isFullscreen()) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag) {
|
||||||
// 项目
|
// 项目
|
||||||
run("main", "open", item);
|
run("main", "open", item);
|
||||||
});
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
@ -123,11 +156,14 @@ function setShortcutKey(setting: Setting = global.setting) {
|
|||||||
}
|
}
|
||||||
// 快速搜索
|
// 快速搜索
|
||||||
if (
|
if (
|
||||||
|
setting.quickSearch.enable &&
|
||||||
setting.quickSearch.showHideShortcutKey &&
|
setting.quickSearch.showHideShortcutKey &&
|
||||||
setting.quickSearch.showHideShortcutKey.trim() !== ""
|
setting.quickSearch.showHideShortcutKey.trim() !== ""
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
globalShortcut.register(setting.quickSearch.showHideShortcutKey, () => {
|
globalShortcut.register(
|
||||||
|
setting.quickSearch.showHideShortcutKey.replace("Win", "Super"),
|
||||||
|
() => {
|
||||||
if (global.setting.quickSearch.enable) {
|
if (global.setting.quickSearch.enable) {
|
||||||
// 如果窗口不存在或者被销毁的话,就创建窗口
|
// 如果窗口不存在或者被销毁的话,就创建窗口
|
||||||
if (
|
if (
|
||||||
@ -149,7 +185,8 @@ function setShortcutKey(setting: Setting = global.setting) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { app, dialog, ipcMain } from "electron";
|
import { app, ipcMain } from "electron";
|
||||||
import {
|
import {
|
||||||
closeWindow,
|
closeWindow,
|
||||||
getUserDataPath,
|
getUserDataPath,
|
||||||
relaunch,
|
relaunch,
|
||||||
sendToWebContent,
|
sendToWebContent,
|
||||||
|
showOpenDialogSync,
|
||||||
} from "../commons/index";
|
} from "../commons/index";
|
||||||
import { createSettingWindow, setFixedPosition, setShortcutKey } from ".";
|
import { createSettingWindow, setFixedPosition, setShortcutKey } from ".";
|
||||||
import { add, select, update } from "./data";
|
import { add, select, update } from "./data";
|
||||||
@ -15,6 +16,7 @@ import { statSync, mkdirSync, copyFileSync, readFileSync } from "node:fs";
|
|||||||
import mime from "mime";
|
import mime from "mime";
|
||||||
import { checkInvalid } from "../item";
|
import { checkInvalid } from "../item";
|
||||||
import { updateItemOpenNumberSortToDefualt } from "../classification";
|
import { updateItemOpenNumberSortToDefualt } from "../classification";
|
||||||
|
import cacheData from "../commons/cacheData";
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
// 创建设置窗口
|
// 创建设置窗口
|
||||||
@ -90,6 +92,13 @@ export default function () {
|
|||||||
// 锁定尺寸
|
// 锁定尺寸
|
||||||
ipcMain.on("setLockSize", (event, args) => {
|
ipcMain.on("setLockSize", (event, args) => {
|
||||||
global.mainWindow.setResizable(!args);
|
global.mainWindow.setResizable(!args);
|
||||||
|
if (args) {
|
||||||
|
// 存储主窗口尺寸
|
||||||
|
cacheData.cacheStore.set(
|
||||||
|
"mainWindowLockSizeBounds",
|
||||||
|
global.mainWindow.getBounds()
|
||||||
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// 固定位置
|
// 固定位置
|
||||||
ipcMain.on("setFixedPosition", (event, args) => {
|
ipcMain.on("setFixedPosition", (event, args) => {
|
||||||
@ -114,7 +123,7 @@ export default function () {
|
|||||||
// 上传背景图
|
// 上传背景图
|
||||||
ipcMain.on("uploadBackgrounImage", (event, args) => {
|
ipcMain.on("uploadBackgrounImage", (event, args) => {
|
||||||
// 打开文件对话框
|
// 打开文件对话框
|
||||||
let filePathList = dialog.showOpenDialogSync(global.settingWindow, {
|
let filePathList = showOpenDialogSync("settingWindow", {
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
name: "Images",
|
name: "Images",
|
||||||
|
@ -5,13 +5,12 @@ import {
|
|||||||
newItem,
|
newItem,
|
||||||
} from "../../commons/utils/common";
|
} from "../../commons/utils/common";
|
||||||
import { CommonItem, Item } from "../../types/item";
|
import { CommonItem, Item } from "../../types/item";
|
||||||
import { parse, join, extname } from "node:path";
|
import { parse, join } from "node:path";
|
||||||
import { readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
import { readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
||||||
import { execSync } from "node:child_process";
|
|
||||||
import xml2js from "xml2js";
|
import xml2js from "xml2js";
|
||||||
import { newCommonItem, newCommonItemData } from "../../commons/utils/common";
|
import { newCommonItem, newCommonItemData } from "../../commons/utils/common";
|
||||||
import { ShortcutInfo } from "../../types/common";
|
import { ShortcutInfo } from "../../types/common";
|
||||||
import { getAbsolutePath, getFileIcon } from "../commons/utils";
|
import { parsePath, getFileIcon } from "../commons/utils";
|
||||||
|
|
||||||
// AppxInfo
|
// AppxInfo
|
||||||
export interface AppxInfo {
|
export interface AppxInfo {
|
||||||
@ -44,11 +43,6 @@ process.parentPort.once("message", async (event) => {
|
|||||||
res = await getStartMenuItemList(dataParam);
|
res = await getStartMenuItemList(dataParam);
|
||||||
} else if (params.name === "getAppxItemList") {
|
} else if (params.name === "getAppxItemList") {
|
||||||
res = await getAppxItemList();
|
res = await getAppxItemList();
|
||||||
} else if (params.name === "getDropItemInfo") {
|
|
||||||
res = await getDropItemInfo(
|
|
||||||
dataParam.classificationId,
|
|
||||||
dataParam.pathList
|
|
||||||
);
|
|
||||||
} else if (params.name === "refreshItemIcon") {
|
} else if (params.name === "refreshItemIcon") {
|
||||||
res = await refreshItemIcon(dataParam);
|
res = await refreshItemIcon(dataParam);
|
||||||
} else if (params.name === "getDirectoryItemList") {
|
} else if (params.name === "getDirectoryItemList") {
|
||||||
@ -166,7 +160,7 @@ async function getStartMenuItemList(cacheList: Array<CommonItem>) {
|
|||||||
name,
|
name,
|
||||||
data: newCommonItemData({
|
data: newCommonItemData({
|
||||||
target: filePath,
|
target: filePath,
|
||||||
icon: getFileIcon(filePath),
|
icon: await getFileIcon(filePath),
|
||||||
params,
|
params,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
@ -559,90 +553,6 @@ function getPropertiesIcon(installLocation: string, result: any) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过路径获取项目信息
|
|
||||||
* @param classificationId
|
|
||||||
* @param pathList
|
|
||||||
*/
|
|
||||||
async function getDropItemInfo(
|
|
||||||
classificationId: number,
|
|
||||||
pathList: Array<string>
|
|
||||||
) {
|
|
||||||
// 项目列表
|
|
||||||
let itemList: Array<Item> = [];
|
|
||||||
// 解析文件信息并添加项目
|
|
||||||
for (const path of pathList) {
|
|
||||||
try {
|
|
||||||
// item
|
|
||||||
let item = newItem({ classificationId });
|
|
||||||
// 目标
|
|
||||||
item.data.target = path;
|
|
||||||
// 名称
|
|
||||||
item.name = getFileName(item.data.target);
|
|
||||||
// 判断是否是快捷方式,如果是的话,需要获取真实路径
|
|
||||||
if (mime.getType(path) === "application/x-ms-shortcut") {
|
|
||||||
// 快捷方式
|
|
||||||
// 获取真实文件路径和参数
|
|
||||||
let shortcutInfo: ShortcutInfo | null =
|
|
||||||
global.addon.getShortcutFileInfo(path);
|
|
||||||
if (shortcutInfo) {
|
|
||||||
// 路径
|
|
||||||
if (shortcutInfo.target) {
|
|
||||||
item.data.target = shortcutInfo.target;
|
|
||||||
}
|
|
||||||
// 参数
|
|
||||||
if (shortcutInfo.arguments) {
|
|
||||||
item.data.params = shortcutInfo.arguments;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 获取图标
|
|
||||||
item.data.icon = getFileIcon(item.data.target);
|
|
||||||
// 获取后缀,判断是否是url
|
|
||||||
let ext = extname(item.data.target);
|
|
||||||
if (ext && ext.toLowerCase() === ".url") {
|
|
||||||
// url
|
|
||||||
let url = parseUrlFileContent(readFileSync(item.data.target, "utf-8"));
|
|
||||||
if (url && url.trim() !== "") {
|
|
||||||
item.data.target = url;
|
|
||||||
item.type = 2;
|
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 文件类型
|
|
||||||
let stats = statSync(item.data.target);
|
|
||||||
item.type = stats.isFile() ? 0 : 1;
|
|
||||||
}
|
|
||||||
// 去掉后缀
|
|
||||||
if (item.type === 0 || item.type === 2) {
|
|
||||||
item.name = deleteExtname(item.name);
|
|
||||||
}
|
|
||||||
// push
|
|
||||||
itemList.push(item);
|
|
||||||
} catch (e) {}
|
|
||||||
}
|
|
||||||
return itemList;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 解析.url文件内容以获取URL
|
|
||||||
* @param content
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
function parseUrlFileContent(content: string) {
|
|
||||||
if (content) {
|
|
||||||
const lines = content.split("\n");
|
|
||||||
for (const line of lines) {
|
|
||||||
if (line.startsWith("URL=")) {
|
|
||||||
const url = line.substring(4).trim();
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷新项目图标
|
* 刷新项目图标
|
||||||
* @param itemList
|
* @param itemList
|
||||||
@ -656,7 +566,7 @@ async function refreshItemIcon(itemList: Array<Item>) {
|
|||||||
// 刷新图标
|
// 刷新图标
|
||||||
for (const item of itemList) {
|
for (const item of itemList) {
|
||||||
if (item.type === 0 || item.type === 1) {
|
if (item.type === 0 || item.type === 1) {
|
||||||
let icon: string | null = getFileIcon(item.data.target);
|
let icon: string | null = await getFileIcon(item.data.target);
|
||||||
if (icon) {
|
if (icon) {
|
||||||
resultList.push({
|
resultList.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
@ -728,9 +638,10 @@ async function getDirectoryItemList(
|
|||||||
}
|
}
|
||||||
if (!item) {
|
if (!item) {
|
||||||
item = newItem({ classificationId, type });
|
item = newItem({ classificationId, type });
|
||||||
item.name = deleteExtname(getFileName(path));
|
item.name =
|
||||||
|
type === 0 ? deleteExtname(getFileName(path)) : getFileName(path);
|
||||||
item.data.target = path;
|
item.data.target = path;
|
||||||
item.data.icon = getFileIcon(path);
|
item.data.icon = await getFileIcon(path);
|
||||||
}
|
}
|
||||||
// push
|
// push
|
||||||
resultList.push(item);
|
resultList.push(item);
|
||||||
@ -752,7 +663,7 @@ function checkInvalidItem(itemList: Array<Item>) {
|
|||||||
// 只校验文件和文件夹
|
// 只校验文件和文件夹
|
||||||
if (item.type === 0 || item.type === 1) {
|
if (item.type === 0 || item.type === 1) {
|
||||||
// 获取绝对路径
|
// 获取绝对路径
|
||||||
let path = getAbsolutePath(item.data.target);
|
let path = parsePath(item.data.target);
|
||||||
try {
|
try {
|
||||||
statSync(path);
|
statSync(path);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -105,12 +105,25 @@ contextBridge.exposeInMainWorld("api", {
|
|||||||
exit: () => {
|
exit: () => {
|
||||||
ipcRenderer.send("exit");
|
ipcRenderer.send("exit");
|
||||||
},
|
},
|
||||||
|
// 运行
|
||||||
|
run: (
|
||||||
|
operation: string,
|
||||||
|
target: string,
|
||||||
|
params: string | null,
|
||||||
|
startLocation: string | null
|
||||||
|
) => {
|
||||||
|
ipcRenderer.send("run", { operation, target, params, startLocation });
|
||||||
|
},
|
||||||
|
// 文本框菜单
|
||||||
|
textRightMenu: () => {
|
||||||
|
ipcRenderer.send("textRightMenu");
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
contextBridge.exposeInMainWorld("main", {
|
contextBridge.exposeInMainWorld("main", {
|
||||||
// 显示窗口
|
// 显示窗口
|
||||||
showWindow: (blurHide: boolean) => {
|
showWindow: (blurHide: boolean, autoHide: boolean) => {
|
||||||
ipcRenderer.send("showMainWindow", { blurHide });
|
ipcRenderer.send("showMainWindow", { blurHide, autoHide });
|
||||||
},
|
},
|
||||||
// 隐藏窗口
|
// 隐藏窗口
|
||||||
hideWindow: () => {
|
hideWindow: () => {
|
||||||
@ -673,6 +686,10 @@ contextBridge.exposeInMainWorld("item", {
|
|||||||
updateOpenInfo: (type: string, id: number) => {
|
updateOpenInfo: (type: string, id: number) => {
|
||||||
ipcRenderer.send("updateItemOpenInfo", { type, id });
|
ipcRenderer.send("updateItemOpenInfo", { type, id });
|
||||||
},
|
},
|
||||||
|
// 删除历史记录
|
||||||
|
deleteQuickSearchHistory: (id: number) => {
|
||||||
|
ipcRenderer.send("deleteQuickSearchHistory", id);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
contextBridge.exposeInMainWorld("setting", {
|
contextBridge.exposeInMainWorld("setting", {
|
||||||
@ -717,6 +734,10 @@ contextBridge.exposeInMainWorld("setting", {
|
|||||||
setTray: (show: boolean) => {
|
setTray: (show: boolean) => {
|
||||||
ipcRenderer.send("setTray", show);
|
ipcRenderer.send("setTray", show);
|
||||||
},
|
},
|
||||||
|
// 隐藏任务栏
|
||||||
|
setTaskbar: (show: boolean) => {
|
||||||
|
ipcRenderer.send("setTaskbar", show);
|
||||||
|
},
|
||||||
// 设置快捷键
|
// 设置快捷键
|
||||||
setShortcutKey: (setting: Setting) => {
|
setShortcutKey: (setting: Setting) => {
|
||||||
ipcRenderer.send("setShortcutKey", setting);
|
ipcRenderer.send("setShortcutKey", setting);
|
||||||
@ -809,6 +830,10 @@ contextBridge.exposeInMainWorld("quickSearch", {
|
|||||||
setWindowHeight: (height: number) => {
|
setWindowHeight: (height: number) => {
|
||||||
ipcRenderer.send("setQuickSearchWindowHeight", height);
|
ipcRenderer.send("setQuickSearchWindowHeight", height);
|
||||||
},
|
},
|
||||||
|
// 设置窗口宽度
|
||||||
|
setWindowWidth: (width: number) => {
|
||||||
|
ipcRenderer.send("setQuickSearchWindowWidth", width);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
contextBridge.exposeInMainWorld("about", {
|
contextBridge.exposeInMainWorld("about", {
|
||||||
|
4
electron/types/global.d.ts
vendored
4
electron/types/global.d.ts
vendored
@ -5,6 +5,8 @@ import { Setting } from "../../types/setting";
|
|||||||
declare global {
|
declare global {
|
||||||
// addon
|
// addon
|
||||||
var addon: any;
|
var addon: any;
|
||||||
|
// 是否是首次打开软件
|
||||||
|
var first: boolean;
|
||||||
// 语言
|
// 语言
|
||||||
var language: any;
|
var language: any;
|
||||||
// 主窗口
|
// 主窗口
|
||||||
@ -57,6 +59,8 @@ declare global {
|
|||||||
var classificationRightMenu: boolean | null;
|
var classificationRightMenu: boolean | null;
|
||||||
// 项目右键菜单显示
|
// 项目右键菜单显示
|
||||||
var itemRightMenu: boolean | null;
|
var itemRightMenu: boolean | null;
|
||||||
|
// 存储主窗口当前是否有弹出对话框
|
||||||
|
var mainWindowShowDialog: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ChildProcessInfo {
|
export interface ChildProcessInfo {
|
||||||
|
14
package.json
14
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "dawn-launcher",
|
"name": "dawn-launcher",
|
||||||
"productName": "Dawn Launcher",
|
"productName": "Dawn Launcher",
|
||||||
"version": "1.3.4",
|
"version": "1.5.1",
|
||||||
"main": "dist-electron/main/index.js",
|
"main": "dist-electron/main/index.js",
|
||||||
"description": "Windows 快捷启动工具,帮助您整理杂乱无章的桌面,分门别类管理您的桌面快捷方式,让您的桌面保持干净整洁。",
|
"description": "Windows 快捷启动工具,帮助您整理杂乱无章的桌面,分门别类管理您的桌面快捷方式,让您的桌面保持干净整洁。",
|
||||||
"author": "FanChenIO",
|
"author": "FanChenIO",
|
||||||
@ -29,22 +29,23 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@napi-rs/cli": "^2.16.3",
|
"@napi-rs/cli": "^2.16.3",
|
||||||
|
"@vicons/ionicons5": "^0.12.0",
|
||||||
"@vicons/material": "^0.12.0",
|
"@vicons/material": "^0.12.0",
|
||||||
"@vicons/utils": "^0.1.4",
|
"@vicons/utils": "^0.1.4",
|
||||||
"@vitejs/plugin-vue": "^4.4.0",
|
"@vitejs/plugin-vue": "^4.4.0",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.16",
|
||||||
"better-sqlite3-multiple-ciphers": "^9.0.0",
|
"better-sqlite3-multiple-ciphers": "^9.4.1",
|
||||||
"electron": "^26.4.2",
|
"electron": "^28.3.1",
|
||||||
"electron-builder": "^24.6.4",
|
"electron-builder": "^24.6.5",
|
||||||
"less": "^4.2.0",
|
"less": "^4.2.0",
|
||||||
"less-loader": "^11.1.3",
|
"less-loader": "^11.1.3",
|
||||||
"naive-ui": "^2.35.0",
|
"naive-ui": "^2.36.0",
|
||||||
"postcss": "^8.4.31",
|
"postcss": "^8.4.31",
|
||||||
"tailwindcss": "^3.3.5",
|
"tailwindcss": "^3.3.5",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"vite": "^4.4.11",
|
"vite": "^4.4.11",
|
||||||
"vite-plugin-electron": "^0.15.4",
|
"vite-plugin-electron": "^0.15.4",
|
||||||
"vue": "^3.3.7",
|
"vue": "^3.4.13",
|
||||||
"vue-tsc": "^1.8.22"
|
"vue-tsc": "^1.8.22"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -59,6 +60,7 @@
|
|||||||
"dompurify": "^3.0.6",
|
"dompurify": "^3.0.6",
|
||||||
"electron-log": "^5.0.0",
|
"electron-log": "^5.0.0",
|
||||||
"electron-store": "^8.1.0",
|
"electron-store": "^8.1.0",
|
||||||
|
"icojs": "^0.19.3",
|
||||||
"mime": "^3.0.0",
|
"mime": "^3.0.0",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"pinyin-pro": "^3.17.0",
|
"pinyin-pro": "^3.17.0",
|
||||||
|
54
rust/lib.rs
54
rust/lib.rs
@ -31,24 +31,6 @@ fn get_shortcut_file_info(path: String) -> Option<HashMap<String, String>> {
|
|||||||
windows::get_shortcut_file_info(&path)
|
windows::get_shortcut_file_info(&path)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 运行
|
|
||||||
*/
|
|
||||||
#[allow(dead_code)]
|
|
||||||
#[napi]
|
|
||||||
fn shell_execute(operation: String, file: String, params: String, start_location: Option<String>) {
|
|
||||||
windows::shell_execute(operation, file, params, start_location)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运行系统项目
|
|
||||||
*/
|
|
||||||
#[allow(dead_code)]
|
|
||||||
#[napi]
|
|
||||||
fn system_item_execute(target: String, params: Option<String>) {
|
|
||||||
windows::system_item_execute(&target, params.as_deref())
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打开文件所在位置
|
* 打开文件所在位置
|
||||||
*/
|
*/
|
||||||
@ -183,3 +165,39 @@ fn remove_window_animation(window: i32) {
|
|||||||
fn get_appx_list() -> Vec<HashMap<String, String>> {
|
fn get_appx_list() -> Vec<HashMap<String, String>> {
|
||||||
windows::get_appx_list()
|
windows::get_appx_list()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前鼠标位置
|
||||||
|
*/
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[napi]
|
||||||
|
fn get_cursor_point() -> [i32; 2] {
|
||||||
|
windows::get_cursor_point()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭显示器
|
||||||
|
*/
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[napi]
|
||||||
|
pub fn turn_off_monitor() {
|
||||||
|
windows::turn_off_monitor()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行
|
||||||
|
*/
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[napi]
|
||||||
|
fn shell_execute(operation: String, file: String, params: String, start_location: Option<String>) {
|
||||||
|
windows::shell_execute(operation, file, params, start_location)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行系统项目
|
||||||
|
*/
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[napi]
|
||||||
|
fn system_item_execute(target: String, params: Option<String>) {
|
||||||
|
windows::system_item_execute(&target, params.as_deref())
|
||||||
|
}
|
||||||
|
229
rust/windows.rs
229
rust/windows.rs
@ -6,6 +6,7 @@ use napi::{
|
|||||||
JsFunction,
|
JsFunction,
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use std::thread;
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
io::Cursor,
|
io::Cursor,
|
||||||
@ -13,9 +14,8 @@ use std::{
|
|||||||
process::Command,
|
process::Command,
|
||||||
sync::atomic::{AtomicBool, Ordering},
|
sync::atomic::{AtomicBool, Ordering},
|
||||||
};
|
};
|
||||||
use windows::Management::Deployment::PackageManager;
|
|
||||||
use windows::{
|
use windows::{
|
||||||
core::{ComInterface, HSTRING, PCSTR, PCWSTR},
|
core::{ComInterface, HSTRING, PCSTR, PCWSTR, PSTR},
|
||||||
w,
|
w,
|
||||||
Win32::{
|
Win32::{
|
||||||
Foundation::{HWND, LPARAM, LRESULT, MAX_PATH, POINT, RECT, SIZE, WPARAM},
|
Foundation::{HWND, LPARAM, LRESULT, MAX_PATH, POINT, RECT, SIZE, WPARAM},
|
||||||
@ -33,7 +33,6 @@ use windows::{
|
|||||||
CLSCTX_INPROC_SERVER, COINIT_APARTMENTTHREADED, STGM_READ,
|
CLSCTX_INPROC_SERVER, COINIT_APARTMENTTHREADED, STGM_READ,
|
||||||
},
|
},
|
||||||
Environment::GetEnvironmentVariableW,
|
Environment::GetEnvironmentVariableW,
|
||||||
SystemInformation::GetSystemDirectoryW,
|
|
||||||
},
|
},
|
||||||
UI::{
|
UI::{
|
||||||
Input::Ime::{
|
Input::Ime::{
|
||||||
@ -43,23 +42,29 @@ use windows::{
|
|||||||
Shell::{
|
Shell::{
|
||||||
BHID_SFUIObject, IContextMenu, IShellItem, IShellItemImageFactory, IShellLinkW,
|
BHID_SFUIObject, IContextMenu, IShellItem, IShellItemImageFactory, IShellLinkW,
|
||||||
SHCreateItemFromParsingName, SHEmptyRecycleBinW, SHQueryUserNotificationState,
|
SHCreateItemFromParsingName, SHEmptyRecycleBinW, SHQueryUserNotificationState,
|
||||||
ShellExecuteW, ShellLink, CMF_NORMAL, CMINVOKECOMMANDINFO,
|
ShellLink, CMF_NORMAL, CMINVOKECOMMANDINFO, QUNS_ACCEPTS_NOTIFICATIONS, QUNS_APP,
|
||||||
QUNS_ACCEPTS_NOTIFICATIONS, QUNS_APP, QUNS_BUSY, QUNS_NOT_PRESENT,
|
QUNS_BUSY, QUNS_NOT_PRESENT, QUNS_PRESENTATION_MODE, QUNS_QUIET_TIME,
|
||||||
QUNS_PRESENTATION_MODE, QUNS_QUIET_TIME, QUNS_RUNNING_D3D_FULL_SCREEN,
|
QUNS_RUNNING_D3D_FULL_SCREEN, SHERB_NOSOUND, SIIGBF_ICONONLY, SLGP_UNCPRIORITY,
|
||||||
SHERB_NOSOUND, SIIGBF_ICONONLY, SLGP_UNCPRIORITY,
|
|
||||||
},
|
},
|
||||||
WindowsAndMessaging::{
|
WindowsAndMessaging::{
|
||||||
CallNextHookEx, CreatePopupMenu, DestroyMenu, FindWindowW, GetClassNameW,
|
CallNextHookEx, CreatePopupMenu, DestroyMenu, FindWindowW, GetClassNameW,
|
||||||
GetCursorPos, GetForegroundWindow, GetSystemMetrics, GetWindowRect, SendMessageW,
|
GetCursorPos, GetForegroundWindow, GetSystemMetrics, GetWindowRect, SendMessageW,
|
||||||
SetForegroundWindow, SetWindowsHookExW, TrackPopupMenu, WindowFromPoint, HHOOK,
|
SetForegroundWindow, SetWindowsHookExW, TrackPopupMenu, WindowFromPoint, HHOOK,
|
||||||
MSLLHOOKSTRUCT, SC_MONITORPOWER, SM_CXSCREEN, SM_CYSCREEN, SW_NORMAL,
|
MSLLHOOKSTRUCT, SC_MONITORPOWER, SM_CXSCREEN, SM_CYSCREEN, SW_NORMAL, TPM_NONOTIFY,
|
||||||
SW_SHOWDEFAULT, TPM_NONOTIFY, TPM_RETURNCMD, WH_MOUSE_LL, WM_LBUTTONDOWN,
|
TPM_RETURNCMD, WH_MOUSE_LL, WM_LBUTTONDOWN, WM_LBUTTONUP, WM_MBUTTONDOWN,
|
||||||
WM_LBUTTONUP, WM_MBUTTONDOWN, WM_MBUTTONUP, WM_MOUSEHWHEEL, WM_MOUSEMOVE,
|
WM_MBUTTONUP, WM_MOUSEHWHEEL, WM_MOUSEMOVE, WM_MOUSEWHEEL, WM_RBUTTONDOWN,
|
||||||
WM_MOUSEWHEEL, WM_RBUTTONDOWN, WM_RBUTTONUP, WM_SYSCOMMAND,
|
WM_RBUTTONUP, WM_SYSCOMMAND,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
use windows::{
|
||||||
|
Management::Deployment::PackageManager,
|
||||||
|
Win32::{
|
||||||
|
System::SystemInformation::GetSystemDirectoryW,
|
||||||
|
UI::{Shell::ShellExecuteW, WindowsAndMessaging::SW_SHOWDEFAULT},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
// 获取图标并转为BASE64
|
// 获取图标并转为BASE64
|
||||||
pub fn get_file_icon(path: &str) -> Option<String> {
|
pub fn get_file_icon(path: &str) -> Option<String> {
|
||||||
@ -176,43 +181,6 @@ fn image_buffer_to_base64(image_buffer: ImageBuffer<Rgba<u8>, Vec<u8>>) -> Strin
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 运行
|
|
||||||
*/
|
|
||||||
pub fn shell_execute(
|
|
||||||
operation: String,
|
|
||||||
file: String,
|
|
||||||
params: String,
|
|
||||||
start_location: Option<String>,
|
|
||||||
) {
|
|
||||||
// dir
|
|
||||||
let dir = start_location.unwrap_or_else(|| {
|
|
||||||
// 判断是否是文件夹
|
|
||||||
let path = Path::new(&file);
|
|
||||||
if path.is_dir() {
|
|
||||||
// 文件夹
|
|
||||||
file.clone()
|
|
||||||
} else {
|
|
||||||
// 文件 获取上一级目录
|
|
||||||
path.parent().unwrap().display().to_string()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// HSTRING
|
|
||||||
let operation = HSTRING::from(operation.as_str());
|
|
||||||
let file = HSTRING::from(file.as_str());
|
|
||||||
let params = HSTRING::from(params.as_str());
|
|
||||||
let dir = HSTRING::from(dir.as_str());
|
|
||||||
// PCWSTR
|
|
||||||
let operation = PCWSTR(operation.as_ptr());
|
|
||||||
let file = PCWSTR(file.as_ptr());
|
|
||||||
let params = PCWSTR(params.as_ptr());
|
|
||||||
let dir = PCWSTR(dir.as_ptr());
|
|
||||||
unsafe {
|
|
||||||
// execute
|
|
||||||
ShellExecuteW(None, operation, file, params, dir, SW_SHOWDEFAULT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取快捷方式信息
|
* 获取快捷方式信息
|
||||||
*/
|
*/
|
||||||
@ -262,45 +230,6 @@ pub fn get_shortcut_file_info(path: &str) -> Option<HashMap<String, String>> {
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 运行命令
|
|
||||||
*/
|
|
||||||
pub fn system_item_execute(target: &str, params: Option<&str>) {
|
|
||||||
if target == "static:TurnOffMonitor" {
|
|
||||||
// 关闭显示器
|
|
||||||
turn_off_monitor()
|
|
||||||
} else {
|
|
||||||
let mut file = target.to_string();
|
|
||||||
if !target.starts_with("shell:") {
|
|
||||||
// 如果不是shell开头,就查询路径
|
|
||||||
file = search_path(target).unwrap_or(target.to_string());
|
|
||||||
}
|
|
||||||
let file = HSTRING::from(file);
|
|
||||||
let params = match params {
|
|
||||||
Some(p) => HSTRING::from(p),
|
|
||||||
_ => HSTRING::new(),
|
|
||||||
};
|
|
||||||
// 获取系统盘路径当作工作目录
|
|
||||||
let mut buffer = [0u16; MAX_PATH as usize];
|
|
||||||
unsafe {
|
|
||||||
GetSystemDirectoryW(Some(&mut buffer));
|
|
||||||
}
|
|
||||||
let dir = u16_to_string(&buffer);
|
|
||||||
let dir = HSTRING::from(dir);
|
|
||||||
// execute
|
|
||||||
unsafe {
|
|
||||||
ShellExecuteW(
|
|
||||||
None,
|
|
||||||
w!("open"),
|
|
||||||
PCWSTR(file.as_ptr()),
|
|
||||||
PCWSTR(params.as_ptr()),
|
|
||||||
PCWSTR(dir.as_ptr()),
|
|
||||||
SW_SHOWDEFAULT,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关闭显示器
|
* 关闭显示器
|
||||||
*/
|
*/
|
||||||
@ -514,6 +443,7 @@ struct MouseEvent {
|
|||||||
y: i32,
|
y: i32,
|
||||||
button: i32,
|
button: i32,
|
||||||
mouse_data: u32,
|
mouse_data: u32,
|
||||||
|
class_name: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -526,6 +456,8 @@ unsafe extern "system" fn mouse_proc(code: i32, wparam: WPARAM, lparam: LPARAM)
|
|||||||
let x = (*msll_struct).pt.x;
|
let x = (*msll_struct).pt.x;
|
||||||
let y = (*msll_struct).pt.y;
|
let y = (*msll_struct).pt.y;
|
||||||
let mouse_data = (*msll_struct).mouseData;
|
let mouse_data = (*msll_struct).mouseData;
|
||||||
|
// 类名
|
||||||
|
let mut class_name = String::new();
|
||||||
// 参数
|
// 参数
|
||||||
let param = wparam.0 as u32;
|
let param = wparam.0 as u32;
|
||||||
// 事件
|
// 事件
|
||||||
@ -540,11 +472,14 @@ unsafe extern "system" fn mouse_proc(code: i32, wparam: WPARAM, lparam: LPARAM)
|
|||||||
// 鼠标操作
|
// 鼠标操作
|
||||||
if param == WM_LBUTTONUP || param == WM_RBUTTONUP || param == WM_MBUTTONUP {
|
if param == WM_LBUTTONUP || param == WM_RBUTTONUP || param == WM_MBUTTONUP {
|
||||||
event.push_str("mouseup");
|
event.push_str("mouseup");
|
||||||
|
class_name.push_str(&get_foreground_window_class_name());
|
||||||
} else if param == WM_LBUTTONDOWN || param == WM_RBUTTONDOWN || param == WM_MBUTTONDOWN
|
} else if param == WM_LBUTTONDOWN || param == WM_RBUTTONDOWN || param == WM_MBUTTONDOWN
|
||||||
{
|
{
|
||||||
event.push_str("mousedown");
|
event.push_str("mousedown");
|
||||||
|
class_name.push_str(&get_foreground_window_class_name());
|
||||||
} else if param == WM_MOUSEWHEEL || param == WM_MOUSEHWHEEL {
|
} else if param == WM_MOUSEWHEEL || param == WM_MOUSEHWHEEL {
|
||||||
event.push_str("mousewheel");
|
event.push_str("mousewheel");
|
||||||
|
class_name.push_str(&get_foreground_window_class_name());
|
||||||
}
|
}
|
||||||
// 按键类型
|
// 按键类型
|
||||||
if param == WM_LBUTTONUP || param == WM_LBUTTONDOWN {
|
if param == WM_LBUTTONUP || param == WM_LBUTTONDOWN {
|
||||||
@ -567,6 +502,7 @@ unsafe extern "system" fn mouse_proc(code: i32, wparam: WPARAM, lparam: LPARAM)
|
|||||||
y,
|
y,
|
||||||
mouse_data,
|
mouse_data,
|
||||||
button,
|
button,
|
||||||
|
class_name,
|
||||||
};
|
};
|
||||||
func.call(
|
func.call(
|
||||||
Ok(serde_json::to_string(&mouse_event).unwrap()),
|
Ok(serde_json::to_string(&mouse_event).unwrap()),
|
||||||
@ -749,3 +685,122 @@ pub fn get_appx_list() -> Vec<HashMap<String, String>> {
|
|||||||
}
|
}
|
||||||
result_list
|
result_list
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前活跃窗口的类名
|
||||||
|
*/
|
||||||
|
fn get_foreground_window_class_name() -> String {
|
||||||
|
let hwnd = unsafe { GetForegroundWindow() };
|
||||||
|
// 获取窗口的ClassName
|
||||||
|
let mut buffer = [0u16; MAX_PATH as usize];
|
||||||
|
unsafe {
|
||||||
|
GetClassNameW(hwnd, &mut buffer);
|
||||||
|
};
|
||||||
|
// 返回
|
||||||
|
u16_to_string(&buffer)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前鼠标位置
|
||||||
|
*/
|
||||||
|
pub fn get_cursor_point() -> [i32; 2] {
|
||||||
|
let mut point = POINT::default();
|
||||||
|
unsafe {
|
||||||
|
GetCursorPos(&mut point);
|
||||||
|
};
|
||||||
|
[point.x, point.y]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行
|
||||||
|
*/
|
||||||
|
pub fn shell_execute(
|
||||||
|
operation: String,
|
||||||
|
file: String,
|
||||||
|
params: String,
|
||||||
|
start_location: Option<String>,
|
||||||
|
) {
|
||||||
|
thread::spawn(move || {
|
||||||
|
// 是否是打开文件夹
|
||||||
|
let is_dir = operation == "explore";
|
||||||
|
// dir
|
||||||
|
let dir = start_location.unwrap_or_else(|| {
|
||||||
|
// 判断是否是文件夹
|
||||||
|
let path = Path::new(&file);
|
||||||
|
if path.is_dir() {
|
||||||
|
// 文件夹
|
||||||
|
file.clone()
|
||||||
|
} else {
|
||||||
|
// 文件 获取上一级目录
|
||||||
|
path.parent().unwrap().display().to_string()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 文件夹
|
||||||
|
let dir_param = format!("\"{}\"", file.to_string());
|
||||||
|
let dir_param = HSTRING::from(dir_param.as_str());
|
||||||
|
let dir_param = PCWSTR(dir_param.as_ptr());
|
||||||
|
// HSTRING
|
||||||
|
let operation = HSTRING::from(operation.as_str());
|
||||||
|
let file = HSTRING::from(file.as_str());
|
||||||
|
let params = HSTRING::from(params.as_str());
|
||||||
|
let dir = HSTRING::from(dir.as_str());
|
||||||
|
// PCWSTR
|
||||||
|
let operation = PCWSTR(operation.as_ptr());
|
||||||
|
let file = PCWSTR(file.as_ptr());
|
||||||
|
let params = PCWSTR(params.as_ptr());
|
||||||
|
let dir = PCWSTR(dir.as_ptr());
|
||||||
|
unsafe {
|
||||||
|
if is_dir {
|
||||||
|
ShellExecuteW(
|
||||||
|
None,
|
||||||
|
w!("open"),
|
||||||
|
w!("explorer.exe"),
|
||||||
|
dir_param,
|
||||||
|
None,
|
||||||
|
SW_SHOWDEFAULT,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
ShellExecuteW(None, operation, file, params, dir, SW_SHOWDEFAULT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行命令
|
||||||
|
*/
|
||||||
|
pub fn system_item_execute(target: &str, params: Option<&str>) {
|
||||||
|
if target == "static:TurnOffMonitor" {
|
||||||
|
// 关闭显示器
|
||||||
|
turn_off_monitor()
|
||||||
|
} else {
|
||||||
|
let mut file = target.to_string();
|
||||||
|
if !target.starts_with("shell:") {
|
||||||
|
// 如果不是shell开头,就查询路径
|
||||||
|
file = search_path(target).unwrap_or(target.to_string());
|
||||||
|
}
|
||||||
|
let file = HSTRING::from(file);
|
||||||
|
let params = match params {
|
||||||
|
Some(p) => HSTRING::from(p),
|
||||||
|
_ => HSTRING::new(),
|
||||||
|
};
|
||||||
|
// 获取系统盘路径当作工作目录
|
||||||
|
let mut buffer = [0u16; MAX_PATH as usize];
|
||||||
|
unsafe {
|
||||||
|
GetSystemDirectoryW(Some(&mut buffer));
|
||||||
|
}
|
||||||
|
let dir = u16_to_string(&buffer);
|
||||||
|
let dir = HSTRING::from(dir);
|
||||||
|
// execute
|
||||||
|
unsafe {
|
||||||
|
ShellExecuteW(
|
||||||
|
None,
|
||||||
|
w!("open"),
|
||||||
|
PCWSTR(file.as_ptr()),
|
||||||
|
PCWSTR(params.as_ptr()),
|
||||||
|
PCWSTR(dir.as_ptr()),
|
||||||
|
SW_SHOWDEFAULT,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
80
src/App.vue
80
src/App.vue
@ -91,10 +91,35 @@ function setTheme() {
|
|||||||
padding: "6px",
|
padding: "6px",
|
||||||
},
|
},
|
||||||
Checkbox: {
|
Checkbox: {
|
||||||
color: store.setting.appearance.theme.mainBackgroundColor,
|
color: hexToRGBA(store.setting.appearance.theme.mainBackgroundColor, 1),
|
||||||
textColor: store.setting.appearance.theme.mainFontColor,
|
textColor: hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
|
||||||
borderChecked: "1px solid " + store.setting.appearance.theme.borderColor,
|
border:
|
||||||
colorChecked: store.setting.appearance.theme.secondBackgroundColor,
|
"1px solid " + hexToRGBA(store.setting.appearance.theme.borderColor, 1),
|
||||||
|
borderChecked:
|
||||||
|
"1px solid " +
|
||||||
|
hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
|
||||||
|
colorChecked: "none",
|
||||||
|
checkMarkColor: hexToRGBA(
|
||||||
|
store.setting.appearance.theme.mainFontColor,
|
||||||
|
1
|
||||||
|
),
|
||||||
|
},
|
||||||
|
Radio: {
|
||||||
|
boxShadowActive:
|
||||||
|
"inset 0 0 0 1px " +
|
||||||
|
hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
|
||||||
|
boxShadowFocus:
|
||||||
|
"inset 0 0 0 1px " +
|
||||||
|
hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
|
||||||
|
boxShadowHover:
|
||||||
|
"inset 0 0 0 1px " +
|
||||||
|
hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
|
||||||
|
dotColorActive: hexToRGBA(
|
||||||
|
store.setting.appearance.theme.mainFontColor,
|
||||||
|
1
|
||||||
|
),
|
||||||
|
color: hexToRGBA(store.setting.appearance.theme.mainBackgroundColor, 1),
|
||||||
|
textColor: hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
|
||||||
},
|
},
|
||||||
Form: {
|
Form: {
|
||||||
labelTextColor: store.setting.appearance.theme.mainFontColor,
|
labelTextColor: store.setting.appearance.theme.mainFontColor,
|
||||||
@ -172,6 +197,26 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
function createStyle() {
|
function createStyle() {
|
||||||
|
// 找到要删除的 style 标签
|
||||||
|
let styleElement = document.getElementById("placeholder-style");
|
||||||
|
// 如果找到了 style 标签,则从其父节点中移除
|
||||||
|
if (styleElement && styleElement.parentNode) {
|
||||||
|
styleElement.parentNode.removeChild(styleElement);
|
||||||
|
}
|
||||||
|
// 创建一个新的伪类样式规则
|
||||||
|
let style = document.createElement("style");
|
||||||
|
style.setAttribute("id", "placeholder-style");
|
||||||
|
style.type = "text/css";
|
||||||
|
// 设置伪类样式规则的内容
|
||||||
|
style.innerHTML =
|
||||||
|
"input::placeholder, textarea::placeholder {" +
|
||||||
|
"color: " +
|
||||||
|
hexToRGBA(store.setting.appearance.theme.mainFontColor, 0.5) +
|
||||||
|
";" +
|
||||||
|
"}";
|
||||||
|
// 将伪类样式规则添加到 head 元素中
|
||||||
|
document.head.appendChild(style);
|
||||||
|
|
||||||
// 找到要删除的 style 标签
|
// 找到要删除的 style 标签
|
||||||
let oldRangeStyleElement = document.getElementById("range-style");
|
let oldRangeStyleElement = document.getElementById("range-style");
|
||||||
// 如果找到了 style 标签,则从其父节点中移除
|
// 如果找到了 style 标签,则从其父节点中移除
|
||||||
@ -251,12 +296,33 @@ function keydown(e: any) {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
// 禁止关闭页面
|
// 禁止关闭页面
|
||||||
if (shortcutKey.toLowerCase() === "ctrl + w") {
|
if (
|
||||||
|
shortcutKey.toLowerCase() === "ctrl + w" ||
|
||||||
|
shortcutKey.toLowerCase() === "alt + f4"
|
||||||
|
) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 监听鼠标右键
|
||||||
|
function contextmenu(e: MouseEvent) {
|
||||||
|
let target = e.target as HTMLInputElement;
|
||||||
|
if (target) {
|
||||||
|
if (
|
||||||
|
(target.nodeName != null &&
|
||||||
|
target.nodeName.toLowerCase() == "input" &&
|
||||||
|
target.type != null &&
|
||||||
|
target.type.toLowerCase() == "text") ||
|
||||||
|
(target.nodeName != null && target.nodeName.toLowerCase() == "textarea")
|
||||||
|
) {
|
||||||
|
window.api.textRightMenu();
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 监听
|
// 监听
|
||||||
let onUpdateSettingUnListen: Function | null = null;
|
let onUpdateSettingUnListen: Function | null = null;
|
||||||
// mounted
|
// mounted
|
||||||
@ -265,6 +331,8 @@ onMounted(() => {
|
|||||||
createStyle();
|
createStyle();
|
||||||
// 监听键盘
|
// 监听键盘
|
||||||
window.addEventListener("keydown", keydown, true);
|
window.addEventListener("keydown", keydown, true);
|
||||||
|
// 监听右键
|
||||||
|
window.addEventListener("contextmenu", contextmenu, true);
|
||||||
// 监听更新项目
|
// 监听更新项目
|
||||||
onUpdateSettingUnListen = window.setting.onUpdate((data) => {
|
onUpdateSettingUnListen = window.setting.onUpdate((data) => {
|
||||||
store.setting = data;
|
store.setting = data;
|
||||||
@ -274,6 +342,8 @@ onMounted(() => {
|
|||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
// 监听键盘
|
// 监听键盘
|
||||||
window.removeEventListener("keydown", keydown, true);
|
window.removeEventListener("keydown", keydown, true);
|
||||||
|
// 监听右键
|
||||||
|
window.removeEventListener("contextmenu", contextmenu, true);
|
||||||
// 删除监听
|
// 删除监听
|
||||||
if (onUpdateSettingUnListen) {
|
if (onUpdateSettingUnListen) {
|
||||||
onUpdateSettingUnListen();
|
onUpdateSettingUnListen();
|
||||||
|
20
src/components/KeyText.vue
Normal file
20
src/components/KeyText.vue
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<template>
|
||||||
|
<span
|
||||||
|
class="ml-auto text-[12px] py-[4px] px-[6px]"
|
||||||
|
style="border-radius: 4px"
|
||||||
|
:style="{
|
||||||
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
|
backgroundColor: store.setting.appearance.theme.secondBackgroundColor,
|
||||||
|
}"
|
||||||
|
>{{ text }}</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { useMainStore } from "../store";
|
||||||
|
// pinia
|
||||||
|
const store = useMainStore();
|
||||||
|
// props
|
||||||
|
const props = defineProps<{
|
||||||
|
text: string;
|
||||||
|
}>();
|
||||||
|
</script>
|
12
src/index.d.ts
vendored
12
src/index.d.ts
vendored
@ -31,9 +31,16 @@ declare global {
|
|||||||
openURL: (url: string) => void;
|
openURL: (url: string) => void;
|
||||||
getVersion: () => string;
|
getVersion: () => string;
|
||||||
exit: () => void;
|
exit: () => void;
|
||||||
|
run: (
|
||||||
|
operation: string,
|
||||||
|
target: string,
|
||||||
|
params: string | null,
|
||||||
|
startLocation: string | null
|
||||||
|
) => void;
|
||||||
|
textRightMenu: () => void;
|
||||||
};
|
};
|
||||||
main: {
|
main: {
|
||||||
showWindow: (blurHide: boolean) => void;
|
showWindow: (blurHide: boolean, autoHide: boolean) => void;
|
||||||
hideWindow: () => void;
|
hideWindow: () => void;
|
||||||
initData: () => void;
|
initData: () => void;
|
||||||
onShowWindowBefore: (callback: Callback) => Function;
|
onShowWindowBefore: (callback: Callback) => Function;
|
||||||
@ -138,6 +145,7 @@ declare global {
|
|||||||
onUpdateOpenInfo: (callback: Callback) => Function;
|
onUpdateOpenInfo: (callback: Callback) => Function;
|
||||||
onCheckInvalid: (callback: Callback) => Function;
|
onCheckInvalid: (callback: Callback) => Function;
|
||||||
updateOpenInfo: (type: string, id: number) => void;
|
updateOpenInfo: (type: string, id: number) => void;
|
||||||
|
deleteQuickSearchHistory: (id: number) => void;
|
||||||
};
|
};
|
||||||
setting: {
|
setting: {
|
||||||
createWindow: () => void;
|
createWindow: () => void;
|
||||||
@ -149,6 +157,7 @@ declare global {
|
|||||||
onUpdate: (callback: Callback) => Function;
|
onUpdate: (callback: Callback) => Function;
|
||||||
setStartup: (value: boolean) => void;
|
setStartup: (value: boolean) => void;
|
||||||
setTray: (show: boolean) => void;
|
setTray: (show: boolean) => void;
|
||||||
|
setTaskbar: (show: boolean) => void;
|
||||||
setShortcutKey: (setting: Setting) => void;
|
setShortcutKey: (setting: Setting) => void;
|
||||||
setAlwaysTop: (value: boolean) => void;
|
setAlwaysTop: (value: boolean) => void;
|
||||||
setLockSize: (value: boolean) => void;
|
setLockSize: (value: boolean) => void;
|
||||||
@ -168,6 +177,7 @@ declare global {
|
|||||||
onShowWindowBefore: (callback: Callback) => Function;
|
onShowWindowBefore: (callback: Callback) => Function;
|
||||||
onClearData: (callback: Callback) => Function;
|
onClearData: (callback: Callback) => Function;
|
||||||
setWindowHeight: (height: number) => void;
|
setWindowHeight: (height: number) => void;
|
||||||
|
setWindowWidth: (width: number) => void;
|
||||||
};
|
};
|
||||||
about: {
|
about: {
|
||||||
createWindow: () => void;
|
createWindow: () => void;
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
:style="{
|
:style="{
|
||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
|
borderRadius:
|
||||||
|
store.setting.appearance.transparency < 1 &&
|
||||||
|
store.setting.appearance.windowRounded
|
||||||
|
? '8px'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex items-center px-2 app-region-drag">
|
<div class="flex items-center px-2 app-region-drag">
|
||||||
@ -29,7 +34,7 @@
|
|||||||
/>
|
/>
|
||||||
<p class="mt-4">Dawn Launcher {{ version }}</p>
|
<p class="mt-4">Dawn Launcher {{ version }}</p>
|
||||||
<p class="mt-2">
|
<p class="mt-2">
|
||||||
Copyright © 2022-2023 Dawn Launcher. All Rights Reserved
|
Copyright © 2022-2025 Dawn Launcher. All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
<p class="mt-2">
|
<p class="mt-2">
|
||||||
{{ store.language.officialWebsite }}{{ store.language.colon
|
{{ store.language.officialWebsite }}{{ store.language.colon
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
:style="{
|
:style="{
|
||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
|
borderRadius:
|
||||||
|
store.setting.appearance.transparency < 1 &&
|
||||||
|
store.setting.appearance.windowRounded
|
||||||
|
? '8px'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex items-center app-region-drag">
|
<div class="flex items-center app-region-drag">
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
:style="{
|
:style="{
|
||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
|
borderRadius:
|
||||||
|
store.setting.appearance.transparency < 1 &&
|
||||||
|
store.setting.appearance.windowRounded
|
||||||
|
? '8px'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex items-center app-region-drag">
|
<div class="flex items-center app-region-drag">
|
||||||
@ -131,7 +136,7 @@ let sortOptions = ref([
|
|||||||
value: "initial",
|
value: "initial",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: store.language.byOpenNumber,
|
label: store.language.byOpenCount,
|
||||||
value: "openNumber",
|
value: "openNumber",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
:style="{
|
:style="{
|
||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
|
borderRadius:
|
||||||
|
store.setting.appearance.transparency < 1 &&
|
||||||
|
store.setting.appearance.windowRounded
|
||||||
|
? '8px'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex items-center app-region-drag">
|
<div class="flex items-center app-region-drag">
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -78,7 +78,7 @@
|
|||||||
@dragleave="clearMouseOverChangeClassificationSetTimeout"
|
@dragleave="clearMouseOverChangeClassificationSetTimeout"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="overflow-hidden text-ellipsis whitespace-nowrap"
|
class="overflow-hidden whitespace-nowrap"
|
||||||
:style="{
|
:style="{
|
||||||
filter: store.setting.appearance.fontShadow
|
filter: store.setting.appearance.fontShadow
|
||||||
? 'drop-shadow(1px 1px 1px ' +
|
? 'drop-shadow(1px 1px 1px ' +
|
||||||
@ -130,20 +130,20 @@
|
|||||||
<KeyboardArrowDownRound></KeyboardArrowDownRound>
|
<KeyboardArrowDownRound></KeyboardArrowDownRound>
|
||||||
</Icon>
|
</Icon>
|
||||||
</div>
|
</div>
|
||||||
<ul
|
<div
|
||||||
v-show="
|
v-show="
|
||||||
classification.childList &&
|
classification.childList &&
|
||||||
classification.childList.length > 0 &&
|
classification.childList.length > 0 &&
|
||||||
classificationChildShowHiddenMap.has(classification.id)
|
classificationChildShowHiddenMap.has(classification.id)
|
||||||
"
|
"
|
||||||
class="classification-child-list"
|
|
||||||
:class="[
|
:class="[
|
||||||
`${
|
`${
|
||||||
store.setting.classification.layout === 'top'
|
store.setting.classification.layout === 'top'
|
||||||
? 'fixed z-[10000] rounded drop-shadow-[0_0_6px_rgba(0,0,0,0.2)] origin-top-left pt-1 mt-1'
|
? '!fixed !z-[10000] !rounded-lg !origin-top-left !pt-1 !mt-1'
|
||||||
: ''
|
: ''
|
||||||
}`,
|
}`,
|
||||||
]"
|
]"
|
||||||
|
:data-simplebar="store.setting.classification.layout === 'top'"
|
||||||
:style="{
|
:style="{
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
store.setting.classification.layout === 'top'
|
store.setting.classification.layout === 'top'
|
||||||
@ -156,7 +156,16 @@
|
|||||||
store.setting.classification.layout === 'top'
|
store.setting.classification.layout === 'top'
|
||||||
? classificationWidth + 'px'
|
? classificationWidth + 'px'
|
||||||
: '',
|
: '',
|
||||||
|
maxHeight:
|
||||||
|
store.setting.classification.layout === 'top' ? '300px' : 'auto',
|
||||||
|
'box-shadow':
|
||||||
|
store.setting.classification.layout === 'top'
|
||||||
|
? '0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05'
|
||||||
|
: '',
|
||||||
}"
|
}"
|
||||||
|
>
|
||||||
|
<ul
|
||||||
|
class="classification-child-list h-full"
|
||||||
:classification-parent-id="classification.id"
|
:classification-parent-id="classification.id"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
@ -183,7 +192,9 @@
|
|||||||
`${
|
`${
|
||||||
store.setting.classification.layout !== 'top' ? 'rounded' : ''
|
store.setting.classification.layout !== 'top' ? 'rounded' : ''
|
||||||
}`,
|
}`,
|
||||||
`${store.setting.classification.mode === 'normal' ? 'px-2' : ''}`,
|
`${
|
||||||
|
store.setting.classification.mode === 'normal' ? 'px-2' : ''
|
||||||
|
}`,
|
||||||
]"
|
]"
|
||||||
:style="{
|
:style="{
|
||||||
color:
|
color:
|
||||||
@ -213,7 +224,7 @@
|
|||||||
@dragleave="clearMouseOverChangeClassificationSetTimeout"
|
@dragleave="clearMouseOverChangeClassificationSetTimeout"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="overflow-hidden text-ellipsis whitespace-nowrap"
|
class="overflow-hidden whitespace-nowrap"
|
||||||
:style="{
|
:style="{
|
||||||
filter: store.setting.appearance.fontShadow
|
filter: store.setting.appearance.fontShadow
|
||||||
? 'drop-shadow(1px 1px 1px ' +
|
? 'drop-shadow(1px 1px 1px ' +
|
||||||
@ -237,6 +248,7 @@
|
|||||||
}"
|
}"
|
||||||
></li>
|
></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -299,10 +311,17 @@ watch(
|
|||||||
() => {
|
() => {
|
||||||
// +1
|
// +1
|
||||||
count.value = count.value + 1;
|
count.value = count.value + 1;
|
||||||
|
classificationChildShowHiddenMap.value = new Map();
|
||||||
// 刷新DOM完毕执行
|
// 刷新DOM完毕执行
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
// 滚动条
|
||||||
|
createSimpleBar();
|
||||||
// 设置分类宽度
|
// 设置分类宽度
|
||||||
setClassificationWidth();
|
setClassificationWidth();
|
||||||
|
// 创建父级分类拖拽对象;
|
||||||
|
createClassificationParentSortable();
|
||||||
|
// 创建子级分类拖拽对象
|
||||||
|
createClassificationChildSortable();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -787,6 +806,8 @@ function createClassificationParentSortable() {
|
|||||||
setClassificationWidth();
|
setClassificationWidth();
|
||||||
// 页面高度 - 34(标题栏固定高度)
|
// 页面高度 - 34(标题栏固定高度)
|
||||||
height.value = document.documentElement.clientHeight - 34;
|
height.value = document.documentElement.clientHeight - 34;
|
||||||
|
// 创建子级分类拖拽对象
|
||||||
|
createClassificationChildSortable();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -862,6 +883,8 @@ function createClassificationChildSortable() {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// 分类宽度
|
// 分类宽度
|
||||||
setClassificationWidth();
|
setClassificationWidth();
|
||||||
|
// 创建子级分类拖拽对象
|
||||||
|
createClassificationChildSortable();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
18475
src/pages/classification/js/emoji.ts
Normal file
18475
src/pages/classification/js/emoji.ts
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,11 @@
|
|||||||
:style="{
|
:style="{
|
||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
|
borderRadius:
|
||||||
|
store.setting.appearance.transparency < 1 &&
|
||||||
|
store.setting.appearance.windowRounded
|
||||||
|
? '8px'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex items-center px-2 app-region-drag">
|
<div class="flex items-center px-2 app-region-drag">
|
||||||
|
@ -300,15 +300,6 @@ let topRightMenuOptions = ref<Array<any>>([
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: store.language.rewardSponsor,
|
|
||||||
key: "RewardSponsor",
|
|
||||||
props: {
|
|
||||||
onclick: () => {
|
|
||||||
window.api.openURL("https://dawnlauncher.com/sponsor");
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: store.language.feedback,
|
label: store.language.feedback,
|
||||||
key: "Feedback",
|
key: "Feedback",
|
||||||
@ -371,7 +362,7 @@ function resize() {
|
|||||||
// 加载完dom后再显示页面
|
// 加载完dom后再显示页面
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (!store.setting.general.startupTray) {
|
if (!store.setting.general.startupTray) {
|
||||||
window.main.showWindow(false);
|
window.main.showWindow(false, false);
|
||||||
}
|
}
|
||||||
window.main.initData();
|
window.main.initData();
|
||||||
});
|
});
|
||||||
@ -532,6 +523,8 @@ onMounted(() => {
|
|||||||
// 监听显示窗口之前
|
// 监听显示窗口之前
|
||||||
listens.push(
|
listens.push(
|
||||||
window.main.onShowWindowBefore((data) => {
|
window.main.onShowWindowBefore((data) => {
|
||||||
|
// 隐藏搜索
|
||||||
|
store.search = false;
|
||||||
if (classificationContentRef.value) {
|
if (classificationContentRef.value) {
|
||||||
// 如果分类ID不为空的话选择分类ID
|
// 如果分类ID不为空的话选择分类ID
|
||||||
let selectedClassificationId: number | null =
|
let selectedClassificationId: number | null =
|
||||||
@ -553,7 +546,7 @@ onMounted(() => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 显示窗口
|
// 显示窗口
|
||||||
window.main.showWindow(data.blurHide);
|
window.main.showWindow(data.blurHide, data.autoHide);
|
||||||
}, 10);
|
}, 10);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
height: height + 'px',
|
height: height + 'px',
|
||||||
|
borderRadius:
|
||||||
|
store.setting.appearance.transparency < 1 &&
|
||||||
|
store.setting.appearance.windowRounded
|
||||||
|
? '8px'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex items-center px-2 app-region-drag">
|
<div class="flex items-center px-2 app-region-drag">
|
||||||
@ -247,7 +252,9 @@
|
|||||||
(selectedMenuId === 4 && id)
|
(selectedMenuId === 4 && id)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<span class="block">{{ store.language.target }}</span>
|
<span class="block">{{
|
||||||
|
selectedMenuId === 2 ? store.language.url : store.language.path
|
||||||
|
}}</span>
|
||||||
<NInput
|
<NInput
|
||||||
class="mt-1.5"
|
class="mt-1.5"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@ -322,9 +329,7 @@
|
|||||||
v-if="
|
v-if="
|
||||||
selectedMenuId === 0 &&
|
selectedMenuId === 0 &&
|
||||||
form.data.target &&
|
form.data.target &&
|
||||||
form.data.target.trim() !== '' &&
|
form.data.target.trim() !== ''
|
||||||
(getFileExtname(form.data.target) === 'exe' ||
|
|
||||||
getFileExtname(form.data.target) === 'bat')
|
|
||||||
"
|
"
|
||||||
v-model:checked="form.data.runAsAdmin"
|
v-model:checked="form.data.runAsAdmin"
|
||||||
:focusable="false"
|
:focusable="false"
|
||||||
@ -452,7 +457,6 @@ import {
|
|||||||
isAbsolutePath,
|
isAbsolutePath,
|
||||||
deleteExtname,
|
deleteExtname,
|
||||||
getFileName,
|
getFileName,
|
||||||
getFileExtname,
|
|
||||||
} from "../../../commons/utils/common";
|
} from "../../../commons/utils/common";
|
||||||
import SystemItemList from "./components/SystemItemList.vue";
|
import SystemItemList from "./components/SystemItemList.vue";
|
||||||
import StartMenuItemList from "./components/StartMenuItemList.vue";
|
import StartMenuItemList from "./components/StartMenuItemList.vue";
|
||||||
@ -649,12 +653,6 @@ async function confirm() {
|
|||||||
if (!success) {
|
if (!success) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 后缀
|
|
||||||
let ext = getFileExtname(form.data.target);
|
|
||||||
// 如果选中按管理员运行,但是文件类型不是exe和bat就修改为false
|
|
||||||
if (form.data.runAsAdmin && (!ext || (ext !== "exe" && ext !== "bat"))) {
|
|
||||||
form.data.runAsAdmin = false;
|
|
||||||
}
|
|
||||||
if (!id) {
|
if (!id) {
|
||||||
// 添加
|
// 添加
|
||||||
await addItem();
|
await addItem();
|
||||||
@ -831,8 +829,10 @@ onMounted(() => {
|
|||||||
getURLInfoLoading.value = false;
|
getURLInfoLoading.value = false;
|
||||||
let res: Result = data;
|
let res: Result = data;
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
|
if (res.icon && res.icon.trim() !== "") {
|
||||||
form.data.icon = res.icon;
|
form.data.icon = res.icon;
|
||||||
form.data.htmlIcon = null;
|
form.data.htmlIcon = null;
|
||||||
|
}
|
||||||
form.name = res.name ?? "";
|
form.name = res.name ?? "";
|
||||||
} else {
|
} else {
|
||||||
window.api.showErrorMessageBox(
|
window.api.showErrorMessageBox(
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
:style="{
|
:style="{
|
||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
|
borderRadius:
|
||||||
|
store.setting.appearance.transparency < 1 &&
|
||||||
|
store.setting.appearance.windowRounded
|
||||||
|
? '8px'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex items-center px-2 app-region-drag">
|
<div class="flex items-center px-2 app-region-drag">
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
:style="{
|
:style="{
|
||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
|
borderRadius:
|
||||||
|
store.setting.appearance.transparency < 1 &&
|
||||||
|
store.setting.appearance.windowRounded
|
||||||
|
? '8px'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex items-center px-2 app-region-drag">
|
<div class="flex items-center px-2 app-region-drag">
|
||||||
|
@ -65,6 +65,19 @@
|
|||||||
: 'item-name-tile-1'
|
: 'item-name-tile-1'
|
||||||
}`,
|
}`,
|
||||||
]"
|
]"
|
||||||
|
:style="{
|
||||||
|
fontSize: store.setting.item.fontSize + 'px',
|
||||||
|
fontWeight: store.setting.item.fontWeight,
|
||||||
|
lineHeight: store.setting.item.fontLineHeight + 'rem',
|
||||||
|
maxHeight:
|
||||||
|
store.setting.item.itemNameRowCount == 2
|
||||||
|
? store.setting.item.hideEllipsis
|
||||||
|
? store.setting.item.fontLineHeight * 2 + 'rem'
|
||||||
|
: undefined
|
||||||
|
: store.setting.item.hideEllipsis
|
||||||
|
? store.setting.item.fontLineHeight * 1 + 'rem'
|
||||||
|
: undefined,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -42,6 +42,10 @@
|
|||||||
store.setting.subClassification.itemAreaNameFontLineHeight +
|
store.setting.subClassification.itemAreaNameFontLineHeight +
|
||||||
'rem',
|
'rem',
|
||||||
textAlign: store.setting.subClassification.itemAreaNameAlign,
|
textAlign: store.setting.subClassification.itemAreaNameAlign,
|
||||||
|
marginRight:
|
||||||
|
store.setting.subClassification.itemAreaNameAlign === 'right'
|
||||||
|
? '4px'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
{{ classification.name }}
|
{{ classification.name }}
|
||||||
@ -126,6 +130,7 @@ import {
|
|||||||
setItemWidth,
|
setItemWidth,
|
||||||
run,
|
run,
|
||||||
removeInvalidItem,
|
removeInvalidItem,
|
||||||
|
showItemList,
|
||||||
} from "../js";
|
} from "../js";
|
||||||
import ItemList from "./List.vue";
|
import ItemList from "./List.vue";
|
||||||
import { Item } from "../../../../types/item";
|
import { Item } from "../../../../types/item";
|
||||||
@ -150,6 +155,12 @@ watch(
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// 监听页面大小
|
// 监听页面大小
|
||||||
resize();
|
resize();
|
||||||
|
// 设置项目宽度
|
||||||
|
setItemWidth();
|
||||||
|
// 创建项目拖拽对象
|
||||||
|
createItemSortable();
|
||||||
|
// 清除批量操作
|
||||||
|
clearBatchOperation();
|
||||||
// 滚动到顶部
|
// 滚动到顶部
|
||||||
scrollToTop(itemContentSimpleBar);
|
scrollToTop(itemContentSimpleBar);
|
||||||
});
|
});
|
||||||
@ -305,12 +316,21 @@ function createItemSortable() {
|
|||||||
let fromClassificationId = parseInt(
|
let fromClassificationId = parseInt(
|
||||||
event.from.getAttribute("classification-id")!
|
event.from.getAttribute("classification-id")!
|
||||||
);
|
);
|
||||||
// 当前项目
|
let fromClassification =
|
||||||
const currentItem =
|
getClassificationById(fromClassificationId);
|
||||||
getItemListByClassificationId(fromClassificationId)[
|
if (fromClassification) {
|
||||||
event.oldIndex
|
let itemList =
|
||||||
];
|
getItemListByClassificationId(fromClassificationId);
|
||||||
|
if (itemList) {
|
||||||
|
let copyItemList = JSON.parse(JSON.stringify(itemList));
|
||||||
|
// 可能会存在自定义排序的情况,所以需要按照指定的排序方式获取项目
|
||||||
|
const currentItem = showItemList(
|
||||||
|
copyItemList,
|
||||||
|
fromClassification
|
||||||
|
)[event.oldIndex];
|
||||||
fromIdList.push(currentItem.id);
|
fromIdList.push(currentItem.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 批量操作
|
// 批量操作
|
||||||
for (const value of store.itemBatchOperationDataArray) {
|
for (const value of store.itemBatchOperationDataArray) {
|
||||||
@ -532,7 +552,7 @@ function drop(e: any, classificationId: number | null) {
|
|||||||
) {
|
) {
|
||||||
// 如果不是同一个项目就可以使用某个程序打开此文件
|
// 如果不是同一个项目就可以使用某个程序打开此文件
|
||||||
if (item.id !== store.itemDragOutData.id) {
|
if (item.id !== store.itemDragOutData.id) {
|
||||||
let params = store.itemDragOutData.data.target;
|
let params = '"' + store.itemDragOutData.data.target + '"';
|
||||||
if (item.data.params) {
|
if (item.data.params) {
|
||||||
params += " " + item.data.params;
|
params += " " + item.data.params;
|
||||||
}
|
}
|
||||||
@ -613,6 +633,14 @@ async function contextmenu(e: any) {
|
|||||||
// 记录右键选中的ID
|
// 记录右键选中的ID
|
||||||
store.itemRightMenuItemId = id;
|
store.itemRightMenuItemId = id;
|
||||||
}
|
}
|
||||||
|
// 获取当前项目在页面的所属分类
|
||||||
|
let pageClassificationId = null;
|
||||||
|
let itemListElement = getClassElement(e, "item-list");
|
||||||
|
if (itemListElement) {
|
||||||
|
pageClassificationId = parseInt(
|
||||||
|
itemListElement.getAttribute("classification-id")
|
||||||
|
);
|
||||||
|
}
|
||||||
// 弹出菜单
|
// 弹出菜单
|
||||||
window.item.showRightMenu({
|
window.item.showRightMenu({
|
||||||
classificationId: getSelectedClassificationId(),
|
classificationId: getSelectedClassificationId(),
|
||||||
@ -623,6 +651,7 @@ async function contextmenu(e: any) {
|
|||||||
x: e.screenX,
|
x: e.screenX,
|
||||||
y: e.screenY,
|
y: e.screenY,
|
||||||
type: "main",
|
type: "main",
|
||||||
|
pageClassificationId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// beforeMount
|
// beforeMount
|
||||||
@ -711,6 +740,8 @@ onMounted(() => {
|
|||||||
// 删除无效项目
|
// 删除无效项目
|
||||||
removeInvalidItem(id);
|
removeInvalidItem(id);
|
||||||
}
|
}
|
||||||
|
// 清空批量操作
|
||||||
|
clearBatchOperation();
|
||||||
// 刷新DOM完毕执行
|
// 刷新DOM完毕执行
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// 创建项目拖拽对象
|
// 创建项目拖拽对象
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
<p
|
<p
|
||||||
class="text-center mx-2"
|
class="text-center mx-2"
|
||||||
:class="[
|
:class="[
|
||||||
`${getLayout(classificationId) === 'tile' ? 'mt-2' : ''}`,
|
`${getLayout(classificationId) === 'tile' ? 'mt-2 text-center' : ''}`,
|
||||||
`${
|
`${
|
||||||
getLayout(classificationId) === 'list'
|
getLayout(classificationId) === 'list'
|
||||||
? store.setting.item.hideEllipsis
|
? store.setting.item.hideEllipsis
|
||||||
@ -60,6 +60,18 @@
|
|||||||
: undefined,
|
: undefined,
|
||||||
fontWeight: store.setting.item.fontWeight,
|
fontWeight: store.setting.item.fontWeight,
|
||||||
lineHeight: store.setting.item.fontLineHeight + 'rem',
|
lineHeight: store.setting.item.fontLineHeight + 'rem',
|
||||||
|
maxHeight:
|
||||||
|
getLayout(classificationId) === 'list'
|
||||||
|
? store.setting.item.hideEllipsis
|
||||||
|
? store.setting.item.fontLineHeight * 1 + 'rem'
|
||||||
|
: undefined
|
||||||
|
: store.setting.item.itemNameRowCount === 2
|
||||||
|
? store.setting.item.hideEllipsis
|
||||||
|
? store.setting.item.fontLineHeight * 2 + 'rem'
|
||||||
|
: undefined
|
||||||
|
: store.setting.item.hideEllipsis
|
||||||
|
? store.setting.item.fontLineHeight * 1 + 'rem'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
v-if="!store.setting.item.hideItemName"
|
v-if="!store.setting.item.hideItemName"
|
||||||
>
|
>
|
||||||
@ -228,9 +240,9 @@ function runItem(e: any, dbclick: boolean) {
|
|||||||
let item = getItemById(itemId);
|
let item = getItemById(itemId);
|
||||||
if (item && item.data) {
|
if (item && item.data) {
|
||||||
if (dbclick && store.setting.item.doubleClickOpen) {
|
if (dbclick && store.setting.item.doubleClickOpen) {
|
||||||
run("main", item.data.runAsAdmin ? "runas" : "open", item);
|
run("main", "open", item);
|
||||||
} else if (!dbclick && !store.setting.item.doubleClickOpen) {
|
} else if (!dbclick && !store.setting.item.doubleClickOpen) {
|
||||||
run("main", item.data.runAsAdmin ? "runas" : "open", item);
|
run("main", "open", item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,19 @@
|
|||||||
: 'item-name-tile-1'
|
: 'item-name-tile-1'
|
||||||
}`,
|
}`,
|
||||||
]"
|
]"
|
||||||
|
:style="{
|
||||||
|
fontSize: store.setting.item.fontSize + 'px',
|
||||||
|
fontWeight: store.setting.item.fontWeight,
|
||||||
|
lineHeight: store.setting.item.fontLineHeight + 'rem',
|
||||||
|
maxHeight:
|
||||||
|
store.setting.item.itemNameRowCount == 2
|
||||||
|
? store.setting.item.hideEllipsis
|
||||||
|
? store.setting.item.fontLineHeight * 2 + 'rem'
|
||||||
|
: undefined
|
||||||
|
: store.setting.item.hideEllipsis
|
||||||
|
? store.setting.item.fontLineHeight * 1 + 'rem'
|
||||||
|
: undefined,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -66,6 +66,19 @@
|
|||||||
: 'item-name-tile-1'
|
: 'item-name-tile-1'
|
||||||
}`,
|
}`,
|
||||||
]"
|
]"
|
||||||
|
:style="{
|
||||||
|
fontSize: store.setting.item.fontSize + 'px',
|
||||||
|
fontWeight: store.setting.item.fontWeight,
|
||||||
|
lineHeight: store.setting.item.fontLineHeight + 'rem',
|
||||||
|
maxHeight:
|
||||||
|
store.setting.item.itemNameRowCount == 2
|
||||||
|
? store.setting.item.hideEllipsis
|
||||||
|
? store.setting.item.fontLineHeight * 2 + 'rem'
|
||||||
|
: undefined
|
||||||
|
: store.setting.item.hideEllipsis
|
||||||
|
? store.setting.item.fontLineHeight * 1 + 'rem'
|
||||||
|
: undefined,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -36,7 +36,7 @@ function setItemWidth() {
|
|||||||
// 获取项目数量
|
// 获取项目数量
|
||||||
let itemList = itemListElement.getElementsByClassName("item");
|
let itemList = itemListElement.getElementsByClassName("item");
|
||||||
// 每行数量
|
// 每行数量
|
||||||
let num = null;
|
let num = 1;
|
||||||
// 布局
|
// 布局
|
||||||
let layout = getLayout(
|
let layout = getLayout(
|
||||||
classificationId ? parseInt(classificationId) : null
|
classificationId ? parseInt(classificationId) : null
|
||||||
@ -69,20 +69,10 @@ function setItemWidth() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
|
||||||
num !== null &&
|
|
||||||
((layout === "tile" && itemList.length >= num) || layout === "list")
|
|
||||||
) {
|
|
||||||
for (let i = 0; i < itemList.length; i++) {
|
for (let i = 0; i < itemList.length; i++) {
|
||||||
let itemElement = itemList[i] as HTMLElement;
|
let itemElement = itemList[i] as HTMLElement;
|
||||||
itemElement.style.width = (width - num * 4) / num + "px";
|
itemElement.style.width = (width - num * 4) / num + "px";
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
for (let i = 0; i < itemList.length; i++) {
|
|
||||||
let itemElement = itemList[i] as HTMLElement;
|
|
||||||
itemElement.style.width = minWidth + "px";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -750,18 +740,36 @@ function getName(name: string | null) {
|
|||||||
* @param item
|
* @param item
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
function getItemTitle(item: Item) {
|
function getItemTitle(item: Item, quickSearch: boolean = false) {
|
||||||
let name =
|
let name =
|
||||||
store.language.name +
|
store.language.name +
|
||||||
store.language.colon +
|
store.language.colon +
|
||||||
(item.name ? item.name.replace(/\\n/g, " ") : "");
|
(item.name ? item.name.replace(/\\n/g, " ") : "");
|
||||||
if (store.setting.item.openNumber) {
|
if (
|
||||||
|
quickSearch &&
|
||||||
|
store.setting.quickSearch.showHistorySort === "openNumber"
|
||||||
|
) {
|
||||||
name +=
|
name +=
|
||||||
"\n" +
|
"\n" +
|
||||||
store.language.openNumber +
|
store.language.openCount +
|
||||||
|
store.language.colon +
|
||||||
|
(item.data.quickSearchOpenNumber ?? 0);
|
||||||
|
} else if (store.setting.item.openNumber) {
|
||||||
|
name +=
|
||||||
|
"\n" +
|
||||||
|
store.language.openCount +
|
||||||
store.language.colon +
|
store.language.colon +
|
||||||
(item.data.openNumber ?? 0);
|
(item.data.openNumber ?? 0);
|
||||||
}
|
}
|
||||||
|
if (store.setting.item.promptShowPath) {
|
||||||
|
name += "\n";
|
||||||
|
if (item.type === 2) {
|
||||||
|
name += store.language.url;
|
||||||
|
} else {
|
||||||
|
name += store.language.path;
|
||||||
|
}
|
||||||
|
name += store.language.colon + item.data.target;
|
||||||
|
}
|
||||||
if (item.data.remark) {
|
if (item.data.remark) {
|
||||||
name +=
|
name +=
|
||||||
"\n" + store.language.remark + store.language.colon + item.data.remark;
|
"\n" + store.language.remark + store.language.colon + item.data.remark;
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="overflow-x-hidden max-h-[525px]"
|
class="overflow-x-hidden max-h-[525px]"
|
||||||
style="text-shadow: none"
|
|
||||||
:style="{
|
:style="{
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
|
borderRadius:
|
||||||
|
store.setting.appearance.transparency < 1 &&
|
||||||
|
store.setting.appearance.windowRounded
|
||||||
|
? '8px'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -16,20 +20,16 @@
|
|||||||
resultList && resultList.length > 0 ? 'solid' : undefined,
|
resultList && resultList.length > 0 ? 'solid' : undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="mx-2 whitespace-nowrap flex items-center">
|
<div class="mx-[10px] whitespace-nowrap flex items-center">
|
||||||
<svg
|
<Icon class="app-region-drag" size="22" v-if="mode === 'search'">
|
||||||
class="w-[24px] h-[24px] app-region-drag"
|
<SearchOutline></SearchOutline>
|
||||||
viewBox="0 96 960 960"
|
</Icon>
|
||||||
v-if="!webSearch"
|
<Icon class="app-region-drag" size="22" v-if="mode === 'commandLine'">
|
||||||
>
|
<TerminalOutline></TerminalOutline>
|
||||||
<path
|
</Icon>
|
||||||
fill="currentColor"
|
|
||||||
d="M779.385 902.154 528.923 651.693q-30 25.538-69 39.538-39 14-78.385 14-96.1 0-162.665-66.529-66.566-66.529-66.566-162.577t66.529-162.702q66.529-66.654 162.577-66.654 96.049 0 162.702 66.565Q610.769 379.899 610.769 476q0 41.692-14.769 80.692-14.769 39-38.769 66.693l250.462 250.461-28.308 28.308ZM381.538 665.231q79.616 0 134.423-54.808Q570.769 555.615 570.769 476q0-79.615-54.808-134.423-54.807-54.808-134.423-54.808-79.615 0-134.423 54.808Q192.308 396.385 192.308 476q0 79.615 54.807 134.423 54.808 54.808 134.423 54.808Z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
<span
|
<span
|
||||||
class="text-2xl block app-region-drag"
|
class="text-xl block app-region-drag"
|
||||||
v-else-if="webSearch && webSearchSource"
|
v-if="mode === 'webSearch' && webSearchSource"
|
||||||
>{{ webSearchSource.name }}</span
|
>{{ webSearchSource.name }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -37,12 +37,12 @@
|
|||||||
ref="searchInput"
|
ref="searchInput"
|
||||||
type="text"
|
type="text"
|
||||||
v-model="value"
|
v-model="value"
|
||||||
class="w-full resize-none text-2xl font-light hover:outline-0 focus-visible:outline-0"
|
class="w-full resize-none text-xl font-light hover:outline-0 focus-visible:outline-0"
|
||||||
:style="{
|
:style="{
|
||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
}"
|
}"
|
||||||
placeholder="Dawn Launcher"
|
:placeholder="getPlaceholder()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ul
|
<ul
|
||||||
@ -59,7 +59,7 @@
|
|||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
v-for="(item, index) of resultList"
|
v-for="(item, index) of resultList"
|
||||||
class="item flex items-center px-2 h-[48px]"
|
class="item flex items-center px-[12px] h-[48px]"
|
||||||
:key="'item-' + item.id + '-' + index"
|
:key="'item-' + item.id + '-' + index"
|
||||||
:id="'item-' + index"
|
:id="'item-' + index"
|
||||||
:item-id="item.id"
|
:item-id="item.id"
|
||||||
@ -73,35 +73,79 @@
|
|||||||
)
|
)
|
||||||
: undefined,
|
: undefined,
|
||||||
}"
|
}"
|
||||||
:title="getItemTitle(item as Item)"
|
:title="getItemTitle(item as Item, true)"
|
||||||
:index="index"
|
:index="index"
|
||||||
|
:target="item.data.target"
|
||||||
>
|
>
|
||||||
<CustomItemIcon :item="(item as Item)" :icon-size="32"></CustomItemIcon>
|
<CustomItemIcon :item="(item as Item)" :icon-size="28"></CustomItemIcon>
|
||||||
<span
|
<span
|
||||||
class="text-sm ml-2 overflow-hidden text-ellipsis whitespace-nowrap h-[20px] flex-1 pr-[10px]"
|
class="text-sm ml-[10px] overflow-hidden text-ellipsis whitespace-nowrap h-[20px]"
|
||||||
>{{ getName(item.name)
|
>{{ getName(item.name) }}</span
|
||||||
}}<span class="text-xs ml-2">{{
|
>
|
||||||
|
<span
|
||||||
|
v-if="mode === 'search'"
|
||||||
|
class="text-xs ml-2 max-w-[100px] flex-shrink-0 pr-[10px]"
|
||||||
|
>{{
|
||||||
getSearchItemClassificationName((item as Item).classificationId)
|
getSearchItemClassificationName((item as Item).classificationId)
|
||||||
}}</span></span
|
}}</span
|
||||||
>
|
>
|
||||||
<span
|
<!-- 快捷键 -->
|
||||||
class="ml-auto text-[12px]"
|
<div
|
||||||
|
class="ml-auto max-w-[100px] flex-shrink-0"
|
||||||
v-if="
|
v-if="
|
||||||
store.setting.quickSearch.openShortcutKey !== 'none' && index <= 9
|
store.setting.quickSearch.openShortcutKey !== 'none' && index <= 9
|
||||||
"
|
"
|
||||||
:style="{
|
|
||||||
color: hexToRGBA(store.setting.appearance.theme.mainFontColor, 0.7),
|
|
||||||
}"
|
|
||||||
>{{
|
|
||||||
showHistory
|
|
||||||
? "Alt + "
|
|
||||||
: store.setting.quickSearch.openShortcutKey === "numberKey"
|
|
||||||
? store.language.numberKey
|
|
||||||
: store.setting.quickSearch.openShortcutKey === "ctrlNumberKey"
|
|
||||||
? "Ctrl + "
|
|
||||||
: "Alt + "
|
|
||||||
}}{{ index + 1 === 10 ? 0 : index + 1 }}</span
|
|
||||||
>
|
>
|
||||||
|
<template
|
||||||
|
v-if="
|
||||||
|
showHistory ||
|
||||||
|
store.setting.quickSearch.openShortcutKey === 'altNumberKey'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<keyText text="Alt"></keyText>
|
||||||
|
+
|
||||||
|
<keyText
|
||||||
|
:text="(index + 1 === 10 ? 0 : index + 1).toString()"
|
||||||
|
></keyText>
|
||||||
|
</template>
|
||||||
|
<template
|
||||||
|
v-else-if="
|
||||||
|
store.setting.quickSearch.openShortcutKey === 'numberKey'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<keyText
|
||||||
|
:text="
|
||||||
|
store.language.numberKey +
|
||||||
|
(index + 1 === 10 ? 0 : index + 1).toString()
|
||||||
|
"
|
||||||
|
></keyText>
|
||||||
|
</template>
|
||||||
|
<template
|
||||||
|
v-else-if="
|
||||||
|
store.setting.quickSearch.openShortcutKey === 'ctrlNumberKey'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<keyText text="Ctrl"></keyText>
|
||||||
|
+
|
||||||
|
<keyText
|
||||||
|
:text="(index + 1 === 10 ? 0 : index + 1).toString()"
|
||||||
|
></keyText>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<!-- 删除历史记录 -->
|
||||||
|
<Icon
|
||||||
|
v-if="showHistory"
|
||||||
|
class="delete-history-icon text-[10px] p-[2px] ml-[10px] cursor-pointer"
|
||||||
|
style="border-radius: 12px"
|
||||||
|
:style="{
|
||||||
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
|
backgroundColor:
|
||||||
|
store.setting.appearance.theme.secondBackgroundColor,
|
||||||
|
}"
|
||||||
|
:title="store.language.deleteHistory"
|
||||||
|
>
|
||||||
|
<CloseRound></CloseRound>
|
||||||
|
</Icon>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -131,7 +175,16 @@ import "simplebar/dist/simplebar.css";
|
|||||||
import CustomItemIcon from "../../components/CustomItemIcon.vue";
|
import CustomItemIcon from "../../components/CustomItemIcon.vue";
|
||||||
import { getClassElement, hexToRGBA } from "../../utils/style";
|
import { getClassElement, hexToRGBA } from "../../utils/style";
|
||||||
import { convert } from "../../../commons/utils/common";
|
import { convert } from "../../../commons/utils/common";
|
||||||
import { itemAllRemoveStyle, searchResultDivMoveScroll } from "./js/index";
|
import {
|
||||||
|
itemAllRemoveStyle,
|
||||||
|
searchResultDivMoveScroll,
|
||||||
|
getCommandLineItemList,
|
||||||
|
commandLineRun as commonCommandLineRun,
|
||||||
|
} from "./js/index";
|
||||||
|
import keyText from "../../components/KeyText.vue";
|
||||||
|
import { Icon } from "@vicons/utils";
|
||||||
|
import { SearchOutline, TerminalOutline } from "@vicons/ionicons5";
|
||||||
|
import { CloseRound } from "@vicons/material";
|
||||||
import { useMainStore } from "../../store";
|
import { useMainStore } from "../../store";
|
||||||
// pinia
|
// pinia
|
||||||
const store = useMainStore();
|
const store = useMainStore();
|
||||||
@ -142,7 +195,7 @@ let searchInput = ref<any>(null);
|
|||||||
// 搜索内容
|
// 搜索内容
|
||||||
let value = ref<string | null>(null);
|
let value = ref<string | null>(null);
|
||||||
// 搜索模式
|
// 搜索模式
|
||||||
let webSearch = ref(false);
|
let mode = ref<"search" | "webSearch" | "commandLine">("search");
|
||||||
// 搜索模式对应的实体
|
// 搜索模式对应的实体
|
||||||
let webSearchSource = ref<WebSearchSource | null>(null);
|
let webSearchSource = ref<WebSearchSource | null>(null);
|
||||||
// 选中的项
|
// 选中的项
|
||||||
@ -160,7 +213,8 @@ watch(
|
|||||||
);
|
);
|
||||||
// 搜索
|
// 搜索
|
||||||
function search() {
|
function search() {
|
||||||
if (!webSearch.value) {
|
if (mode.value === "search") {
|
||||||
|
// 搜索模式
|
||||||
if (value.value) {
|
if (value.value) {
|
||||||
showHistory.value = false;
|
showHistory.value = false;
|
||||||
resultList.value = searchItem(value.value, searchMap, 50);
|
resultList.value = searchItem(value.value, searchMap, 50);
|
||||||
@ -178,6 +232,11 @@ function search() {
|
|||||||
// 获取历史记录
|
// 获取历史记录
|
||||||
getHistory();
|
getHistory();
|
||||||
}
|
}
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 刷新
|
||||||
|
function refresh() {
|
||||||
// 重置滚动条
|
// 重置滚动条
|
||||||
resetScroll();
|
resetScroll();
|
||||||
// 刷新DOM完毕执行
|
// 刷新DOM完毕执行
|
||||||
@ -191,7 +250,6 @@ function search() {
|
|||||||
: resultList.value.length * 48 + 1;
|
: resultList.value.length * 48 + 1;
|
||||||
window.quickSearch.setWindowHeight(height + 44);
|
window.quickSearch.setWindowHeight(height + 44);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 重置滚动条
|
* 重置滚动条
|
||||||
@ -268,25 +326,24 @@ function getHistory() {
|
|||||||
resultList.value = [];
|
resultList.value = [];
|
||||||
showHistory.value = false;
|
showHistory.value = false;
|
||||||
}
|
}
|
||||||
// 重置滚动条
|
refresh();
|
||||||
resetScroll();
|
|
||||||
// 刷新DOM完毕执行
|
|
||||||
nextTick(() => {
|
|
||||||
// 设置窗口高度
|
|
||||||
let height =
|
|
||||||
!resultList.value || resultList.value.length === 0
|
|
||||||
? 0
|
|
||||||
: resultList.value.length > 9
|
|
||||||
? 10 * 48 + 1
|
|
||||||
: resultList.value.length * 48 + 1;
|
|
||||||
window.quickSearch.setWindowHeight(height + 44);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
// 父级运行项目
|
// 父级运行项目
|
||||||
function parentRunItem(e: any) {
|
function parentRunItem(e: any) {
|
||||||
|
// 找到delete-history-icon
|
||||||
|
let deleteHistoryElement = getClassElement(e, "delete-history-icon");
|
||||||
|
if (deleteHistoryElement) {
|
||||||
|
// 找到item
|
||||||
|
let itemElement = getClassElement(e, "item");
|
||||||
|
// 项目ID
|
||||||
|
let itemId = parseInt(itemElement.getAttribute("item-id"));
|
||||||
|
// 删除历史记录
|
||||||
|
window.item.deleteQuickSearchHistory(itemId);
|
||||||
|
} else {
|
||||||
// 找到item
|
// 找到item
|
||||||
let itemElement = getClassElement(e, "item");
|
let itemElement = getClassElement(e, "item");
|
||||||
if (itemElement) {
|
if (itemElement) {
|
||||||
|
if (mode.value === "search") {
|
||||||
// 项目ID
|
// 项目ID
|
||||||
let itemId = parseInt(itemElement.getAttribute("item-id"));
|
let itemId = parseInt(itemElement.getAttribute("item-id"));
|
||||||
// 查询项目
|
// 查询项目
|
||||||
@ -294,7 +351,19 @@ function parentRunItem(e: any) {
|
|||||||
if (item && item.data) {
|
if (item && item.data) {
|
||||||
runItem(item);
|
runItem(item);
|
||||||
}
|
}
|
||||||
|
} else if (mode.value === "commandLine") {
|
||||||
|
// 目标
|
||||||
|
commandLineRun(itemElement.getAttribute("target"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 命令行运行
|
||||||
|
function commandLineRun(target: string) {
|
||||||
|
if (store.setting.quickSearch.openAfterHideQuickSearchWindow) {
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
commonCommandLineRun(target, value.value);
|
||||||
}
|
}
|
||||||
// 运行项目
|
// 运行项目
|
||||||
function runItem(item: Item) {
|
function runItem(item: Item) {
|
||||||
@ -303,6 +372,21 @@ function runItem(item: Item) {
|
|||||||
}
|
}
|
||||||
run("quickSearch", "open", item);
|
run("quickSearch", "open", item);
|
||||||
}
|
}
|
||||||
|
// 获取placeholder
|
||||||
|
function getPlaceholder() {
|
||||||
|
let text = "Dawn Launcher";
|
||||||
|
if (
|
||||||
|
mode.value === "webSearch" &&
|
||||||
|
webSearchSource.value &&
|
||||||
|
webSearchSource.value.description &&
|
||||||
|
webSearchSource.value.description.trim() !== ""
|
||||||
|
) {
|
||||||
|
text = webSearchSource.value.description.trim();
|
||||||
|
} else if (mode.value === "commandLine") {
|
||||||
|
text = "Command Line";
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
// 隐藏窗口
|
// 隐藏窗口
|
||||||
function hide() {
|
function hide() {
|
||||||
window.quickSearch.hideWindow();
|
window.quickSearch.hideWindow();
|
||||||
@ -311,6 +395,7 @@ function hide() {
|
|||||||
function contextmenu(e: any) {
|
function contextmenu(e: any) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
if (mode.value === "search") {
|
||||||
// 当前项目
|
// 当前项目
|
||||||
let item: Item | null = null;
|
let item: Item | null = null;
|
||||||
// 判断是在哪个区域右键
|
// 判断是在哪个区域右键
|
||||||
@ -333,11 +418,12 @@ function contextmenu(e: any) {
|
|||||||
type: "quickSearch",
|
type: "quickSearch",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// dragover
|
// dragover
|
||||||
function dragover(e: any) {
|
function dragover(e: any) {
|
||||||
// 从程序外拖动文件到项目图标上时用此项目打开文件
|
// 从程序外拖动文件到项目图标上时用此项目打开文件
|
||||||
if (store.setting.quickSearch.useItemOpen) {
|
if (mode.value === "search" && store.setting.quickSearch.useItemOpen) {
|
||||||
// 选中效果
|
// 选中效果
|
||||||
let target = findElement(e.target, "item");
|
let target = findElement(e.target, "item");
|
||||||
// 取消选中效果
|
// 取消选中效果
|
||||||
@ -363,6 +449,7 @@ function dragover(e: any) {
|
|||||||
}
|
}
|
||||||
// drop
|
// drop
|
||||||
function drop(e: any) {
|
function drop(e: any) {
|
||||||
|
if (mode.value === "search") {
|
||||||
// 尝试获取项目
|
// 尝试获取项目
|
||||||
let item: Item | null = null;
|
let item: Item | null = null;
|
||||||
let itemElement = findElement(e.target, "item");
|
let itemElement = findElement(e.target, "item");
|
||||||
@ -398,6 +485,7 @@ function drop(e: any) {
|
|||||||
// 运行
|
// 运行
|
||||||
runItem(copyItem);
|
runItem(copyItem);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
@ -430,7 +518,7 @@ function keydown(e: any) {
|
|||||||
}
|
}
|
||||||
// 空格
|
// 空格
|
||||||
if (e.keyCode === 32) {
|
if (e.keyCode === 32) {
|
||||||
if (!webSearch.value) {
|
if (mode.value !== "webSearch") {
|
||||||
// 判断是否是搜索引擎
|
// 判断是否是搜索引擎
|
||||||
if (value.value && value.value.trim() !== "") {
|
if (value.value && value.value.trim() !== "") {
|
||||||
let flag = false;
|
let flag = false;
|
||||||
@ -448,7 +536,7 @@ function keydown(e: any) {
|
|||||||
: value.value;
|
: value.value;
|
||||||
for (let searchSource of store.setting.webSearch.searchSourceList) {
|
for (let searchSource of store.setting.webSearch.searchSourceList) {
|
||||||
if (keyword === searchSource.keyword) {
|
if (keyword === searchSource.keyword) {
|
||||||
webSearch.value = true;
|
mode.value = "webSearch";
|
||||||
webSearchSource.value = searchSource;
|
webSearchSource.value = searchSource;
|
||||||
value.value = null;
|
value.value = null;
|
||||||
resultList.value = [];
|
resultList.value = [];
|
||||||
@ -461,32 +549,57 @@ function keydown(e: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (mode.value !== "webSearch" && mode.value !== "commandLine") {
|
||||||
|
// 判断是否是命令行
|
||||||
|
if (value.value && value.value.trim() !== "") {
|
||||||
|
if (value.value === ">") {
|
||||||
|
mode.value = "commandLine";
|
||||||
|
value.value = null;
|
||||||
|
resultList.value = getCommandLineItemList();
|
||||||
|
selected.value = 0;
|
||||||
|
refresh();
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// enter
|
// enter
|
||||||
if (e.keyCode === 13) {
|
if (e.keyCode === 13) {
|
||||||
if (webSearch.value && webSearchSource.value) {
|
if (mode.value === "webSearch" && webSearchSource.value) {
|
||||||
let url = webSearchSource.value.url.replace("{w}", value.value ?? "");
|
let url = webSearchSource.value.url.replace("{w}", value.value ?? "");
|
||||||
window.api.openURL(url);
|
window.api.openURL(url);
|
||||||
if (store.setting.quickSearch.openAfterHideQuickSearchWindow) {
|
if (store.setting.quickSearch.openAfterHideQuickSearchWindow) {
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
} else if (
|
} else if (
|
||||||
!webSearch.value &&
|
mode.value === "search" &&
|
||||||
resultList.value.length - 1 >= selected.value
|
resultList.value.length - 1 >= selected.value
|
||||||
) {
|
) {
|
||||||
runItem(resultList.value[selected.value] as Item);
|
runItem(resultList.value[selected.value] as Item);
|
||||||
|
} else if (
|
||||||
|
mode.value === "commandLine" &&
|
||||||
|
resultList.value.length - 1 >= selected.value
|
||||||
|
) {
|
||||||
|
commandLineRun(resultList.value[selected.value].data.target!);
|
||||||
}
|
}
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
// 退格键
|
// 退格键
|
||||||
if (e.keyCode === 8) {
|
if (e.keyCode === 8) {
|
||||||
if (webSearch.value) {
|
if (mode.value === "webSearch") {
|
||||||
if (!value.value || value.value.trim() === "") {
|
if (!value.value || value.value.trim() === "") {
|
||||||
webSearch.value = false;
|
mode.value = "search";
|
||||||
webSearchSource.value = null;
|
webSearchSource.value = null;
|
||||||
window.quickSearch.setWindowHeight(44);
|
window.quickSearch.setWindowHeight(44);
|
||||||
}
|
}
|
||||||
|
} else if (mode.value === "commandLine") {
|
||||||
|
if (!value.value || value.value.trim() === "") {
|
||||||
|
mode.value = "search";
|
||||||
|
resultList.value = [];
|
||||||
|
window.quickSearch.setWindowHeight(44);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (showHistory.value) {
|
if (showHistory.value) {
|
||||||
@ -547,7 +660,11 @@ function keydown(e: any) {
|
|||||||
index = e.key - 1;
|
index = e.key - 1;
|
||||||
}
|
}
|
||||||
if (resultList.value && index < resultList.value.length) {
|
if (resultList.value && index < resultList.value.length) {
|
||||||
|
if (mode.value === "search") {
|
||||||
runItem(resultList.value[index] as Item);
|
runItem(resultList.value[index] as Item);
|
||||||
|
} else if (mode.value === "commandLine") {
|
||||||
|
commandLineRun(resultList.value[index].data.target!);
|
||||||
|
}
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
@ -591,12 +708,10 @@ onMounted(() => {
|
|||||||
// 聚焦文本框
|
// 聚焦文本框
|
||||||
searchInput.value.focus();
|
searchInput.value.focus();
|
||||||
// 刷新DOM完毕执行
|
// 刷新DOM完毕执行
|
||||||
nextTick(() => {
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 显示窗口
|
// 显示窗口
|
||||||
window.quickSearch.showWindow();
|
window.quickSearch.showWindow();
|
||||||
}, 10);
|
}, 10);
|
||||||
});
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
// 清空数据
|
// 清空数据
|
||||||
@ -606,7 +721,7 @@ onMounted(() => {
|
|||||||
value.value = null;
|
value.value = null;
|
||||||
resultList.value = [];
|
resultList.value = [];
|
||||||
selected.value = 0;
|
selected.value = 0;
|
||||||
webSearch.value = false;
|
mode.value = "search";
|
||||||
webSearchSource.value = null;
|
webSearchSource.value = null;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -625,6 +740,17 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
// 删除历史记录
|
||||||
|
listens.push(
|
||||||
|
window.item.onUpdateOpenInfo((data) => {
|
||||||
|
let item = getItemById(data.id);
|
||||||
|
if (item) {
|
||||||
|
item.data.quickSearchOpenNumber = data.quickSearchOpenNumber;
|
||||||
|
item.data.quickSearchLastOpen = data.quickSearchLastOpen;
|
||||||
|
}
|
||||||
|
getHistory();
|
||||||
|
})
|
||||||
|
);
|
||||||
});
|
});
|
||||||
// unmounted
|
// unmounted
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
@ -18,20 +18,17 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="mx-2 whitespace-nowrap flex items-center">
|
<div class="mx-2 whitespace-nowrap flex items-center">
|
||||||
<svg
|
<Icon size="18" v-if="mode === 'search'">
|
||||||
class="w-[18px] h-[18px]"
|
<SearchOutline></SearchOutline>
|
||||||
:style="{ color: store.setting.appearance.theme.mainFontColor }"
|
</Icon>
|
||||||
viewBox="0 0 24 24"
|
<Icon size="18" v-if="mode === 'commandLine'">
|
||||||
v-if="!webSearch"
|
<TerminalOutline></TerminalOutline>
|
||||||
|
</Icon>
|
||||||
|
<span
|
||||||
|
class="text-sm block"
|
||||||
|
v-if="mode === 'webSearch' && webSearchSource"
|
||||||
|
>{{ webSearchSource.name }}</span
|
||||||
>
|
>
|
||||||
<path
|
|
||||||
fill="currentColor"
|
|
||||||
d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
<span class="text-sm block" v-else-if="webSearch && webSearchSource">{{
|
|
||||||
webSearchSource.name
|
|
||||||
}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
ref="searchInput"
|
ref="searchInput"
|
||||||
@ -42,14 +39,7 @@
|
|||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
}"
|
}"
|
||||||
:placeholder="
|
:placeholder="getPlaceholder()"
|
||||||
webSearch &&
|
|
||||||
webSearchSource &&
|
|
||||||
webSearchSource.description &&
|
|
||||||
webSearchSource.description.trim() !== ''
|
|
||||||
? webSearchSource.description
|
|
||||||
: store.language.search
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
<Icon
|
<Icon
|
||||||
size="18"
|
size="18"
|
||||||
@ -89,14 +79,19 @@
|
|||||||
:item-id="item.id"
|
:item-id="item.id"
|
||||||
:title="getItemTitle(item as Item)"
|
:title="getItemTitle(item as Item)"
|
||||||
:index="index"
|
:index="index"
|
||||||
|
:target="item.data.target"
|
||||||
>
|
>
|
||||||
<CustomItemIcon :item="(item as Item)" :icon-size="32"></CustomItemIcon>
|
<CustomItemIcon :item="(item as Item)" :icon-size="32"></CustomItemIcon>
|
||||||
<span
|
<span
|
||||||
class="text-sm ml-2 overflow-hidden text-ellipsis whitespace-nowrap h-[20px]"
|
class="text-sm ml-2 overflow-hidden text-ellipsis whitespace-nowrap h-[20px]"
|
||||||
>{{ getName(item.name)
|
>{{ getName(item.name) }}</span
|
||||||
}}<span class="text-xs ml-2">{{
|
>
|
||||||
|
<span
|
||||||
|
v-if="mode === 'search'"
|
||||||
|
class="text-xs ml-2 max-w-[100px] flex-shrink-0"
|
||||||
|
>{{
|
||||||
getSearchItemClassificationName((item as Item).classificationId)
|
getSearchItemClassificationName((item as Item).classificationId)
|
||||||
}}</span></span
|
}}</span
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -130,14 +125,20 @@ import { WebSearchSource } from "../../../../types/setting";
|
|||||||
import { convert } from "../../../../commons/utils/common";
|
import { convert } from "../../../../commons/utils/common";
|
||||||
import "simplebar";
|
import "simplebar";
|
||||||
import "simplebar/dist/simplebar.css";
|
import "simplebar/dist/simplebar.css";
|
||||||
import { itemAllRemoveStyle, searchResultDivMoveScroll } from "../js/index";
|
import {
|
||||||
|
getCommandLineItemList,
|
||||||
|
itemAllRemoveStyle,
|
||||||
|
searchResultDivMoveScroll,
|
||||||
|
commandLineRun,
|
||||||
|
} from "../js/index";
|
||||||
|
import { SearchOutline, TerminalOutline } from "@vicons/ionicons5";
|
||||||
import { useMainStore } from "../../../store";
|
import { useMainStore } from "../../../store";
|
||||||
// pinia
|
// pinia
|
||||||
const store = useMainStore();
|
const store = useMainStore();
|
||||||
// 搜索框
|
// 搜索框
|
||||||
let searchInput = ref<any>(null);
|
let searchInput = ref<any>(null);
|
||||||
// 搜索模式
|
// 搜索模式
|
||||||
let webSearch = ref(false);
|
let mode = ref<"search" | "webSearch" | "commandLine">("search");
|
||||||
// 搜索模式对应的实体
|
// 搜索模式对应的实体
|
||||||
let webSearchSource = ref<WebSearchSource | null>(null);
|
let webSearchSource = ref<WebSearchSource | null>(null);
|
||||||
// 搜索内容
|
// 搜索内容
|
||||||
@ -162,7 +163,7 @@ watch(
|
|||||||
);
|
);
|
||||||
// 搜索
|
// 搜索
|
||||||
function search() {
|
function search() {
|
||||||
if (!webSearch.value) {
|
if (mode.value === "search") {
|
||||||
if (value.value) {
|
if (value.value) {
|
||||||
resultList.value = searchItem(value.value, searchMap, 50);
|
resultList.value = searchItem(value.value, searchMap, 50);
|
||||||
if (resultList.value && resultList.value.length > 0) {
|
if (resultList.value && resultList.value.length > 0) {
|
||||||
@ -190,6 +191,7 @@ function runItem(e: any) {
|
|||||||
// 找到item
|
// 找到item
|
||||||
let itemElement = getClassElement(e, "search-result-item");
|
let itemElement = getClassElement(e, "search-result-item");
|
||||||
if (itemElement) {
|
if (itemElement) {
|
||||||
|
if (mode.value === "search") {
|
||||||
// 项目ID
|
// 项目ID
|
||||||
let itemId = parseInt(itemElement.getAttribute("item-id"));
|
let itemId = parseInt(itemElement.getAttribute("item-id"));
|
||||||
// 查询项目
|
// 查询项目
|
||||||
@ -198,7 +200,27 @@ function runItem(e: any) {
|
|||||||
run("search", "open", item);
|
run("search", "open", item);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
} else if (mode.value === "commandLine") {
|
||||||
|
// 目标
|
||||||
|
commandLineRun(itemElement.getAttribute("target"), value.value);
|
||||||
|
close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取placeholder
|
||||||
|
function getPlaceholder() {
|
||||||
|
let text = store.language.search;
|
||||||
|
if (
|
||||||
|
mode.value === "webSearch" &&
|
||||||
|
webSearchSource.value &&
|
||||||
|
webSearchSource.value.description &&
|
||||||
|
webSearchSource.value.description.trim() !== ""
|
||||||
|
) {
|
||||||
|
text = webSearchSource.value.description.trim();
|
||||||
|
} else if (mode.value === "commandLine") {
|
||||||
|
text = "Command Line";
|
||||||
|
}
|
||||||
|
return text;
|
||||||
}
|
}
|
||||||
// 关闭
|
// 关闭
|
||||||
function close() {
|
function close() {
|
||||||
@ -217,6 +239,7 @@ watch(
|
|||||||
function contextmenu(e: any) {
|
function contextmenu(e: any) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
if (mode.value === "search") {
|
||||||
// 当前项目
|
// 当前项目
|
||||||
let item: Item | null = null;
|
let item: Item | null = null;
|
||||||
// 判断是在哪个区域右键
|
// 判断是在哪个区域右键
|
||||||
@ -239,6 +262,7 @@ function contextmenu(e: any) {
|
|||||||
type: "search",
|
type: "search",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function keydown(e: any) {
|
function keydown(e: any) {
|
||||||
// 提取快捷键
|
// 提取快捷键
|
||||||
@ -275,7 +299,7 @@ function keydown(e: any) {
|
|||||||
}
|
}
|
||||||
// 空格
|
// 空格
|
||||||
if (e.keyCode === 32) {
|
if (e.keyCode === 32) {
|
||||||
if (!webSearch.value) {
|
if (mode.value === "search") {
|
||||||
// 判断是否是搜索引擎
|
// 判断是否是搜索引擎
|
||||||
if (value.value && value.value.trim() !== "") {
|
if (value.value && value.value.trim() !== "") {
|
||||||
let flag = false;
|
let flag = false;
|
||||||
@ -293,7 +317,7 @@ function keydown(e: any) {
|
|||||||
: value.value;
|
: value.value;
|
||||||
for (let searchSource of store.setting.webSearch.searchSourceList) {
|
for (let searchSource of store.setting.webSearch.searchSourceList) {
|
||||||
if (keyword === searchSource.keyword) {
|
if (keyword === searchSource.keyword) {
|
||||||
webSearch.value = true;
|
mode.value = "webSearch";
|
||||||
webSearchSource.value = searchSource;
|
webSearchSource.value = searchSource;
|
||||||
value.value = null;
|
value.value = null;
|
||||||
resultList.value = [];
|
resultList.value = [];
|
||||||
@ -304,29 +328,55 @@ function keydown(e: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (mode.value !== "webSearch" && mode.value !== "commandLine") {
|
||||||
|
// 判断是否是命令行
|
||||||
|
if (value.value && value.value.trim() !== "") {
|
||||||
|
if (value.value === ">") {
|
||||||
|
mode.value = "commandLine";
|
||||||
|
value.value = null;
|
||||||
|
resultList.value = getCommandLineItemList();
|
||||||
|
selected.value = 0;
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// enter
|
// enter
|
||||||
if (e.keyCode === 13) {
|
if (e.keyCode === 13) {
|
||||||
if (webSearch.value && webSearchSource.value) {
|
if (mode.value === "webSearch" && webSearchSource.value) {
|
||||||
let url = webSearchSource.value.url.replace("{w}", value.value ?? "");
|
let url = webSearchSource.value.url.replace("{w}", value.value ?? "");
|
||||||
window.api.openURL(url);
|
window.api.openURL(url);
|
||||||
close();
|
close();
|
||||||
} else if (
|
} else if (
|
||||||
!webSearch.value &&
|
mode.value === "search" &&
|
||||||
resultList.value.length - 1 >= selected.value
|
resultList.value.length - 1 >= selected.value
|
||||||
) {
|
) {
|
||||||
run("search", "open", resultList.value[selected.value] as Item);
|
run("search", "open", resultList.value[selected.value] as Item);
|
||||||
close();
|
close();
|
||||||
|
} else if (
|
||||||
|
mode.value === "commandLine" &&
|
||||||
|
resultList.value.length - 1 >= selected.value
|
||||||
|
) {
|
||||||
|
commandLineRun(
|
||||||
|
resultList.value[selected.value].data.target!,
|
||||||
|
value.value
|
||||||
|
);
|
||||||
|
close();
|
||||||
}
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
// 退格键
|
// 退格键
|
||||||
if (e.keyCode === 8) {
|
if (e.keyCode === 8) {
|
||||||
if (webSearch.value) {
|
if (mode.value === "webSearch") {
|
||||||
if (!value.value || value.value.trim() === "") {
|
if (!value.value || value.value.trim() === "") {
|
||||||
webSearch.value = false;
|
mode.value = "search";
|
||||||
webSearchSource.value = null;
|
webSearchSource.value = null;
|
||||||
}
|
}
|
||||||
|
} else if (mode.value === "commandLine") {
|
||||||
|
if (!value.value || value.value.trim() === "") {
|
||||||
|
mode.value = "search";
|
||||||
|
resultList.value = [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -5,6 +5,11 @@
|
|||||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||||
color: store.setting.appearance.theme.mainFontColor,
|
color: store.setting.appearance.theme.mainFontColor,
|
||||||
height: height + 'px',
|
height: height + 'px',
|
||||||
|
borderRadius:
|
||||||
|
store.setting.appearance.transparency < 1 &&
|
||||||
|
store.setting.appearance.windowRounded
|
||||||
|
? '8px'
|
||||||
|
: undefined,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex items-center px-2 app-region-drag">
|
<div class="flex items-center px-2 app-region-drag">
|
||||||
@ -63,7 +68,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<span class="block font-semibold">{{
|
<span class="block font-semibold">{{
|
||||||
store.language.startup
|
store.language.system
|
||||||
}}</span>
|
}}</span>
|
||||||
<NFormItem class="mt-1">
|
<NFormItem class="mt-1">
|
||||||
<NCheckbox
|
<NCheckbox
|
||||||
@ -88,6 +93,14 @@
|
|||||||
>{{ store.language.hideTray }}</NCheckbox
|
>{{ store.language.hideTray }}</NCheckbox
|
||||||
></NFormItem
|
></NFormItem
|
||||||
>
|
>
|
||||||
|
<NFormItem
|
||||||
|
><NCheckbox
|
||||||
|
v-model:checked="setting.general.hideTaskbar"
|
||||||
|
:focusable="false"
|
||||||
|
@update:checked="setTaskbar"
|
||||||
|
>{{ store.language.hideTaskbar }}</NCheckbox
|
||||||
|
></NFormItem
|
||||||
|
>
|
||||||
</NForm>
|
</NForm>
|
||||||
<NForm
|
<NForm
|
||||||
label-placement="left"
|
label-placement="left"
|
||||||
@ -393,47 +406,95 @@
|
|||||||
<span class="block font-semibold">{{
|
<span class="block font-semibold">{{
|
||||||
store.language.color
|
store.language.color
|
||||||
}}</span>
|
}}</span>
|
||||||
<NFormItem class="mt-1" :label="store.language.mainColor">
|
<div
|
||||||
|
:class="[
|
||||||
|
`${
|
||||||
|
store.setting.general.language !== 'English'
|
||||||
|
? 'flex items-center'
|
||||||
|
: ''
|
||||||
|
}`,
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<NFormItem
|
||||||
|
class="mt-1 flex-1"
|
||||||
|
:label="store.language.mainColor"
|
||||||
|
>
|
||||||
<NColorPicker
|
<NColorPicker
|
||||||
:modes="['hex']"
|
:modes="['hex']"
|
||||||
v-model:value="mainBackgroundColor"
|
v-model:value="mainBackgroundColor"
|
||||||
@complete="changeMainBackgroundColor"
|
@complete="changeMainBackgroundColor"
|
||||||
:to="false"
|
:to="false"
|
||||||
|
:show-alpha="false"
|
||||||
></NColorPicker>
|
></NColorPicker>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem class="mt-1" :label="store.language.secondaryColor">
|
<NFormItem
|
||||||
<NColorPicker
|
class="mt-1 flex-1"
|
||||||
:modes="['hex']"
|
:label="store.language.fontMainColor"
|
||||||
v-model:value="secondBackgroundColor"
|
:class="[
|
||||||
@complete="changeSecondBackgroundColor"
|
`${
|
||||||
:to="false"
|
store.setting.general.language !== 'English'
|
||||||
></NColorPicker>
|
? 'ml-[10px]'
|
||||||
</NFormItem>
|
: ''
|
||||||
<NFormItem class="mt-1" :label="store.language.fontMainColor">
|
}`,
|
||||||
|
]"
|
||||||
|
>
|
||||||
<NColorPicker
|
<NColorPicker
|
||||||
:modes="['hex']"
|
:modes="['hex']"
|
||||||
v-model:value="mainFontColor"
|
v-model:value="mainFontColor"
|
||||||
@complete="changeMainFontColor"
|
@complete="changeMainFontColor"
|
||||||
:to="false"
|
:to="false"
|
||||||
|
:show-alpha="false"
|
||||||
|
></NColorPicker>
|
||||||
|
</NFormItem>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
:class="[
|
||||||
|
`${
|
||||||
|
store.setting.general.language !== 'English'
|
||||||
|
? 'flex items-center'
|
||||||
|
: ''
|
||||||
|
}`,
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<NFormItem
|
||||||
|
class="mt-1 flex-1"
|
||||||
|
:label="store.language.secondaryColor"
|
||||||
|
>
|
||||||
|
<NColorPicker
|
||||||
|
:modes="['hex']"
|
||||||
|
v-model:value="secondBackgroundColor"
|
||||||
|
@complete="changeSecondBackgroundColor"
|
||||||
|
:to="false"
|
||||||
|
:show-alpha="false"
|
||||||
></NColorPicker>
|
></NColorPicker>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem
|
<NFormItem
|
||||||
class="mt-1"
|
class="mt-1 flex-1"
|
||||||
:label="store.language.fontSecondaryColor"
|
:label="store.language.fontSecondaryColor"
|
||||||
|
:class="[
|
||||||
|
`${
|
||||||
|
store.setting.general.language !== 'English'
|
||||||
|
? 'ml-[10px]'
|
||||||
|
: ''
|
||||||
|
}`,
|
||||||
|
]"
|
||||||
>
|
>
|
||||||
<NColorPicker
|
<NColorPicker
|
||||||
:modes="['hex']"
|
:modes="['hex']"
|
||||||
v-model:value="secondFontColor"
|
v-model:value="secondFontColor"
|
||||||
@complete="changeSecondFontColor"
|
@complete="changeSecondFontColor"
|
||||||
:to="false"
|
:to="false"
|
||||||
|
:show-alpha="false"
|
||||||
></NColorPicker>
|
></NColorPicker>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
</div>
|
||||||
<NFormItem class="mt-1" :label="store.language.borderColor">
|
<NFormItem class="mt-1" :label="store.language.borderColor">
|
||||||
<NColorPicker
|
<NColorPicker
|
||||||
:modes="['hex']"
|
:modes="['hex']"
|
||||||
v-model:value="borderColor"
|
v-model:value="borderColor"
|
||||||
@complete="changeBorderColor"
|
@complete="changeBorderColor"
|
||||||
:to="false"
|
:to="false"
|
||||||
|
:show-alpha="false"
|
||||||
></NColorPicker>
|
></NColorPicker>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
</NForm>
|
</NForm>
|
||||||
@ -443,28 +504,39 @@
|
|||||||
size="small"
|
size="small"
|
||||||
class="mt-3"
|
class="mt-3"
|
||||||
>
|
>
|
||||||
<span class="block font-semibold"
|
<span class="block font-semibold">{{
|
||||||
>{{ store.language.backgroundTransparent }}({{
|
store.language.backgroundTransparent
|
||||||
transparency
|
}}</span>
|
||||||
}})</span
|
<NFormItem class="mt-1">
|
||||||
|
<NRadio
|
||||||
|
:checked="setting.appearance.transparency === 1"
|
||||||
|
:value="false"
|
||||||
|
@change="changeTransparency"
|
||||||
|
>{{ store.language.notTransparent }}</NRadio
|
||||||
|
>
|
||||||
|
<NRadio
|
||||||
|
:checked="setting.appearance.transparency < 1"
|
||||||
|
:value="true"
|
||||||
|
@change="changeTransparency"
|
||||||
|
>{{ store.language.transparent }}</NRadio
|
||||||
>
|
>
|
||||||
<NFormItem>
|
|
||||||
<input
|
|
||||||
type="range"
|
|
||||||
v-model="transparency"
|
|
||||||
min="0.1"
|
|
||||||
max="1.0"
|
|
||||||
step="0.01"
|
|
||||||
class="mt-2 w-full range"
|
|
||||||
@change="setTransparency"
|
|
||||||
/>
|
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
<NSlider
|
||||||
|
v-if="setting.appearance.transparency < 1"
|
||||||
|
class="mt-1"
|
||||||
|
v-model:value="transparency"
|
||||||
|
:step="0.01"
|
||||||
|
:min="0.1"
|
||||||
|
:max="0.99"
|
||||||
|
:on-dragend="setTransparency"
|
||||||
|
:keyboard="false"
|
||||||
|
></NSlider>
|
||||||
</NForm>
|
</NForm>
|
||||||
<NForm
|
<NForm
|
||||||
label-placement="left"
|
label-placement="left"
|
||||||
:show-feedback="false"
|
:show-feedback="false"
|
||||||
size="small"
|
size="small"
|
||||||
class="mt-1"
|
class="mt-3"
|
||||||
>
|
>
|
||||||
<span class="block font-semibold">{{
|
<span class="block font-semibold">{{
|
||||||
store.language.backgroundImage
|
store.language.backgroundImage
|
||||||
@ -499,21 +571,18 @@
|
|||||||
class="mt-3"
|
class="mt-3"
|
||||||
v-if="setting.appearance.backgroundImage && store.backgroundImage"
|
v-if="setting.appearance.backgroundImage && store.backgroundImage"
|
||||||
>
|
>
|
||||||
<span class="block font-semibold"
|
<span class="block font-semibold">{{
|
||||||
>{{ store.language.backgroundImageTransparent }}({{
|
store.language.backgroundImageTransparent
|
||||||
setting.appearance.backgroundImageTransparency
|
}}</span>
|
||||||
}})</span
|
|
||||||
>
|
|
||||||
<NFormItem>
|
<NFormItem>
|
||||||
<input
|
<NSlider
|
||||||
type="range"
|
v-model:value="backgroundImageTransparency"
|
||||||
v-model="backgroundImageTransparency"
|
:step="0.01"
|
||||||
min="0.1"
|
:min="0.1"
|
||||||
max="1.0"
|
:max="1.0"
|
||||||
step="0.01"
|
:on-dragend="setBackgroundImageTransparency"
|
||||||
class="mt-2 w-full range"
|
:keyboard="false"
|
||||||
@change="setBackgroundImageTransparency"
|
></NSlider>
|
||||||
/>
|
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
</NForm>
|
</NForm>
|
||||||
<NForm
|
<NForm
|
||||||
@ -542,7 +611,7 @@
|
|||||||
v-if="setting.appearance.backgroundImage && store.backgroundImage"
|
v-if="setting.appearance.backgroundImage && store.backgroundImage"
|
||||||
>
|
>
|
||||||
<span class="block font-semibold">{{
|
<span class="block font-semibold">{{
|
||||||
store.language.backgroundImagePostion
|
store.language.backgroundImagePosition
|
||||||
}}</span>
|
}}</span>
|
||||||
<NFormItem class="mt-2">
|
<NFormItem class="mt-2">
|
||||||
<NSelect
|
<NSelect
|
||||||
@ -864,21 +933,18 @@
|
|||||||
size="small"
|
size="small"
|
||||||
class="mt-3"
|
class="mt-3"
|
||||||
>
|
>
|
||||||
<span class="block font-semibold"
|
<span class="block font-semibold">{{
|
||||||
>{{ store.language.columnNumber }}({{
|
store.language.columnNumber
|
||||||
setting.item.columnNumber
|
}}</span>
|
||||||
}})</span
|
|
||||||
>
|
|
||||||
<NFormItem>
|
<NFormItem>
|
||||||
<input
|
<NSlider
|
||||||
type="range"
|
v-model:value="columnNumber"
|
||||||
v-model="columnNumber"
|
:step="1"
|
||||||
min="1"
|
:min="1"
|
||||||
max="20"
|
:max="20"
|
||||||
step="1"
|
:on-dragend="setColumnNumber"
|
||||||
class="mt-2 w-full range"
|
:keyboard="false"
|
||||||
@change="setColumnNumber"
|
></NSlider>
|
||||||
/>
|
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<Desc
|
<Desc
|
||||||
class="mt-1"
|
class="mt-1"
|
||||||
@ -975,7 +1041,24 @@
|
|||||||
v-model:checked="setting.item.openNumber"
|
v-model:checked="setting.item.openNumber"
|
||||||
:focusable="false"
|
:focusable="false"
|
||||||
@update:checked="setOpenNumber"
|
@update:checked="setOpenNumber"
|
||||||
>{{ store.language.recordOpenNumber }}</NCheckbox
|
>{{ store.language.recordOpenCount }}</NCheckbox
|
||||||
|
>
|
||||||
|
</NFormItem>
|
||||||
|
</NForm>
|
||||||
|
<NForm
|
||||||
|
label-placement="left"
|
||||||
|
:show-feedback="false"
|
||||||
|
size="small"
|
||||||
|
class="mt-3"
|
||||||
|
>
|
||||||
|
<span class="block font-semibold">{{
|
||||||
|
store.language.prompt
|
||||||
|
}}</span>
|
||||||
|
<NFormItem class="mt-1">
|
||||||
|
<NCheckbox
|
||||||
|
v-model:checked="setting.item.promptShowPath"
|
||||||
|
:focusable="false"
|
||||||
|
>{{ store.language.showPath }}</NCheckbox
|
||||||
>
|
>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
</NForm>
|
</NForm>
|
||||||
@ -1007,6 +1090,7 @@
|
|||||||
<NCheckbox
|
<NCheckbox
|
||||||
v-model:checked="setting.quickSearch.enable"
|
v-model:checked="setting.quickSearch.enable"
|
||||||
:focusable="false"
|
:focusable="false"
|
||||||
|
@update:checked="setEnable"
|
||||||
>{{ store.language.useQuickSearch }}</NCheckbox
|
>{{ store.language.useQuickSearch }}</NCheckbox
|
||||||
>
|
>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
@ -1058,6 +1142,25 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</NForm>
|
</NForm>
|
||||||
|
<NForm
|
||||||
|
label-placement="left"
|
||||||
|
:show-feedback="false"
|
||||||
|
size="small"
|
||||||
|
class="mt-3"
|
||||||
|
>
|
||||||
|
<span class="block font-semibold">{{ store.language.size }}</span>
|
||||||
|
<NFormItem :label="store.language.width" class="mt-1">
|
||||||
|
<NInputNumber
|
||||||
|
v-model:value="setting.quickSearch.width"
|
||||||
|
size="small"
|
||||||
|
:min="0"
|
||||||
|
class="w-full"
|
||||||
|
placeholder=""
|
||||||
|
:show-button="false"
|
||||||
|
@update:value="updateQuickSearchWidth"
|
||||||
|
></NInputNumber>
|
||||||
|
</NFormItem>
|
||||||
|
</NForm>
|
||||||
<NForm
|
<NForm
|
||||||
label-placement="left"
|
label-placement="left"
|
||||||
:show-feedback="false"
|
:show-feedback="false"
|
||||||
@ -1195,7 +1298,7 @@
|
|||||||
:style="{
|
:style="{
|
||||||
backgroundColor: hexToRGBA(
|
backgroundColor: hexToRGBA(
|
||||||
setting.appearance.theme.secondBackgroundColor,
|
setting.appearance.theme.secondBackgroundColor,
|
||||||
0.8
|
0.7
|
||||||
),
|
),
|
||||||
color: setting.appearance.theme.secondFontColor,
|
color: setting.appearance.theme.secondFontColor,
|
||||||
}"
|
}"
|
||||||
@ -1238,7 +1341,7 @@
|
|||||||
searchSourceId === item.id
|
searchSourceId === item.id
|
||||||
? hexToRGBA(
|
? hexToRGBA(
|
||||||
setting.appearance.theme.secondBackgroundColor,
|
setting.appearance.theme.secondBackgroundColor,
|
||||||
0.8
|
0.7
|
||||||
)
|
)
|
||||||
: undefined,
|
: undefined,
|
||||||
color:
|
color:
|
||||||
@ -1255,7 +1358,7 @@
|
|||||||
'background-color',
|
'background-color',
|
||||||
hexToRGBA(
|
hexToRGBA(
|
||||||
setting.appearance.theme.secondBackgroundColor,
|
setting.appearance.theme.secondBackgroundColor,
|
||||||
0.8
|
0.7
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
['color', setting.appearance.theme.secondFontColor],
|
['color', setting.appearance.theme.secondFontColor],
|
||||||
@ -1393,6 +1496,24 @@
|
|||||||
</NForm>
|
</NForm>
|
||||||
</div>
|
</div>
|
||||||
<div class="mx-2" v-if="selectedMenuId === 7">
|
<div class="mx-2" v-if="selectedMenuId === 7">
|
||||||
|
<NForm label-placement="left" :show-feedback="false" size="small">
|
||||||
|
<span class="block font-semibold">{{
|
||||||
|
store.language.default
|
||||||
|
}}</span>
|
||||||
|
<NFormItem class="mt-2">
|
||||||
|
<NSelect
|
||||||
|
v-model:value="setting.commandLine.defaultUse"
|
||||||
|
:options="commandLineDefultUseOptions"
|
||||||
|
size="small"
|
||||||
|
></NSelect>
|
||||||
|
</NFormItem>
|
||||||
|
<Desc
|
||||||
|
class="mt-2"
|
||||||
|
:content="store.language.commandLinePrompt1"
|
||||||
|
></Desc>
|
||||||
|
</NForm>
|
||||||
|
</div>
|
||||||
|
<div class="mx-2" v-if="selectedMenuId === 8">
|
||||||
<NForm label-placement="left" :show-feedback="false" size="small">
|
<NForm label-placement="left" :show-feedback="false" size="small">
|
||||||
<span class="block font-semibold">{{
|
<span class="block font-semibold">{{
|
||||||
store.language.proxy
|
store.language.proxy
|
||||||
@ -1456,6 +1577,8 @@ import {
|
|||||||
NColorPicker,
|
NColorPicker,
|
||||||
NInputNumber,
|
NInputNumber,
|
||||||
NSelect,
|
NSelect,
|
||||||
|
NRadio,
|
||||||
|
NSlider,
|
||||||
} from "naive-ui";
|
} from "naive-ui";
|
||||||
import SimpleBar from "simplebar";
|
import SimpleBar from "simplebar";
|
||||||
import "simplebar/dist/simplebar.css";
|
import "simplebar/dist/simplebar.css";
|
||||||
@ -1542,6 +1665,10 @@ let menuList = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 7,
|
id: 7,
|
||||||
|
label: store.language.commandLine,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 8,
|
||||||
label: store.language.network,
|
label: store.language.network,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -1834,6 +1961,10 @@ function setStartup(value: boolean) {
|
|||||||
function setTray(value: boolean) {
|
function setTray(value: boolean) {
|
||||||
window.setting.setTray(!value);
|
window.setting.setTray(!value);
|
||||||
}
|
}
|
||||||
|
// 隐藏任务栏
|
||||||
|
function setTaskbar(value: boolean) {
|
||||||
|
window.setting.setTaskbar(value);
|
||||||
|
}
|
||||||
// 校验快捷键
|
// 校验快捷键
|
||||||
async function checkGeneralShowHideShortcutKey() {
|
async function checkGeneralShowHideShortcutKey() {
|
||||||
let success = true;
|
let success = true;
|
||||||
@ -1993,6 +2124,14 @@ function changeFontShadowColor(value: string) {
|
|||||||
}
|
}
|
||||||
// 修改背景色透明
|
// 修改背景色透明
|
||||||
let transparency = ref(setting.value.appearance.transparency);
|
let transparency = ref(setting.value.appearance.transparency);
|
||||||
|
function changeTransparency(e: Event) {
|
||||||
|
let val = (e.target as HTMLInputElement).value;
|
||||||
|
if (val === "true") {
|
||||||
|
setting.value.appearance.transparency = 0.9;
|
||||||
|
} else {
|
||||||
|
setting.value.appearance.transparency = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
function setTransparency() {
|
function setTransparency() {
|
||||||
setting.value.appearance.transparency = Number(transparency.value);
|
setting.value.appearance.transparency = Number(transparency.value);
|
||||||
}
|
}
|
||||||
@ -2040,6 +2179,11 @@ function setCheckInvalidItem(value: boolean) {
|
|||||||
function setOpenNumber(value: boolean) {
|
function setOpenNumber(value: boolean) {
|
||||||
window.setting.setOpenNumber(value);
|
window.setting.setOpenNumber(value);
|
||||||
}
|
}
|
||||||
|
// 启用
|
||||||
|
function setEnable() {
|
||||||
|
// 设置快捷键
|
||||||
|
window.setting.setShortcutKey(convert(setting.value));
|
||||||
|
}
|
||||||
// 快速搜索打开快捷键
|
// 快速搜索打开快捷键
|
||||||
let quickSearchShortcutKeyOpenOptions = ref([
|
let quickSearchShortcutKeyOpenOptions = ref([
|
||||||
{
|
{
|
||||||
@ -2066,10 +2210,16 @@ let quickSearchHistorySortOptions = ref([
|
|||||||
value: "lastOpen",
|
value: "lastOpen",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: store.language.byOpenNumber,
|
label: store.language.byOpenCount,
|
||||||
value: "openNumber",
|
value: "openNumber",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
// 快速搜索宽度更新
|
||||||
|
function updateQuickSearchWidth(value: number | null) {
|
||||||
|
if (value) {
|
||||||
|
window.quickSearch.setWindowWidth(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
// 网络搜索模式
|
// 网络搜索模式
|
||||||
let webSearchModeOptions = ref([
|
let webSearchModeOptions = ref([
|
||||||
{
|
{
|
||||||
@ -2201,6 +2351,17 @@ function closeSaveSearchSource() {
|
|||||||
searchSourceURL.value = null;
|
searchSourceURL.value = null;
|
||||||
searchSourceDescription.value = null;
|
searchSourceDescription.value = null;
|
||||||
}
|
}
|
||||||
|
// 命令行默认使用
|
||||||
|
let commandLineDefultUseOptions = ref([
|
||||||
|
{
|
||||||
|
label: store.language.commandPrompt,
|
||||||
|
value: "cmd",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: store.language.powerShell,
|
||||||
|
value: "powershell",
|
||||||
|
},
|
||||||
|
]);
|
||||||
// 页面高度
|
// 页面高度
|
||||||
let height = ref(0);
|
let height = ref(0);
|
||||||
// 初始化页面尺寸
|
// 初始化页面尺寸
|
||||||
|
@ -75,7 +75,7 @@ input::-webkit-inner-spin-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.item-name-tile-2 {
|
.item-name-tile-2 {
|
||||||
word-break: break-all;
|
word-break: break-word;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
@ -85,8 +85,7 @@ input::-webkit-inner-spin-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.item-name-tile-2-no-ellipsis {
|
.item-name-tile-2-no-ellipsis {
|
||||||
max-height: 40px;
|
word-break: break-word;
|
||||||
word-break: break-all;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +100,6 @@ input::-webkit-inner-spin-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.item-name-tile-1-no-ellipsis {
|
.item-name-tile-1-no-ellipsis {
|
||||||
max-height: 20px;
|
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
@ -117,7 +115,6 @@ input::-webkit-inner-spin-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.item-name-list-no-ellipsis {
|
.item-name-list-no-ellipsis {
|
||||||
max-height: 20px;
|
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,7 @@ function checkKeyCode(e: any) {
|
|||||||
// e.keyCode == 16 Shift
|
// e.keyCode == 16 Shift
|
||||||
// e.keyCode == 17 Control
|
// e.keyCode == 17 Control
|
||||||
// e.keyCode == 18 Alt
|
// e.keyCode == 18 Alt
|
||||||
|
// e.keyCode == 91 Mate(Win)
|
||||||
// e.keyCode == 20 Cape Lock 大小写
|
// e.keyCode == 20 Cape Lock 大小写
|
||||||
// e.keyCode == 27 Esc
|
// e.keyCode == 27 Esc
|
||||||
// (e.keyCode >= 32 && e.keyCode <= 40) 控制键盘区
|
// (e.keyCode >= 32 && e.keyCode <= 40) 控制键盘区
|
||||||
@ -125,6 +126,7 @@ function checkKeyCode(e: any) {
|
|||||||
e.keyCode === 16 ||
|
e.keyCode === 16 ||
|
||||||
e.keyCode === 17 ||
|
e.keyCode === 17 ||
|
||||||
e.keyCode === 18 ||
|
e.keyCode === 18 ||
|
||||||
|
e.keyCode === 91 ||
|
||||||
e.keyCode === 20 ||
|
e.keyCode === 20 ||
|
||||||
e.keyCode === 27 ||
|
e.keyCode === 27 ||
|
||||||
(e.keyCode >= 32 && e.keyCode <= 40) ||
|
(e.keyCode >= 32 && e.keyCode <= 40) ||
|
||||||
|
14
types/setting.d.ts
vendored
14
types/setting.d.ts
vendored
@ -20,6 +20,8 @@ export interface General {
|
|||||||
hideLoseFocus: boolean;
|
hideLoseFocus: boolean;
|
||||||
// 隐藏托盘图标
|
// 隐藏托盘图标
|
||||||
hideTray: boolean;
|
hideTray: boolean;
|
||||||
|
// 隐藏任务栏
|
||||||
|
hideTaskbar: boolean;
|
||||||
// 固定位置
|
// 固定位置
|
||||||
fixedPosition: boolean;
|
fixedPosition: boolean;
|
||||||
// 永远居中
|
// 永远居中
|
||||||
@ -154,6 +156,8 @@ export interface Item {
|
|||||||
fontWeight: number;
|
fontWeight: number;
|
||||||
// 字体行高
|
// 字体行高
|
||||||
fontLineHeight: number;
|
fontLineHeight: number;
|
||||||
|
// 提示:显示路径
|
||||||
|
promptShowPath: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 快速搜索
|
// 快速搜索
|
||||||
@ -178,6 +182,8 @@ export interface QuickSearch {
|
|||||||
openAfterHideQuickSearchWindow: boolean;
|
openAfterHideQuickSearchWindow: boolean;
|
||||||
// 匹配条件:备注
|
// 匹配条件:备注
|
||||||
matchConditionsRemark: boolean;
|
matchConditionsRemark: boolean;
|
||||||
|
// 宽度
|
||||||
|
width: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 网络搜索
|
// 网络搜索
|
||||||
@ -188,6 +194,12 @@ export interface WebSearch {
|
|||||||
searchSourceList: Array<WebSearchSource>;
|
searchSourceList: Array<WebSearchSource>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 命令行
|
||||||
|
export interface CommandLine {
|
||||||
|
// 默认使用
|
||||||
|
defaultUse: string;
|
||||||
|
}
|
||||||
|
|
||||||
// 网络搜索源
|
// 网络搜索源
|
||||||
export interface WebSearchSource {
|
export interface WebSearchSource {
|
||||||
// ID
|
// ID
|
||||||
@ -236,6 +248,8 @@ export interface Setting {
|
|||||||
quickSearch: QuickSearch;
|
quickSearch: QuickSearch;
|
||||||
// 网络搜索
|
// 网络搜索
|
||||||
webSearch: WebSearch;
|
webSearch: WebSearch;
|
||||||
|
// 命令行
|
||||||
|
commandLine: CommandLine;
|
||||||
// 网络
|
// 网络
|
||||||
network: Network;
|
network: Network;
|
||||||
}
|
}
|
||||||
|
467
yarn.lock
467
yarn.lock
@ -2,10 +2,10 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"7zip-bin@~5.1.1":
|
"7zip-bin@~5.2.0":
|
||||||
version "5.1.1"
|
version "5.2.0"
|
||||||
resolved "https://registry.npmmirror.com/7zip-bin/-/7zip-bin-5.1.1.tgz#9274ec7460652f9c632c59addf24efb1684ef876"
|
resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-5.2.0.tgz#7a03314684dd6572b7dfa89e68ce31d60286854d"
|
||||||
integrity sha512-sAP4LldeWNz0lNzmTird3uWfFDWWTeg6V/MsmyyLR9X1idwKBWIgt/ZvinqQldJm3LecKEs1emkbquO6PCiLVQ==
|
integrity sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A==
|
||||||
|
|
||||||
"@alloc/quick-lru@^5.2.0":
|
"@alloc/quick-lru@^5.2.0":
|
||||||
version "5.2.0"
|
version "5.2.0"
|
||||||
@ -17,6 +17,11 @@
|
|||||||
resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
|
resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
|
||||||
integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==
|
integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==
|
||||||
|
|
||||||
|
"@babel/parser@^7.24.4":
|
||||||
|
version "7.24.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790"
|
||||||
|
integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==
|
||||||
|
|
||||||
"@babel/runtime@^7.21.0":
|
"@babel/runtime@^7.21.0":
|
||||||
version "7.23.2"
|
version "7.23.2"
|
||||||
resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885"
|
resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885"
|
||||||
@ -24,6 +29,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
regenerator-runtime "^0.14.0"
|
regenerator-runtime "^0.14.0"
|
||||||
|
|
||||||
|
"@canvas/image-data@^1.0.0":
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.npmmirror.com/@canvas/image-data/-/image-data-1.0.0.tgz#3bd2cd856e13fc9e2c25feff360a4056857b0367"
|
||||||
|
integrity sha512-BxOqI5LgsIQP1odU5KMwV9yoijleOPzHL18/YvNqF9KFSGF2K/DLlYAbDQsWqd/1nbaFuSkYD/191dpMtNh4vw==
|
||||||
|
|
||||||
"@css-render/plugin-bem@^0.15.12":
|
"@css-render/plugin-bem@^0.15.12":
|
||||||
version "0.15.12"
|
version "0.15.12"
|
||||||
resolved "https://registry.npmmirror.com/@css-render/plugin-bem/-/plugin-bem-0.15.12.tgz#cd88e46a388e4786436bd622414da0aa6019af3b"
|
resolved "https://registry.npmmirror.com/@css-render/plugin-bem/-/plugin-bem-0.15.12.tgz#cd88e46a388e4786436bd622414da0aa6019af3b"
|
||||||
@ -66,10 +76,10 @@
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
global-agent "^3.0.0"
|
global-agent "^3.0.0"
|
||||||
|
|
||||||
"@electron/notarize@2.1.0":
|
"@electron/notarize@2.2.1":
|
||||||
version "2.1.0"
|
version "2.2.1"
|
||||||
resolved "https://registry.npmmirror.com/@electron/notarize/-/notarize-2.1.0.tgz#76aaec10c8687225e8d0a427cc9df67611c46ff3"
|
resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.2.1.tgz#d0aa6bc43cba830c41bfd840b85dbe0e273f59fe"
|
||||||
integrity sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==
|
integrity sha512-aL+bFMIkpR0cmmj5Zgy0LMKEpgy43/hw5zadEArgmAMWWlKc5buwFvFT9G/o/YJkvXAJm5q3iuTuLaiaXW39sg==
|
||||||
dependencies:
|
dependencies:
|
||||||
debug "^4.1.1"
|
debug "^4.1.1"
|
||||||
fs-extra "^9.0.1"
|
fs-extra "^9.0.1"
|
||||||
@ -87,10 +97,10 @@
|
|||||||
minimist "^1.2.6"
|
minimist "^1.2.6"
|
||||||
plist "^3.0.5"
|
plist "^3.0.5"
|
||||||
|
|
||||||
"@electron/universal@1.4.1":
|
"@electron/universal@1.5.1":
|
||||||
version "1.4.1"
|
version "1.5.1"
|
||||||
resolved "https://registry.npmmirror.com/@electron/universal/-/universal-1.4.1.tgz#3fbda2a5ed9ff9f3304c8e8316b94c1e3a7b3785"
|
resolved "https://registry.yarnpkg.com/@electron/universal/-/universal-1.5.1.tgz#f338bc5bcefef88573cf0ab1d5920fac10d06ee5"
|
||||||
integrity sha512-lE/U3UNw1YHuowNbTmKNs9UlS3En3cPgwM5MI+agIgr/B1hSze9NdOP0qn7boZaI9Lph8IDv3/24g9IxnJP7aQ==
|
integrity sha512-kbgXxyEauPJiQQUNG2VgUeyfQNFk6hBF11ISN2PNI6agUgPl55pv4eQmaqHzTAzchBvqZ2tQuRVaPStGf0mxGw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/asar" "^3.2.1"
|
"@electron/asar" "^3.2.1"
|
||||||
"@malept/cross-spawn-promise" "^1.1.0"
|
"@malept/cross-spawn-promise" "^1.1.0"
|
||||||
@ -215,6 +225,21 @@
|
|||||||
resolved "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d"
|
resolved "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d"
|
||||||
integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==
|
integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==
|
||||||
|
|
||||||
|
"@jimp/bmp@^0.22.10":
|
||||||
|
version "0.22.12"
|
||||||
|
resolved "https://registry.npmmirror.com/@jimp/bmp/-/bmp-0.22.12.tgz#0316044dc7b1a90274aef266d50349347fb864d4"
|
||||||
|
integrity sha512-aeI64HD0npropd+AR76MCcvvRaa+Qck6loCOS03CkkxGHN5/r336qTM5HPUdHKMDOGzqknuVPA8+kK1t03z12g==
|
||||||
|
dependencies:
|
||||||
|
"@jimp/utils" "^0.22.12"
|
||||||
|
bmp-js "^0.1.0"
|
||||||
|
|
||||||
|
"@jimp/utils@^0.22.12":
|
||||||
|
version "0.22.12"
|
||||||
|
resolved "https://registry.npmmirror.com/@jimp/utils/-/utils-0.22.12.tgz#8ffaed8f2dc2962539ccaf14727ac60793c7a537"
|
||||||
|
integrity sha512-yJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/nMKXk8TrSwAE71zt716Q==
|
||||||
|
dependencies:
|
||||||
|
regenerator-runtime "^0.13.3"
|
||||||
|
|
||||||
"@jridgewell/gen-mapping@^0.3.2":
|
"@jridgewell/gen-mapping@^0.3.2":
|
||||||
version "0.3.3"
|
version "0.3.3"
|
||||||
resolved "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098"
|
resolved "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098"
|
||||||
@ -307,6 +332,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
defer-to-connect "^2.0.0"
|
defer-to-connect "^2.0.0"
|
||||||
|
|
||||||
|
"@tokenizer/token@^0.3.0":
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.npmmirror.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276"
|
||||||
|
integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==
|
||||||
|
|
||||||
"@tootallnate/once@2":
|
"@tootallnate/once@2":
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.npmmirror.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
|
resolved "https://registry.npmmirror.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
|
||||||
@ -475,6 +505,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@vicons/ionicons5@^0.12.0":
|
||||||
|
version "0.12.0"
|
||||||
|
resolved "https://registry.npmmirror.com/@vicons/ionicons5/-/ionicons5-0.12.0.tgz#c39fda04420dfae3b58053faf8aaf3555253299d"
|
||||||
|
integrity sha512-Iy1EUVRpX0WWxeu1VIReR1zsZLMc4fqpt223czR+Rpnrwu7pt46nbnC2ycO7ItI/uqDLJxnbcMC7FujKs9IfFA==
|
||||||
|
|
||||||
"@vicons/material@^0.12.0":
|
"@vicons/material@^0.12.0":
|
||||||
version "0.12.0"
|
version "0.12.0"
|
||||||
resolved "https://registry.npmmirror.com/@vicons/material/-/material-0.12.0.tgz#068e72fa40bd7f780af5fc68011fb69010c8e0b5"
|
resolved "https://registry.npmmirror.com/@vicons/material/-/material-0.12.0.tgz#068e72fa40bd7f780af5fc68011fb69010c8e0b5"
|
||||||
@ -524,7 +559,26 @@
|
|||||||
estree-walker "^2.0.2"
|
estree-walker "^2.0.2"
|
||||||
source-map-js "^1.0.2"
|
source-map-js "^1.0.2"
|
||||||
|
|
||||||
"@vue/compiler-dom@3.3.7", "@vue/compiler-dom@^3.3.0":
|
"@vue/compiler-core@3.4.26":
|
||||||
|
version "3.4.26"
|
||||||
|
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.4.26.tgz#d507886520e83a6f8339ed55ed0b2b5d84b44b73"
|
||||||
|
integrity sha512-N9Vil6Hvw7NaiyFUFBPXrAyETIGlQ8KcFMkyk6hW1Cl6NvoqvP+Y8p1Eqvx+UdqsnrnI9+HMUEJegzia3mhXmQ==
|
||||||
|
dependencies:
|
||||||
|
"@babel/parser" "^7.24.4"
|
||||||
|
"@vue/shared" "3.4.26"
|
||||||
|
entities "^4.5.0"
|
||||||
|
estree-walker "^2.0.2"
|
||||||
|
source-map-js "^1.2.0"
|
||||||
|
|
||||||
|
"@vue/compiler-dom@3.4.26":
|
||||||
|
version "3.4.26"
|
||||||
|
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.4.26.tgz#acc7b788b48152d087d4bb9e655b795e3dbec554"
|
||||||
|
integrity sha512-4CWbR5vR9fMg23YqFOhr6t6WB1Fjt62d6xdFPyj8pxrYub7d+OgZaObMsoxaF9yBUHPMiPFK303v61PwAuGvZA==
|
||||||
|
dependencies:
|
||||||
|
"@vue/compiler-core" "3.4.26"
|
||||||
|
"@vue/shared" "3.4.26"
|
||||||
|
|
||||||
|
"@vue/compiler-dom@^3.3.0":
|
||||||
version "3.3.7"
|
version "3.3.7"
|
||||||
resolved "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.3.7.tgz#a245aa03f9bfcdb537a239bf02842072de0644c9"
|
resolved "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.3.7.tgz#a245aa03f9bfcdb537a239bf02842072de0644c9"
|
||||||
integrity sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw==
|
integrity sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw==
|
||||||
@ -532,29 +586,28 @@
|
|||||||
"@vue/compiler-core" "3.3.7"
|
"@vue/compiler-core" "3.3.7"
|
||||||
"@vue/shared" "3.3.7"
|
"@vue/shared" "3.3.7"
|
||||||
|
|
||||||
"@vue/compiler-sfc@3.3.7":
|
"@vue/compiler-sfc@3.4.26":
|
||||||
version "3.3.7"
|
version "3.4.26"
|
||||||
resolved "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.3.7.tgz#219d04b3013c7b15fbc536e2279e07810b731cc2"
|
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.4.26.tgz#c679f206829954c3c078d8a9be76d0098b8377ae"
|
||||||
integrity sha512-7pfldWy/J75U/ZyYIXRVqvLRw3vmfxDo2YLMwVtWVNew8Sm8d6wodM+OYFq4ll/UxfqVr0XKiVwti32PCrruAw==
|
integrity sha512-It1dp+FAOCgluYSVYlDn5DtZBxk1NCiJJfu2mlQqa/b+k8GL6NG/3/zRbJnHdhV2VhxFghaDq5L4K+1dakW6cw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/parser" "^7.23.0"
|
"@babel/parser" "^7.24.4"
|
||||||
"@vue/compiler-core" "3.3.7"
|
"@vue/compiler-core" "3.4.26"
|
||||||
"@vue/compiler-dom" "3.3.7"
|
"@vue/compiler-dom" "3.4.26"
|
||||||
"@vue/compiler-ssr" "3.3.7"
|
"@vue/compiler-ssr" "3.4.26"
|
||||||
"@vue/reactivity-transform" "3.3.7"
|
"@vue/shared" "3.4.26"
|
||||||
"@vue/shared" "3.3.7"
|
|
||||||
estree-walker "^2.0.2"
|
estree-walker "^2.0.2"
|
||||||
magic-string "^0.30.5"
|
magic-string "^0.30.10"
|
||||||
postcss "^8.4.31"
|
postcss "^8.4.38"
|
||||||
source-map-js "^1.0.2"
|
source-map-js "^1.2.0"
|
||||||
|
|
||||||
"@vue/compiler-ssr@3.3.7":
|
"@vue/compiler-ssr@3.4.26":
|
||||||
version "3.3.7"
|
version "3.4.26"
|
||||||
resolved "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.3.7.tgz#eff4a70f7ceb800d60e68d208b96a030c0f1b636"
|
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.4.26.tgz#22842d8adfff972d87bb798b8d496111f7f814b5"
|
||||||
integrity sha512-TxOfNVVeH3zgBc82kcUv+emNHo+vKnlRrkv8YvQU5+Y5LJGJwSNzcmLUoxD/dNzv0bhQ/F0s+InlgV0NrApJZg==
|
integrity sha512-FNwLfk7LlEPRY/g+nw2VqiDKcnDTVdCfBREekF8X74cPLiWHUX6oldktf/Vx28yh4STNy7t+/yuLoMBBF7YDiQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@vue/compiler-dom" "3.3.7"
|
"@vue/compiler-dom" "3.4.26"
|
||||||
"@vue/shared" "3.3.7"
|
"@vue/shared" "3.4.26"
|
||||||
|
|
||||||
"@vue/devtools-api@^6.5.0":
|
"@vue/devtools-api@^6.5.0":
|
||||||
version "6.5.1"
|
version "6.5.1"
|
||||||
@ -575,54 +628,48 @@
|
|||||||
muggle-string "^0.3.1"
|
muggle-string "^0.3.1"
|
||||||
vue-template-compiler "^2.7.14"
|
vue-template-compiler "^2.7.14"
|
||||||
|
|
||||||
"@vue/reactivity-transform@3.3.7":
|
"@vue/reactivity@3.4.26":
|
||||||
version "3.3.7"
|
version "3.4.26"
|
||||||
resolved "https://registry.npmmirror.com/@vue/reactivity-transform/-/reactivity-transform-3.3.7.tgz#eb9f5110af5085079b851d162205394bc790d539"
|
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.4.26.tgz#1191f543809d4c93e5b3e842ba83022350a3f205"
|
||||||
integrity sha512-APhRmLVbgE1VPGtoLQoWBJEaQk4V8JUsqrQihImVqKT+8U6Qi3t5ATcg4Y9wGAPb3kIhetpufyZ1RhwbZCIdDA==
|
integrity sha512-E/ynEAu/pw0yotJeLdvZEsp5Olmxt+9/WqzvKff0gE67tw73gmbx6tRkiagE/eH0UCubzSlGRebCbidB1CpqZQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/parser" "^7.23.0"
|
"@vue/shared" "3.4.26"
|
||||||
"@vue/compiler-core" "3.3.7"
|
|
||||||
"@vue/shared" "3.3.7"
|
|
||||||
estree-walker "^2.0.2"
|
|
||||||
magic-string "^0.30.5"
|
|
||||||
|
|
||||||
"@vue/reactivity@3.3.7":
|
"@vue/runtime-core@3.4.26":
|
||||||
version "3.3.7"
|
version "3.4.26"
|
||||||
resolved "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.3.7.tgz#48b6671a45ba33039da2c0eb25ae702f924486a9"
|
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.4.26.tgz#51ee971cb700370a67e5a510c4a84eff7491d658"
|
||||||
integrity sha512-cZNVjWiw00708WqT0zRpyAgduG79dScKEPYJXq2xj/aMtk3SKvL3FBt2QKUlh6EHBJ1m8RhBY+ikBUzwc7/khg==
|
integrity sha512-AFJDLpZvhT4ujUgZSIL9pdNcO23qVFh7zWCsNdGQBw8ecLNxOOnPcK9wTTIYCmBJnuPHpukOwo62a2PPivihqw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@vue/shared" "3.3.7"
|
"@vue/reactivity" "3.4.26"
|
||||||
|
"@vue/shared" "3.4.26"
|
||||||
|
|
||||||
"@vue/runtime-core@3.3.7":
|
"@vue/runtime-dom@3.4.26":
|
||||||
version "3.3.7"
|
version "3.4.26"
|
||||||
resolved "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.3.7.tgz#c1eece1c98f936dc69dd0667d11b464579b128fd"
|
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.4.26.tgz#179aa7c8dc964112e6d096bc8ec5f361111009a1"
|
||||||
integrity sha512-LHq9du3ubLZFdK/BP0Ysy3zhHqRfBn80Uc+T5Hz3maFJBGhci1MafccnL3rpd5/3wVfRHAe6c+PnlO2PAavPTQ==
|
integrity sha512-UftYA2hUXR2UOZD/Fc3IndZuCOOJgFxJsWOxDkhfVcwLbsfh2CdXE2tG4jWxBZuDAs9J9PzRTUFt1PgydEtItw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@vue/reactivity" "3.3.7"
|
"@vue/runtime-core" "3.4.26"
|
||||||
"@vue/shared" "3.3.7"
|
"@vue/shared" "3.4.26"
|
||||||
|
csstype "^3.1.3"
|
||||||
|
|
||||||
"@vue/runtime-dom@3.3.7":
|
"@vue/server-renderer@3.4.26":
|
||||||
version "3.3.7"
|
version "3.4.26"
|
||||||
resolved "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.3.7.tgz#e7cf88cc01591fdf6e3164825554fdadc3137ffc"
|
resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.4.26.tgz#6d0c6b0366bfe0232579aea00e3ff6784e5a1c60"
|
||||||
integrity sha512-PFQU1oeJxikdDmrfoNQay5nD4tcPNYixUBruZzVX/l0eyZvFKElZUjW4KctCcs52nnpMGO6UDK+jF5oV4GT5Lw==
|
integrity sha512-xoGAqSjYDPGAeRWxeoYwqJFD/gw7mpgzOvSxEmjWaFO2rE6qpbD1PC172YRpvKhrihkyHJkNDADFXTfCyVGhKw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@vue/runtime-core" "3.3.7"
|
"@vue/compiler-ssr" "3.4.26"
|
||||||
"@vue/shared" "3.3.7"
|
"@vue/shared" "3.4.26"
|
||||||
csstype "^3.1.2"
|
|
||||||
|
|
||||||
"@vue/server-renderer@3.3.7":
|
|
||||||
version "3.3.7"
|
|
||||||
resolved "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.3.7.tgz#0cc3dc6ad39a54693e6e8f853caa3c7bb43b0364"
|
|
||||||
integrity sha512-UlpKDInd1hIZiNuVVVvLgxpfnSouxKQOSE2bOfQpBuGwxRV/JqqTCyyjXUWiwtVMyeRaZhOYYqntxElk8FhBhw==
|
|
||||||
dependencies:
|
|
||||||
"@vue/compiler-ssr" "3.3.7"
|
|
||||||
"@vue/shared" "3.3.7"
|
|
||||||
|
|
||||||
"@vue/shared@3.3.7", "@vue/shared@^3.3.0":
|
"@vue/shared@3.3.7", "@vue/shared@^3.3.0":
|
||||||
version "3.3.7"
|
version "3.3.7"
|
||||||
resolved "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.7.tgz#0091852fe5cc4237c8440fe32f3ab6bc920ae6d9"
|
resolved "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.7.tgz#0091852fe5cc4237c8440fe32f3ab6bc920ae6d9"
|
||||||
integrity sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg==
|
integrity sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg==
|
||||||
|
|
||||||
|
"@vue/shared@3.4.26":
|
||||||
|
version "3.4.26"
|
||||||
|
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.4.26.tgz#f17854fb1faf889854aed4b23b60e86a8cab6403"
|
||||||
|
integrity sha512-Fg4zwR0GNnjzodMt3KRy2AWGMKQXByl56+4HjN87soxLNU9P5xcJkstAlIeEF3cU6UYOzmJl1tV0dVPGIljCnQ==
|
||||||
|
|
||||||
"@xicons/utils@^0.1.4":
|
"@xicons/utils@^0.1.4":
|
||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
resolved "https://registry.npmmirror.com/@xicons/utils/-/utils-0.1.4.tgz#cece50613b34d4b4c71e73bb0be92981067e11e1"
|
resolved "https://registry.npmmirror.com/@xicons/utils/-/utils-0.1.4.tgz#cece50613b34d4b4c71e73bb0be92981067e11e1"
|
||||||
@ -704,26 +751,25 @@ app-builder-bin@4.0.0:
|
|||||||
resolved "https://registry.npmmirror.com/app-builder-bin/-/app-builder-bin-4.0.0.tgz#1df8e654bd1395e4a319d82545c98667d7eed2f0"
|
resolved "https://registry.npmmirror.com/app-builder-bin/-/app-builder-bin-4.0.0.tgz#1df8e654bd1395e4a319d82545c98667d7eed2f0"
|
||||||
integrity sha512-xwdG0FJPQMe0M0UA4Tz0zEB8rBJTRA5a476ZawAqiBkMv16GRK5xpXThOjMaEOFnZ6zabejjG4J3da0SXG63KA==
|
integrity sha512-xwdG0FJPQMe0M0UA4Tz0zEB8rBJTRA5a476ZawAqiBkMv16GRK5xpXThOjMaEOFnZ6zabejjG4J3da0SXG63KA==
|
||||||
|
|
||||||
app-builder-lib@24.6.4:
|
app-builder-lib@24.13.3:
|
||||||
version "24.6.4"
|
version "24.13.3"
|
||||||
resolved "https://registry.npmmirror.com/app-builder-lib/-/app-builder-lib-24.6.4.tgz#5bf77dd89d3ee557bc615b9ddfaf383f3e51577b"
|
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-24.13.3.tgz#36e47b65fecb8780bb73bff0fee4e0480c28274b"
|
||||||
integrity sha512-m9931WXb83teb32N0rKg+ulbn6+Hl8NV5SUpVDOVz9MWOXfhV6AQtTdftf51zJJvCQnQugGtSqoLvgw6mdF/Rg==
|
integrity sha512-FAzX6IBit2POXYGnTCT8YHFO/lr5AapAII6zzhQO3Rw4cEDOgK+t1xhLc5tNcKlicTHlo9zxIwnYCX9X2DLkig==
|
||||||
dependencies:
|
dependencies:
|
||||||
"7zip-bin" "~5.1.1"
|
|
||||||
"@develar/schema-utils" "~2.6.5"
|
"@develar/schema-utils" "~2.6.5"
|
||||||
"@electron/notarize" "2.1.0"
|
"@electron/notarize" "2.2.1"
|
||||||
"@electron/osx-sign" "1.0.5"
|
"@electron/osx-sign" "1.0.5"
|
||||||
"@electron/universal" "1.4.1"
|
"@electron/universal" "1.5.1"
|
||||||
"@malept/flatpak-bundler" "^0.4.0"
|
"@malept/flatpak-bundler" "^0.4.0"
|
||||||
"@types/fs-extra" "9.0.13"
|
"@types/fs-extra" "9.0.13"
|
||||||
async-exit-hook "^2.0.1"
|
async-exit-hook "^2.0.1"
|
||||||
bluebird-lst "^1.0.9"
|
bluebird-lst "^1.0.9"
|
||||||
builder-util "24.5.0"
|
builder-util "24.13.1"
|
||||||
builder-util-runtime "9.2.1"
|
builder-util-runtime "9.2.4"
|
||||||
chromium-pickle-js "^0.2.0"
|
chromium-pickle-js "^0.2.0"
|
||||||
debug "^4.3.4"
|
debug "^4.3.4"
|
||||||
ejs "^3.1.8"
|
ejs "^3.1.8"
|
||||||
electron-publish "24.5.0"
|
electron-publish "24.13.1"
|
||||||
form-data "^4.0.0"
|
form-data "^4.0.0"
|
||||||
fs-extra "^10.1.0"
|
fs-extra "^10.1.0"
|
||||||
hosted-git-info "^4.1.0"
|
hosted-git-info "^4.1.0"
|
||||||
@ -834,10 +880,10 @@ bcrypt-pbkdf@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
tweetnacl "^0.14.3"
|
tweetnacl "^0.14.3"
|
||||||
|
|
||||||
better-sqlite3-multiple-ciphers@^9.0.0:
|
better-sqlite3-multiple-ciphers@^9.4.1:
|
||||||
version "9.0.0"
|
version "9.5.0"
|
||||||
resolved "https://registry.npmmirror.com/better-sqlite3-multiple-ciphers/-/better-sqlite3-multiple-ciphers-9.0.0.tgz#ce6f10dd5950a508c2bd1596e2863fd5faa3b0bc"
|
resolved "https://registry.yarnpkg.com/better-sqlite3-multiple-ciphers/-/better-sqlite3-multiple-ciphers-9.5.0.tgz#15948374ee42cf5c7deeb56d7c4693faa33f2d2e"
|
||||||
integrity sha512-bM0gv20exF1X1Q8/Rz0PasxCYcgb8VIbQKOhYe3Js35uFAmrvnX8AUqW6c/eq+i8WRtAoRw4yAOBs5Nxx7qaXw==
|
integrity sha512-6A9xBRvssONJW07Lur6pmkaUwlCGz1bnjFmXrrAR3qXETUBk92OI4C/+LhMOatn5wQ8AQzLScFZC/CKUpxkTaw==
|
||||||
dependencies:
|
dependencies:
|
||||||
bindings "^1.5.0"
|
bindings "^1.5.0"
|
||||||
prebuild-install "^7.1.1"
|
prebuild-install "^7.1.1"
|
||||||
@ -875,6 +921,11 @@ bluebird@^3.5.5:
|
|||||||
resolved "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
|
resolved "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
|
||||||
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
|
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
|
||||||
|
|
||||||
|
bmp-js@^0.1.0:
|
||||||
|
version "0.1.0"
|
||||||
|
resolved "https://registry.npmmirror.com/bmp-js/-/bmp-js-0.1.0.tgz#e05a63f796a6c1ff25f4771ec7adadc148c07233"
|
||||||
|
integrity sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw==
|
||||||
|
|
||||||
boolbase@^1.0.0:
|
boolbase@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
|
resolved "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
|
||||||
@ -940,24 +991,24 @@ buffer@^5.1.0, buffer@^5.5.0:
|
|||||||
base64-js "^1.3.1"
|
base64-js "^1.3.1"
|
||||||
ieee754 "^1.1.13"
|
ieee754 "^1.1.13"
|
||||||
|
|
||||||
builder-util-runtime@9.2.1:
|
builder-util-runtime@9.2.4:
|
||||||
version "9.2.1"
|
version "9.2.4"
|
||||||
resolved "https://registry.npmmirror.com/builder-util-runtime/-/builder-util-runtime-9.2.1.tgz#3184dcdf7ed6c47afb8df733813224ced4f624fd"
|
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-9.2.4.tgz#13cd1763da621e53458739a1e63f7fcba673c42a"
|
||||||
integrity sha512-2rLv/uQD2x+dJ0J3xtsmI12AlRyk7p45TEbE/6o/fbb633e/S3pPgm+ct+JHsoY7r39dKHnGEFk/AASRFdnXmA==
|
integrity sha512-upp+biKpN/XZMLim7aguUyW8s0FUpDvOtK6sbanMFDAMBzpHDqdhgVYm6zc9HJ6nWo7u2Lxk60i2M6Jd3aiNrA==
|
||||||
dependencies:
|
dependencies:
|
||||||
debug "^4.3.4"
|
debug "^4.3.4"
|
||||||
sax "^1.2.4"
|
sax "^1.2.4"
|
||||||
|
|
||||||
builder-util@24.5.0:
|
builder-util@24.13.1:
|
||||||
version "24.5.0"
|
version "24.13.1"
|
||||||
resolved "https://registry.npmmirror.com/builder-util/-/builder-util-24.5.0.tgz#8683c9a7a1c5c9f9a4c4d2789ecca0e47dddd3f9"
|
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-24.13.1.tgz#4a4c4f9466b016b85c6990a0ea15aa14edec6816"
|
||||||
integrity sha512-STnBmZN/M5vGcv01u/K8l+H+kplTaq4PAIn3yeuufUKSpcdro0DhJWxPI81k5XcNfC//bjM3+n9nr8F9uV4uAQ==
|
integrity sha512-NhbCSIntruNDTOVI9fdXz0dihaqX2YuE1D6zZMrwiErzH4ELZHE6mdiB40wEgZNprDia+FghRFgKoAqMZRRjSA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"7zip-bin" "~5.1.1"
|
"7zip-bin" "~5.2.0"
|
||||||
"@types/debug" "^4.1.6"
|
"@types/debug" "^4.1.6"
|
||||||
app-builder-bin "4.0.0"
|
app-builder-bin "4.0.0"
|
||||||
bluebird-lst "^1.0.9"
|
bluebird-lst "^1.0.9"
|
||||||
builder-util-runtime "9.2.1"
|
builder-util-runtime "9.2.4"
|
||||||
chalk "^4.1.2"
|
chalk "^4.1.2"
|
||||||
cross-spawn "^7.0.3"
|
cross-spawn "^7.0.3"
|
||||||
debug "^4.3.4"
|
debug "^4.3.4"
|
||||||
@ -1234,10 +1285,10 @@ cssesc@^3.0.0:
|
|||||||
resolved "https://registry.npmmirror.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
|
resolved "https://registry.npmmirror.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
|
||||||
integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
|
integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
|
||||||
|
|
||||||
csstype@^3.1.2:
|
csstype@^3.1.3:
|
||||||
version "3.1.2"
|
version "3.1.3"
|
||||||
resolved "https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b"
|
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
|
||||||
integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==
|
integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==
|
||||||
|
|
||||||
csstype@~3.0.5:
|
csstype@~3.0.5:
|
||||||
version "3.0.11"
|
version "3.0.11"
|
||||||
@ -1289,6 +1340,23 @@ debug@^3.2.6:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ms "^2.1.1"
|
ms "^2.1.1"
|
||||||
|
|
||||||
|
decode-bmp@^0.2.0:
|
||||||
|
version "0.2.1"
|
||||||
|
resolved "https://registry.npmmirror.com/decode-bmp/-/decode-bmp-0.2.1.tgz#cec3e0197ec3b6c60f02220f50e8757030ff2427"
|
||||||
|
integrity sha512-NiOaGe+GN0KJqi2STf24hfMkFitDUaIoUU3eKvP/wAbLe8o6FuW5n/x7MHPR0HKvBokp6MQY/j7w8lewEeVCIA==
|
||||||
|
dependencies:
|
||||||
|
"@canvas/image-data" "^1.0.0"
|
||||||
|
to-data-view "^1.1.0"
|
||||||
|
|
||||||
|
decode-ico@^0.4.1:
|
||||||
|
version "0.4.1"
|
||||||
|
resolved "https://registry.npmmirror.com/decode-ico/-/decode-ico-0.4.1.tgz#e0f7373081532c7b8495bd51fb225d354e14de25"
|
||||||
|
integrity sha512-69NZfbKIzux1vBOd31al3XnMnH+2mqDhEgLdpygErm4d60N+UwA5Sq5WFjmEDQzumgB9fElojGwWG0vybVfFmA==
|
||||||
|
dependencies:
|
||||||
|
"@canvas/image-data" "^1.0.0"
|
||||||
|
decode-bmp "^0.2.0"
|
||||||
|
to-data-view "^1.1.0"
|
||||||
|
|
||||||
decompress-response@^6.0.0:
|
decompress-response@^6.0.0:
|
||||||
version "6.0.0"
|
version "6.0.0"
|
||||||
resolved "https://registry.npmmirror.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc"
|
resolved "https://registry.npmmirror.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc"
|
||||||
@ -1357,14 +1425,14 @@ dlv@^1.1.3:
|
|||||||
resolved "https://registry.npmmirror.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79"
|
resolved "https://registry.npmmirror.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79"
|
||||||
integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==
|
integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==
|
||||||
|
|
||||||
dmg-builder@24.6.4:
|
dmg-builder@24.13.3:
|
||||||
version "24.6.4"
|
version "24.13.3"
|
||||||
resolved "https://registry.npmmirror.com/dmg-builder/-/dmg-builder-24.6.4.tgz#e19b8305f7e1ea0b4faaa30382c81b9d6de39863"
|
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-24.13.3.tgz#95d5b99c587c592f90d168a616d7ec55907c7e55"
|
||||||
integrity sha512-BNcHRc9CWEuI9qt0E655bUBU/j/3wUCYBVKGu1kVpbN5lcUdEJJJeiO0NHK3dgKmra6LUUZlo+mWqc+OCbi0zw==
|
integrity sha512-rcJUkMfnJpfCboZoOOPf4L29TRtEieHNOeAbYPWPxlaBw/Z1RKrRA86dOI9rwaI4tQSc/RD82zTNHprfUHXsoQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
app-builder-lib "24.6.4"
|
app-builder-lib "24.13.3"
|
||||||
builder-util "24.5.0"
|
builder-util "24.13.1"
|
||||||
builder-util-runtime "9.2.1"
|
builder-util-runtime "9.2.4"
|
||||||
fs-extra "^10.1.0"
|
fs-extra "^10.1.0"
|
||||||
iconv-lite "^0.6.2"
|
iconv-lite "^0.6.2"
|
||||||
js-yaml "^4.1.0"
|
js-yaml "^4.1.0"
|
||||||
@ -1452,16 +1520,16 @@ ejs@^3.1.8:
|
|||||||
dependencies:
|
dependencies:
|
||||||
jake "^10.8.5"
|
jake "^10.8.5"
|
||||||
|
|
||||||
electron-builder@^24.6.4:
|
electron-builder@^24.6.5:
|
||||||
version "24.6.4"
|
version "24.13.3"
|
||||||
resolved "https://registry.npmmirror.com/electron-builder/-/electron-builder-24.6.4.tgz#c51271e49b9a02c9a3ec444f866b6008c4d98a1d"
|
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-24.13.3.tgz#c506dfebd36d9a50a83ee8aa32d803d83dbe4616"
|
||||||
integrity sha512-uNWQoU7pE7qOaIQ6CJHpBi44RJFVG8OHRBIadUxrsDJVwLLo8Nma3K/EEtx5/UyWAQYdcK4nVPYKoRqBb20hbA==
|
integrity sha512-yZSgVHft5dNVlo31qmJAe4BVKQfFdwpRw7sFp1iQglDRCDD6r22zfRJuZlhtB5gp9FHUxCMEoWGq10SkCnMAIg==
|
||||||
dependencies:
|
dependencies:
|
||||||
app-builder-lib "24.6.4"
|
app-builder-lib "24.13.3"
|
||||||
builder-util "24.5.0"
|
builder-util "24.13.1"
|
||||||
builder-util-runtime "9.2.1"
|
builder-util-runtime "9.2.4"
|
||||||
chalk "^4.1.2"
|
chalk "^4.1.2"
|
||||||
dmg-builder "24.6.4"
|
dmg-builder "24.13.3"
|
||||||
fs-extra "^10.1.0"
|
fs-extra "^10.1.0"
|
||||||
is-ci "^3.0.0"
|
is-ci "^3.0.0"
|
||||||
lazy-val "^1.0.5"
|
lazy-val "^1.0.5"
|
||||||
@ -1474,14 +1542,14 @@ electron-log@^5.0.0:
|
|||||||
resolved "https://registry.npmmirror.com/electron-log/-/electron-log-5.0.0.tgz#b5fab83500fce1c61ec7493701f5e228b752d2e2"
|
resolved "https://registry.npmmirror.com/electron-log/-/electron-log-5.0.0.tgz#b5fab83500fce1c61ec7493701f5e228b752d2e2"
|
||||||
integrity sha512-vB3akupmQvA8jAyNL9rULZtf6WoP8vsabjXsRtiqXS6/D37SwN/4LEyj4JD+9Bv6xoTcx/LrVnsIKEEWdq5ClQ==
|
integrity sha512-vB3akupmQvA8jAyNL9rULZtf6WoP8vsabjXsRtiqXS6/D37SwN/4LEyj4JD+9Bv6xoTcx/LrVnsIKEEWdq5ClQ==
|
||||||
|
|
||||||
electron-publish@24.5.0:
|
electron-publish@24.13.1:
|
||||||
version "24.5.0"
|
version "24.13.1"
|
||||||
resolved "https://registry.npmmirror.com/electron-publish/-/electron-publish-24.5.0.tgz#492a4d7caa232e88ee3c18f5c3b4dc637e5e1b3a"
|
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.13.1.tgz#57289b2f7af18737dc2ad134668cdd4a1b574a0c"
|
||||||
integrity sha512-zwo70suH15L15B4ZWNDoEg27HIYoPsGJUF7xevLJLSI7JUPC8l2yLBdLGwqueJ5XkDL7ucYyRZzxJVR8ElV9BA==
|
integrity sha512-2ZgdEqJ8e9D17Hwp5LEq5mLQPjqU3lv/IALvgp+4W8VeNhryfGhYEQC/PgDPMrnWUp+l60Ou5SJLsu+k4mhQ8A==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/fs-extra" "^9.0.11"
|
"@types/fs-extra" "^9.0.11"
|
||||||
builder-util "24.5.0"
|
builder-util "24.13.1"
|
||||||
builder-util-runtime "9.2.1"
|
builder-util-runtime "9.2.4"
|
||||||
chalk "^4.1.2"
|
chalk "^4.1.2"
|
||||||
fs-extra "^10.1.0"
|
fs-extra "^10.1.0"
|
||||||
lazy-val "^1.0.5"
|
lazy-val "^1.0.5"
|
||||||
@ -1500,10 +1568,10 @@ electron-to-chromium@^1.4.535:
|
|||||||
resolved "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.569.tgz#1298b67727187ffbaac005a7425490d157f3ad03"
|
resolved "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.569.tgz#1298b67727187ffbaac005a7425490d157f3ad03"
|
||||||
integrity sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg==
|
integrity sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg==
|
||||||
|
|
||||||
electron@^26.4.2:
|
electron@^28.3.1:
|
||||||
version "26.4.2"
|
version "28.3.3"
|
||||||
resolved "https://registry.npmmirror.com/electron/-/electron-26.4.2.tgz#2f976a3c30558f09ced3f5876862b4c21172c02c"
|
resolved "https://registry.npmmirror.com/electron/-/electron-28.3.3.tgz#2df898f653c4f77b66b4cf3eeba79d8bea6d03c0"
|
||||||
integrity sha512-BOfQUOIvsq5NnssWOMqcZnA5M0ull620wvQoJq3WhXN1wJAsWu+cdjHvREyxnHbArPkV+F+x3YAi5Dt+UKoqhw==
|
integrity sha512-ObKMLSPNhomtCOBAxFS8P2DW/4umkh72ouZUlUKzXGtYuPzgr1SYhskhFWgzAsPtUzhL2CzyV2sfbHcEW4CXqw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/get" "^2.0.0"
|
"@electron/get" "^2.0.0"
|
||||||
"@types/node" "^18.11.18"
|
"@types/node" "^18.11.18"
|
||||||
@ -1521,7 +1589,7 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
once "^1.4.0"
|
once "^1.4.0"
|
||||||
|
|
||||||
entities@^4.2.0, entities@^4.4.0:
|
entities@^4.2.0, entities@^4.4.0, entities@^4.5.0:
|
||||||
version "4.5.0"
|
version "4.5.0"
|
||||||
resolved "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48"
|
resolved "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48"
|
||||||
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
|
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
|
||||||
@ -1662,6 +1730,15 @@ fd-slicer@~1.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
pend "~1.2.0"
|
pend "~1.2.0"
|
||||||
|
|
||||||
|
file-type@^18.7.0:
|
||||||
|
version "18.7.0"
|
||||||
|
resolved "https://registry.npmmirror.com/file-type/-/file-type-18.7.0.tgz#cddb16f184d6b94106cfc4bb56978726b25cb2a2"
|
||||||
|
integrity sha512-ihHtXRzXEziMrQ56VSgU7wkxh55iNchFkosu7Y9/S+tXHdKyrGjVK0ujbqNnsxzea+78MaLhN6PGmfYSAv1ACw==
|
||||||
|
dependencies:
|
||||||
|
readable-web-to-node-stream "^3.0.2"
|
||||||
|
strtok3 "^7.0.0"
|
||||||
|
token-types "^5.0.1"
|
||||||
|
|
||||||
file-uri-to-path@1.0.0:
|
file-uri-to-path@1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
|
resolved "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
|
||||||
@ -2008,6 +2085,18 @@ https-proxy-agent@^5.0.1:
|
|||||||
agent-base "6"
|
agent-base "6"
|
||||||
debug "4"
|
debug "4"
|
||||||
|
|
||||||
|
icojs@^0.19.3:
|
||||||
|
version "0.19.3"
|
||||||
|
resolved "https://registry.npmmirror.com/icojs/-/icojs-0.19.3.tgz#1c0a4e593c8cb3ce61aee4aa4f4a3befb3165527"
|
||||||
|
integrity sha512-Q6syRxwoEACLRl7uTiee72038vDbq4gF6ot7JFsXmxj0WtkgGQiUxCdEJtwxd8nfADr9mPmGtpmbORJursaOsQ==
|
||||||
|
dependencies:
|
||||||
|
"@jimp/bmp" "^0.22.10"
|
||||||
|
decode-ico "^0.4.1"
|
||||||
|
file-type "^18.7.0"
|
||||||
|
jpeg-js "^0.4.4"
|
||||||
|
pngjs "^7.0.0"
|
||||||
|
to-data-view "^2.0.0"
|
||||||
|
|
||||||
iconv-corefoundation@^1.1.7:
|
iconv-corefoundation@^1.1.7:
|
||||||
version "1.1.7"
|
version "1.1.7"
|
||||||
resolved "https://registry.npmmirror.com/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz#31065e6ab2c9272154c8b0821151e2c88f1b002a"
|
resolved "https://registry.npmmirror.com/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz#31065e6ab2c9272154c8b0821151e2c88f1b002a"
|
||||||
@ -2023,7 +2112,7 @@ iconv-lite@^0.6.2, iconv-lite@^0.6.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
safer-buffer ">= 2.1.2 < 3.0.0"
|
safer-buffer ">= 2.1.2 < 3.0.0"
|
||||||
|
|
||||||
ieee754@^1.1.13:
|
ieee754@^1.1.13, ieee754@^1.2.1:
|
||||||
version "1.2.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
resolved "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
||||||
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
||||||
@ -2144,6 +2233,11 @@ jiti@^1.19.1:
|
|||||||
resolved "https://registry.npmmirror.com/jiti/-/jiti-1.20.0.tgz#2d823b5852ee8963585c8dd8b7992ffc1ae83b42"
|
resolved "https://registry.npmmirror.com/jiti/-/jiti-1.20.0.tgz#2d823b5852ee8963585c8dd8b7992ffc1ae83b42"
|
||||||
integrity sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==
|
integrity sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==
|
||||||
|
|
||||||
|
jpeg-js@^0.4.4:
|
||||||
|
version "0.4.4"
|
||||||
|
resolved "https://registry.npmmirror.com/jpeg-js/-/jpeg-js-0.4.4.tgz#a9f1c6f1f9f0fa80cdb3484ed9635054d28936aa"
|
||||||
|
integrity sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==
|
||||||
|
|
||||||
js-yaml@^4.1.0:
|
js-yaml@^4.1.0:
|
||||||
version "4.1.0"
|
version "4.1.0"
|
||||||
resolved "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
|
resolved "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
|
||||||
@ -2291,10 +2385,10 @@ lru-cache@^6.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
yallist "^4.0.0"
|
yallist "^4.0.0"
|
||||||
|
|
||||||
magic-string@^0.30.5:
|
magic-string@^0.30.10:
|
||||||
version "0.30.5"
|
version "0.30.10"
|
||||||
resolved "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9"
|
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.10.tgz#123d9c41a0cb5640c892b041d4cfb3bd0aa4b39e"
|
||||||
integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==
|
integrity sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@jridgewell/sourcemap-codec" "^1.4.15"
|
"@jridgewell/sourcemap-codec" "^1.4.15"
|
||||||
|
|
||||||
@ -2453,10 +2547,10 @@ mz@^2.7.0:
|
|||||||
object-assign "^4.0.1"
|
object-assign "^4.0.1"
|
||||||
thenify-all "^1.0.0"
|
thenify-all "^1.0.0"
|
||||||
|
|
||||||
naive-ui@^2.35.0:
|
naive-ui@^2.36.0:
|
||||||
version "2.35.0"
|
version "2.39.0"
|
||||||
resolved "https://registry.npmmirror.com/naive-ui/-/naive-ui-2.35.0.tgz#fe1fc2404694b4114486fa31e609e35714e8ed25"
|
resolved "https://registry.npmmirror.com/naive-ui/-/naive-ui-2.39.0.tgz#f0d47d30ce86b178242ad5de9de4066eb8a3f0c9"
|
||||||
integrity sha512-PdnLpOip1LQaKs5+rXLZoPDPQkTq26TnHWeABvUA2eOQjtHxE4+TQvj0Jq/W8clM2On/7jptoGmenLt48G3Bhg==
|
integrity sha512-5oUJzRG+rtLSH8eRU+fJvVYiQids2BxF9jp+fwGoAqHOptEINrBlgBu9uy+95RHE5FLJ7Q/z41o+qkoGnUrKxQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@css-render/plugin-bem" "^0.15.12"
|
"@css-render/plugin-bem" "^0.15.12"
|
||||||
"@css-render/vue3-ssr" "^0.15.12"
|
"@css-render/vue3-ssr" "^0.15.12"
|
||||||
@ -2465,23 +2559,29 @@ naive-ui@^2.35.0:
|
|||||||
"@types/lodash-es" "^4.17.9"
|
"@types/lodash-es" "^4.17.9"
|
||||||
async-validator "^4.2.5"
|
async-validator "^4.2.5"
|
||||||
css-render "^0.15.12"
|
css-render "^0.15.12"
|
||||||
|
csstype "^3.1.3"
|
||||||
date-fns "^2.30.0"
|
date-fns "^2.30.0"
|
||||||
date-fns-tz "^2.0.0"
|
date-fns-tz "^2.0.0"
|
||||||
evtd "^0.2.4"
|
evtd "^0.2.4"
|
||||||
highlight.js "^11.8.0"
|
highlight.js "^11.8.0"
|
||||||
lodash "^4.17.21"
|
lodash "^4.17.21"
|
||||||
lodash-es "^4.17.21"
|
lodash-es "^4.17.21"
|
||||||
seemly "^0.3.6"
|
seemly "^0.3.8"
|
||||||
treemate "^0.3.11"
|
treemate "^0.3.11"
|
||||||
vdirs "^0.1.8"
|
vdirs "^0.1.8"
|
||||||
vooks "^0.2.12"
|
vooks "^0.2.12"
|
||||||
vueuc "^0.4.51"
|
vueuc "^0.4.58"
|
||||||
|
|
||||||
nanoid@^3.3.6:
|
nanoid@^3.3.6:
|
||||||
version "3.3.6"
|
version "3.3.6"
|
||||||
resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
|
resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
|
||||||
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
|
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
|
||||||
|
|
||||||
|
nanoid@^3.3.7:
|
||||||
|
version "3.3.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
|
||||||
|
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
|
||||||
|
|
||||||
napi-build-utils@^1.0.1:
|
napi-build-utils@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.npmmirror.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806"
|
resolved "https://registry.npmmirror.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806"
|
||||||
@ -2638,6 +2738,11 @@ path-parse@^1.0.7:
|
|||||||
resolved "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
|
resolved "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
|
||||||
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
|
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
|
||||||
|
|
||||||
|
peek-readable@^5.0.0:
|
||||||
|
version "5.1.1"
|
||||||
|
resolved "https://registry.npmmirror.com/peek-readable/-/peek-readable-5.1.1.tgz#7dbeafa1ce271a3eba3fba808883bdb03769b822"
|
||||||
|
integrity sha512-4hEOSH7KeEaZpMDF/xfm1W9fS5rT7Ett3BkXWHqAEzRLLwLaHkwOL+GvvpIEh9UrvX9BDhzfkvteslgraoH69w==
|
||||||
|
|
||||||
pend@~1.2.0:
|
pend@~1.2.0:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.npmmirror.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
|
resolved "https://registry.npmmirror.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
|
||||||
@ -2702,6 +2807,11 @@ plist@^3.0.4, plist@^3.0.5:
|
|||||||
base64-js "^1.5.1"
|
base64-js "^1.5.1"
|
||||||
xmlbuilder "^15.1.1"
|
xmlbuilder "^15.1.1"
|
||||||
|
|
||||||
|
pngjs@^7.0.0:
|
||||||
|
version "7.0.0"
|
||||||
|
resolved "https://registry.npmmirror.com/pngjs/-/pngjs-7.0.0.tgz#a8b7446020ebbc6ac739db6c5415a65d17090e26"
|
||||||
|
integrity sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==
|
||||||
|
|
||||||
postcss-import@^15.1.0:
|
postcss-import@^15.1.0:
|
||||||
version "15.1.0"
|
version "15.1.0"
|
||||||
resolved "https://registry.npmmirror.com/postcss-import/-/postcss-import-15.1.0.tgz#41c64ed8cc0e23735a9698b3249ffdbf704adc70"
|
resolved "https://registry.npmmirror.com/postcss-import/-/postcss-import-15.1.0.tgz#41c64ed8cc0e23735a9698b3249ffdbf704adc70"
|
||||||
@ -2755,6 +2865,15 @@ postcss@^8.4.23, postcss@^8.4.27, postcss@^8.4.31:
|
|||||||
picocolors "^1.0.0"
|
picocolors "^1.0.0"
|
||||||
source-map-js "^1.0.2"
|
source-map-js "^1.0.2"
|
||||||
|
|
||||||
|
postcss@^8.4.38:
|
||||||
|
version "8.4.38"
|
||||||
|
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e"
|
||||||
|
integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==
|
||||||
|
dependencies:
|
||||||
|
nanoid "^3.3.7"
|
||||||
|
picocolors "^1.0.0"
|
||||||
|
source-map-js "^1.2.0"
|
||||||
|
|
||||||
prebuild-install@^7.1.1:
|
prebuild-install@^7.1.1:
|
||||||
version "7.1.1"
|
version "7.1.1"
|
||||||
resolved "https://registry.npmmirror.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45"
|
resolved "https://registry.npmmirror.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45"
|
||||||
@ -2853,7 +2972,7 @@ read-config-file@6.3.2:
|
|||||||
json5 "^2.2.0"
|
json5 "^2.2.0"
|
||||||
lazy-val "^1.0.4"
|
lazy-val "^1.0.4"
|
||||||
|
|
||||||
readable-stream@^3.1.1, readable-stream@^3.4.0:
|
readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0:
|
||||||
version "3.6.2"
|
version "3.6.2"
|
||||||
resolved "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
|
resolved "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
|
||||||
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
|
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
|
||||||
@ -2862,6 +2981,13 @@ readable-stream@^3.1.1, readable-stream@^3.4.0:
|
|||||||
string_decoder "^1.1.1"
|
string_decoder "^1.1.1"
|
||||||
util-deprecate "^1.0.1"
|
util-deprecate "^1.0.1"
|
||||||
|
|
||||||
|
readable-web-to-node-stream@^3.0.2:
|
||||||
|
version "3.0.2"
|
||||||
|
resolved "https://registry.npmmirror.com/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz#5d52bb5df7b54861fd48d015e93a2cb87b3ee0bb"
|
||||||
|
integrity sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==
|
||||||
|
dependencies:
|
||||||
|
readable-stream "^3.6.0"
|
||||||
|
|
||||||
readdirp@~3.6.0:
|
readdirp@~3.6.0:
|
||||||
version "3.6.0"
|
version "3.6.0"
|
||||||
resolved "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
|
resolved "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
|
||||||
@ -2869,6 +2995,11 @@ readdirp@~3.6.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
picomatch "^2.2.1"
|
picomatch "^2.2.1"
|
||||||
|
|
||||||
|
regenerator-runtime@^0.13.3:
|
||||||
|
version "0.13.11"
|
||||||
|
resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
|
||||||
|
integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
|
||||||
|
|
||||||
regenerator-runtime@^0.14.0:
|
regenerator-runtime@^0.14.0:
|
||||||
version "0.14.0"
|
version "0.14.0"
|
||||||
resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45"
|
resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45"
|
||||||
@ -3006,6 +3137,11 @@ seemly@^0.3.6:
|
|||||||
resolved "https://registry.npmmirror.com/seemly/-/seemly-0.3.6.tgz#7ef97e8083dea00804965e2662f572a5df9cb18e"
|
resolved "https://registry.npmmirror.com/seemly/-/seemly-0.3.6.tgz#7ef97e8083dea00804965e2662f572a5df9cb18e"
|
||||||
integrity sha512-lEV5VB8BUKTo/AfktXJcy+JeXns26ylbMkIUco8CYREsQijuz4mrXres2Q+vMLdwkuLxJdIPQ8IlCIxLYm71Yw==
|
integrity sha512-lEV5VB8BUKTo/AfktXJcy+JeXns26ylbMkIUco8CYREsQijuz4mrXres2Q+vMLdwkuLxJdIPQ8IlCIxLYm71Yw==
|
||||||
|
|
||||||
|
seemly@^0.3.8:
|
||||||
|
version "0.3.8"
|
||||||
|
resolved "https://registry.npmmirror.com/seemly/-/seemly-0.3.8.tgz#42879d8375d73126a04dc16b1bf92a773d2e5974"
|
||||||
|
integrity sha512-MW8Qs6vbzo0pHmDpFSYPna+lwpZ6Zk1ancbajw/7E8TKtHdV+1DfZZD+kKJEhG/cAoB/i+LiT+5msZOqj0DwRA==
|
||||||
|
|
||||||
semver-compare@^1.0.0:
|
semver-compare@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.npmmirror.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
|
resolved "https://registry.npmmirror.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
|
||||||
@ -3110,6 +3246,11 @@ source-map-js@^1.0.2:
|
|||||||
resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||||
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
|
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
|
||||||
|
|
||||||
|
source-map-js@^1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af"
|
||||||
|
integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==
|
||||||
|
|
||||||
source-map-support@^0.5.19:
|
source-map-support@^0.5.19:
|
||||||
version "0.5.21"
|
version "0.5.21"
|
||||||
resolved "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
|
resolved "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
|
||||||
@ -3176,6 +3317,14 @@ strip-json-comments@~2.0.1:
|
|||||||
resolved "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
resolved "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
||||||
integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==
|
integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==
|
||||||
|
|
||||||
|
strtok3@^7.0.0:
|
||||||
|
version "7.0.0"
|
||||||
|
resolved "https://registry.npmmirror.com/strtok3/-/strtok3-7.0.0.tgz#868c428b4ade64a8fd8fee7364256001c1a4cbe5"
|
||||||
|
integrity sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==
|
||||||
|
dependencies:
|
||||||
|
"@tokenizer/token" "^0.3.0"
|
||||||
|
peek-readable "^5.0.0"
|
||||||
|
|
||||||
sucrase@^3.32.0:
|
sucrase@^3.32.0:
|
||||||
version "3.34.0"
|
version "3.34.0"
|
||||||
resolved "https://registry.npmmirror.com/sucrase/-/sucrase-3.34.0.tgz#1e0e2d8fcf07f8b9c3569067d92fbd8690fb576f"
|
resolved "https://registry.npmmirror.com/sucrase/-/sucrase-3.34.0.tgz#1e0e2d8fcf07f8b9c3569067d92fbd8690fb576f"
|
||||||
@ -3305,6 +3454,16 @@ tmp@^0.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
rimraf "^3.0.0"
|
rimraf "^3.0.0"
|
||||||
|
|
||||||
|
to-data-view@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.npmmirror.com/to-data-view/-/to-data-view-1.1.0.tgz#08d6492b0b8deb9b29bdf1f61c23eadfa8994d00"
|
||||||
|
integrity sha512-1eAdufMg6mwgmlojAx3QeMnzB/BTVp7Tbndi3U7ftcT2zCZadjxkkmLmd97zmaxWi+sgGcgWrokmpEoy0Dn0vQ==
|
||||||
|
|
||||||
|
to-data-view@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.npmmirror.com/to-data-view/-/to-data-view-2.0.0.tgz#4cc3f5c9eb59514a7436fc54c587c3c34c9b1d60"
|
||||||
|
integrity sha512-RGEM5KqlPHr+WVTPmGNAXNeFEmsBnlkxXaIfEpUYV0AST2Z5W1EGq9L/MENFrMMmL2WQr1wjkmZy/M92eKhjYA==
|
||||||
|
|
||||||
to-regex-range@^5.0.1:
|
to-regex-range@^5.0.1:
|
||||||
version "5.0.1"
|
version "5.0.1"
|
||||||
resolved "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
|
resolved "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
|
||||||
@ -3312,6 +3471,14 @@ to-regex-range@^5.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-number "^7.0.0"
|
is-number "^7.0.0"
|
||||||
|
|
||||||
|
token-types@^5.0.1:
|
||||||
|
version "5.0.1"
|
||||||
|
resolved "https://registry.npmmirror.com/token-types/-/token-types-5.0.1.tgz#aa9d9e6b23c420a675e55413b180635b86a093b4"
|
||||||
|
integrity sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==
|
||||||
|
dependencies:
|
||||||
|
"@tokenizer/token" "^0.3.0"
|
||||||
|
ieee754 "^1.2.1"
|
||||||
|
|
||||||
tough-cookie@~2.5.0:
|
tough-cookie@~2.5.0:
|
||||||
version "2.5.0"
|
version "2.5.0"
|
||||||
resolved "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
|
resolved "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
|
||||||
@ -3449,10 +3616,10 @@ verror@^1.10.0:
|
|||||||
core-util-is "1.0.2"
|
core-util-is "1.0.2"
|
||||||
extsprintf "^1.2.0"
|
extsprintf "^1.2.0"
|
||||||
|
|
||||||
vite-plugin-electron@^0.14.1:
|
vite-plugin-electron@^0.15.4:
|
||||||
version "0.14.1"
|
version "0.15.4"
|
||||||
resolved "https://registry.npmmirror.com/vite-plugin-electron/-/vite-plugin-electron-0.14.1.tgz#faad1e26d853ea7960b812272c19521c7f180482"
|
resolved "https://registry.npmmirror.com/vite-plugin-electron/-/vite-plugin-electron-0.15.4.tgz#29552461940ed7ec398f59ee8b5ee63aa559a6c9"
|
||||||
integrity sha512-QGQ2nJ4wjMf1FaDSkdoC/UskQGiYGcAToATJqJXvqrL4Jmt0CFaZqoDjh1xLicUWEo/X7urHYjhKTqwEeP7F7g==
|
integrity sha512-aXGDjTXebJxNX+cf+KSZEsa9BcMrTbNhjZJaUhU5999/ATYZq4PlZpebfyeslyuYpjk6OdyA/pNC+fTeDYK5Kw==
|
||||||
|
|
||||||
vite@^4.4.11:
|
vite@^4.4.11:
|
||||||
version "4.5.0"
|
version "4.5.0"
|
||||||
@ -3501,21 +3668,21 @@ vue-tsc@^1.8.22:
|
|||||||
"@vue/language-core" "1.8.22"
|
"@vue/language-core" "1.8.22"
|
||||||
semver "^7.5.4"
|
semver "^7.5.4"
|
||||||
|
|
||||||
vue@^3.3.7:
|
vue@^3.4.13:
|
||||||
version "3.3.7"
|
version "3.4.26"
|
||||||
resolved "https://registry.npmmirror.com/vue/-/vue-3.3.7.tgz#972a218682443a3819d121261b2bff914417f4f0"
|
resolved "https://registry.yarnpkg.com/vue/-/vue-3.4.26.tgz#936c97e37672c737705d7bdfa62c31af18742269"
|
||||||
integrity sha512-YEMDia1ZTv1TeBbnu6VybatmSteGOS3A3YgfINOfraCbf85wdKHzscD6HSS/vB4GAtI7sa1XPX7HcQaJ1l24zA==
|
integrity sha512-bUIq/p+VB+0xrJubaemrfhk1/FiW9iX+pDV+62I/XJ6EkspAO9/DXEjbDFoe8pIfOZBqfk45i9BMc41ptP/uRg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@vue/compiler-dom" "3.3.7"
|
"@vue/compiler-dom" "3.4.26"
|
||||||
"@vue/compiler-sfc" "3.3.7"
|
"@vue/compiler-sfc" "3.4.26"
|
||||||
"@vue/runtime-dom" "3.3.7"
|
"@vue/runtime-dom" "3.4.26"
|
||||||
"@vue/server-renderer" "3.3.7"
|
"@vue/server-renderer" "3.4.26"
|
||||||
"@vue/shared" "3.3.7"
|
"@vue/shared" "3.4.26"
|
||||||
|
|
||||||
vueuc@^0.4.51:
|
vueuc@^0.4.58:
|
||||||
version "0.4.51"
|
version "0.4.58"
|
||||||
resolved "https://registry.npmmirror.com/vueuc/-/vueuc-0.4.51.tgz#35cd5364db4b71fc791a9823748711b91d910d49"
|
resolved "https://registry.npmmirror.com/vueuc/-/vueuc-0.4.58.tgz#03ee2ea6febf360ca9cbe490841fce91742eea12"
|
||||||
integrity sha512-pLiMChM4f+W8czlIClGvGBYo656lc2Y0/mXFSCydcSmnCR1izlKPGMgiYBGjbY9FDkFG8a2HEVz7t0DNzBWbDw==
|
integrity sha512-Wnj/N8WbPRSxSt+9ji1jtDHPzda5h2OH/0sFBhvdxDRuyCZbjGg3/cKMaKqEoe+dErTexG2R+i6Q8S/Toq1MYg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@css-render/vue3-ssr" "^0.15.10"
|
"@css-render/vue3-ssr" "^0.15.10"
|
||||||
"@juggle/resize-observer" "^3.3.1"
|
"@juggle/resize-observer" "^3.3.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user