mirror of
https://github.com/fanchenio/DawnLauncher.git
synced 2025-07-14 05:12:11 +08:00
Compare commits
32 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 |
@ -1,9 +1,5 @@
|
||||
# [简体中文](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
|
||||
|
||||
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
|
||||
|
||||
`Electron + Vite + Vue3 + TS`
|
||||
`Electron + Vite + Vue3 + TS + Rust`
|
||||
|
||||
# Support Platform
|
||||
|
||||
@ -31,14 +27,6 @@ Supports associated folders (real-time synchronization of folder contents), quic
|
||||
|
||||
[dawnlauncher.com](https://dawnlauncher.com/)
|
||||
|
||||
# Donate(Wechat)
|
||||
|
||||

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

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

|
||||
|
14
README.md
14
README.md
@ -1,9 +1,5 @@
|
||||
# 简体中文 | [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
|
||||
|
||||
`Windows`快捷启动工具,帮助您整理杂乱无章的桌面,分门别类管理您的桌面快捷方式,让您的桌面保持干净整洁。
|
||||
@ -12,7 +8,7 @@
|
||||
|
||||
# 技术栈
|
||||
|
||||
`Electron + Vite + Vue3 + TS`
|
||||
`Electron + Vite + Vue3 + TS + Rust`
|
||||
|
||||
# 支持平台
|
||||
|
||||
@ -35,14 +31,6 @@
|
||||
|
||||
369652112
|
||||
|
||||
# 捐赠(微信)
|
||||
|
||||

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

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

|
||||
|
@ -5,8 +5,8 @@ let simplifiedChinese = {
|
||||
address: "地址",
|
||||
aggregateClassification: "聚合分类",
|
||||
aggregateClassificationPrompt1:
|
||||
"聚合分类可以将所有分类下的项目聚合到一起,按照设定的排序方式、项目数量进行排序和显示。",
|
||||
aggregateClassificationPrompt2: "当前分类为父级分类,不能设置聚合分类。",
|
||||
"聚合分类会将所有分类下项目聚合到一起,按照设定的排序方式、项目数量进行显示。",
|
||||
aggregateClassificationPrompt2: "当前分类是父级分类,不能设置为聚合分类。",
|
||||
aggregateClassificationPrompt3:
|
||||
"当前设置排序为按打开次数,需开启设置-项目-记录打开次数。",
|
||||
aggregateClassificationPrompt4:
|
||||
@ -22,7 +22,7 @@ let simplifiedChinese = {
|
||||
associateFolderPrompt1:
|
||||
"关联文件夹可以实时监控指定文件夹内的变化并同步到对应分类中。",
|
||||
associateFolderPrompt2: "需要隐藏的文件/文件夹名称,多个按英文逗号分割",
|
||||
associateFolderPrompt3: "当前分类为父级分类,不能设置关联文件夹。",
|
||||
associateFolderPrompt3: "当前分类是父级分类,不能设置为关联文件夹。",
|
||||
associateFolderPrompt4: "目标路径不存在。",
|
||||
associateFolderPrompt5: "目标路径必须是文件夹。",
|
||||
associateFolderPrompt6:
|
||||
@ -33,15 +33,14 @@ let simplifiedChinese = {
|
||||
backgroundIcon: "背景图标",
|
||||
backgroundImage: "背景图",
|
||||
backgroundImageMode: "背景图模式",
|
||||
backgroundImagePostion: "背景图定位",
|
||||
backgroundImageTransparent: "背景图透明",
|
||||
backgroundTransparent: "背景透明",
|
||||
backgroundImagePosition: "背景图定位",
|
||||
backgroundImageTransparency: "背景图透明度",
|
||||
backup: "备份",
|
||||
backupRestoreData: "备份/还原数据",
|
||||
backupRestoreDataPrompt:
|
||||
"如果要还原1.2.3及之前版本的备份数据,请在还原时选择导入JSON格式的文件。",
|
||||
batchConvertAbsolutePath: "转为绝对路径",
|
||||
batchConvertRelativePath: "转为相对路径",
|
||||
"如果要还原 1.2.3 及之前版本的数据,请在还原时选择导入 JSON 格式的文件。",
|
||||
batchConvertAbsolutePath: "批量转为绝对路径",
|
||||
batchConvertRelativePath: "批量转为相对路径",
|
||||
batchCopyTo: "批量复制到",
|
||||
batchDelete: "批量删除",
|
||||
batchDeletePrompt: "是否批量删除项目?",
|
||||
@ -52,7 +51,7 @@ let simplifiedChinese = {
|
||||
bottom: "底部",
|
||||
byInitialLetter: "按首字母",
|
||||
byLastOpen: "按最后打开",
|
||||
byOpenNumber: "按打开次数",
|
||||
byOpenCount: "按打开次数",
|
||||
calculator: "计算器",
|
||||
cancel: "取消",
|
||||
cancelBatchOperation: "取消批量操作",
|
||||
@ -71,17 +70,19 @@ let simplifiedChinese = {
|
||||
color: "颜色",
|
||||
columnNumber: "列数",
|
||||
commandLine: "命令行",
|
||||
commandLinePrompt1: "使用“> + 空格”进入命令行模式。",
|
||||
commandLinePrompt1: '在"快速搜索"或"搜索"中使用"> + 空格"进入命令行模式。',
|
||||
commandPrompt: "命令提示符",
|
||||
computer: "计算机",
|
||||
computerManagement: "计算机管理",
|
||||
controlPanel: "控制面板",
|
||||
convertAbsolutePath: "转为绝对路径",
|
||||
convertRelativePath: "转为相对路径",
|
||||
copy: "复制",
|
||||
copyFullPath: "复制完整路径",
|
||||
copyTo: "复制到",
|
||||
createShortcut: "创建快捷方式",
|
||||
ctrlNumberKey: "Ctrl + 数字键",
|
||||
cut: "剪切",
|
||||
default: "默认",
|
||||
defaultIcon: "默认图标",
|
||||
delayDisplay: "延迟显示",
|
||||
@ -93,7 +94,7 @@ let simplifiedChinese = {
|
||||
deleteHistory: "删除历史记录",
|
||||
description: "描述",
|
||||
display: "显示",
|
||||
displayMainWindow: "显示主界面",
|
||||
displayMainInterface: "显示主界面",
|
||||
documents: "文档",
|
||||
doubleClickOpen: "双击打开",
|
||||
doubleClickTaskbar: "双击任务栏",
|
||||
@ -108,6 +109,7 @@ let simplifiedChinese = {
|
||||
editSubclassification: "编辑子分类",
|
||||
emptyRecycleBin: "清空回收站",
|
||||
enable: "启用",
|
||||
enableQuickSearch: "启用快速搜索",
|
||||
english: "英语",
|
||||
excludeSearch: "排除搜索",
|
||||
exit: "退出",
|
||||
@ -135,11 +137,12 @@ let simplifiedChinese = {
|
||||
globalShortcutKey: "全局快捷键",
|
||||
hiddenItems: "隐藏项",
|
||||
hideEllipses: "隐藏省略号",
|
||||
hideLoseFocus: "失去焦点后隐藏",
|
||||
hideLoseFocus: "失去焦点隐藏",
|
||||
hideName: "隐藏名称",
|
||||
hideTray: "隐藏托盘图标",
|
||||
hideTaskbar: "隐藏任务栏",
|
||||
hideWindowCollapseSubClassification: "隐藏窗口时收起子分类",
|
||||
hideWindowCollapseSubClassification: "隐藏窗口收起子分类",
|
||||
hideWindowAfterOpen: "打开后隐藏窗口",
|
||||
history: "历史记录",
|
||||
hover: "悬停",
|
||||
icon: "图标",
|
||||
@ -179,7 +182,7 @@ let simplifiedChinese = {
|
||||
name: "名称",
|
||||
network: "网络",
|
||||
networkIcon: "网络图标",
|
||||
networkIconPrompt1: "支持JPG/JPEG/GIF/PNG/ICO/SVG/WEBP格式图片。",
|
||||
networkIconPrompt1: "支持 JPG/JPEG/GIF/PNG/ICO/SVG/WEBP 格式图片。",
|
||||
networkShareCenter: "网络和共享中心",
|
||||
newClassification: "新建分类",
|
||||
newClassificationName: "新分类",
|
||||
@ -190,7 +193,7 @@ let simplifiedChinese = {
|
||||
normal: "普通",
|
||||
notDisturb: "勿扰模式",
|
||||
notDisturbPrompt:
|
||||
"开启勿扰模式后,计算机在游戏、应用全屏模式下不会弹出Dawn Launcher窗口。",
|
||||
"开启勿扰模式后,计算机在游戏、应用全屏模式下不会弹出 Dawn Launcher 窗口。",
|
||||
notFoundFile: "找不到指定的文件",
|
||||
notFoundFolder: "找不到指定的文件夹",
|
||||
notTransparent: "不透明",
|
||||
@ -199,24 +202,23 @@ let simplifiedChinese = {
|
||||
officialWebsite: "官方网站",
|
||||
ok: "确定",
|
||||
open: "打开",
|
||||
openAfterHideMainInterface: "打开后隐藏主界面",
|
||||
openAfterHideQuickSearchWindow: "打开后隐藏窗口",
|
||||
openFileLocation: "打开文件所在位置",
|
||||
openNow: "仅剩一项时立即打开",
|
||||
openNumber: "打开次数",
|
||||
openNow: "仅剩一项立即打开",
|
||||
openCount: "打开次数",
|
||||
parameters: "参数",
|
||||
password: "密码",
|
||||
pasteIcon: "粘贴图标",
|
||||
paste: "粘贴",
|
||||
path: "路径",
|
||||
powerOptions: "电源选项",
|
||||
powerShell: "PowerShell",
|
||||
programsFeatures: "程序和功能",
|
||||
proxy: "代理",
|
||||
proxyPrompt:
|
||||
"仅支持HTTP代理,填写“地址”时需要带通信协议和端口,例如:http://127.0.0.1:7890,如果没有用户名和密码,为空即可。",
|
||||
'仅支持 HTTP 代理,填写"地址"时需要带通信协议和端口,例如:http://127.0.0.1:7890,如果没有用户名和密码,为空即可。',
|
||||
prompt: "提示",
|
||||
quickSearch: "快速搜索",
|
||||
recordOpenNumber: "记录打开次数",
|
||||
recordOpenCount: "记录打开次数",
|
||||
recycleBin: "回收站",
|
||||
refreshIcon: "刷新图标",
|
||||
registryEditor: "注册表编辑器",
|
||||
@ -227,7 +229,6 @@ let simplifiedChinese = {
|
||||
restart: "重启",
|
||||
restore: "还原",
|
||||
restoreDataPrompt: "还原数据失败。",
|
||||
rewardSponsor: "打赏&赞助",
|
||||
right: "右侧",
|
||||
roundedCorners: "圆角",
|
||||
runAsAdministrator: "以管理员身份运行",
|
||||
@ -275,10 +276,9 @@ let simplifiedChinese = {
|
||||
startupTray: "启动后最小化到系统托盘",
|
||||
subclassification: "子分类",
|
||||
svgIcon: "SVG图标",
|
||||
svgIconPrompt1: "输入SVG代码后,需要先点击“校验代码”按钮。",
|
||||
svgIconPrompt1: '输入 SVG 代码后,需要先点击"校验代码"按钮。',
|
||||
switch: "切换",
|
||||
switchClassificationCollapseOtherSubClassification:
|
||||
"切换分类时收起其他子分类",
|
||||
switchClassificationCollapseOtherSubClassification: "切换分类收起其他子分类",
|
||||
switchEnglish: "显示窗口时将输入法切换为英文模式",
|
||||
system: "系统",
|
||||
target: "目标",
|
||||
@ -295,9 +295,8 @@ let simplifiedChinese = {
|
||||
unlockItem: "解锁项目",
|
||||
uploadIcon: "上传图标",
|
||||
url: "网址",
|
||||
useItemOpen: "从程序外拖动文件到项目图标上时用此项目打开文件",
|
||||
useItemOpen: "从程序外拖动文件到项目图标上用此项目打开文件",
|
||||
useProxy: "使用代理",
|
||||
useQuickSearch: "使用快速搜索",
|
||||
username: "用户名",
|
||||
update: "更新",
|
||||
webSearch: "网络搜索",
|
||||
@ -306,6 +305,7 @@ let simplifiedChinese = {
|
||||
webSearchModePrompt2: "{w}为搜索关键字。",
|
||||
width: "宽度",
|
||||
window: "窗口",
|
||||
windowTransparency: "窗口透明度",
|
||||
zoom: "缩放",
|
||||
};
|
||||
|
||||
@ -315,8 +315,8 @@ let traditionalChinese = {
|
||||
address: "地址",
|
||||
aggregateClassification: "聚合分類",
|
||||
aggregateClassificationPrompt1:
|
||||
"聚合分類可以將所有分類下的項目聚合到一起,按照設定的排序方式、項目數量進行排序和顯示。",
|
||||
aggregateClassificationPrompt2: "當前分類為父級分類,不能設置聚合分類。",
|
||||
"聚合分類會將所有分類下項目聚合到一起,按照設定的排序方式、項目數量進行顯示。",
|
||||
aggregateClassificationPrompt2: "當前分類是父級分類,不能設置為聚合分類。",
|
||||
aggregateClassificationPrompt3:
|
||||
"當前設置排序為按打開次數,需開啟設置-項目-記錄打開次數。",
|
||||
aggregateClassificationPrompt4:
|
||||
@ -332,7 +332,7 @@ let traditionalChinese = {
|
||||
associateFolderPrompt1:
|
||||
"關聯文件夾可以實時監控指定文件夾內的變化並同步到對應分類中。",
|
||||
associateFolderPrompt2: "需要隱藏的文件/文件夾名稱,多個按英文逗號分割",
|
||||
associateFolderPrompt3: "當前分類為父級分類,不能設置關聯文件夾。",
|
||||
associateFolderPrompt3: "當前分類是父級分類,不能設置為關聯文件夾。",
|
||||
associateFolderPrompt4: "目標路徑不存在。",
|
||||
associateFolderPrompt5: "目標路徑必須是文件夾。",
|
||||
associateFolderPrompt6:
|
||||
@ -343,15 +343,14 @@ let traditionalChinese = {
|
||||
backgroundIcon: "背景圖標",
|
||||
backgroundImage: "背景圖",
|
||||
backgroundImageMode: "背景圖模式",
|
||||
backgroundImagePostion: "背景圖定位",
|
||||
backgroundImageTransparent: "背景圖透明",
|
||||
backgroundTransparent: "背景透明",
|
||||
backgroundImagePosition: "背景圖定位",
|
||||
backgroundImageTransparency: "背景圖透明度",
|
||||
backup: "備份",
|
||||
backupRestoreData: "備份/還原數據",
|
||||
backupRestoreDataPrompt:
|
||||
"如果要還原1.2.3及之前版本的備份數據,請在還原時選擇導入JSON格式的文件。",
|
||||
batchConvertAbsolutePath: "轉為絕對路徑",
|
||||
batchConvertRelativePath: "轉為相對路徑",
|
||||
"如果要還原 1.2.3 及之前版本的數據,請在還原時選擇導入 JSON 格式的文件。",
|
||||
batchConvertAbsolutePath: "批量轉為絕對路徑",
|
||||
batchConvertRelativePath: "批量轉為相對路徑",
|
||||
batchCopyTo: "批量復製到",
|
||||
batchDelete: "批量刪除",
|
||||
batchDeletePrompt: "是否批量刪除項目?",
|
||||
@ -362,7 +361,7 @@ let traditionalChinese = {
|
||||
bottom: "底部",
|
||||
byInitialLetter: "按首字母",
|
||||
byLastOpen: "按最後打開",
|
||||
byOpenNumber: "按打開次數",
|
||||
byOpenCount: "按打開次數",
|
||||
calculator: "計算器",
|
||||
cancel: "取消",
|
||||
cancelBatchOperation: "取消批量操作",
|
||||
@ -381,17 +380,19 @@ let traditionalChinese = {
|
||||
color: "顏色",
|
||||
columnNumber: "列數",
|
||||
commandLine: "命令行",
|
||||
commandLinePrompt1: "使用「> + 空格」進入命令行模式。",
|
||||
commandLinePrompt1: '在"快速搜索"或"搜索"中使用"> + 空格"進入命令行模式。',
|
||||
commandPrompt: "命令提示符",
|
||||
computer: "計算機",
|
||||
computerManagement: "計算機管理",
|
||||
controlPanel: "控製面板",
|
||||
convertAbsolutePath: "轉為絕對路徑",
|
||||
convertRelativePath: "轉為相對路徑",
|
||||
copy: "復製",
|
||||
copyFullPath: "復製完整路徑",
|
||||
copyTo: "復製到",
|
||||
createShortcut: "創建快捷方式",
|
||||
ctrlNumberKey: "Ctrl + 數字鍵",
|
||||
cut: "剪切",
|
||||
default: "默認",
|
||||
defaultIcon: "默認圖標",
|
||||
delayDisplay: "延遲顯示",
|
||||
@ -403,7 +404,7 @@ let traditionalChinese = {
|
||||
deleteHistory: "刪除歷史記錄",
|
||||
description: "描述",
|
||||
display: "顯示",
|
||||
displayMainWindow: "顯示主界面",
|
||||
displayMainInterface: "顯示主界面",
|
||||
documents: "文檔",
|
||||
doubleClickOpen: "雙擊打開",
|
||||
doubleClickTaskbar: "雙擊任務欄",
|
||||
@ -418,6 +419,7 @@ let traditionalChinese = {
|
||||
editSubclassification: "編輯子分類",
|
||||
emptyRecycleBin: "清空回收站",
|
||||
enable: "啟用",
|
||||
enableQuickSearch: "啟用快速搜索",
|
||||
english: "英語",
|
||||
excludeSearch: "排除搜索",
|
||||
exit: "退出",
|
||||
@ -445,11 +447,12 @@ let traditionalChinese = {
|
||||
globalShortcutKey: "全局快捷鍵",
|
||||
hiddenItems: "隱藏項",
|
||||
hideEllipses: "隱藏省略號",
|
||||
hideLoseFocus: "失去焦點後隱藏",
|
||||
hideLoseFocus: "失去焦點隱藏",
|
||||
hideName: "隱藏名稱",
|
||||
hideTray: "隱藏托盤圖標",
|
||||
hideTaskbar: "隱藏任務欄",
|
||||
hideWindowCollapseSubClassification: "隱藏窗口時收起子分類",
|
||||
hideWindowCollapseSubClassification: "隱藏窗口收起子分類",
|
||||
hideWindowAfterOpen: "打開後隱藏窗口",
|
||||
history: "歷史記錄",
|
||||
hover: "懸停",
|
||||
icon: "圖標",
|
||||
@ -489,7 +492,7 @@ let traditionalChinese = {
|
||||
name: "名稱",
|
||||
network: "網絡",
|
||||
networkIcon: "網絡圖標",
|
||||
networkIconPrompt1: "支持JPG/JPEG/GIF/PNG/ICO/SVG/WEBP格式圖片。",
|
||||
networkIconPrompt1: "支持 JPG/JPEG/GIF/PNG/ICO/SVG/WEBP 格式圖片。",
|
||||
networkShareCenter: "網絡和共享中心",
|
||||
newClassification: "新建分類",
|
||||
newClassificationName: "新分類",
|
||||
@ -500,7 +503,7 @@ let traditionalChinese = {
|
||||
normal: "普通",
|
||||
notDisturb: "勿擾模式",
|
||||
notDisturbPrompt:
|
||||
"開啟勿擾模式後,計算機在遊戲、應用全屏模式下不會彈出Dawn Launcher窗口。",
|
||||
"開啟勿擾模式後,計算機在遊戲、應用全屏模式下不會彈出 Dawn Launcher 窗口。",
|
||||
notFoundFile: "找不到指定的文件",
|
||||
notFoundFolder: "找不到指定的文件夾",
|
||||
notTransparent: "不透明",
|
||||
@ -509,24 +512,23 @@ let traditionalChinese = {
|
||||
officialWebsite: "官方網站",
|
||||
ok: "確定",
|
||||
open: "打開",
|
||||
openAfterHideMainInterface: "打開後隱藏主界面",
|
||||
openAfterHideQuickSearchWindow: "打開後隱藏窗口",
|
||||
openFileLocation: "打開文件所在位置",
|
||||
openNow: "僅剩一項時立即打開",
|
||||
openNumber: "打開次數",
|
||||
openNow: "僅剩一項立即打開",
|
||||
openCount: "打開次數",
|
||||
parameters: "參數",
|
||||
password: "密碼",
|
||||
pasteIcon: "粘貼圖標",
|
||||
paste: "粘貼",
|
||||
path: "路徑",
|
||||
powerOptions: "電源選項",
|
||||
powerShell: "PowerShell",
|
||||
programsFeatures: "程序和功能",
|
||||
proxy: "代理",
|
||||
proxyPrompt:
|
||||
"僅支持HTTP代理,填寫「地址」時需要帶通信協議和端口,例如:http://127.0.0.1:7890,如果沒有用戶名和密碼,為空即可。",
|
||||
'僅支持 HTTP 代理,填寫"地址"時需要帶通信協議和端口,例如:http://127.0.0.1:7890,如果沒有用戶名和密碼,為空即可。',
|
||||
prompt: "提示",
|
||||
quickSearch: "快速搜索",
|
||||
recordOpenNumber: "記錄打開次數",
|
||||
recordOpenCount: "記錄打開次數",
|
||||
recycleBin: "回收站",
|
||||
refreshIcon: "刷新圖標",
|
||||
registryEditor: "註冊表編輯器",
|
||||
@ -537,7 +539,6 @@ let traditionalChinese = {
|
||||
restart: "重啟",
|
||||
restore: "還原",
|
||||
restoreDataPrompt: "還原數據失敗。",
|
||||
rewardSponsor: "打賞&贊助",
|
||||
right: "右側",
|
||||
roundedCorners: "圓角",
|
||||
runAsAdministrator: "以管理員身份運行",
|
||||
@ -585,10 +586,9 @@ let traditionalChinese = {
|
||||
startupTray: "啟動後最小化到系統托盤",
|
||||
subclassification: "子分類",
|
||||
svgIcon: "SVG圖標",
|
||||
svgIconPrompt1: "輸入SVG代碼後,需要先點擊「校驗代碼」按鈕。",
|
||||
svgIconPrompt1: '輸入 SVG 代碼後,需要先點擊"校驗代碼"按鈕。',
|
||||
switch: "切換",
|
||||
switchClassificationCollapseOtherSubClassification:
|
||||
"切換分類時收起其他子分類",
|
||||
switchClassificationCollapseOtherSubClassification: "切換分類收起其他子分類",
|
||||
switchEnglish: "顯示窗口時將輸入法切換為英文模式",
|
||||
system: "系統",
|
||||
target: "目標",
|
||||
@ -605,9 +605,8 @@ let traditionalChinese = {
|
||||
unlockItem: "解鎖項目",
|
||||
uploadIcon: "上傳圖標",
|
||||
url: "網址",
|
||||
useItemOpen: "從程序外拖動文件到項目圖標上時用此項目打開文件",
|
||||
useItemOpen: "從程序外拖動文件到項目圖標上用此項目打開文件",
|
||||
useProxy: "使用代理",
|
||||
useQuickSearch: "使用快速搜索",
|
||||
username: "用戶名",
|
||||
update: "更新",
|
||||
webSearch: "網絡搜索",
|
||||
@ -616,6 +615,7 @@ let traditionalChinese = {
|
||||
webSearchModePrompt2: "{w}為搜索關鍵字。",
|
||||
width: "寬度",
|
||||
window: "窗口",
|
||||
windowTransparency: "窗口透明度",
|
||||
zoom: "縮放",
|
||||
};
|
||||
|
||||
@ -626,44 +626,44 @@ let english = {
|
||||
address: "Address",
|
||||
aggregateClassification: "Aggregate Classification",
|
||||
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:
|
||||
"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:
|
||||
"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:
|
||||
"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",
|
||||
all: "All",
|
||||
altNumberKey: "Alt + Number Key",
|
||||
alwaysCenter: "Always Center",
|
||||
alwaysTop: "Always Top",
|
||||
alwaysTop: "Always on Top",
|
||||
appearance: "Appearance",
|
||||
appx: "Appx",
|
||||
associateFolder: "Associate Folder",
|
||||
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:
|
||||
"Name of the file/folder to be hidden, multiple separated by commas",
|
||||
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.",
|
||||
associateFolderPrompt5: "The destination path must be a folder.",
|
||||
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:
|
||||
"The target path is empty. The current classification will be automatically converted to a normal classification. Are you sure?",
|
||||
autoSwitchClassification: "Auto Switch Classification on Scroll",
|
||||
"The target path is empty. The current classification will be automatically converted to a regular classification. Are you sure?",
|
||||
autoSwitchClassification:
|
||||
"Automatically switch classification when the item list scrolls to the bottom or top",
|
||||
backgroundIcon: "Background Icon",
|
||||
backgroundImage: "Background Image",
|
||||
backgroundImageMode: "Background Image Mode",
|
||||
backgroundImagePostion: "Background Image Postion",
|
||||
backgroundImageTransparent: "Background Image Transparent",
|
||||
backgroundTransparent: "Background Transparent",
|
||||
backgroundImagePosition: "Background Image Position",
|
||||
backgroundImageTransparency: "Background Image Transparency",
|
||||
backup: "Backup",
|
||||
backupRestoreData: "Backup/Restore Data",
|
||||
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",
|
||||
batchConvertRelativePath: "Batch Convert to Relative Path",
|
||||
batchCopyTo: "Batch Copy to",
|
||||
@ -674,9 +674,9 @@ let english = {
|
||||
batchRefreshIcon: "Batch Refresh Icon",
|
||||
borderColor: "Border Color",
|
||||
bottom: "Bottom",
|
||||
byInitialLetter: "by Initial Letter",
|
||||
byLastOpen: "by Last Open",
|
||||
byOpenNumber: "by Open Count",
|
||||
byInitialLetter: "By Initial Letter",
|
||||
byLastOpen: "By Last Open",
|
||||
byOpenCount: "By Open Count",
|
||||
calculator: "Calculator",
|
||||
cancel: "Cancel",
|
||||
cancelBatchOperation: "Cancel Batch Operation",
|
||||
@ -685,10 +685,10 @@ let english = {
|
||||
checkInvalidItem: "Check for Invalid Items",
|
||||
checkUpdates: "Check Updates",
|
||||
checkUpdatesPrompt1:
|
||||
'Check that there is a new version, click "OK" to jump to the official website to download the latest version.',
|
||||
checkUpdatesPrompt2: "It is currently the latest version.",
|
||||
"A new version has been detected. Click 'OK' to go to the official website and download the latest version.",
|
||||
checkUpdatesPrompt2: "You are already on the latest version.",
|
||||
checkUpdatesPrompt3:
|
||||
"Failed to check for updates, please confirm the network.",
|
||||
"Update check failed. Please check your network connection.",
|
||||
classification: "Classification",
|
||||
clear: "Clear",
|
||||
close: "Close",
|
||||
@ -697,17 +697,20 @@ let english = {
|
||||
color: "Color",
|
||||
columnNumber: "Column Number",
|
||||
commandLine: "Command Line",
|
||||
commandLinePrompt1: 'Use "> + space" to enter command line mode.',
|
||||
commandLinePrompt1:
|
||||
'Use "> + Space" in "Quick Search" or "Search" to enter command-line mode.',
|
||||
commandPrompt: "Command Prompt",
|
||||
computer: "Computer",
|
||||
computerManagement: "Computer Management",
|
||||
controlPanel: "Control Panel",
|
||||
convertAbsolutePath: "Convert to Absolute Path",
|
||||
convertRelativePath: "Convert to Relative Path",
|
||||
copy: "Copy",
|
||||
copyFullPath: "Copy Full Path",
|
||||
copyTo: "Copy to",
|
||||
createShortcut: "Create Shortcut",
|
||||
ctrlNumberKey: "Ctrl + Number Key",
|
||||
cut: "Cut",
|
||||
default: "Default",
|
||||
defaultIcon: "Default Icon",
|
||||
delayDisplay: "Delay Display",
|
||||
@ -719,14 +722,14 @@ let english = {
|
||||
deleteHistory: "Delete History",
|
||||
description: "Description",
|
||||
display: "Display",
|
||||
displayMainWindow: "Display Main Interface",
|
||||
displayMainInterface: "Display Main Interface",
|
||||
documents: "Documents",
|
||||
doubleClickOpen: "Double Click Open",
|
||||
doubleClickTaskbar: "Double Click Taskbar",
|
||||
downloadImagePrompt1: "Failed to download image.",
|
||||
downloadImagePrompt2: "The link is not in image format.",
|
||||
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",
|
||||
edit: "Edit",
|
||||
editClassification: "Edit Classification",
|
||||
@ -734,6 +737,7 @@ let english = {
|
||||
editSubclassification: "Edit Subclassification",
|
||||
emptyRecycleBin: "Empty Recycle Bin",
|
||||
enable: "Enable",
|
||||
enableQuickSearch: "Enable Quick Search",
|
||||
english: "English",
|
||||
excludeSearch: "Exclude Search",
|
||||
exit: "Exit",
|
||||
@ -761,23 +765,24 @@ let english = {
|
||||
globalShortcutKey: "Global Shortcut Key",
|
||||
hiddenItems: "Hidden Items",
|
||||
hideEllipses: "Hide Ellipses",
|
||||
hideLoseFocus: "Hide After Lose Focus",
|
||||
hideLoseFocus: "Loss of Focus Hide",
|
||||
hideName: "Hide Name",
|
||||
hideTray: "Hide Tray",
|
||||
hideTray: "Hide Tray Icon",
|
||||
hideTaskbar: "Hide Taskbar",
|
||||
hideWindowCollapseSubClassification:
|
||||
"Collapse Subclassification when Hide Window",
|
||||
"Collapse subclassifications when the window is hidden",
|
||||
hideWindowAfterOpen: "Hide Window After Opening",
|
||||
history: "History",
|
||||
hover: "Hover",
|
||||
icon: "Icon",
|
||||
imageLink: "Image Link",
|
||||
item: "Item",
|
||||
itemAddEditPrompt1:
|
||||
"After selecting the fixed icon, the current project will not participate in refreshing the icon.",
|
||||
itemAddEditPrompt2: "Leave it blank if there are no special requirements",
|
||||
"After selecting a fixed icon, the current item will not participate in icon refreshing.",
|
||||
itemAddEditPrompt2: "Leave empty if there are no special requirements",
|
||||
itemAddEditPrompt3: "Add successfully.",
|
||||
itemAddEditPrompt4: "The target does not exist.",
|
||||
itemAddEditPrompt5: "Failed to obtain URL information.",
|
||||
itemAddEditPrompt5: "Failed to retrieve website information.",
|
||||
itemList: "Item List",
|
||||
keyword: "Keyword",
|
||||
keywordSpace: "Leyword + Space",
|
||||
@ -807,7 +812,7 @@ let english = {
|
||||
name: "Name",
|
||||
network: "Network",
|
||||
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",
|
||||
newClassification: "New Classification",
|
||||
newClassificationName: "New Classification",
|
||||
@ -818,7 +823,7 @@ let english = {
|
||||
normal: "Normal",
|
||||
notDisturb: "Not Disturb Mode",
|
||||
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",
|
||||
notFoundFolder: "The specified folder cannot be found",
|
||||
notTransparent: "Not Transparent",
|
||||
@ -827,14 +832,13 @@ let english = {
|
||||
officialWebsite: "Official Website",
|
||||
ok: "OK",
|
||||
open: "Open",
|
||||
openAfterHideMainInterface: "Hide Main Interface After Open",
|
||||
openAfterHideQuickSearchWindow: "Hide Window After Open",
|
||||
openFileLocation: "Open File Location",
|
||||
openNow: "Open when Only One Item",
|
||||
openNumber: "Open Count",
|
||||
openNow: "Only one item left to open immediately",
|
||||
openCount: "Open Count",
|
||||
parameters: "Parameters",
|
||||
password: "Password",
|
||||
pasteIcon: "Paste Icon",
|
||||
paste: "Paste",
|
||||
path: "Path",
|
||||
powerOptions: "Power Options",
|
||||
powerShell: "PowerShell",
|
||||
@ -844,7 +848,7 @@ let english = {
|
||||
'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",
|
||||
recordOpenNumber: "Record Open Count",
|
||||
recordOpenCount: "Record Open Count",
|
||||
recycleBin: "Recycle Bin",
|
||||
refreshIcon: "Refresh Icon",
|
||||
registryEditor: "Registry Editor",
|
||||
@ -855,7 +859,6 @@ let english = {
|
||||
restart: "Restart",
|
||||
restore: "Restore",
|
||||
restoreDataPrompt: "Failed to restore data.",
|
||||
rewardSponsor: "Reward&Sponsor",
|
||||
right: "Right",
|
||||
roundedCorners: "Rounded Corners",
|
||||
runAsAdministrator: "Run as Administrator",
|
||||
@ -896,7 +899,7 @@ let english = {
|
||||
'It conflicts with the "Show/Hide" shortcut key in "Settings-Quick Search", please reset it.',
|
||||
shortcutKeyPrompt7: "Invaild symbol.",
|
||||
show: "Show",
|
||||
showFollowMousePosition: "Follows Mouse Position on Display",
|
||||
showFollowMousePosition: "Follow the mouse position when displayed",
|
||||
showHide: "Show/Hide",
|
||||
showOnlyFiles: "Show Only Files",
|
||||
showOnlyFolders: "Show Only Folders",
|
||||
@ -910,15 +913,16 @@ let english = {
|
||||
startLocation: "Start Location",
|
||||
startMenu: "Start Menu",
|
||||
startup: "Startup",
|
||||
startupTray: "Minimize to System Tray on Startup",
|
||||
startupTray: "Minimize to system tray on startup",
|
||||
subclassification: "Subclassification",
|
||||
svgIcon: "SVG Icon",
|
||||
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",
|
||||
switchClassificationCollapseOtherSubClassification:
|
||||
"Collapse Other Subclassification on Classification Switch",
|
||||
switchEnglish: "Switch to English Input on Window Display",
|
||||
"Collapse other subclassifications when switching classifications",
|
||||
switchEnglish:
|
||||
"Switch the input method to English mode when the window is displayed",
|
||||
system: "System",
|
||||
target: "Target",
|
||||
taskManager: "Task Manager",
|
||||
@ -934,9 +938,9 @@ let english = {
|
||||
unlockItem: "Unlock Item",
|
||||
uploadIcon: "Upload Icon",
|
||||
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",
|
||||
useQuickSearch: "Use Quick Search",
|
||||
username: "Username",
|
||||
update: "Update",
|
||||
webSearch: "Web Search",
|
||||
@ -945,6 +949,7 @@ let english = {
|
||||
webSearchModePrompt2: "{w} is the search keyword.",
|
||||
width: "Width",
|
||||
window: "Window",
|
||||
windowTransparency: "Window Transparency",
|
||||
zoom: "Zoom",
|
||||
};
|
||||
|
||||
|
@ -24,7 +24,11 @@ function createWindow() {
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
|
@ -49,7 +49,11 @@ function createAddEditWindow(id: number | null, parentId: number | null) {
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -113,7 +117,11 @@ function createSetIconWindow(id: number) {
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -172,7 +180,11 @@ function createAssociateFolderWindow(id: number) {
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -236,7 +248,11 @@ function createAggregateWindow(id: number) {
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -528,7 +544,7 @@ function getItemSortMenu(classification: Classification) {
|
||||
if (global.setting.item.openNumber) {
|
||||
submenus.push(
|
||||
new MenuItem({
|
||||
label: global.language.byOpenNumber,
|
||||
label: global.language.byOpenCount,
|
||||
icon:
|
||||
classification.data.itemSort === "openNumber" && !hasChild
|
||||
? getDot()
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Menu, MenuItem, ipcMain, dialog } from "electron";
|
||||
import { Menu, MenuItem, ipcMain } from "electron";
|
||||
import { Classification } from "../../../types/classification";
|
||||
import {
|
||||
createAddEditWindow,
|
||||
@ -27,7 +27,12 @@ import {
|
||||
batchUpdateFixed,
|
||||
} from "./data";
|
||||
import { setShortcutKey } from "../setting";
|
||||
import { closeWindow, getDot, sendToWebContent } from "../commons/index";
|
||||
import {
|
||||
closeWindow,
|
||||
getDot,
|
||||
sendToWebContent,
|
||||
showMessageBoxSync,
|
||||
} from "../commons/index";
|
||||
|
||||
export default function () {
|
||||
// 获取分类列表
|
||||
@ -248,13 +253,12 @@ export default function () {
|
||||
new MenuItem({
|
||||
label: global.language.delete,
|
||||
click: () => {
|
||||
let res = dialog.showMessageBoxSync(global.mainWindow, {
|
||||
message: global.language.deleteClassificationPrompt,
|
||||
buttons: [global.language.ok, global.language.cancel],
|
||||
type: "question",
|
||||
noLink: true,
|
||||
cancelId: 1,
|
||||
});
|
||||
let res = showMessageBoxSync(
|
||||
"mainWindow",
|
||||
global.language.deleteClassificationPrompt,
|
||||
"question",
|
||||
[global.language.ok, global.language.cancel]
|
||||
);
|
||||
if (res === 0) {
|
||||
// 删除数据
|
||||
if (del(classification.id)) {
|
||||
|
@ -9,6 +9,8 @@ import { isAbsolutePath } from "../../../commons/utils/common";
|
||||
import {
|
||||
BrowserWindow,
|
||||
Display,
|
||||
OpenDialogOptions,
|
||||
SaveDialogOptions,
|
||||
app,
|
||||
dialog,
|
||||
nativeImage,
|
||||
@ -207,6 +209,9 @@ function analysisHTML(windowName: string, url: string, data: string) {
|
||||
let $ = cheerio.load(data);
|
||||
// 获取标题
|
||||
result.name = $("head").find("title").text();
|
||||
if (!result.name || result.name.trim() === "") {
|
||||
result.name = $("title").text();
|
||||
}
|
||||
// 获取图标URL
|
||||
let iconURL: string | null = null;
|
||||
let icon = $("link[rel='icon']");
|
||||
@ -270,6 +275,9 @@ function analysisHTML(windowName: string, url: string, data: string) {
|
||||
result.status = true;
|
||||
sendUrlInfo(windowName, result);
|
||||
} else {
|
||||
if (result.name && result.name.trim() !== "") {
|
||||
result.status = true;
|
||||
}
|
||||
sendUrlInfo(windowName, result);
|
||||
}
|
||||
}
|
||||
@ -428,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,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重启
|
||||
*/
|
||||
@ -500,6 +494,80 @@ function getWindowInScreen(window: BrowserWindow) {
|
||||
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 {
|
||||
downloadImage,
|
||||
getURLInfo,
|
||||
@ -511,9 +579,13 @@ export {
|
||||
sendToWebContent,
|
||||
closeAllChildProcess,
|
||||
openAfterHideWindow,
|
||||
showErrorMessageBox,
|
||||
relaunch,
|
||||
getUserDataPath,
|
||||
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 mime from "mime";
|
||||
import { ShortcutInfo } from "../../../types/common";
|
||||
@ -8,9 +8,10 @@ import {
|
||||
getURLInfo,
|
||||
sendToWebContent,
|
||||
showErrorMessageBox,
|
||||
showMessageBoxSync,
|
||||
showOpenDialogSync,
|
||||
} from ".";
|
||||
import { statSync } from "node:fs";
|
||||
import { getWindow } from "../commons/index";
|
||||
|
||||
export default function () {
|
||||
// emit
|
||||
@ -23,23 +24,17 @@ export default function () {
|
||||
});
|
||||
// 信息提示框
|
||||
ipcMain.on("showInfoMessageBox", (event, args) => {
|
||||
dialog.showMessageBoxSync(getWindow(args.windowName), {
|
||||
message: args.message,
|
||||
buttons: [global.language.ok],
|
||||
type: "info",
|
||||
noLink: true,
|
||||
});
|
||||
showMessageBoxSync(args.windowName, args.message, "info", [
|
||||
global.language.ok,
|
||||
]);
|
||||
});
|
||||
// 对话框
|
||||
ipcMain.on("showConfirmBox", (event, args) => {
|
||||
// 弹出对话框
|
||||
let res = dialog.showMessageBoxSync(getWindow(args.windowName), {
|
||||
message: args.message,
|
||||
buttons: [global.language.ok, global.language.cancel],
|
||||
type: "question",
|
||||
noLink: true,
|
||||
cancelId: 1,
|
||||
});
|
||||
let res = showMessageBoxSync(args.windowName, args.message, "question", [
|
||||
global.language.ok,
|
||||
global.language.cancel,
|
||||
]);
|
||||
event.returnValue = res === 0;
|
||||
});
|
||||
// 选择文件
|
||||
@ -57,10 +52,7 @@ export default function () {
|
||||
} else {
|
||||
options.defaultPath = app.getPath("desktop");
|
||||
}
|
||||
let filePathList = dialog.showOpenDialogSync(
|
||||
getWindow(windowName),
|
||||
options
|
||||
);
|
||||
let filePathList = showOpenDialogSync(windowName, options);
|
||||
if (filePathList && filePathList.length > 0) {
|
||||
let filePath = filePathList[0];
|
||||
if (target) {
|
||||
@ -94,7 +86,7 @@ export default function () {
|
||||
} else {
|
||||
options.defaultPath = app.getPath("desktop");
|
||||
}
|
||||
let dirPathList = dialog.showOpenDialogSync(getWindow(windowName), options);
|
||||
let dirPathList = showOpenDialogSync(windowName, options);
|
||||
if (dirPathList && dirPathList.length > 0) {
|
||||
let dirPath = dirPathList[0];
|
||||
event.returnValue = dirPath;
|
||||
@ -172,4 +164,24 @@ export default function () {
|
||||
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,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
|
@ -1,6 +1,12 @@
|
||||
import { dialog, ipcMain } from "electron";
|
||||
import { ipcMain } from "electron";
|
||||
import { backupData, createBackupRestoreDataWindow } from ".";
|
||||
import { closeWindow, relaunch, showErrorMessageBox } from "../commons";
|
||||
import {
|
||||
closeWindow,
|
||||
relaunch,
|
||||
showErrorMessageBox,
|
||||
showOpenDialogSync,
|
||||
showSaveDialogSync,
|
||||
} from "../commons";
|
||||
import { restore } from "./data";
|
||||
import { rmSync } from "node:fs";
|
||||
|
||||
@ -22,7 +28,7 @@ export default function () {
|
||||
// 备份数据
|
||||
ipcMain.on("backupData", () => {
|
||||
try {
|
||||
let filePath = dialog.showSaveDialogSync(global.backupRestoreDataWindow, {
|
||||
let filePath = showSaveDialogSync("backupRestoreDataWindow", {
|
||||
defaultPath: "Data",
|
||||
filters: [{ name: "DB", extensions: ["db"] }],
|
||||
});
|
||||
@ -48,12 +54,9 @@ export default function () {
|
||||
// 恢复数据
|
||||
ipcMain.on("restoreData", () => {
|
||||
try {
|
||||
let filePathList = dialog.showOpenDialogSync(
|
||||
global.backupRestoreDataWindow,
|
||||
{
|
||||
filters: [{ name: "Data", extensions: ["db", "json"] }],
|
||||
}
|
||||
);
|
||||
let filePathList = showOpenDialogSync("backupRestoreDataWindow", {
|
||||
filters: [{ name: "Data", extensions: ["db", "json"] }],
|
||||
});
|
||||
if (filePathList && filePathList.length > 0) {
|
||||
let filePath = filePathList[0];
|
||||
if (restore(filePath)) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { app, BrowserWindow, dialog } from "electron";
|
||||
import { release } from "node:os";
|
||||
import { join, dirname, basename } from "node:path";
|
||||
import indexIpcEvent from "./main/ipcEvent";
|
||||
import classificationIpcEvent from "./classification/ipcEvent";
|
||||
@ -9,7 +8,10 @@ import { initSystemItem } from "./item/commons/data";
|
||||
import commonIpcEvent from "./commons/ipcEvent";
|
||||
import itemIpcEvent from "./item/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 searchIpcEvent from "./search/ipcEvent";
|
||||
import { createMainWindow } from "./main";
|
||||
@ -38,8 +40,13 @@ process.env.VITE_PUBLIC = process.env.VITE_DEV_SERVER_URL
|
||||
// 解决透明窗口闪烁
|
||||
app.commandLine.appendSwitch("wm-window-animations-disabled");
|
||||
|
||||
// 解决创建窗口屏幕闪烁问题
|
||||
app.disableHardwareAcceleration();
|
||||
// 初始化设置数据
|
||||
settingDataInit();
|
||||
// 如果主窗口是非透明窗口的话,禁止GPU加速,解决白屏问题。
|
||||
// 如果主窗口是透明窗口的话,将除主窗口外的窗口都改为透明度0.99,解决解决白屏问题。
|
||||
if (global.setting.appearance.transparency === 1) {
|
||||
app.disableHardwareAcceleration();
|
||||
}
|
||||
|
||||
// Set application name for Windows 10+ notifications
|
||||
if (process.platform === "win32") app.setAppUserModelId(app.getName());
|
||||
@ -63,8 +70,18 @@ app.whenReady().then(() => {
|
||||
}
|
||||
// addon
|
||||
global.addon = require("../../native/addon.node");
|
||||
// 初始化数据
|
||||
settingDataInit();
|
||||
if (global.first) {
|
||||
// 首次添加,判断系统语言
|
||||
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);
|
||||
// 禁用debugtron
|
||||
@ -74,7 +91,7 @@ app.whenReady().then(() => {
|
||||
arg.indexOf("--inspect") !== -1 ||
|
||||
arg.indexOf("--remote-debugging-port") !== -1
|
||||
) {
|
||||
dialog.showMessageBoxSync(null, {
|
||||
dialog.showMessageBoxSync({
|
||||
message: "达咩呦达咩达咩~",
|
||||
buttons: [global.language.ok],
|
||||
type: "error",
|
||||
|
@ -323,6 +323,34 @@ 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
|
||||
@ -419,6 +447,7 @@ export {
|
||||
batchAdd,
|
||||
update,
|
||||
del,
|
||||
batchDel,
|
||||
selectById,
|
||||
selectByIdList,
|
||||
deleteByClassificationId,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { BrowserWindow, shell, dialog, app } from "electron";
|
||||
import { join } from "node:path";
|
||||
import { parsePath, getURLParams } from "../../commons/utils";
|
||||
import { BrowserWindow, shell, app } from "electron";
|
||||
import { extname, join } from "node:path";
|
||||
import { parsePath, getURLParams, getFileIcon } from "../../commons/utils";
|
||||
import { Item } from "../../../types/item";
|
||||
import {
|
||||
batchAdd,
|
||||
@ -15,8 +15,10 @@ import { writeFile, statSync, readFileSync, accessSync } from "node:fs";
|
||||
import mime from "mime";
|
||||
import {
|
||||
deleteExtname,
|
||||
getFileName,
|
||||
getItemName,
|
||||
isAbsolutePath,
|
||||
newItem,
|
||||
} from "../../../commons/utils/common";
|
||||
import { iconExts } from "../../commons/utils";
|
||||
import { addAssociateFolderWatcher } from "../classification";
|
||||
@ -25,8 +27,11 @@ import {
|
||||
convertPath,
|
||||
getMainBackgorunColor,
|
||||
sendToWebContent,
|
||||
showMessageBoxSync,
|
||||
showSaveDialogSync,
|
||||
} from "../commons/index";
|
||||
import { fork } from "../../commons/utilityProcessUtils";
|
||||
import { ShortcutInfo } from "../../../types/common";
|
||||
|
||||
// 窗口
|
||||
let itemAddEditWindow: BrowserWindow | null = null;
|
||||
@ -57,7 +62,11 @@ async function createAddEditWindow(
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -117,7 +126,11 @@ async function createNetworkIconWindow() {
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -168,7 +181,11 @@ async function createSVGIconWindow() {
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -246,24 +263,17 @@ function move(idList: Array<number>, toClassificationId: number) {
|
||||
* @param classificationId
|
||||
* @param pathList
|
||||
*/
|
||||
function drop(classificationId: number, pathList: Array<string>) {
|
||||
fork(
|
||||
"getDropItemInfo",
|
||||
{
|
||||
classificationId,
|
||||
pathList,
|
||||
},
|
||||
(resultList: Array<Item>) => {
|
||||
// 添加项目
|
||||
let itemList = batchAdd(classificationId, resultList);
|
||||
// 发送消息到页面
|
||||
sendToWebContent("mainWindow", "onAddItem", {
|
||||
itemList,
|
||||
clear: false,
|
||||
classificationId: null,
|
||||
});
|
||||
}
|
||||
);
|
||||
async function drop(classificationId: number, pathList: Array<string>) {
|
||||
// 获取项目信息
|
||||
let resultList = await getDropItemInfo(classificationId, pathList);
|
||||
// 添加项目
|
||||
let itemList = batchAdd(classificationId, resultList);
|
||||
// 发送消息到页面
|
||||
sendToWebContent("mainWindow", "onAddItem", {
|
||||
itemList,
|
||||
clear: false,
|
||||
classificationId: null,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -309,10 +319,15 @@ function updateOpenInfo(type: string, id: number) {
|
||||
*/
|
||||
function run(
|
||||
type: string,
|
||||
operation: "open" | "runas" | "openFileLocation",
|
||||
operation: "open" | "runas" | "openFileLocation" | "explore",
|
||||
item: Item
|
||||
) {
|
||||
if (item.data) {
|
||||
if (operation === "open" && item.data.runAsAdmin) {
|
||||
operation = "runas";
|
||||
} else if (operation === "open" && item.type === 1) {
|
||||
operation = "explore";
|
||||
}
|
||||
// 更新打开信息
|
||||
updateOpenInfo(type, item.id);
|
||||
// 判断类型
|
||||
@ -352,13 +367,9 @@ function run(
|
||||
message = global.language.notFoundFolder;
|
||||
}
|
||||
message += '"' + item.data.target + '"';
|
||||
dialog.showMessageBox(global.mainWindow, {
|
||||
title: "Dawn Launcher",
|
||||
message: message,
|
||||
buttons: [global.language.ok],
|
||||
type: "error",
|
||||
noLink: true,
|
||||
});
|
||||
showMessageBoxSync("mainWindow", message, "error", [
|
||||
global.language.ok,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -429,7 +440,7 @@ function exportIcon(item: Item) {
|
||||
}
|
||||
// 弹出文件对话框保存
|
||||
if (extensionName && content) {
|
||||
let path = dialog.showSaveDialogSync(global.mainWindow, {
|
||||
let path = showSaveDialogSync("mainWindow", {
|
||||
defaultPath: "icon",
|
||||
filters: [
|
||||
{
|
||||
@ -693,6 +704,90 @@ function deleteQuickSearchHistory(itemId: number) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过路径获取项目信息
|
||||
* @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 {
|
||||
createAddEditWindow,
|
||||
createNetworkIconWindow,
|
||||
|
@ -1,7 +1,6 @@
|
||||
import {
|
||||
Menu,
|
||||
MenuItem,
|
||||
dialog,
|
||||
ipcMain,
|
||||
clipboard,
|
||||
MenuItemConstructorOptions,
|
||||
@ -29,7 +28,15 @@ import {
|
||||
getStartMenuItemList,
|
||||
getSystemItemList,
|
||||
} 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 { getFileExtname, isAbsolutePath } from "../../../commons/utils/common";
|
||||
import {
|
||||
@ -51,6 +58,7 @@ import {
|
||||
closeWindow,
|
||||
openAfterHideWindow,
|
||||
sendToWebContent,
|
||||
showMessageBoxSync,
|
||||
} from "../commons/index";
|
||||
|
||||
/**
|
||||
@ -179,6 +187,13 @@ export default function () {
|
||||
// 组装菜单
|
||||
if (!batchOperation) {
|
||||
if (item) {
|
||||
// 查询页面分类信息
|
||||
let pageClassification = selectClassificationById(
|
||||
args.pageClassificationId
|
||||
);
|
||||
if (!pageClassification && type === "main") {
|
||||
return;
|
||||
}
|
||||
// 后缀
|
||||
let ext: string | null = null;
|
||||
// 排除
|
||||
@ -188,8 +203,9 @@ export default function () {
|
||||
// "打开"菜单
|
||||
let openMenu = false;
|
||||
if (
|
||||
(item.type === 0 && ext && (ext === "exe" || ext === "bat")) ||
|
||||
item.type === 4
|
||||
item.type === 0 ||
|
||||
item.type === 4 ||
|
||||
(item.type === 3 && item.data.target === "cmd.exe")
|
||||
) {
|
||||
menuList.push(
|
||||
new MenuItem({
|
||||
@ -306,7 +322,8 @@ export default function () {
|
||||
if (
|
||||
type === "main" &&
|
||||
(item.type === 0 || item.type === 1) &&
|
||||
classification.type === 0
|
||||
classification.type === 0 &&
|
||||
pageClassification.type === 0
|
||||
) {
|
||||
menuList.push(
|
||||
new MenuItem({
|
||||
@ -337,7 +354,11 @@ export default function () {
|
||||
if (pathMenu) {
|
||||
menuList.push(new MenuItem({ type: "separator" }));
|
||||
}
|
||||
if (type === "main") {
|
||||
if (
|
||||
type === "main" &&
|
||||
classification.type === 0 &&
|
||||
pageClassification.type === 0
|
||||
) {
|
||||
// "图标"菜单
|
||||
let existPasteIcon = false;
|
||||
// 获取剪切板图片文件
|
||||
@ -373,7 +394,9 @@ export default function () {
|
||||
if (
|
||||
type === "main" &&
|
||||
(item.type === 0 || item.type === 1) &&
|
||||
!item.data.fixedIcon
|
||||
!item.data.fixedIcon &&
|
||||
classification.type === 0 &&
|
||||
pageClassification.type === 0
|
||||
) {
|
||||
menuList.push(
|
||||
new MenuItem({
|
||||
@ -384,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({
|
||||
@ -411,13 +438,12 @@ export default function () {
|
||||
new MenuItem({
|
||||
label: global.language.delete,
|
||||
click: () => {
|
||||
let res = dialog.showMessageBoxSync(global.mainWindow, {
|
||||
message: global.language.deleteItemPrompt,
|
||||
buttons: [global.language.ok, global.language.cancel],
|
||||
type: "question",
|
||||
noLink: true,
|
||||
cancelId: 1,
|
||||
});
|
||||
let res = showMessageBoxSync(
|
||||
"mainWindow",
|
||||
global.language.deleteItemPrompt,
|
||||
"question",
|
||||
[global.language.ok, global.language.cancel]
|
||||
);
|
||||
if (res === 0) {
|
||||
// 删除数据
|
||||
del(item.id);
|
||||
@ -553,20 +579,17 @@ export default function () {
|
||||
new MenuItem({
|
||||
label: global.language.batchDelete,
|
||||
click: () => {
|
||||
let res = dialog.showMessageBoxSync(global.mainWindow, {
|
||||
message: global.language.batchDeletePrompt,
|
||||
buttons: [global.language.ok, global.language.cancel],
|
||||
type: "question",
|
||||
noLink: true,
|
||||
cancelId: 1,
|
||||
});
|
||||
let res = showMessageBoxSync(
|
||||
"mainWindow",
|
||||
global.language.batchDeletePrompt,
|
||||
"question",
|
||||
[global.language.ok, global.language.cancel]
|
||||
);
|
||||
if (res === 0) {
|
||||
for (const id of batchSelectedIdList) {
|
||||
// 删除数据
|
||||
del(id);
|
||||
// 快捷键
|
||||
setShortcutKey();
|
||||
}
|
||||
// 批量删除
|
||||
batchDel(batchSelectedIdList);
|
||||
// 快捷键
|
||||
setShortcutKey();
|
||||
// 通知前端删除数据
|
||||
sendToWebContent(
|
||||
"mainWindow",
|
||||
|
@ -13,6 +13,7 @@ import cacheData from "../commons/cacheData";
|
||||
import {
|
||||
getMainBackgorunColor,
|
||||
getWindowInScreen,
|
||||
mainWindowExist,
|
||||
sendToWebContent,
|
||||
} from "../commons";
|
||||
import { release } from "node:os";
|
||||
@ -65,11 +66,6 @@ function createMainWindow() {
|
||||
global.addon.removeWindowAnimation(
|
||||
mainWindow.getNativeWindowHandle().readInt32LE(0)
|
||||
);
|
||||
// 恢复上一次的位置
|
||||
let bounds = cacheData.cacheStore.get("mainWindowBounds");
|
||||
if (bounds) {
|
||||
mainWindow.setBounds(bounds);
|
||||
}
|
||||
// 永远居中不可移动
|
||||
if (global.setting.general.alwaysCenter) {
|
||||
mainWindow.setMovable(false);
|
||||
@ -80,8 +76,39 @@ function createMainWindow() {
|
||||
if (global.setting.general.alwaysTop) {
|
||||
mainWindow.setAlwaysOnTop(true, "screen-saver");
|
||||
}
|
||||
// 恢复上一次的位置
|
||||
let bounds: any = cacheData.cacheStore.get("mainWindowBounds");
|
||||
// 锁定尺寸
|
||||
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);
|
||||
// 永远居中
|
||||
@ -121,7 +148,10 @@ function createMainWindow() {
|
||||
!global.setting.general.alwaysTop
|
||||
) {
|
||||
// 如果当前还有打开的子窗口就不执行失去焦点隐藏
|
||||
if (mainWindow.getChildWindows().length === 0) {
|
||||
if (
|
||||
mainWindow.getChildWindows().length === 0 &&
|
||||
!global.mainWindowShowDialog
|
||||
) {
|
||||
hideMainWindow();
|
||||
}
|
||||
}
|
||||
@ -151,6 +181,10 @@ function createMainWindow() {
|
||||
sendToWebContent("mainWindow", "onCollapseSubClassification", {});
|
||||
}
|
||||
});
|
||||
// 主窗口关闭事件
|
||||
mainWindow.on("closed", () => {
|
||||
app.quit();
|
||||
});
|
||||
// 创建鼠标hook
|
||||
let mousedownClassName = null;
|
||||
addon.createMouseHook((...args: any[]) => {
|
||||
@ -184,6 +218,8 @@ function createMainWindow() {
|
||||
// 中间单击
|
||||
showHideMouseWheelClick();
|
||||
}
|
||||
// 失去焦点隐藏
|
||||
onBlurHide();
|
||||
}
|
||||
});
|
||||
// 禁用标题栏右键
|
||||
@ -198,6 +234,50 @@ 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
|
||||
@ -223,6 +303,9 @@ function showMainWindowBefore(
|
||||
* @param autoHide
|
||||
*/
|
||||
function showMainWindow(blurHide: boolean, autoHide = false) {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
// flag
|
||||
let flag = true;
|
||||
// 是否开启勿扰模式
|
||||
@ -237,12 +320,12 @@ function showMainWindow(blurHide: boolean, autoHide = false) {
|
||||
}
|
||||
if (flag) {
|
||||
if (!global.setting.general.alwaysTop) {
|
||||
mainWindow.setAlwaysOnTop(true, "screen-saver");
|
||||
global.mainWindow.setAlwaysOnTop(true, "screen-saver");
|
||||
}
|
||||
global.mainWindow.show();
|
||||
global.mainWindow.focus();
|
||||
if (!global.setting.general.alwaysTop) {
|
||||
mainWindow.setAlwaysOnTop(false);
|
||||
global.mainWindow.setAlwaysOnTop(false);
|
||||
}
|
||||
global.blurHide = blurHide;
|
||||
}
|
||||
@ -252,7 +335,7 @@ function showMainWindow(blurHide: boolean, autoHide = false) {
|
||||
* 隐藏窗口
|
||||
*/
|
||||
function hideMainWindow() {
|
||||
if (global.mainWindow.isVisible()) {
|
||||
if (mainWindowExist() && global.mainWindow.isVisible()) {
|
||||
global.mainWindow.hide();
|
||||
global.blurHide = false;
|
||||
}
|
||||
@ -313,10 +396,13 @@ function createTray(show: boolean) {
|
||||
* @returns
|
||||
*/
|
||||
function edgeAdsorb(display: Display | null, workArea = false) {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
// 如果勾选停靠在桌面边缘时自动隐藏,放行
|
||||
if (
|
||||
global.mainWindow.isDestroyed() ||
|
||||
(!global.setting.general.edgeAdsorb && !global.setting.general.edgeAutoHide)
|
||||
!global.setting.general.edgeAdsorb &&
|
||||
!global.setting.general.edgeAutoHide
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@ -324,7 +410,7 @@ function edgeAdsorb(display: Display | null, workArea = false) {
|
||||
// 清空方向
|
||||
global.mainWindowDirection = null;
|
||||
// 屏幕
|
||||
let displays = display ? [display] : getWindowInScreen(mainWindow);
|
||||
let displays = display ? [display] : getWindowInScreen(global.mainWindow);
|
||||
if (displays.length > 1 || displays.length === 0) {
|
||||
return;
|
||||
}
|
||||
@ -413,6 +499,9 @@ function edgeAdsorb(display: Display | null, workArea = false) {
|
||||
* 显示时跟随鼠标位置
|
||||
*/
|
||||
function showFollowMousePosition() {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
// 当永远居中、固定位置勾选后不能使用显示时跟随鼠标位置
|
||||
if (
|
||||
!global.setting.general.alwaysCenter &&
|
||||
@ -443,6 +532,9 @@ function showFollowMousePosition() {
|
||||
* 中间单击显示/隐藏窗口
|
||||
*/
|
||||
function showHideMouseWheelClick() {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
if (global.setting.general.showHideMouseWheelClick) {
|
||||
if (global.mainWindow.isVisible()) {
|
||||
hideMainWindow();
|
||||
@ -456,8 +548,11 @@ function showHideMouseWheelClick() {
|
||||
* 永远居中
|
||||
*/
|
||||
function alwaysCenter() {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
if (global.setting.general.alwaysCenter) {
|
||||
mainWindow.center();
|
||||
global.mainWindow.center();
|
||||
}
|
||||
}
|
||||
|
||||
@ -468,26 +563,32 @@ function alwaysCenter() {
|
||||
* @returns
|
||||
*/
|
||||
function autoHide(size: number, timer: boolean) {
|
||||
if (global.mainWindow.isDestroyed() || !global.setting.general.edgeAutoHide) {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
if (!global.setting.general.edgeAutoHide) {
|
||||
return;
|
||||
}
|
||||
// 当有子窗口时不自动隐藏
|
||||
if (mainWindow.getChildWindows().length > 0) {
|
||||
if (
|
||||
global.mainWindow.getChildWindows().length > 0 ||
|
||||
global.mainWindowShowDialog
|
||||
) {
|
||||
return;
|
||||
}
|
||||
let x = screen.getCursorScreenPoint().x;
|
||||
let y = screen.getCursorScreenPoint().y;
|
||||
try {
|
||||
// 屏幕
|
||||
let displays = getWindowInScreen(mainWindow);
|
||||
let displays = getWindowInScreen(global.mainWindow);
|
||||
if (displays.length > 1 || displays.length === 0) {
|
||||
return;
|
||||
}
|
||||
// 屏幕区域
|
||||
let displayBounds = displays[0].bounds;
|
||||
// 窗口位置信息
|
||||
let bounds = mainWindow.getBounds();
|
||||
if (mainWindow.isVisible()) {
|
||||
let bounds = global.mainWindow.getBounds();
|
||||
if (global.mainWindow.isVisible()) {
|
||||
let flag = false;
|
||||
if (bounds.x === displayBounds.x && bounds.y === displayBounds.y) {
|
||||
// 左上角
|
||||
@ -662,12 +763,15 @@ function doubleClickTaskbar(
|
||||
mousedownClassName: string | null,
|
||||
className: string | null
|
||||
) {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
// 必须开启设置
|
||||
if (!global.setting.general.showHideDoubleClickTaskbar) {
|
||||
return;
|
||||
}
|
||||
// 获取屏幕
|
||||
let displays = getWindowInScreen(mainWindow);
|
||||
let displays = getWindowInScreen(global.mainWindow);
|
||||
if (
|
||||
displays.length > 1 ||
|
||||
displays.length === 0 ||
|
||||
@ -703,7 +807,7 @@ function doubleClickTaskbar(
|
||||
// 清空计数
|
||||
global.doubleClickTaskbarCounter = 0;
|
||||
// 显示或隐藏
|
||||
if (mainWindow.isVisible()) {
|
||||
if (global.mainWindow.isVisible()) {
|
||||
hideMainWindow();
|
||||
} else {
|
||||
showMainWindowBefore(false);
|
||||
|
@ -1,6 +1,10 @@
|
||||
import { BrowserWindow, shell, screen } from "electron";
|
||||
import { join } from "node:path";
|
||||
import { getWindowInScreen, sendToWebContent } from "../commons";
|
||||
import {
|
||||
getMainBackgorunColor,
|
||||
getWindowInScreen,
|
||||
sendToWebContent,
|
||||
} from "../commons";
|
||||
import cacheData from "../commons/cacheData";
|
||||
|
||||
// 窗口
|
||||
@ -24,7 +28,11 @@ function createQuickSearchWindow() {
|
||||
fullscreenable: false,
|
||||
resizable: false,
|
||||
alwaysOnTop: true,
|
||||
backgroundColor: global.setting.appearance.theme.mainBackgroundColor,
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
backgroundThrottling: false,
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Setting } from "../../../types/setting";
|
||||
import { getSetting } from "../../../commons/utils/setting";
|
||||
import { getDataSqlite3 } from "../../commons/betterSqlite3";
|
||||
import { app } from "electron";
|
||||
|
||||
// 获取数据库
|
||||
let db = getDataSqlite3();
|
||||
@ -58,6 +59,8 @@ function add(setting: Setting) {
|
||||
let id = db.prepare(sql).run(1, JSON.stringify(setting)).lastInsertRowid;
|
||||
if (id) {
|
||||
global.setting = setting;
|
||||
// 添加设置被视为首次打开软件
|
||||
global.first = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -5,7 +5,11 @@ import { hideMainWindow, showMainWindowBefore } from "../main/index";
|
||||
import { list as selectClassificationList } from "../classification/data";
|
||||
import { list as selectItemList } from "../item/data";
|
||||
import { run } from "../item";
|
||||
import { closeWindow, getMainBackgorunColor } from "../commons/index";
|
||||
import {
|
||||
closeWindow,
|
||||
getMainBackgorunColor,
|
||||
mainWindowExist,
|
||||
} from "../commons/index";
|
||||
import {
|
||||
createQuickSearchWindow,
|
||||
hideQuickSearchWindow,
|
||||
@ -34,7 +38,11 @@ function createSettingWindow() {
|
||||
fullscreenable: false,
|
||||
skipTaskbar: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -79,10 +87,12 @@ function setShortcutKey(setting: Setting = global.setting) {
|
||||
globalShortcut.register(
|
||||
setting.general.showHideShortcutKey.replace("Win", "Super"),
|
||||
() => {
|
||||
if (global.mainWindow.isVisible()) {
|
||||
hideMainWindow();
|
||||
} else {
|
||||
showMainWindowBefore(true);
|
||||
if (mainWindowExist()) {
|
||||
if (global.mainWindow.isVisible()) {
|
||||
hideMainWindow();
|
||||
} else {
|
||||
showMainWindowBefore(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -100,8 +110,10 @@ function setShortcutKey(setting: Setting = global.setting) {
|
||||
globalShortcut.register(
|
||||
classification.shortcutKey.replace("Win", "Super"),
|
||||
() => {
|
||||
// 分类
|
||||
showMainWindowBefore(true, false, classification.id);
|
||||
if (mainWindowExist()) {
|
||||
// 分类
|
||||
showMainWindowBefore(true, false, classification.id);
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (e) {
|
||||
@ -119,17 +131,19 @@ function setShortcutKey(setting: Setting = global.setting) {
|
||||
globalShortcut.register(
|
||||
item.shortcutKey.replace("Win", "Super"),
|
||||
() => {
|
||||
// flag
|
||||
let flag = true;
|
||||
// 是否开启勿扰模式
|
||||
if (global.setting.general.notDisturb) {
|
||||
if (global.addon.isFullscreen()) {
|
||||
flag = false;
|
||||
if (mainWindowExist()) {
|
||||
// flag
|
||||
let flag = true;
|
||||
// 是否开启勿扰模式
|
||||
if (global.setting.general.notDisturb) {
|
||||
if (global.addon.isFullscreen()) {
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
// 项目
|
||||
run("main", "open", item);
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
// 项目
|
||||
run("main", "open", item);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { app, dialog, ipcMain } from "electron";
|
||||
import { app, ipcMain } from "electron";
|
||||
import {
|
||||
closeWindow,
|
||||
getUserDataPath,
|
||||
relaunch,
|
||||
sendToWebContent,
|
||||
showOpenDialogSync,
|
||||
} from "../commons/index";
|
||||
import { createSettingWindow, setFixedPosition, setShortcutKey } from ".";
|
||||
import { add, select, update } from "./data";
|
||||
@ -15,6 +16,7 @@ import { statSync, mkdirSync, copyFileSync, readFileSync } from "node:fs";
|
||||
import mime from "mime";
|
||||
import { checkInvalid } from "../item";
|
||||
import { updateItemOpenNumberSortToDefualt } from "../classification";
|
||||
import cacheData from "../commons/cacheData";
|
||||
|
||||
export default function () {
|
||||
// 创建设置窗口
|
||||
@ -90,6 +92,13 @@ export default function () {
|
||||
// 锁定尺寸
|
||||
ipcMain.on("setLockSize", (event, args) => {
|
||||
global.mainWindow.setResizable(!args);
|
||||
if (args) {
|
||||
// 存储主窗口尺寸
|
||||
cacheData.cacheStore.set(
|
||||
"mainWindowLockSizeBounds",
|
||||
global.mainWindow.getBounds()
|
||||
);
|
||||
}
|
||||
});
|
||||
// 固定位置
|
||||
ipcMain.on("setFixedPosition", (event, args) => {
|
||||
@ -114,7 +123,7 @@ export default function () {
|
||||
// 上传背景图
|
||||
ipcMain.on("uploadBackgrounImage", (event, args) => {
|
||||
// 打开文件对话框
|
||||
let filePathList = dialog.showOpenDialogSync(global.settingWindow, {
|
||||
let filePathList = showOpenDialogSync("settingWindow", {
|
||||
filters: [
|
||||
{
|
||||
name: "Images",
|
||||
|
@ -5,7 +5,7 @@ import {
|
||||
newItem,
|
||||
} from "../../commons/utils/common";
|
||||
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 xml2js from "xml2js";
|
||||
import { newCommonItem, newCommonItemData } from "../../commons/utils/common";
|
||||
@ -43,11 +43,6 @@ process.parentPort.once("message", async (event) => {
|
||||
res = await getStartMenuItemList(dataParam);
|
||||
} else if (params.name === "getAppxItemList") {
|
||||
res = await getAppxItemList();
|
||||
} else if (params.name === "getDropItemInfo") {
|
||||
res = await getDropItemInfo(
|
||||
dataParam.classificationId,
|
||||
dataParam.pathList
|
||||
);
|
||||
} else if (params.name === "refreshItemIcon") {
|
||||
res = await refreshItemIcon(dataParam);
|
||||
} else if (params.name === "getDirectoryItemList") {
|
||||
@ -558,90 +553,6 @@ function getPropertiesIcon(installLocation: string, result: any) {
|
||||
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 = 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新项目图标
|
||||
* @param itemList
|
||||
|
@ -114,6 +114,10 @@ contextBridge.exposeInMainWorld("api", {
|
||||
) => {
|
||||
ipcRenderer.send("run", { operation, target, params, startLocation });
|
||||
},
|
||||
// 文本框菜单
|
||||
textRightMenu: () => {
|
||||
ipcRenderer.send("textRightMenu");
|
||||
},
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld("main", {
|
||||
|
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 {
|
||||
// addon
|
||||
var addon: any;
|
||||
// 是否是首次打开软件
|
||||
var first: boolean;
|
||||
// 语言
|
||||
var language: any;
|
||||
// 主窗口
|
||||
@ -57,6 +59,8 @@ declare global {
|
||||
var classificationRightMenu: boolean | null;
|
||||
// 项目右键菜单显示
|
||||
var itemRightMenu: boolean | null;
|
||||
// 存储主窗口当前是否有弹出对话框
|
||||
var mainWindowShowDialog: boolean;
|
||||
}
|
||||
|
||||
export interface ChildProcessInfo {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "dawn-launcher",
|
||||
"productName": "Dawn Launcher",
|
||||
"version": "1.4.4",
|
||||
"version": "1.5.1",
|
||||
"main": "dist-electron/main/index.js",
|
||||
"description": "Windows 快捷启动工具,帮助您整理杂乱无章的桌面,分门别类管理您的桌面快捷方式,让您的桌面保持干净整洁。",
|
||||
"author": "FanChenIO",
|
||||
|
@ -15,7 +15,7 @@ use std::{
|
||||
sync::atomic::{AtomicBool, Ordering},
|
||||
};
|
||||
use windows::{
|
||||
core::{ComInterface, HSTRING, PCSTR, PCWSTR},
|
||||
core::{ComInterface, HSTRING, PCSTR, PCWSTR, PSTR},
|
||||
w,
|
||||
Win32::{
|
||||
Foundation::{HWND, LPARAM, LRESULT, MAX_PATH, POINT, RECT, SIZE, WPARAM},
|
||||
@ -721,6 +721,8 @@ pub fn shell_execute(
|
||||
start_location: Option<String>,
|
||||
) {
|
||||
thread::spawn(move || {
|
||||
// 是否是打开文件夹
|
||||
let is_dir = operation == "explore";
|
||||
// dir
|
||||
let dir = start_location.unwrap_or_else(|| {
|
||||
// 判断是否是文件夹
|
||||
@ -733,6 +735,10 @@ pub fn shell_execute(
|
||||
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());
|
||||
@ -744,8 +750,18 @@ pub fn shell_execute(
|
||||
let params = PCWSTR(params.as_ptr());
|
||||
let dir = PCWSTR(dir.as_ptr());
|
||||
unsafe {
|
||||
// execute
|
||||
ShellExecuteW(None, operation, file, params, dir, SW_SHOWDEFAULT);
|
||||
if is_dir {
|
||||
ShellExecuteW(
|
||||
None,
|
||||
w!("open"),
|
||||
w!("explorer.exe"),
|
||||
dir_param,
|
||||
None,
|
||||
SW_SHOWDEFAULT,
|
||||
);
|
||||
} else {
|
||||
ShellExecuteW(None, operation, file, params, dir, SW_SHOWDEFAULT);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
22
src/App.vue
22
src/App.vue
@ -305,6 +305,24 @@ function keydown(e: any) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 监听鼠标右键
|
||||
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;
|
||||
// mounted
|
||||
@ -313,6 +331,8 @@ onMounted(() => {
|
||||
createStyle();
|
||||
// 监听键盘
|
||||
window.addEventListener("keydown", keydown, true);
|
||||
// 监听右键
|
||||
window.addEventListener("contextmenu", contextmenu, true);
|
||||
// 监听更新项目
|
||||
onUpdateSettingUnListen = window.setting.onUpdate((data) => {
|
||||
store.setting = data;
|
||||
@ -322,6 +342,8 @@ onMounted(() => {
|
||||
onUnmounted(() => {
|
||||
// 监听键盘
|
||||
window.removeEventListener("keydown", keydown, true);
|
||||
// 监听右键
|
||||
window.removeEventListener("contextmenu", contextmenu, true);
|
||||
// 删除监听
|
||||
if (onUpdateSettingUnListen) {
|
||||
onUpdateSettingUnListen();
|
||||
|
1
src/index.d.ts
vendored
1
src/index.d.ts
vendored
@ -37,6 +37,7 @@ declare global {
|
||||
params: string | null,
|
||||
startLocation: string | null
|
||||
) => void;
|
||||
textRightMenu: () => void;
|
||||
};
|
||||
main: {
|
||||
showWindow: (blurHide: boolean, autoHide: boolean) => void;
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
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">
|
||||
@ -29,7 +34,7 @@
|
||||
/>
|
||||
<p class="mt-4">Dawn Launcher {{ version }}</p>
|
||||
<p class="mt-2">
|
||||
Copyright © 2022-2024 Dawn Launcher. All Rights Reserved
|
||||
Copyright © 2022-2025 Dawn Launcher. All Rights Reserved
|
||||
</p>
|
||||
<p class="mt-2">
|
||||
{{ store.language.officialWebsite }}{{ store.language.colon
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
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">
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
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">
|
||||
@ -131,7 +136,7 @@ let sortOptions = ref([
|
||||
value: "initial",
|
||||
},
|
||||
{
|
||||
label: store.language.byOpenNumber,
|
||||
label: store.language.byOpenCount,
|
||||
value: "openNumber",
|
||||
},
|
||||
{
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
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">
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
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">
|
||||
|
@ -78,7 +78,7 @@
|
||||
@dragleave="clearMouseOverChangeClassificationSetTimeout"
|
||||
>
|
||||
<span
|
||||
class="overflow-hidden text-ellipsis whitespace-nowrap"
|
||||
class="overflow-hidden whitespace-nowrap"
|
||||
:style="{
|
||||
filter: store.setting.appearance.fontShadow
|
||||
? 'drop-shadow(1px 1px 1px ' +
|
||||
@ -224,7 +224,7 @@
|
||||
@dragleave="clearMouseOverChangeClassificationSetTimeout"
|
||||
>
|
||||
<span
|
||||
class="overflow-hidden text-ellipsis whitespace-nowrap"
|
||||
class="overflow-hidden whitespace-nowrap"
|
||||
:style="{
|
||||
filter: store.setting.appearance.fontShadow
|
||||
? 'drop-shadow(1px 1px 1px ' +
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
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">
|
||||
|
@ -523,6 +523,8 @@ onMounted(() => {
|
||||
// 监听显示窗口之前
|
||||
listens.push(
|
||||
window.main.onShowWindowBefore((data) => {
|
||||
// 隐藏搜索
|
||||
store.search = false;
|
||||
if (classificationContentRef.value) {
|
||||
// 如果分类ID不为空的话选择分类ID
|
||||
let selectedClassificationId: number | null =
|
||||
|
@ -5,6 +5,11 @@
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
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">
|
||||
@ -324,9 +329,7 @@
|
||||
v-if="
|
||||
selectedMenuId === 0 &&
|
||||
form.data.target &&
|
||||
form.data.target.trim() !== '' &&
|
||||
(getFileExtname(form.data.target) === 'exe' ||
|
||||
getFileExtname(form.data.target) === 'bat')
|
||||
form.data.target.trim() !== ''
|
||||
"
|
||||
v-model:checked="form.data.runAsAdmin"
|
||||
:focusable="false"
|
||||
@ -454,7 +457,6 @@ import {
|
||||
isAbsolutePath,
|
||||
deleteExtname,
|
||||
getFileName,
|
||||
getFileExtname,
|
||||
} from "../../../commons/utils/common";
|
||||
import SystemItemList from "./components/SystemItemList.vue";
|
||||
import StartMenuItemList from "./components/StartMenuItemList.vue";
|
||||
@ -651,12 +653,6 @@ async function confirm() {
|
||||
if (!success) {
|
||||
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) {
|
||||
// 添加
|
||||
await addItem();
|
||||
@ -833,8 +829,10 @@ onMounted(() => {
|
||||
getURLInfoLoading.value = false;
|
||||
let res: Result = data;
|
||||
if (res.status) {
|
||||
form.data.icon = res.icon;
|
||||
form.data.htmlIcon = null;
|
||||
if (res.icon && res.icon.trim() !== "") {
|
||||
form.data.icon = res.icon;
|
||||
form.data.htmlIcon = null;
|
||||
}
|
||||
form.name = res.name ?? "";
|
||||
} else {
|
||||
window.api.showErrorMessageBox(
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
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">
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
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">
|
||||
|
@ -130,6 +130,7 @@ import {
|
||||
setItemWidth,
|
||||
run,
|
||||
removeInvalidItem,
|
||||
showItemList,
|
||||
} from "../js";
|
||||
import ItemList from "./List.vue";
|
||||
import { Item } from "../../../../types/item";
|
||||
@ -315,12 +316,21 @@ function createItemSortable() {
|
||||
let fromClassificationId = parseInt(
|
||||
event.from.getAttribute("classification-id")!
|
||||
);
|
||||
// 当前项目
|
||||
const currentItem =
|
||||
getItemListByClassificationId(fromClassificationId)[
|
||||
event.oldIndex
|
||||
];
|
||||
fromIdList.push(currentItem.id);
|
||||
let fromClassification =
|
||||
getClassificationById(fromClassificationId);
|
||||
if (fromClassification) {
|
||||
let itemList =
|
||||
getItemListByClassificationId(fromClassificationId);
|
||||
if (itemList) {
|
||||
let copyItemList = JSON.parse(JSON.stringify(itemList));
|
||||
// 可能会存在自定义排序的情况,所以需要按照指定的排序方式获取项目
|
||||
const currentItem = showItemList(
|
||||
copyItemList,
|
||||
fromClassification
|
||||
)[event.oldIndex];
|
||||
fromIdList.push(currentItem.id);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 批量操作
|
||||
for (const value of store.itemBatchOperationDataArray) {
|
||||
@ -623,6 +633,14 @@ async function contextmenu(e: any) {
|
||||
// 记录右键选中的ID
|
||||
store.itemRightMenuItemId = id;
|
||||
}
|
||||
// 获取当前项目在页面的所属分类
|
||||
let pageClassificationId = null;
|
||||
let itemListElement = getClassElement(e, "item-list");
|
||||
if (itemListElement) {
|
||||
pageClassificationId = parseInt(
|
||||
itemListElement.getAttribute("classification-id")
|
||||
);
|
||||
}
|
||||
// 弹出菜单
|
||||
window.item.showRightMenu({
|
||||
classificationId: getSelectedClassificationId(),
|
||||
@ -633,6 +651,7 @@ async function contextmenu(e: any) {
|
||||
x: e.screenX,
|
||||
y: e.screenY,
|
||||
type: "main",
|
||||
pageClassificationId,
|
||||
});
|
||||
}
|
||||
// beforeMount
|
||||
|
@ -240,9 +240,9 @@ function runItem(e: any, dbclick: boolean) {
|
||||
let item = getItemById(itemId);
|
||||
if (item && item.data) {
|
||||
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) {
|
||||
run("main", item.data.runAsAdmin ? "runas" : "open", item);
|
||||
run("main", "open", item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -751,13 +751,13 @@ function getItemTitle(item: Item, quickSearch: boolean = false) {
|
||||
) {
|
||||
name +=
|
||||
"\n" +
|
||||
store.language.openNumber +
|
||||
store.language.openCount +
|
||||
store.language.colon +
|
||||
(item.data.quickSearchOpenNumber ?? 0);
|
||||
} else if (store.setting.item.openNumber) {
|
||||
name +=
|
||||
"\n" +
|
||||
store.language.openNumber +
|
||||
store.language.openCount +
|
||||
store.language.colon +
|
||||
(item.data.openNumber ?? 0);
|
||||
}
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '8px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
<div
|
||||
|
@ -5,6 +5,11 @@
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
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">
|
||||
@ -401,7 +406,15 @@
|
||||
<span class="block font-semibold">{{
|
||||
store.language.color
|
||||
}}</span>
|
||||
<div class="flex items-center">
|
||||
<div
|
||||
:class="[
|
||||
`${
|
||||
store.setting.general.language !== 'English'
|
||||
? 'flex items-center'
|
||||
: ''
|
||||
}`,
|
||||
]"
|
||||
>
|
||||
<NFormItem
|
||||
class="mt-1 flex-1"
|
||||
:label="store.language.mainColor"
|
||||
@ -415,8 +428,15 @@
|
||||
></NColorPicker>
|
||||
</NFormItem>
|
||||
<NFormItem
|
||||
class="mt-1 flex-1 ml-[10px]"
|
||||
class="mt-1 flex-1"
|
||||
:label="store.language.fontMainColor"
|
||||
:class="[
|
||||
`${
|
||||
store.setting.general.language !== 'English'
|
||||
? 'ml-[10px]'
|
||||
: ''
|
||||
}`,
|
||||
]"
|
||||
>
|
||||
<NColorPicker
|
||||
:modes="['hex']"
|
||||
@ -427,7 +447,15 @@
|
||||
></NColorPicker>
|
||||
</NFormItem>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<div
|
||||
:class="[
|
||||
`${
|
||||
store.setting.general.language !== 'English'
|
||||
? 'flex items-center'
|
||||
: ''
|
||||
}`,
|
||||
]"
|
||||
>
|
||||
<NFormItem
|
||||
class="mt-1 flex-1"
|
||||
:label="store.language.secondaryColor"
|
||||
@ -441,8 +469,15 @@
|
||||
></NColorPicker>
|
||||
</NFormItem>
|
||||
<NFormItem
|
||||
class="mt-1 flex-1 ml-[10px]"
|
||||
class="mt-1 flex-1"
|
||||
:label="store.language.fontSecondaryColor"
|
||||
:class="[
|
||||
`${
|
||||
store.setting.general.language !== 'English'
|
||||
? 'ml-[10px]'
|
||||
: ''
|
||||
}`,
|
||||
]"
|
||||
>
|
||||
<NColorPicker
|
||||
:modes="['hex']"
|
||||
@ -576,7 +611,7 @@
|
||||
v-if="setting.appearance.backgroundImage && store.backgroundImage"
|
||||
>
|
||||
<span class="block font-semibold">{{
|
||||
store.language.backgroundImagePostion
|
||||
store.language.backgroundImagePosition
|
||||
}}</span>
|
||||
<NFormItem class="mt-2">
|
||||
<NSelect
|
||||
@ -1006,7 +1041,7 @@
|
||||
v-model:checked="setting.item.openNumber"
|
||||
:focusable="false"
|
||||
@update:checked="setOpenNumber"
|
||||
>{{ store.language.recordOpenNumber }}</NCheckbox
|
||||
>{{ store.language.recordOpenCount }}</NCheckbox
|
||||
>
|
||||
</NFormItem>
|
||||
</NForm>
|
||||
@ -2175,7 +2210,7 @@ let quickSearchHistorySortOptions = ref([
|
||||
value: "lastOpen",
|
||||
},
|
||||
{
|
||||
label: store.language.byOpenNumber,
|
||||
label: store.language.byOpenCount,
|
||||
value: "openNumber",
|
||||
},
|
||||
]);
|
||||
|
26
yarn.lock
26
yarn.lock
@ -2547,10 +2547,10 @@ mz@^2.7.0:
|
||||
object-assign "^4.0.1"
|
||||
thenify-all "^1.0.0"
|
||||
|
||||
naive-ui@^2.35.0:
|
||||
version "2.35.0"
|
||||
resolved "https://registry.npmmirror.com/naive-ui/-/naive-ui-2.35.0.tgz#fe1fc2404694b4114486fa31e609e35714e8ed25"
|
||||
integrity sha512-PdnLpOip1LQaKs5+rXLZoPDPQkTq26TnHWeABvUA2eOQjtHxE4+TQvj0Jq/W8clM2On/7jptoGmenLt48G3Bhg==
|
||||
naive-ui@^2.36.0:
|
||||
version "2.39.0"
|
||||
resolved "https://registry.npmmirror.com/naive-ui/-/naive-ui-2.39.0.tgz#f0d47d30ce86b178242ad5de9de4066eb8a3f0c9"
|
||||
integrity sha512-5oUJzRG+rtLSH8eRU+fJvVYiQids2BxF9jp+fwGoAqHOptEINrBlgBu9uy+95RHE5FLJ7Q/z41o+qkoGnUrKxQ==
|
||||
dependencies:
|
||||
"@css-render/plugin-bem" "^0.15.12"
|
||||
"@css-render/vue3-ssr" "^0.15.12"
|
||||
@ -2559,17 +2559,18 @@ naive-ui@^2.35.0:
|
||||
"@types/lodash-es" "^4.17.9"
|
||||
async-validator "^4.2.5"
|
||||
css-render "^0.15.12"
|
||||
csstype "^3.1.3"
|
||||
date-fns "^2.30.0"
|
||||
date-fns-tz "^2.0.0"
|
||||
evtd "^0.2.4"
|
||||
highlight.js "^11.8.0"
|
||||
lodash "^4.17.21"
|
||||
lodash-es "^4.17.21"
|
||||
seemly "^0.3.6"
|
||||
seemly "^0.3.8"
|
||||
treemate "^0.3.11"
|
||||
vdirs "^0.1.8"
|
||||
vooks "^0.2.12"
|
||||
vueuc "^0.4.51"
|
||||
vueuc "^0.4.58"
|
||||
|
||||
nanoid@^3.3.6:
|
||||
version "3.3.6"
|
||||
@ -3136,6 +3137,11 @@ seemly@^0.3.6:
|
||||
resolved "https://registry.npmmirror.com/seemly/-/seemly-0.3.6.tgz#7ef97e8083dea00804965e2662f572a5df9cb18e"
|
||||
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:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmmirror.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
|
||||
@ -3673,10 +3679,10 @@ vue@^3.4.13:
|
||||
"@vue/server-renderer" "3.4.26"
|
||||
"@vue/shared" "3.4.26"
|
||||
|
||||
vueuc@^0.4.51:
|
||||
version "0.4.51"
|
||||
resolved "https://registry.npmmirror.com/vueuc/-/vueuc-0.4.51.tgz#35cd5364db4b71fc791a9823748711b91d910d49"
|
||||
integrity sha512-pLiMChM4f+W8czlIClGvGBYo656lc2Y0/mXFSCydcSmnCR1izlKPGMgiYBGjbY9FDkFG8a2HEVz7t0DNzBWbDw==
|
||||
vueuc@^0.4.58:
|
||||
version "0.4.58"
|
||||
resolved "https://registry.npmmirror.com/vueuc/-/vueuc-0.4.58.tgz#03ee2ea6febf360ca9cbe490841fce91742eea12"
|
||||
integrity sha512-Wnj/N8WbPRSxSt+9ji1jtDHPzda5h2OH/0sFBhvdxDRuyCZbjGg3/cKMaKqEoe+dErTexG2R+i6Q8S/Toq1MYg==
|
||||
dependencies:
|
||||
"@css-render/vue3-ssr" "^0.15.10"
|
||||
"@juggle/resize-observer" "^3.3.1"
|
||||
|
Loading…
Reference in New Issue
Block a user