Compare commits

...

113 Commits
1.3.2 ... main

Author SHA1 Message Date
unknown
5800cbbdaa 更新版本。 2025-03-18 08:36:36 +08:00
unknown
56517f059c 优化拖拽文件速度。 2025-03-16 17:58:44 +08:00
unknown
342d8939ab 优化。 2025-03-16 17:49:04 +08:00
unknown
92270def83 优化主界面搜索框,隐藏窗口时同时隐藏搜索框。 2025-03-16 17:41:46 +08:00
unknown
881fbc9f56 修复'文件夹项目'带有特殊符号时,打开文件夹失败的问题。 2025-03-16 17:40:05 +08:00
unknown
2cd721263e 修复'任务栏'右键关闭窗口时,程序并没有完全退出的问题。 2025-03-16 17:39:09 +08:00
unknown
ea851c652c update. 2025-01-12 12:09:21 +08:00
unknown
9243140d3b 更新版本。 2025-01-12 12:08:56 +08:00
unknown
36b77ce32b 修复同一目录下打开文件夹却打开应用程序的问题。 2025-01-12 12:08:37 +08:00
unknown
d51a5404ee 修复项目在自定义排序拖拽移动项目问题。 2025-01-12 12:06:26 +08:00
unknown
018bd91931 修复程序在某些情况崩溃的问题。 2025-01-12 12:04:14 +08:00
unknown
d4520eef0c 修复某些情况下'以管理员身份启动'没有生效的问题、优化'新增/编辑项目'时'以管理员身份运行'显示逻辑。 2025-01-01 11:48:09 +08:00
unknown
0c2ae8ae5b 修复'失去焦点隐藏'有时无效的问题。 2024-11-09 16:39:26 +08:00
unknown
07912ea276 修复批量删除项目失败的问题。 2024-11-09 16:27:58 +08:00
unknown
bebe8272cf 更新版本。 2024-09-24 20:04:44 +08:00
unknown
4e3947ab7e 修复'锁定尺寸'在某些状况下没有成功的问题。 2024-09-22 22:49:07 +08:00
unknown
5c791874c6 修复'透明窗口'下出现窗口闪烁的问题。 2024-09-22 22:42:25 +08:00
unknown
a2ccd8670b 所有文本框支持右键剪切、复制、粘贴。 2024-09-22 22:13:15 +08:00
unknown
78cf39bec7 修改README。 2024-09-20 19:55:56 +08:00
unknown
62a1780197 更新版本。 2024-09-13 21:28:52 +08:00
unknown
dd3cf64f5d 优化语言。 2024-09-13 21:16:36 +08:00
unknown
ed77cc4fb4 优化批量删除项目出现卡顿的问题。 2024-09-13 21:06:19 +08:00
unknown
0327dfc0cc 优化部分网址获取信息失败的问题。 2024-09-13 21:03:20 +08:00
unknown
0ad813a315 优化右键菜单'以管理员身份运行'功能,改为右键时动态判断文件是否有此权限。 2024-09-13 20:57:27 +08:00
unknown
2ba01403a5 优化右键菜单'以管理员身份运行'功能,改为右键时动态判断文件是否有此权限。 2024-09-13 20:54:36 +08:00
unknown
f365005bd8 优化样式。 2024-09-13 20:47:09 +08:00
unknown
3ffbd110dc 优化语言。 2024-09-13 20:45:13 +08:00
unknown
7ec78fef08 首次打开程序将根据计算机语言显示 Dawn Launcher 语言。 2024-09-13 20:26:40 +08:00
unknown
b9ac69cf22 更新版本。 2024-08-29 22:47:01 +08:00
unknown
c23e4f51f0 修复关联文件夹、聚合分类下右键项目菜单显示多余选项问题。 2024-08-29 22:43:47 +08:00
unknown
a411674e3a 优化分类名称样式。 2024-08-29 22:25:10 +08:00
unknown
e1f896e963 优化窗口失去焦点隐藏、停靠在桌面边缘时自动隐藏功能,在弹出对话框时应不隐藏窗口。 2024-08-29 22:22:01 +08:00
unknown
8228495918 更新版本。 2024-07-05 22:42:47 +08:00
unknown
bcc5ad1989 修复快速搜索历史记录按打开次数排序问题。 2024-07-05 22:42:32 +08:00
unknown
dd06149fb4 优化窗口透明度操作逻辑。 2024-07-05 22:41:00 +08:00
unknown
0cb66ffaa5 修复项目隐藏省略号和项目行高冲突的问题。 2024-07-05 22:36:15 +08:00
unknown
6386518171 修复部分ico图标无效的问题。 2024-07-05 22:34:22 +08:00
unknown
49124e7eeb 修复子分类相关排序问题。 2024-07-05 22:27:34 +08:00
unknown
ac96cfd6be 优化项目宽度对齐,所有项目统一对齐。 2024-07-05 22:26:18 +08:00
unknown
950cff7a6c 优化样式。 2024-07-05 22:25:24 +08:00
unknown
f0eeea8483 修复(UNC)网络路径被识别成相对路径的问题。 2024-07-05 22:23:10 +08:00
unknown
8c17275169 优化项目名称显示。 2024-07-05 22:19:59 +08:00
unknown
6f04f8ccbd 修复在勿扰模式下,使用快捷键启动项目和显示快速搜索窗口仍然生效的问题。 2024-07-05 22:14:56 +08:00
unknown
8c6de3fdc2 更新版本。 2024-06-16 20:21:58 +08:00
unknown
c170df8691 优化主界面搜索、快速搜索项目标题过长导致样式变形的问题。 2024-06-16 20:21:42 +08:00
unknown
2d82702efe 修复分类在顶部,当子分类数量过多超出屏幕范围的问题。 2024-06-16 20:18:54 +08:00
unknown
acb9231915 修复主题非白色的情况下,创建窗口出现闪屏的问题。 2024-06-16 20:15:18 +08:00
unknown
fac3bda8f4 更新版本 2024-05-15 22:46:37 +08:00
unknown
333f0888be 修复获取部分网址信息失败问题 2024-05-15 22:46:09 +08:00
unknown
a94d5a2244 修复锁定尺寸重启软件失效问题 2024-05-15 22:45:07 +08:00
unknown
27a32c7eed 修复在多屏幕情况下显示快速搜索窗口程序崩溃问题 2024-05-15 22:44:14 +08:00
unknown
2cdefb513a update version. 2024-05-01 15:09:55 +08:00
unknown
c9593f379f optimize window display hierarchy issues. 2024-05-01 15:08:31 +08:00
unknown
df499a0517 fix the problem that sometimes the startup fails when booting. 2024-05-01 15:07:09 +08:00
unknown
4048f4a230 recovery item opening logic. 2024-05-01 15:04:29 +08:00
unknown
7c866f57b4 update version. 2024-04-11 19:36:52 +08:00
unknown
e7ce285ae9 fixed an issue that caused the program to crash if the item did not exist when opening the item. 2024-04-11 19:36:37 +08:00
unknown
d117397dc3 update version. 2024-04-10 21:13:12 +08:00
unknown
6b71805274 optimize the opening item logic (solve the problem that some software/files cannot be opened, and too many running programs cause the program to crash). 2024-04-10 21:12:28 +08:00
unknown
480f88d558 fixed the issue where shortcut keys are still occupied after disabling quick search. 2024-04-10 21:06:05 +08:00
unknown
37a62c1cb5 fixed an issue where item opening information would also be copied when copying a item. 2024-04-10 21:04:02 +08:00
unknown
fb0ce7d3ca update version. 2024-03-03 20:12:50 +08:00
unknown
467f33bc99 fixed the bug of invalid environment variables. 2024-03-03 20:11:58 +08:00
unknown
28f3ed000f change version. 2024-02-26 22:19:36 +08:00
unknown
235f964198 quick search add delete history. 2024-02-26 22:16:52 +08:00
unknown
52847f8629 optimize the auto-hide function when docked to the edge of the desktop. 2024-02-26 22:06:52 +08:00
unknown
a11913c785 change version. 2024-01-13 10:36:49 +08:00
unknown
c683d0f167 the quick search window supports multiple screens. 2024-01-13 10:36:33 +08:00
unknown
8a0d1ea08a optimize code. 2024-01-13 10:31:11 +08:00
unknown
d655198b1d settings-Quick search, add dimensions, modify window width. 2024-01-13 10:30:07 +08:00
unknown
607ff84af9 optimize the problem of accidental double-clicking on the taskbar. 2024-01-13 10:23:49 +08:00
unknown
ac9c8c834f optimize the problem of accidental double-clicking on the taskbar. 2024-01-13 10:23:15 +08:00
unknown
af25b93004 optimize the delay issue of clicking the desktop icon to display the main interface. 2024-01-13 09:50:48 +08:00
unknown
90fdc9b8ac shortcut keys support Win key. 2024-01-13 09:49:29 +08:00
unknown
ace6f282d0 fix the abnormal BUG that occurs when using Alt + F4 shortcut keys. 2024-01-13 09:46:06 +08:00
unknown
64007a12e9 stuttering problem occurs when optimizing running projects. 2024-01-13 09:41:04 +08:00
unknown
ee94f20392 fixed the bug where '.' was truncated in the folder project name under the associated folder. 2024-01-13 09:38:44 +08:00
unknown
ca43708a22 fixed a bug that occurred when copying items to a specified classification. 2024-01-13 09:36:54 +08:00
unknown
c73a2b3709 optimize code. 2024-01-13 09:34:41 +08:00
unknown
90594e7f21 optimize style. 2024-01-13 09:29:19 +08:00
unknown
5167e0c084 change readme. 2023-11-28 10:56:58 +08:00
fanchenio
88b5fa8a15 Change version. 2023-11-23 11:11:39 +08:00
fanchenio
da4a19f81a Optimize the overall operation logic of double-clicking the taskbar to reduce accidental touches. 2023-11-23 11:11:21 +08:00
fanchenio
87ab4e3060 Settings-Item-Add the display path function. After it is turned on, the path will be displayed when the mouse is hovering over the project. 2023-11-23 11:06:52 +08:00
fanchenio
e6289d0344 Optimize style. 2023-11-23 10:43:08 +08:00
fanchenio
ffd7c1d8df Optimize style. 2023-11-23 10:40:56 +08:00
fanchenio
f40cab0107 Search, quick search, new command line function, use '> + space' to enter command line mode. 2023-11-23 10:40:04 +08:00
fanchenio
26ae2093e3 Add comment. 2023-11-23 10:02:20 +08:00
fanchenio
dfe16dd36c Remove. 2023-11-23 10:00:26 +08:00
fanchenio
d6894662ea Restore. 2023-11-21 14:23:26 +08:00
unknown
f556343883 Fixed the bug of not exiting batch mode after batch deletion. 2023-11-19 21:24:34 +08:00
unknown
82f5fe8cfe Remove timeout, Remove backgroundThrottling. 2023-11-19 21:21:45 +08:00
unknown
1d1edb95e7 Emoji language. 2023-11-19 21:16:47 +08:00
unknown
da23211600 Settings-System-Added the function of hiding the taskbar, which is enabled by default. 2023-11-19 21:14:14 +08:00
FanChenIO
2bdbdbab16
Merge pull request #13 from WhiteSevs/main
fix bug
2023-11-18 18:41:59 +08:00
白柒
515944539c fix bug
修复开启启动时报错ReferenceError:mainWindow is not defined问题
2023-11-18 16:31:04 +08:00
fanchenio
b982367793 Change License. 2023-11-17 14:36:02 +08:00
fanchenio
426e261397 Merge branch 'main' of github.com:fanchenio/DawnLauncher 2023-11-16 09:38:12 +08:00
fanchenio
3432c7aa6a Language error. 2023-11-16 09:37:54 +08:00
unknown
028845c159 Change version. 2023-11-10 23:00:41 +08:00
unknown
dcb2b1cc38 Settings - Subclassification - Added name alignment function, which can adjust the alignment of subcategory names in the project area on the right side of the main interface. 2023-11-10 22:59:57 +08:00
unknown
0d93c2f922 Optimize the acquisition of APPX application information and obtain more APPX applications. 2023-11-10 22:53:38 +08:00
unknown
946d94cb5b Change README 2023-11-10 22:42:08 +08:00
fanchenio
55e247a5a3 Fixed a bug that caused the software to crash when entering non-English characters when setting shortcut keys. 2023-11-09 09:57:19 +08:00
fanchenio
5173d73b42 Fixed the bug that the quick search window can still be called up by using shortcut keys when quick search is disabled. 2023-11-09 09:55:10 +08:00
fanchenio
e688210a58 Modify Settings-Appearance-Window Corner Angle. 2023-11-09 09:52:27 +08:00
fanchenio
21cddb6d00 Change README 2023-11-08 16:45:35 +08:00
fanchenio
e91dcdfbdb Change version 2023-11-07 10:36:51 +08:00
fanchenio
f2d0a81042 Fixed the issue where the transparent rounded corners of the background failed after setting the background image 2023-11-07 10:36:34 +08:00
fanchenio
187ffeb636 There is a delay problem when optimizing the interface display 2023-11-07 10:34:48 +08:00
fanchenio
f6fe6c9558 Optimization window 2023-11-07 10:33:42 +08:00
fanchenio
80f1c40ad7 Solve transparent window flickering 2023-11-07 10:28:01 +08:00
fanchenio
5d575216a8 Support parsing URL files 2023-11-07 10:27:18 +08:00
67 changed files with 22004 additions and 13951 deletions

18
.vscode/c_cpp_properties.json vendored Normal file
View File

@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "windows-gcc-x64",
"includePath": [
"${workspaceFolder}/**"
],
"compilerPath": "gcc",
"cStandard": "${default}",
"cppStandard": "${default}",
"intelliSenseMode": "windows-gcc-x64",
"compilerArgs": [
""
]
}
],
"version": 4
}

23
.vscode/launch.json vendored
View File

@ -1,7 +1,4 @@
{ {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"compounds": [ "compounds": [
{ {
@ -45,9 +42,27 @@
"<node_internals>/**", "<node_internals>/**",
"${workspaceRoot}/node_modules/**", "${workspaceRoot}/node_modules/**",
"${workspaceRoot}/dist-electron/**", "${workspaceRoot}/dist-electron/**",
// Skip files in host(VITE_DEV_SERVER_URL)
"http://127.0.0.1:3344/**" "http://127.0.0.1:3344/**"
] ]
}, },
{
"name": "C/C++ Runner: Debug Session",
"type": "cppdbg",
"request": "launch",
"args": [],
"stopAtEntry": false,
"externalConsole": true,
"cwd": "d:/GITHUB-DAWN-LAUNCHER/DawnLauncher",
"program": "d:/GITHUB-DAWN-LAUNCHER/DawnLauncher/build/Debug/outDebug",
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
] ]
} }

59
.vscode/settings.json vendored
View File

@ -9,5 +9,62 @@
], ],
"url": "https://json.schemastore.org/electron-builder" "url": "https://json.schemastore.org/electron-builder"
} }
] ],
"C_Cpp_Runner.msvcBatchPath": "",
"C_Cpp_Runner.cCompilerPath": "gcc",
"C_Cpp_Runner.cppCompilerPath": "g++",
"C_Cpp_Runner.debuggerPath": "gdb",
"C_Cpp_Runner.cStandard": "",
"C_Cpp_Runner.cppStandard": "",
"C_Cpp_Runner.useMsvc": false,
"C_Cpp_Runner.warnings": [
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wshadow",
"-Wformat=2",
"-Wcast-align",
"-Wconversion",
"-Wsign-conversion",
"-Wnull-dereference"
],
"C_Cpp_Runner.msvcWarnings": [
"/W4",
"/permissive-",
"/w14242",
"/w14287",
"/w14296",
"/w14311",
"/w14826",
"/w44062",
"/w44242",
"/w14905",
"/w14906",
"/w14263",
"/w44265",
"/w14928"
],
"C_Cpp_Runner.enableWarnings": true,
"C_Cpp_Runner.warningsAsError": false,
"C_Cpp_Runner.compilerArgs": [],
"C_Cpp_Runner.linkerArgs": [],
"C_Cpp_Runner.includePaths": [],
"C_Cpp_Runner.includeSearch": [
"*",
"**/*"
],
"C_Cpp_Runner.excludeSearch": [
"**/build",
"**/build/**",
"**/.*",
"**/.*/**",
"**/.vscode",
"**/.vscode/**"
],
"C_Cpp_Runner.useAddressSanitizer": false,
"C_Cpp_Runner.useUndefinedSanitizer": false,
"C_Cpp_Runner.useLeakSanitizer": false,
"C_Cpp_Runner.showCompilationTime": false,
"C_Cpp_Runner.useLinkTimeOptimization": false,
"C_Cpp_Runner.msvcSecureNoWarnings": false
} }

78
LICENSE
View File

@ -1,65 +1,21 @@
Apache License MIT License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION Copyright (c) [2023] [Dawn Launcher]
1. Definitions. Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. SOFTWARE.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of this License; and
You must cause any modified files to carry prominent notices stating that You changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright [2023] [Dawn Launcher]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,9 +1,5 @@
# [简体中文](https://github.com/fanchenio/DawnLauncher) | English # [简体中文](https://github.com/fanchenio/DawnLauncher) | English
# Update
After disappearing for more than three months, I refactored the `Dawn Launcher` code. Because I had no experience in developing `NodeJS` and `Electron` at the beginning, `Vue` was not well written, and the code was a bit sloppy, so I carried out Code refactoring, the new version uses `Electron26 + Vite + Vue3 + TS`, the UI framework uses `Naive`, regarding the native API, I switched from `C++` to `Rust`, and the database switched from `electron-store` With `SQLite3`, the language has also added `English`.
# Dawn Launcher # Dawn Launcher
The `Windows` quick launch tool helps you organize your messy desktop, manage your desktop shortcuts by category, and keep your desktop clean and tidy. The `Windows` quick launch tool helps you organize your messy desktop, manage your desktop shortcuts by category, and keep your desktop clean and tidy.
@ -12,7 +8,7 @@ Supports associated folders (real-time synchronization of folder contents), quic
# Technology Stack # Technology Stack
`Electron + Vite + Vue3 + TS` `Electron + Vite + Vue3 + TS + Rust`
# Support Platform # Support Platform
@ -20,24 +16,17 @@ Supports associated folders (real-time synchronization of folder contents), quic
# Compilation Steps # Compilation Steps
1. First you need to install `node-gyp`, which is needed to compile local modules. 1. Install `node-gyp`, required to compile SQLite3.
2. Then run `yarn install` to install the project dependencies (if you modify the `Rust` code, you need to re-run `yarn install`). 2. Install the `Rust` environment + `Cargo`, which is needed to compile Rust.
3. `yarn run dev` runs the project locally. 3. Then run `yarn install` to install the project dependencies (if you modify the `Rust` code, you need to re-run `yarn install`).
4. `yarn run build` packages the project. 4. `yarn run dev` runs the project locally.
5. The portable version and the installation version need to be packaged twice. By modifying `VITE_INSTALL` in `.env.production`, `true` means the installation version and `false` means the portable version. 5. `yarn run build` packages the project.
6. The portable version and the installation version need to be packaged twice. By modifying `VITE_INSTALL` in `.env.production`, `true` means the installation version and `false` means the portable version.
# Official Website # Official Website
[dawnlauncher.com](https://dawnlauncher.com/) [dawnlauncher.com](https://dawnlauncher.com/)
# Donate(Wechat)
![Wechat](/images/wechat.png)
# Donate(Alipay)
![Alipay](/images/alipay.png)
# UI # UI
![UI](/images/soft1.png) ![UI](/images/soft1.png)
@ -70,6 +59,10 @@ Supports associated folders (real-time synchronization of folder contents), quic
![Associate Folders](/images/soft8.webp) ![Associate Folders](/images/soft8.webp)
# License ## Stargazers over time
Apache License Version 2.0 [![Stargazers over time](https://starchart.cc/fanchenio/DawnLauncher.svg)](https://starchart.cc/fanchenio/DawnLauncher)
## License
MIT License

View File

@ -1,9 +1,5 @@
# 简体中文 | [English](https://github.com/fanchenio/DawnLauncher/blob/main/README-ENGLISH.md) # 简体中文 | [English](https://github.com/fanchenio/DawnLauncher/blob/main/README-ENGLISH.md)
# 更新
消失了三个多月,我将`Dawn Launcher`代码进行重构,因为一开始没有开发`NodeJS`和`Electron`的经验,`Vue`也写的不好,代码写的有些潦草,所以进行了代码重构,新版使用了`Electron26 + Vite + Vue3 + TS`UI 框架使用了`Naive`,关于原生 API 方面,我从`C++`切换到了 `Rust`,数据库从`electron-store`切换到了`SQLite3`,语言也新增了`英语`。
# Dawn Launcher # Dawn Launcher
`Windows`快捷启动工具,帮助您整理杂乱无章的桌面,分门别类管理您的桌面快捷方式,让您的桌面保持干净整洁。 `Windows`快捷启动工具,帮助您整理杂乱无章的桌面,分门别类管理您的桌面快捷方式,让您的桌面保持干净整洁。
@ -12,7 +8,7 @@
# 技术栈 # 技术栈
`Electron + Vite + Vue3 + TS` `Electron + Vite + Vue3 + TS + Rust`
# 支持平台 # 支持平台
@ -20,23 +16,20 @@
# 编译步骤 # 编译步骤
1. 首先需要安装`node-gyp`,编译本地模块需要用到。 1. 安装`node-gyp`,编译 SQLite3 需要。
2. 然后运行`yarn install`安装项目依赖(如果修改了`Rust`代码也需要重新运行`yarn install`)。 2. 安装`Rust`环境 + `Cargo`,编译 Rust 需要。
3. `yarn run dev`本地运行项目。 3. 然后运行`yarn install`安装项目依赖(如果修改了`Rust`代码也需要重新运行`yarn install`)。
4. `yarn run build`打包项目。 4. `yarn run dev`本地运行项目。
5. 便携版和安装版需要分两次打包,通过修改`.env.production`中的`VITE_INSTALL``true`为安装版,`false`为便携版。 5. `yarn run build`打包项目。
6. 便携版和安装版需要分两次打包,通过修改`.env.production`中的`VITE_INSTALL``true`为安装版,`false`为便携版。
# 官网 # 官网
[dawnlauncher.com](https://dawnlauncher.com/) [dawnlauncher.com](https://dawnlauncher.com/)
# 捐赠(微信) # QQ 群
![微信](/images/wechat.png) 369652112
# 捐赠(支付宝)
![支付宝](/images/alipay.png)
# 界面 # 界面
@ -70,6 +63,10 @@
![关联文件夹](/images/soft8.webp) ![关联文件夹](/images/soft8.webp)
# License ## Stargazers over time
Apache License Version 2.0 [![Stargazers over time](https://starchart.cc/fanchenio/DawnLauncher.svg)](https://starchart.cc/fanchenio/DawnLauncher)
## License
MIT License

View File

@ -30,6 +30,11 @@ features = [
"Win32_System_Environment", "Win32_System_Environment",
"Win32_UI_Input_Ime", "Win32_UI_Input_Ime",
"Win32_Globalization", "Win32_Globalization",
"Win32_Graphics_Dwm",
"Management_Deployment",
"ApplicationModel",
"Foundation_Collections",
"ApplicationModel_Core",
] ]
[build-dependencies] [build-dependencies]

View File

@ -5,8 +5,8 @@ let simplifiedChinese = {
address: "地址", address: "地址",
aggregateClassification: "聚合分类", aggregateClassification: "聚合分类",
aggregateClassificationPrompt1: aggregateClassificationPrompt1:
"聚合分类可以将所有分类下的项目聚合到一起,按照设定的排序方式、项目数量进行排序和显示。", "聚合分类会将所有分类下项目聚合到一起,按照设定的排序方式、项目数量进行显示。",
aggregateClassificationPrompt2: "当前分类为父级分类,不能设置聚合分类。", aggregateClassificationPrompt2: "当前分类是父级分类,不能设置为聚合分类。",
aggregateClassificationPrompt3: aggregateClassificationPrompt3:
"当前设置排序为按打开次数,需开启设置-项目-记录打开次数。", "当前设置排序为按打开次数,需开启设置-项目-记录打开次数。",
aggregateClassificationPrompt4: aggregateClassificationPrompt4:
@ -22,7 +22,7 @@ let simplifiedChinese = {
associateFolderPrompt1: associateFolderPrompt1:
"关联文件夹可以实时监控指定文件夹内的变化并同步到对应分类中。", "关联文件夹可以实时监控指定文件夹内的变化并同步到对应分类中。",
associateFolderPrompt2: "需要隐藏的文件/文件夹名称,多个按英文逗号分割", associateFolderPrompt2: "需要隐藏的文件/文件夹名称,多个按英文逗号分割",
associateFolderPrompt3: "当前分类为父级分类,不能设置关联文件夹。", associateFolderPrompt3: "当前分类是父级分类,不能设置为关联文件夹。",
associateFolderPrompt4: "目标路径不存在。", associateFolderPrompt4: "目标路径不存在。",
associateFolderPrompt5: "目标路径必须是文件夹。", associateFolderPrompt5: "目标路径必须是文件夹。",
associateFolderPrompt6: associateFolderPrompt6:
@ -33,15 +33,14 @@ let simplifiedChinese = {
backgroundIcon: "背景图标", backgroundIcon: "背景图标",
backgroundImage: "背景图", backgroundImage: "背景图",
backgroundImageMode: "背景图模式", backgroundImageMode: "背景图模式",
backgroundImagePostion: "背景图定位", backgroundImagePosition: "背景图定位",
backgroundImageTransparent: "背景图透明", backgroundImageTransparency: "背景图透明度",
backgroundTransparent: "背景透明",
backup: "备份", backup: "备份",
backupRestoreData: "备份/还原数据", backupRestoreData: "备份/还原数据",
backupRestoreDataPrompt: backupRestoreDataPrompt:
"如果要还原1.2.3及之前版本的备份数据请在还原时选择导入JSON格式的文件。", "如果要还原 1.2.3 及之前版本的数据,请在还原时选择导入 JSON 格式的文件。",
batchConvertAbsolutePath: "转为绝对路径", batchConvertAbsolutePath: "批量转为绝对路径",
batchConvertRelativePath: "转为相对路径", batchConvertRelativePath: "批量转为相对路径",
batchCopyTo: "批量复制到", batchCopyTo: "批量复制到",
batchDelete: "批量删除", batchDelete: "批量删除",
batchDeletePrompt: "是否批量删除项目?", batchDeletePrompt: "是否批量删除项目?",
@ -52,7 +51,7 @@ let simplifiedChinese = {
bottom: "底部", bottom: "底部",
byInitialLetter: "按首字母", byInitialLetter: "按首字母",
byLastOpen: "按最后打开", byLastOpen: "按最后打开",
byOpenNumber: "按打开次数", byOpenCount: "按打开次数",
calculator: "计算器", calculator: "计算器",
cancel: "取消", cancel: "取消",
cancelBatchOperation: "取消批量操作", cancelBatchOperation: "取消批量操作",
@ -70,16 +69,20 @@ let simplifiedChinese = {
colonKeywordSpace: "冒号 + 关键字 + 空格", colonKeywordSpace: "冒号 + 关键字 + 空格",
color: "颜色", color: "颜色",
columnNumber: "列数", columnNumber: "列数",
commandLine: "命令行",
commandLinePrompt1: '在"快速搜索"或"搜索"中使用"> + 空格"进入命令行模式。',
commandPrompt: "命令提示符", commandPrompt: "命令提示符",
computer: "计算机", computer: "计算机",
computerManagement: "计算机管理", computerManagement: "计算机管理",
controlPanel: "控制面板", controlPanel: "控制面板",
convertAbsolutePath: "转为绝对路径", convertAbsolutePath: "转为绝对路径",
convertRelativePath: "转为相对路径", convertRelativePath: "转为相对路径",
copy: "复制",
copyFullPath: "复制完整路径", copyFullPath: "复制完整路径",
copyTo: "复制到", copyTo: "复制到",
createShortcut: "创建快捷方式", createShortcut: "创建快捷方式",
ctrlNumberKey: "Ctrl + 数字键", ctrlNumberKey: "Ctrl + 数字键",
cut: "剪切",
default: "默认", default: "默认",
defaultIcon: "默认图标", defaultIcon: "默认图标",
delayDisplay: "延迟显示", delayDisplay: "延迟显示",
@ -88,9 +91,10 @@ let simplifiedChinese = {
deleteClassificationPrompt: "是否删除当前分类?", deleteClassificationPrompt: "是否删除当前分类?",
deleteIcon: "删除图标", deleteIcon: "删除图标",
deleteItemPrompt: "是否删除当前项目?", deleteItemPrompt: "是否删除当前项目?",
deleteHistory: "删除历史记录",
description: "描述", description: "描述",
display: "显示", display: "显示",
displayMainWindow: "显示主界面", displayMainInterface: "显示主界面",
documents: "文档", documents: "文档",
doubleClickOpen: "双击打开", doubleClickOpen: "双击打开",
doubleClickTaskbar: "双击任务栏", doubleClickTaskbar: "双击任务栏",
@ -105,6 +109,7 @@ let simplifiedChinese = {
editSubclassification: "编辑子分类", editSubclassification: "编辑子分类",
emptyRecycleBin: "清空回收站", emptyRecycleBin: "清空回收站",
enable: "启用", enable: "启用",
enableQuickSearch: "启用快速搜索",
english: "英语", english: "英语",
excludeSearch: "排除搜索", excludeSearch: "排除搜索",
exit: "退出", exit: "退出",
@ -132,10 +137,12 @@ let simplifiedChinese = {
globalShortcutKey: "全局快捷键", globalShortcutKey: "全局快捷键",
hiddenItems: "隐藏项", hiddenItems: "隐藏项",
hideEllipses: "隐藏省略号", hideEllipses: "隐藏省略号",
hideLoseFocus: "失去焦点隐藏", hideLoseFocus: "失去焦点隐藏",
hideName: "隐藏名称", hideName: "隐藏名称",
hideTray: "隐藏托盘图标", hideTray: "隐藏托盘图标",
hideWindowCollapseSubClassification: "隐藏窗口时收起子分类", hideTaskbar: "隐藏任务栏",
hideWindowCollapseSubClassification: "隐藏窗口收起子分类",
hideWindowAfterOpen: "打开后隐藏窗口",
history: "历史记录", history: "历史记录",
hover: "悬停", hover: "悬停",
icon: "图标", icon: "图标",
@ -175,7 +182,7 @@ let simplifiedChinese = {
name: "名称", name: "名称",
network: "网络", network: "网络",
networkIcon: "网络图标", networkIcon: "网络图标",
networkIconPrompt1: "支持JPG/JPEG/GIF/PNG/ICO/SVG/WEBP格式图片。", networkIconPrompt1: "支持 JPG/JPEG/GIF/PNG/ICO/SVG/WEBP 格式图片。",
networkShareCenter: "网络和共享中心", networkShareCenter: "网络和共享中心",
newClassification: "新建分类", newClassification: "新建分类",
newClassificationName: "新分类", newClassificationName: "新分类",
@ -186,29 +193,32 @@ let simplifiedChinese = {
normal: "普通", normal: "普通",
notDisturb: "勿扰模式", notDisturb: "勿扰模式",
notDisturbPrompt: notDisturbPrompt:
"开启勿扰模式后,计算机在游戏、应用全屏模式下不会弹出Dawn Launcher窗口。", "开启勿扰模式后,计算机在游戏、应用全屏模式下不会弹出 Dawn Launcher 窗口。",
notFoundFile: "找不到指定的文件", notFoundFile: "找不到指定的文件",
notFoundFolder: "找不到指定的文件夹", notFoundFolder: "找不到指定的文件夹",
notTransparent: "不透明",
number: "数量", number: "数量",
numberKey: "数字键", numberKey: "数字键",
officialWebsite: "官方网站", officialWebsite: "官方网站",
ok: "确定", ok: "确定",
open: "打开", open: "打开",
openAfterHideMainInterface: "打开后隐藏主界面",
openAfterHideQuickSearchWindow: "打开后隐藏窗口",
openFileLocation: "打开文件所在位置", openFileLocation: "打开文件所在位置",
openNow: "仅剩一项立即打开", openNow: "仅剩一项立即打开",
openNumber: "打开次数", openCount: "打开次数",
parameters: "参数", parameters: "参数",
password: "密码", password: "密码",
pasteIcon: "粘贴图标", pasteIcon: "粘贴图标",
paste: "粘贴",
path: "路径",
powerOptions: "电源选项", powerOptions: "电源选项",
powerShell: "PowerShell",
programsFeatures: "程序和功能", programsFeatures: "程序和功能",
proxy: "代理", proxy: "代理",
proxyPrompt: proxyPrompt:
"仅支持HTTP代理填写“地址”时需要带通信协议和端口例如http://127.0.0.1:7890如果没有用户名和密码为空即可。", '仅支持 HTTP 代理,填写"地址"时需要带通信协议和端口例如http://127.0.0.1:7890如果没有用户名和密码为空即可。',
prompt: "提示",
quickSearch: "快速搜索", quickSearch: "快速搜索",
recordOpenNumber: "记录打开次数", recordOpenCount: "记录打开次数",
recycleBin: "回收站", recycleBin: "回收站",
refreshIcon: "刷新图标", refreshIcon: "刷新图标",
registryEditor: "注册表编辑器", registryEditor: "注册表编辑器",
@ -219,7 +229,6 @@ let simplifiedChinese = {
restart: "重启", restart: "重启",
restore: "还原", restore: "还原",
restoreDataPrompt: "还原数据失败。", restoreDataPrompt: "还原数据失败。",
rewardSponsor: "打赏&赞助",
right: "右侧", right: "右侧",
roundedCorners: "圆角", roundedCorners: "圆角",
runAsAdministrator: "以管理员身份运行", runAsAdministrator: "以管理员身份运行",
@ -248,11 +257,13 @@ let simplifiedChinese = {
shortcutKeyPrompt5: '与"设置-常规"中的"搜索"快捷键产生冲突,请重新设置。', shortcutKeyPrompt5: '与"设置-常规"中的"搜索"快捷键产生冲突,请重新设置。',
shortcutKeyPrompt6: shortcutKeyPrompt6:
'与"设置-快速搜索"中的"显示/隐藏"快捷键产生冲突,请重新设置。', '与"设置-快速搜索"中的"显示/隐藏"快捷键产生冲突,请重新设置。',
shortcutKeyPrompt7: "非法字符。",
show: "显示", show: "显示",
showFollowMousePosition: "显示时跟随鼠标位置", showFollowMousePosition: "显示时跟随鼠标位置",
showHide: "显示/隐藏", showHide: "显示/隐藏",
showOnlyFiles: "只显示文件", showOnlyFiles: "只显示文件",
showOnlyFolders: "只显示文件夹", showOnlyFolders: "只显示文件夹",
showPath: "显示路径",
shutdown: "关机", shutdown: "关机",
simplifiedChinese: "简体中文", simplifiedChinese: "简体中文",
size: "尺寸", size: "尺寸",
@ -265,10 +276,9 @@ let simplifiedChinese = {
startupTray: "启动后最小化到系统托盘", startupTray: "启动后最小化到系统托盘",
subclassification: "子分类", subclassification: "子分类",
svgIcon: "SVG图标", svgIcon: "SVG图标",
svgIconPrompt1: "输入SVG代码后需要先点击“校验代码”按钮。", svgIconPrompt1: '输入 SVG 代码后,需要先点击"校验代码"按钮。',
switch: "切换", switch: "切换",
switchClassificationCollapseOtherSubClassification: switchClassificationCollapseOtherSubClassification: "切换分类收起其他子分类",
"切换分类时收起其他子分类",
switchEnglish: "显示窗口时将输入法切换为英文模式", switchEnglish: "显示窗口时将输入法切换为英文模式",
system: "系统", system: "系统",
target: "目标", target: "目标",
@ -279,14 +289,14 @@ let simplifiedChinese = {
title: "标题", title: "标题",
top: "顶部", top: "顶部",
traditionalChinese: "繁体中文", traditionalChinese: "繁体中文",
transparent: "透明",
turnOffMonitor: "关闭显示器", turnOffMonitor: "关闭显示器",
unlockClassification: "解锁分类", unlockClassification: "解锁分类",
unlockItem: "解锁项目", unlockItem: "解锁项目",
uploadIcon: "上传图标", uploadIcon: "上传图标",
url: "网址", url: "网址",
useItemOpen: "从程序外拖动文件到项目图标上用此项目打开文件", useItemOpen: "从程序外拖动文件到项目图标上用此项目打开文件",
useProxy: "使用代理", useProxy: "使用代理",
useQuickSearch: "使用快速搜索",
username: "用户名", username: "用户名",
update: "更新", update: "更新",
webSearch: "网络搜索", webSearch: "网络搜索",
@ -295,6 +305,7 @@ let simplifiedChinese = {
webSearchModePrompt2: "{w}为搜索关键字。", webSearchModePrompt2: "{w}为搜索关键字。",
width: "宽度", width: "宽度",
window: "窗口", window: "窗口",
windowTransparency: "窗口透明度",
zoom: "缩放", zoom: "缩放",
}; };
@ -304,8 +315,8 @@ let traditionalChinese = {
address: "地址", address: "地址",
aggregateClassification: "聚合分類", aggregateClassification: "聚合分類",
aggregateClassificationPrompt1: aggregateClassificationPrompt1:
"聚合分類可以將所有分類下的項目聚合到一起,按照設定的排序方式、項目數量進行排序和顯示。", "聚合分類會將所有分類下項目聚合到一起,按照設定的排序方式、項目數量進行顯示。",
aggregateClassificationPrompt2: "當前分類為父級分類,不能設置聚合分類。", aggregateClassificationPrompt2: "當前分類是父級分類,不能設置為聚合分類。",
aggregateClassificationPrompt3: aggregateClassificationPrompt3:
"當前設置排序為按打開次數,需開啟設置-項目-記錄打開次數。", "當前設置排序為按打開次數,需開啟設置-項目-記錄打開次數。",
aggregateClassificationPrompt4: aggregateClassificationPrompt4:
@ -321,7 +332,7 @@ let traditionalChinese = {
associateFolderPrompt1: associateFolderPrompt1:
"關聯文件夾可以實時監控指定文件夾內的變化並同步到對應分類中。", "關聯文件夾可以實時監控指定文件夾內的變化並同步到對應分類中。",
associateFolderPrompt2: "需要隱藏的文件/文件夾名稱,多個按英文逗號分割", associateFolderPrompt2: "需要隱藏的文件/文件夾名稱,多個按英文逗號分割",
associateFolderPrompt3: "當前分類為父級分類,不能設置關聯文件夾。", associateFolderPrompt3: "當前分類是父級分類,不能設置為關聯文件夾。",
associateFolderPrompt4: "目標路徑不存在。", associateFolderPrompt4: "目標路徑不存在。",
associateFolderPrompt5: "目標路徑必須是文件夾。", associateFolderPrompt5: "目標路徑必須是文件夾。",
associateFolderPrompt6: associateFolderPrompt6:
@ -332,15 +343,14 @@ let traditionalChinese = {
backgroundIcon: "背景圖標", backgroundIcon: "背景圖標",
backgroundImage: "背景圖", backgroundImage: "背景圖",
backgroundImageMode: "背景圖模式", backgroundImageMode: "背景圖模式",
backgroundImagePostion: "背景圖定位", backgroundImagePosition: "背景圖定位",
backgroundImageTransparent: "背景圖透明", backgroundImageTransparency: "背景圖透明度",
backgroundTransparent: "背景透明",
backup: "備份", backup: "備份",
backupRestoreData: "備份/還原數據", backupRestoreData: "備份/還原數據",
backupRestoreDataPrompt: backupRestoreDataPrompt:
"如果要還原1.2.3及之前版本的備份數據請在還原時選擇導入JSON格式的文件。", "如果要還原 1.2.3 及之前版本的數據,請在還原時選擇導入 JSON 格式的文件。",
batchConvertAbsolutePath: "轉為絕對路徑", batchConvertAbsolutePath: "批量轉為絕對路徑",
batchConvertRelativePath: "轉為相對路徑", batchConvertRelativePath: "批量轉為相對路徑",
batchCopyTo: "批量復製到", batchCopyTo: "批量復製到",
batchDelete: "批量刪除", batchDelete: "批量刪除",
batchDeletePrompt: "是否批量刪除項目?", batchDeletePrompt: "是否批量刪除項目?",
@ -351,7 +361,7 @@ let traditionalChinese = {
bottom: "底部", bottom: "底部",
byInitialLetter: "按首字母", byInitialLetter: "按首字母",
byLastOpen: "按最後打開", byLastOpen: "按最後打開",
byOpenNumber: "按打開次數", byOpenCount: "按打開次數",
calculator: "計算器", calculator: "計算器",
cancel: "取消", cancel: "取消",
cancelBatchOperation: "取消批量操作", cancelBatchOperation: "取消批量操作",
@ -369,16 +379,20 @@ let traditionalChinese = {
colonKeywordSpace: "冒號 + 關鍵字 + 空格", colonKeywordSpace: "冒號 + 關鍵字 + 空格",
color: "顏色", color: "顏色",
columnNumber: "列數", columnNumber: "列數",
commandLine: "命令行",
commandLinePrompt1: '在"快速搜索"或"搜索"中使用"> + 空格"進入命令行模式。',
commandPrompt: "命令提示符", commandPrompt: "命令提示符",
computer: "計算機", computer: "計算機",
computerManagement: "計算機管理", computerManagement: "計算機管理",
controlPanel: "控製面板", controlPanel: "控製面板",
convertAbsolutePath: "轉為絕對路徑", convertAbsolutePath: "轉為絕對路徑",
convertRelativePath: "轉為相對路徑", convertRelativePath: "轉為相對路徑",
copy: "復製",
copyFullPath: "復製完整路徑", copyFullPath: "復製完整路徑",
copyTo: "復製到", copyTo: "復製到",
createShortcut: "創建快捷方式", createShortcut: "創建快捷方式",
ctrlNumberKey: "Ctrl + 數字鍵", ctrlNumberKey: "Ctrl + 數字鍵",
cut: "剪切",
default: "默認", default: "默認",
defaultIcon: "默認圖標", defaultIcon: "默認圖標",
delayDisplay: "延遲顯示", delayDisplay: "延遲顯示",
@ -387,9 +401,10 @@ let traditionalChinese = {
deleteClassificationPrompt: "是否刪除當前分類?", deleteClassificationPrompt: "是否刪除當前分類?",
deleteIcon: "刪除圖標", deleteIcon: "刪除圖標",
deleteItemPrompt: "是否刪除當前項目?", deleteItemPrompt: "是否刪除當前項目?",
deleteHistory: "刪除歷史記錄",
description: "描述", description: "描述",
display: "顯示", display: "顯示",
displayMainWindow: "顯示主界面", displayMainInterface: "顯示主界面",
documents: "文檔", documents: "文檔",
doubleClickOpen: "雙擊打開", doubleClickOpen: "雙擊打開",
doubleClickTaskbar: "雙擊任務欄", doubleClickTaskbar: "雙擊任務欄",
@ -404,6 +419,7 @@ let traditionalChinese = {
editSubclassification: "編輯子分類", editSubclassification: "編輯子分類",
emptyRecycleBin: "清空回收站", emptyRecycleBin: "清空回收站",
enable: "啟用", enable: "啟用",
enableQuickSearch: "啟用快速搜索",
english: "英語", english: "英語",
excludeSearch: "排除搜索", excludeSearch: "排除搜索",
exit: "退出", exit: "退出",
@ -431,10 +447,12 @@ let traditionalChinese = {
globalShortcutKey: "全局快捷鍵", globalShortcutKey: "全局快捷鍵",
hiddenItems: "隱藏項", hiddenItems: "隱藏項",
hideEllipses: "隱藏省略號", hideEllipses: "隱藏省略號",
hideLoseFocus: "失去焦點隱藏", hideLoseFocus: "失去焦點隱藏",
hideName: "隱藏名稱", hideName: "隱藏名稱",
hideTray: "隱藏托盤圖標", hideTray: "隱藏托盤圖標",
hideWindowCollapseSubClassification: "隱藏窗口時收起子分類", hideTaskbar: "隱藏任務欄",
hideWindowCollapseSubClassification: "隱藏窗口收起子分類",
hideWindowAfterOpen: "打開後隱藏窗口",
history: "歷史記錄", history: "歷史記錄",
hover: "懸停", hover: "懸停",
icon: "圖標", icon: "圖標",
@ -474,7 +492,7 @@ let traditionalChinese = {
name: "名稱", name: "名稱",
network: "網絡", network: "網絡",
networkIcon: "網絡圖標", networkIcon: "網絡圖標",
networkIconPrompt1: "支持JPG/JPEG/GIF/PNG/ICO/SVG/WEBP格式圖片。", networkIconPrompt1: "支持 JPG/JPEG/GIF/PNG/ICO/SVG/WEBP 格式圖片。",
networkShareCenter: "網絡和共享中心", networkShareCenter: "網絡和共享中心",
newClassification: "新建分類", newClassification: "新建分類",
newClassificationName: "新分類", newClassificationName: "新分類",
@ -485,29 +503,32 @@ let traditionalChinese = {
normal: "普通", normal: "普通",
notDisturb: "勿擾模式", notDisturb: "勿擾模式",
notDisturbPrompt: notDisturbPrompt:
"開啟勿擾模式後,計算機在遊戲、應用全屏模式下不會彈出Dawn Launcher窗口。", "開啟勿擾模式後,計算機在遊戲、應用全屏模式下不會彈出 Dawn Launcher 窗口。",
notFoundFile: "找不到指定的文件", notFoundFile: "找不到指定的文件",
notFoundFolder: "找不到指定的文件夾", notFoundFolder: "找不到指定的文件夾",
notTransparent: "不透明",
number: "數量", number: "數量",
numberKey: "數字鍵", numberKey: "數字鍵",
officialWebsite: "官方網站", officialWebsite: "官方網站",
ok: "確定", ok: "確定",
open: "打開", open: "打開",
openAfterHideMainInterface: "打開後隱藏主界面",
openAfterHideQuickSearchWindow: "打開後隱藏窗口",
openFileLocation: "打開文件所在位置", openFileLocation: "打開文件所在位置",
openNow: "僅剩一項立即打開", openNow: "僅剩一項立即打開",
openNumber: "打開次數", openCount: "打開次數",
parameters: "參數", parameters: "參數",
password: "密碼", password: "密碼",
pasteIcon: "粘貼圖標", pasteIcon: "粘貼圖標",
paste: "粘貼",
path: "路徑",
powerOptions: "電源選項", powerOptions: "電源選項",
powerShell: "PowerShell",
programsFeatures: "程序和功能", programsFeatures: "程序和功能",
proxy: "代理", proxy: "代理",
proxyPrompt: proxyPrompt:
"僅支持HTTP代理填寫「地址」時需要帶通信協議和端口例如http://127.0.0.1:7890如果沒有用戶名和密碼為空即可。", '僅支持 HTTP 代理,填寫"地址"時需要帶通信協議和端口例如http://127.0.0.1:7890如果沒有用戶名和密碼為空即可。',
prompt: "提示",
quickSearch: "快速搜索", quickSearch: "快速搜索",
recordOpenNumber: "記錄打開次數", recordOpenCount: "記錄打開次數",
recycleBin: "回收站", recycleBin: "回收站",
refreshIcon: "刷新圖標", refreshIcon: "刷新圖標",
registryEditor: "註冊表編輯器", registryEditor: "註冊表編輯器",
@ -518,7 +539,6 @@ let traditionalChinese = {
restart: "重啟", restart: "重啟",
restore: "還原", restore: "還原",
restoreDataPrompt: "還原數據失敗。", restoreDataPrompt: "還原數據失敗。",
rewardSponsor: "打賞&贊助",
right: "右側", right: "右側",
roundedCorners: "圓角", roundedCorners: "圓角",
runAsAdministrator: "以管理員身份運行", runAsAdministrator: "以管理員身份運行",
@ -547,11 +567,13 @@ let traditionalChinese = {
shortcutKeyPrompt5: '與"設置-常規"中的"搜索"快捷鍵產生沖突,請重新設置。', shortcutKeyPrompt5: '與"設置-常規"中的"搜索"快捷鍵產生沖突,請重新設置。',
shortcutKeyPrompt6: shortcutKeyPrompt6:
'與"設置-快速搜索"中的"顯示/隱藏"快捷鍵產生沖突,請重新設置。', '與"設置-快速搜索"中的"顯示/隱藏"快捷鍵產生沖突,請重新設置。',
shortcutKeyPrompt7: "非法字符。",
show: "顯示", show: "顯示",
showFollowMousePosition: "顯示時跟隨鼠標位置", showFollowMousePosition: "顯示時跟隨鼠標位置",
showHide: "顯示/隱藏", showHide: "顯示/隱藏",
showOnlyFiles: "只顯示文件", showOnlyFiles: "只顯示文件",
showOnlyFolders: "只顯示文件夾", showOnlyFolders: "只顯示文件夾",
showPath: "顯示路徑",
shutdown: "關機", shutdown: "關機",
simplifiedChinese: "簡體中文", simplifiedChinese: "簡體中文",
size: "尺寸", size: "尺寸",
@ -564,10 +586,9 @@ let traditionalChinese = {
startupTray: "啟動後最小化到系統托盤", startupTray: "啟動後最小化到系統托盤",
subclassification: "子分類", subclassification: "子分類",
svgIcon: "SVG圖標", svgIcon: "SVG圖標",
svgIconPrompt1: "輸入SVG代碼後需要先點擊「校驗代碼」按鈕。", svgIconPrompt1: '輸入 SVG 代碼後,需要先點擊"校驗代碼"按鈕。',
switch: "切換", switch: "切換",
switchClassificationCollapseOtherSubClassification: switchClassificationCollapseOtherSubClassification: "切換分類收起其他子分類",
"切換分類時收起其他子分類",
switchEnglish: "顯示窗口時將輸入法切換為英文模式", switchEnglish: "顯示窗口時將輸入法切換為英文模式",
system: "系統", system: "系統",
target: "目標", target: "目標",
@ -578,14 +599,14 @@ let traditionalChinese = {
title: "標題", title: "標題",
top: "頂部", top: "頂部",
traditionalChinese: "繁體中文", traditionalChinese: "繁體中文",
transparent: "透明",
turnOffMonitor: "關閉顯示器", turnOffMonitor: "關閉顯示器",
unlockClassification: "解鎖分類", unlockClassification: "解鎖分類",
unlockItem: "解鎖項目", unlockItem: "解鎖項目",
uploadIcon: "上傳圖標", uploadIcon: "上傳圖標",
url: "網址", url: "網址",
useItemOpen: "從程序外拖動文件到項目圖標上用此項目打開文件", useItemOpen: "從程序外拖動文件到項目圖標上用此項目打開文件",
useProxy: "使用代理", useProxy: "使用代理",
useQuickSearch: "使用快速搜索",
username: "用戶名", username: "用戶名",
update: "更新", update: "更新",
webSearch: "網絡搜索", webSearch: "網絡搜索",
@ -594,6 +615,7 @@ let traditionalChinese = {
webSearchModePrompt2: "{w}為搜索關鍵字。", webSearchModePrompt2: "{w}為搜索關鍵字。",
width: "寬度", width: "寬度",
window: "窗口", window: "窗口",
windowTransparency: "窗口透明度",
zoom: "縮放", zoom: "縮放",
}; };
@ -604,44 +626,44 @@ let english = {
address: "Address", address: "Address",
aggregateClassification: "Aggregate Classification", aggregateClassification: "Aggregate Classification",
aggregateClassificationPrompt1: aggregateClassificationPrompt1:
"Aggregation classification can aggregate items under all categories together, sort and display them according to the set sorting method and number of items.", "Aggregate classification will combine items from all classifications and display them according to the set sorting order and item count.",
aggregateClassificationPrompt2: aggregateClassificationPrompt2:
"The current classification is the parent classification, and aggregate classification cannot be set.", "The current classification is a parent classification and cannot be set as an aggregate classification.",
aggregateClassificationPrompt3: aggregateClassificationPrompt3:
"The current settings are sorted by the number of opens. You need to enable Settings-Item-Open Count the number of opens.", "The current sorting is set to by open count. You need to enable Settings - Item - Record open count.",
aggregateClassificationPrompt4: aggregateClassificationPrompt4:
"Setting an aggregation classification will clear all items under the original classification. Please operate with caution. Are you sure?", "Setting an aggregate classification will clear all items under the original classification. Please proceed with caution. Are you sure?",
align: "Align", align: "Align",
all: "All", all: "All",
altNumberKey: "Alt + Number Key", altNumberKey: "Alt + Number Key",
alwaysCenter: "Always Center", alwaysCenter: "Always Center",
alwaysTop: "Always Top", alwaysTop: "Always on Top",
appearance: "Appearance", appearance: "Appearance",
appx: "Appx", appx: "Appx",
associateFolder: "Associate Folder", associateFolder: "Associate Folder",
associateFolderPrompt1: associateFolderPrompt1:
"Associate folder can monitor changes in the specified folder in real time and synchronize them to the corresponding classification.", "Associate folder can monitor changes in the specified folder in real-time and synchronize them with the corresponding classification.",
associateFolderPrompt2: associateFolderPrompt2:
"Name of the file/folder to be hidden, multiple separated by commas", "Name of the file/folder to be hidden, multiple separated by commas",
associateFolderPrompt3: associateFolderPrompt3:
"The current classification is the parent classification and associate folder cannot be set.", "The current classification is a parent classification and cannot be set as an associate folder.",
associateFolderPrompt4: "The target path does not exist.", associateFolderPrompt4: "The target path does not exist.",
associateFolderPrompt5: "The destination path must be a folder.", associateFolderPrompt5: "The destination path must be a folder.",
associateFolderPrompt6: associateFolderPrompt6:
"Setting the associate folder will clear all items under the original classification. Please operate with caution. Are you sure?", "Setting an associate folder will clear all items under the original classification. Please proceed with caution. Are you sure?",
associateFolderPrompt7: associateFolderPrompt7:
"The target path is empty. The current classification will be automatically converted to a normal classification. Are you sure?", "The target path is empty. The current classification will be automatically converted to a regular classification. Are you sure?",
autoSwitchClassification: "Auto Switch Classification on Scroll", autoSwitchClassification:
"Automatically switch classification when the item list scrolls to the bottom or top",
backgroundIcon: "Background Icon", backgroundIcon: "Background Icon",
backgroundImage: "Background Image", backgroundImage: "Background Image",
backgroundImageMode: "Background Image Mode", backgroundImageMode: "Background Image Mode",
backgroundImagePostion: "Background Image Postion", backgroundImagePosition: "Background Image Position",
backgroundImageTransparent: "Background Image Transparent", backgroundImageTransparency: "Background Image Transparency",
backgroundTransparent: "Background Transparent",
backup: "Backup", backup: "Backup",
backupRestoreData: "Backup/Restore Data", backupRestoreData: "Backup/Restore Data",
backupRestoreDataPrompt: backupRestoreDataPrompt:
"If you want to restore the backup data of versions 1.2.3 and earlier, please choose to import a file in JSON format when restoring.", "To restore data from version 1.2.3 and earlier, please choose to import a JSON file during the restoration process.",
batchConvertAbsolutePath: "Batch Convert to Absolute Path", batchConvertAbsolutePath: "Batch Convert to Absolute Path",
batchConvertRelativePath: "Batch Convert to Relative Path", batchConvertRelativePath: "Batch Convert to Relative Path",
batchCopyTo: "Batch Copy to", batchCopyTo: "Batch Copy to",
@ -652,9 +674,9 @@ let english = {
batchRefreshIcon: "Batch Refresh Icon", batchRefreshIcon: "Batch Refresh Icon",
borderColor: "Border Color", borderColor: "Border Color",
bottom: "Bottom", bottom: "Bottom",
byInitialLetter: "by Initial Letter", byInitialLetter: "By Initial Letter",
byLastOpen: "by Last Open", byLastOpen: "By Last Open",
byOpenNumber: "by Open Count", byOpenCount: "By Open Count",
calculator: "Calculator", calculator: "Calculator",
cancel: "Cancel", cancel: "Cancel",
cancelBatchOperation: "Cancel Batch Operation", cancelBatchOperation: "Cancel Batch Operation",
@ -663,10 +685,10 @@ let english = {
checkInvalidItem: "Check for Invalid Items", checkInvalidItem: "Check for Invalid Items",
checkUpdates: "Check Updates", checkUpdates: "Check Updates",
checkUpdatesPrompt1: checkUpdatesPrompt1:
'Check that there is a new version, click "OK" to jump to the official website to download the latest version.', "A new version has been detected. Click 'OK' to go to the official website and download the latest version.",
checkUpdatesPrompt2: "It is currently the latest version.", checkUpdatesPrompt2: "You are already on the latest version.",
checkUpdatesPrompt3: checkUpdatesPrompt3:
"Failed to check for updates, please confirm the network.", "Update check failed. Please check your network connection.",
classification: "Classification", classification: "Classification",
clear: "Clear", clear: "Clear",
close: "Close", close: "Close",
@ -674,16 +696,21 @@ let english = {
colonKeywordSpace: "Colon + Keyword + Space", colonKeywordSpace: "Colon + Keyword + Space",
color: "Color", color: "Color",
columnNumber: "Column Number", columnNumber: "Column Number",
commandLine: "Command Line",
commandLinePrompt1:
'Use "> + Space" in "Quick Search" or "Search" to enter command-line mode.',
commandPrompt: "Command Prompt", commandPrompt: "Command Prompt",
computer: "Computer", computer: "Computer",
computerManagement: "Computer Management", computerManagement: "Computer Management",
controlPanel: "Control Panel", controlPanel: "Control Panel",
convertAbsolutePath: "Convert to Absolute Path", convertAbsolutePath: "Convert to Absolute Path",
convertRelativePath: "Convert to Relative Path", convertRelativePath: "Convert to Relative Path",
copy: "Copy",
copyFullPath: "Copy Full Path", copyFullPath: "Copy Full Path",
copyTo: "Copy to", copyTo: "Copy to",
createShortcut: "Create Shortcut", createShortcut: "Create Shortcut",
ctrlNumberKey: "Ctrl + Number Key", ctrlNumberKey: "Ctrl + Number Key",
cut: "Cut",
default: "Default", default: "Default",
defaultIcon: "Default Icon", defaultIcon: "Default Icon",
delayDisplay: "Delay Display", delayDisplay: "Delay Display",
@ -692,16 +719,17 @@ let english = {
deleteClassificationPrompt: "Delete current classification?", deleteClassificationPrompt: "Delete current classification?",
deleteIcon: "Delete Icon", deleteIcon: "Delete Icon",
deleteItemPrompt: "Delete current item?", deleteItemPrompt: "Delete current item?",
deleteHistory: "Delete History",
description: "Description", description: "Description",
display: "Display", display: "Display",
displayMainWindow: "Display Main Interface", displayMainInterface: "Display Main Interface",
documents: "Documents", documents: "Documents",
doubleClickOpen: "Double Click Open", doubleClickOpen: "Double Click Open",
doubleClickTaskbar: "Double Click Taskbar", doubleClickTaskbar: "Double Click Taskbar",
downloadImagePrompt1: "Failed to download image.", downloadImagePrompt1: "Failed to download image.",
downloadImagePrompt2: "The link is not in image format.", downloadImagePrompt2: "The link is not in image format.",
dontPromptAgain: "Don't prompt again", dontPromptAgain: "Don't prompt again",
edgeAutoHide: "Auto Hide at Desktop Edge", edgeAutoHide: "Automatically hide when docked to the edge of the desktop",
edgeDock: "Edge Dock", edgeDock: "Edge Dock",
edit: "Edit", edit: "Edit",
editClassification: "Edit Classification", editClassification: "Edit Classification",
@ -709,6 +737,7 @@ let english = {
editSubclassification: "Edit Subclassification", editSubclassification: "Edit Subclassification",
emptyRecycleBin: "Empty Recycle Bin", emptyRecycleBin: "Empty Recycle Bin",
enable: "Enable", enable: "Enable",
enableQuickSearch: "Enable Quick Search",
english: "English", english: "English",
excludeSearch: "Exclude Search", excludeSearch: "Exclude Search",
exit: "Exit", exit: "Exit",
@ -736,22 +765,24 @@ let english = {
globalShortcutKey: "Global Shortcut Key", globalShortcutKey: "Global Shortcut Key",
hiddenItems: "Hidden Items", hiddenItems: "Hidden Items",
hideEllipses: "Hide Ellipses", hideEllipses: "Hide Ellipses",
hideLoseFocus: "Hide After Lose Focus", hideLoseFocus: "Loss of Focus Hide",
hideName: "Hide Name", hideName: "Hide Name",
hideTray: "Hide Tray", hideTray: "Hide Tray Icon",
hideTaskbar: "Hide Taskbar",
hideWindowCollapseSubClassification: hideWindowCollapseSubClassification:
"Collapse Subclassification when Hide Window", "Collapse subclassifications when the window is hidden",
hideWindowAfterOpen: "Hide Window After Opening",
history: "History", history: "History",
hover: "Hover", hover: "Hover",
icon: "Icon", icon: "Icon",
imageLink: "Image Link", imageLink: "Image Link",
item: "Item", item: "Item",
itemAddEditPrompt1: itemAddEditPrompt1:
"After selecting the fixed icon, the current project will not participate in refreshing the icon.", "After selecting a fixed icon, the current item will not participate in icon refreshing.",
itemAddEditPrompt2: "Leave it blank if there are no special requirements", itemAddEditPrompt2: "Leave empty if there are no special requirements",
itemAddEditPrompt3: "Add successfully.", itemAddEditPrompt3: "Add successfully.",
itemAddEditPrompt4: "The target does not exist.", itemAddEditPrompt4: "The target does not exist.",
itemAddEditPrompt5: "Failed to obtain URL information.", itemAddEditPrompt5: "Failed to retrieve website information.",
itemList: "Item List", itemList: "Item List",
keyword: "Keyword", keyword: "Keyword",
keywordSpace: "Leyword + Space", keywordSpace: "Leyword + Space",
@ -781,7 +812,7 @@ let english = {
name: "Name", name: "Name",
network: "Network", network: "Network",
networkIcon: "Network Icon", networkIcon: "Network Icon",
networkIconPrompt1: "Supports JPG/JPEG/GIF/PNG/ICO/SVG/WEBP format images.", networkIconPrompt1: "Supports JPG/JPEG/GIF/PNG/ICO/SVG/WEBP image formats.",
networkShareCenter: "Network Share Center", networkShareCenter: "Network Share Center",
newClassification: "New Classification", newClassification: "New Classification",
newClassificationName: "New Classification", newClassificationName: "New Classification",
@ -792,29 +823,32 @@ let english = {
normal: "Normal", normal: "Normal",
notDisturb: "Not Disturb Mode", notDisturb: "Not Disturb Mode",
notDisturbPrompt: notDisturbPrompt:
"After turning on Do Not Disturb mode, the Dawn Launcher window will not pop up when the computer is in full-screen mode for games or applications.", "After enabling Do Not Disturb mode, Dawn Launcher will not pop up during full-screen games or applications.",
notFoundFile: "The file specified cannot be found", notFoundFile: "The file specified cannot be found",
notFoundFolder: "The specified folder cannot be found", notFoundFolder: "The specified folder cannot be found",
notTransparent: "Not Transparent",
number: "Number", number: "Number",
numberKey: "Number Key", numberKey: "Number Key",
officialWebsite: "Official Website", officialWebsite: "Official Website",
ok: "OK", ok: "OK",
open: "Open", open: "Open",
openAfterHideMainInterface: "Hide Main Interface After Open",
openAfterHideQuickSearchWindow: "Hide Window After Open",
openFileLocation: "Open File Location", openFileLocation: "Open File Location",
openNow: "Open when Only One Item", openNow: "Only one item left to open immediately",
openNumber: "Open Count", openCount: "Open Count",
parameters: "Parameters", parameters: "Parameters",
password: "Password", password: "Password",
pasteIcon: "Paste Icon", pasteIcon: "Paste Icon",
paste: "Paste",
path: "Path",
powerOptions: "Power Options", powerOptions: "Power Options",
powerShell: "PowerShell",
programsFeatures: "Programs Features", programsFeatures: "Programs Features",
proxy: "Proxy", proxy: "Proxy",
proxyPrompt: proxyPrompt:
'Only HTTP proxy is supported. When filling in the "address", you need to include the communication protocol and port, for example: http://127.0.0.1:7890. If there is no username and password, just leave it blank.', 'Only HTTP proxy is supported. When filling in the "address", you need to include the communication protocol and port, for example: http://127.0.0.1:7890. If there is no username and password, just leave it blank.',
prompt: "Prompt",
quickSearch: "Quick Search", quickSearch: "Quick Search",
recordOpenNumber: "Record Open Count", recordOpenCount: "Record Open Count",
recycleBin: "Recycle Bin", recycleBin: "Recycle Bin",
refreshIcon: "Refresh Icon", refreshIcon: "Refresh Icon",
registryEditor: "Registry Editor", registryEditor: "Registry Editor",
@ -825,7 +859,6 @@ let english = {
restart: "Restart", restart: "Restart",
restore: "Restore", restore: "Restore",
restoreDataPrompt: "Failed to restore data.", restoreDataPrompt: "Failed to restore data.",
rewardSponsor: "Reward&Sponsor",
right: "Right", right: "Right",
roundedCorners: "Rounded Corners", roundedCorners: "Rounded Corners",
runAsAdministrator: "Run as Administrator", runAsAdministrator: "Run as Administrator",
@ -864,12 +897,14 @@ let english = {
'It conflicts with the "Search" shortcut key in "Settings-General", please reset it.', 'It conflicts with the "Search" shortcut key in "Settings-General", please reset it.',
shortcutKeyPrompt6: shortcutKeyPrompt6:
'It conflicts with the "Show/Hide" shortcut key in "Settings-Quick Search", please reset it.', 'It conflicts with the "Show/Hide" shortcut key in "Settings-Quick Search", please reset it.',
shortcutKeyPrompt7: "Invaild symbol.",
show: "Show", show: "Show",
showFollowMousePosition: "Follows Mouse Position on Display", showFollowMousePosition: "Follow the mouse position when displayed",
showHide: "Show/Hide", showHide: "Show/Hide",
showOnlyFiles: "Show Only Files", showOnlyFiles: "Show Only Files",
showOnlyFolders: "Show Only Folders", showOnlyFolders: "Show Only Folders",
shutdown: "Shutdown关机", showPath: "Show Path",
shutdown: "Shutdown",
simplifiedChinese: "Simplified Chinese", simplifiedChinese: "Simplified Chinese",
size: "Size", size: "Size",
sleep: "Sleep", sleep: "Sleep",
@ -878,15 +913,16 @@ let english = {
startLocation: "Start Location", startLocation: "Start Location",
startMenu: "Start Menu", startMenu: "Start Menu",
startup: "Startup", startup: "Startup",
startupTray: "Minimize to System Tray on Startup", startupTray: "Minimize to system tray on startup",
subclassification: "Subclassification", subclassification: "Subclassification",
svgIcon: "SVG Icon", svgIcon: "SVG Icon",
svgIconPrompt1: svgIconPrompt1:
'After entering the SVG code, you need to click the "Check Code" button first.', 'After entering SVG code, you need to click the "Validate Code" button first.',
switch: "Switch", switch: "Switch",
switchClassificationCollapseOtherSubClassification: switchClassificationCollapseOtherSubClassification:
"Collapse Other Subclassification on Classification Switch", "Collapse other subclassifications when switching classifications",
switchEnglish: "Switch to English Input on Window Display", switchEnglish:
"Switch the input method to English mode when the window is displayed",
system: "System", system: "System",
target: "Target", target: "Target",
taskManager: "Task Manager", taskManager: "Task Manager",
@ -896,14 +932,15 @@ let english = {
title: "Title", title: "Title",
top: "Top", top: "Top",
traditionalChinese: "Traditional Chinese", traditionalChinese: "Traditional Chinese",
transparent: "Transparent",
turnOffMonitor: "Turn Off Monitor", turnOffMonitor: "Turn Off Monitor",
unlockClassification: "Unlock Classification", unlockClassification: "Unlock Classification",
unlockItem: "Unlock Item", unlockItem: "Unlock Item",
uploadIcon: "Upload Icon", uploadIcon: "Upload Icon",
url: "URL", url: "URL",
useItemOpen: "Use This Item to Open Dragged Files", useItemOpen:
"Open files with this item when dragging files from outside the program to the item icon",
useProxy: "Use Proxy", useProxy: "Use Proxy",
useQuickSearch: "Use Quick Search",
username: "Username", username: "Username",
update: "Update", update: "Update",
webSearch: "Web Search", webSearch: "Web Search",
@ -912,6 +949,7 @@ let english = {
webSearchModePrompt2: "{w} is the search keyword.", webSearchModePrompt2: "{w} is the search keyword.",
width: "Width", width: "Width",
window: "Window", window: "Window",
windowTransparency: "Window Transparency",
zoom: "Zoom", zoom: "Zoom",
}; };

View File

@ -3,83 +3,83 @@ import { Theme } from "../../types/setting";
const themeList: Array<Theme> = [ const themeList: Array<Theme> = [
{ {
name: "#FFFFFF", name: "#FFFFFF",
mainFontColor: "#505050FF", mainFontColor: "#505050",
secondFontColor: "#505050FF", secondFontColor: "#505050",
mainBackgroundColor: "#FFFFFFFF", mainBackgroundColor: "#FFFFFF",
secondBackgroundColor: "#DCDEDFFF", secondBackgroundColor: "#DCDEDF",
borderColor: "#F0F0F0FF", borderColor: "#F0F0F0",
}, },
{ {
name: "#2B2B2B", name: "#2B2B2B",
mainFontColor: "#BBBBBBFF", mainFontColor: "#BBBBBB",
secondFontColor: "#BBBBBBFF", secondFontColor: "#BBBBBB",
mainBackgroundColor: "#2B2B2BFF", mainBackgroundColor: "#2B2B2B",
secondBackgroundColor: "#3C3F41FF", secondBackgroundColor: "#3C3F41",
borderColor: "#3C3F41FF", borderColor: "#373737",
}, },
{ {
name: "#508CC8", name: "#508CC8",
mainFontColor: "#FFFFFFFF", mainFontColor: "#FFFFFF",
secondFontColor: "#FFFFFFFF", secondFontColor: "#FFFFFF",
mainBackgroundColor: "#508CC8FF", mainBackgroundColor: "#508CC8",
secondBackgroundColor: "#6FA0D2FF", secondBackgroundColor: "#6FA0D2",
borderColor: "#6FA0D2FF", borderColor: "#5A94CD",
}, },
{ {
name: "#024351", name: "#024351",
mainFontColor: "#FFFFFFFF", mainFontColor: "#FFFFFF",
secondFontColor: "#FFFFFFFF", secondFontColor: "#FFFFFF",
mainBackgroundColor: "#024351FF", mainBackgroundColor: "#024351",
secondBackgroundColor: "#025A6CFF", secondBackgroundColor: "#025A6C",
borderColor: "#025A6CFF", borderColor: "#064D5C",
}, },
{ {
name: "#516FA3", name: "#516FA3",
mainFontColor: "#FFFFFFFF", mainFontColor: "#FFFFFF",
secondFontColor: "#FFFFFFFF", secondFontColor: "#FFFFFF",
mainBackgroundColor: "#516FA3FF", mainBackgroundColor: "#516FA3",
secondBackgroundColor: "#91A8D0FF", secondBackgroundColor: "#91A8D0",
borderColor: "#91A8D0FF", borderColor: "#5D78A7",
}, },
{ {
name: "#45326E", name: "#45326E",
mainFontColor: "#FFFFFFFF", mainFontColor: "#FFFFFF",
secondFontColor: "#FFFFFFFF", secondFontColor: "#FFFFFF",
mainBackgroundColor: "#45326EFF", mainBackgroundColor: "#45326E",
secondBackgroundColor: "#5F4B8BFF", secondBackgroundColor: "#5F4B8B",
borderColor: "#5F4B8BFF", borderColor: "#4C3A73",
}, },
{ {
name: "#693030", name: "#693030",
mainFontColor: "#FFFFFFFF", mainFontColor: "#FFFFFF",
secondFontColor: "#FFFFFFFF", secondFontColor: "#FFFFFF",
mainBackgroundColor: "#693030FF", mainBackgroundColor: "#693030",
secondBackgroundColor: "#955151FF", secondBackgroundColor: "#955151",
borderColor: "#803A3AFF", borderColor: "#733535",
}, },
{ {
name: "#9F2F4A", name: "#9F2F4A",
mainFontColor: "#FFFFFFFF", mainFontColor: "#FFFFFF",
secondFontColor: "#FFFFFFFF", secondFontColor: "#FFFFFF",
mainBackgroundColor: "#9F2F4AFF", mainBackgroundColor: "#9F2F4A",
secondBackgroundColor: "#EA6F8CFF", secondBackgroundColor: "#EA6F8C",
borderColor: "#AD3350FF", borderColor: "#AD3350",
}, },
{ {
name: "#000000,#FFDB00", name: "#000000,#FFDB00",
mainFontColor: "#B3B3B3FF", mainFontColor: "#B3B3B3",
secondFontColor: "#000000FF", secondFontColor: "#000000",
mainBackgroundColor: "#000000FF", mainBackgroundColor: "#000000",
secondBackgroundColor: "#FFDB00FF", secondBackgroundColor: "#FFDB00",
borderColor: "#1D1D1DFF", borderColor: "#1D1D1D",
}, },
{ {
name: "#000000,#FFFFFF", name: "#000000,#FFFFFF",
mainFontColor: "#B3B3B3FF", mainFontColor: "#B3B3B3",
secondFontColor: "#000000FF", secondFontColor: "#000000",
mainBackgroundColor: "#000000FF", mainBackgroundColor: "#000000",
secondBackgroundColor: "#FFFFFFFF", secondBackgroundColor: "#FFFFFF",
borderColor: "#1D1D1DFF", borderColor: "#1D1D1D",
}, },
]; ];

View File

@ -14,7 +14,7 @@ function convert<F, T>(from: F): T {
* @returns * @returns
*/ */
function isAbsolutePath(path: string) { function isAbsolutePath(path: string) {
const regex = /^[a-zA-Z]:\\/; const regex = /^[a-zA-Z]:\\|^\\\\/;
return regex.test(path); return regex.test(path);
} }

View File

@ -1,6 +1,7 @@
import { import {
Appearance, Appearance,
Classification, Classification,
CommandLine,
General, General,
Item, Item,
Network, Network,
@ -31,6 +32,7 @@ function getGeneral({
lockSize = false, lockSize = false,
hideLoseFocus = false, hideLoseFocus = false,
hideTray = false, hideTray = false,
hideTaskbar = true,
fixedPosition = false, fixedPosition = false,
alwaysCenter = false, alwaysCenter = false,
showHideMouseWheelClick = false, showHideMouseWheelClick = false,
@ -53,6 +55,7 @@ function getGeneral({
lockSize?: boolean | null; lockSize?: boolean | null;
hideLoseFocus?: boolean | null; hideLoseFocus?: boolean | null;
hideTray?: boolean | null; hideTray?: boolean | null;
hideTaskbar?: boolean | null;
fixedPosition?: boolean | null; fixedPosition?: boolean | null;
alwaysCenter?: boolean | null; alwaysCenter?: boolean | null;
showHideMouseWheelClick?: boolean | null; showHideMouseWheelClick?: boolean | null;
@ -76,6 +79,7 @@ function getGeneral({
lockSize: lockSize ?? false, lockSize: lockSize ?? false,
hideLoseFocus: hideLoseFocus ?? false, hideLoseFocus: hideLoseFocus ?? false,
hideTray: hideTray ?? false, hideTray: hideTray ?? false,
hideTaskbar: hideTaskbar ?? true,
fixedPosition: fixedPosition ?? false, fixedPosition: fixedPosition ?? false,
alwaysCenter: alwaysCenter ?? false, alwaysCenter: alwaysCenter ?? false,
showHideMouseWheelClick: showHideMouseWheelClick ?? false, showHideMouseWheelClick: showHideMouseWheelClick ?? false,
@ -185,15 +189,18 @@ function getSubClassification({
itemAreaNameFontSize = 14, itemAreaNameFontSize = 14,
itemAreaNameFontWeight = 700, itemAreaNameFontWeight = 700,
itemAreaNameFontLineHeight = 1.25, itemAreaNameFontLineHeight = 1.25,
itemAreaNameAlign = "left",
}: { }: {
itemAreaNameFontSize?: number | null; itemAreaNameFontSize?: number | null;
itemAreaNameFontWeight?: number | null; itemAreaNameFontWeight?: number | null;
itemAreaNameFontLineHeight?: number | null; itemAreaNameFontLineHeight?: number | null;
itemAreaNameAlign?: "left" | "center" | "right" | null;
}): SubClassification { }): SubClassification {
return { return {
itemAreaNameFontSize: itemAreaNameFontSize ?? 14, itemAreaNameFontSize: itemAreaNameFontSize ?? 14,
itemAreaNameFontWeight: itemAreaNameFontWeight ?? 700, itemAreaNameFontWeight: itemAreaNameFontWeight ?? 700,
itemAreaNameFontLineHeight: itemAreaNameFontLineHeight ?? 1.25, itemAreaNameFontLineHeight: itemAreaNameFontLineHeight ?? 1.25,
itemAreaNameAlign: itemAreaNameAlign ?? "left",
}; };
} }
@ -217,6 +224,7 @@ function getItem({
fontSize = 14, fontSize = 14,
fontWeight = 400, fontWeight = 400,
fontLineHeight = 1.25, fontLineHeight = 1.25,
promptShowPath = false,
}: { }: {
layout?: string | null; layout?: string | null;
iconSize?: number | null; iconSize?: number | null;
@ -233,6 +241,7 @@ function getItem({
fontSize?: number | null; fontSize?: number | null;
fontWeight?: number | null; fontWeight?: number | null;
fontLineHeight?: number | null; fontLineHeight?: number | null;
promptShowPath?: boolean | null;
}): Item { }): Item {
return { return {
layout: layout ?? "tile", layout: layout ?? "tile",
@ -250,6 +259,7 @@ function getItem({
fontSize: fontSize ?? 14, fontSize: fontSize ?? 14,
fontWeight: fontWeight ?? 400, fontWeight: fontWeight ?? 400,
fontLineHeight: fontLineHeight ?? 1.25, fontLineHeight: fontLineHeight ?? 1.25,
promptShowPath: promptShowPath ?? false,
}; };
} }
@ -268,6 +278,7 @@ function getQuickSearch({
useItemOpen = false, useItemOpen = false,
openAfterHideQuickSearchWindow = true, openAfterHideQuickSearchWindow = true,
matchConditionsRemark = false, matchConditionsRemark = false,
width = 600,
}: { }: {
enable?: boolean | null; enable?: boolean | null;
showHideShortcutKey?: string | null; showHideShortcutKey?: string | null;
@ -279,6 +290,7 @@ function getQuickSearch({
useItemOpen?: boolean | null; useItemOpen?: boolean | null;
openAfterHideQuickSearchWindow?: boolean | null; openAfterHideQuickSearchWindow?: boolean | null;
matchConditionsRemark?: boolean | null; matchConditionsRemark?: boolean | null;
width?: number | null;
}): QuickSearch { }): QuickSearch {
return { return {
enable: enable ?? true, enable: enable ?? true,
@ -291,6 +303,7 @@ function getQuickSearch({
useItemOpen: useItemOpen ?? false, useItemOpen: useItemOpen ?? false,
openAfterHideQuickSearchWindow: openAfterHideQuickSearchWindow ?? true, openAfterHideQuickSearchWindow: openAfterHideQuickSearchWindow ?? true,
matchConditionsRemark: matchConditionsRemark ?? false, matchConditionsRemark: matchConditionsRemark ?? false,
width: width ?? 600,
}; };
} }
@ -311,6 +324,20 @@ function getWebSearch({
}; };
} }
/**
*
* @returns
*/
function getCommandLine({
defaultUse = "cmd",
}: {
defaultUse?: string | null;
}): CommandLine {
return {
defaultUse: defaultUse ?? "cmd",
};
}
/** /**
* *
* @returns * @returns
@ -371,6 +398,9 @@ function getSetting(setting: Setting | null): Setting {
webSearch: getWebSearch( webSearch: getWebSearch(
setting && setting.webSearch ? setting.webSearch : {} setting && setting.webSearch ? setting.webSearch : {}
), ),
commandLine: getCommandLine(
setting && setting.commandLine ? setting.commandLine : {}
),
network: getNetwork(setting && setting.network ? setting.network : {}), network: getNetwork(setting && setting.network ? setting.network : {}),
}; };
} }

View File

@ -1,7 +1,8 @@
import { resolve, dirname, parse } from "node:path"; import { resolve, dirname, parse, join } from "node:path";
import { isAbsolutePath } from "../../commons/utils/common"; import { isAbsolutePath } from "../../commons/utils/common";
import mime from "mime"; import mime from "mime";
import { readFileSync } from "node:fs"; import { readFileSync } from "node:fs";
import icojs from "icojs";
// 图标格式 // 图标格式
const iconExts = ["jpg", "jpeg", "png", "gif", "ico", "svg", "webp"]; const iconExts = ["jpg", "jpeg", "png", "gif", "ico", "svg", "webp"];
@ -59,12 +60,21 @@ function getURLParams(paramsMap: Map<string, any>) {
function parseEnvPath(path: string) { function parseEnvPath(path: string) {
// 尝试解析路径中的环境变量 // 尝试解析路径中的环境变量
let parsedPath = parse(path); let parsedPath = parse(path);
let isBase = false; // 路径数组
let pathArr: Array<string> = []; let pathArr: Array<string> = [];
// 判断是否是网络路径,以\\开头
let isNetwork = false;
if (path.indexOf("\\\\") === 0) {
isNetwork = true;
}
// 是否是一级路径
let isBase = false;
if (!parsedPath.dir || parsedPath.dir.trim() === "") { if (!parsedPath.dir || parsedPath.dir.trim() === "") {
// 如果为空代表路径只有一级也就是当前文件本身比如C:/1.txt
pathArr = parsedPath.base.split("\\"); pathArr = parsedPath.base.split("\\");
isBase = true; isBase = true;
} else { } else {
// 不为空代表有父级目录
pathArr = parsedPath.dir.split("\\"); pathArr = parsedPath.dir.split("\\");
} }
// 新路径 // 新路径
@ -93,29 +103,30 @@ function parseEnvPath(path: string) {
if (!isBase) { if (!isBase) {
newPathArr.push(parsedPath.base); newPathArr.push(parsedPath.base);
} }
// 拼接并返回 // 拼接
return newPathArr.join("\\"); let newPath = join(...newPathArr);
// 如果是网络路径,在最前面加\\
if (isNetwork) {
newPath = "\\\\" + newPath;
}
return newPath;
} }
/** /**
* *
* @param path * @returns
*/ */
function getAbsolutePath(path: string) { function parsePath(path: string) {
// 尝试解析环境变量
path = parseEnvPath(path);
// 是否是相对路径
if (!isAbsolutePath(path)) { if (!isAbsolutePath(path)) {
// 尝试解析环境变量 return resolve(
let newPath = parseEnvPath(path); process.env.NODE_ENV === "development"
// 判断解析之后的路径是否是绝对路径 ? resolve(".")
if (isAbsolutePath(newPath)) { : dirname(process.execPath),
return newPath; path
} else { );
return resolve(
process.env.NODE_ENV === "development"
? resolve(".")
: dirname(process.execPath),
path
);
}
} }
return path; return path;
} }
@ -124,7 +135,7 @@ function getAbsolutePath(path: string) {
* *
* @param filePath * @param filePath
*/ */
function getFileIcon(filePath: string | null) { async function getFileIcon(filePath: string | null) {
// 图标 // 图标
let icon: string | null = null; let icon: string | null = null;
if (filePath) { if (filePath) {
@ -133,6 +144,16 @@ function getFileIcon(filePath: string | null) {
if (iconExts.includes(ext)) { if (iconExts.includes(ext)) {
// 读取文件 // 读取文件
let buffer = readFileSync(filePath); let buffer = readFileSync(filePath);
if (ext === "ico") {
let images = await icojs.parseICO(buffer);
const largestImage = images.reduce((max, current) => {
if (current.width * current.height > max.width * max.height) {
return current;
}
return max;
});
buffer = Buffer.from(largestImage.buffer);
}
icon = icon =
"data:" + "data:" +
mime.getType(filePath) + mime.getType(filePath) +
@ -146,10 +167,4 @@ function getFileIcon(filePath: string | null) {
return icon; return icon;
} }
export { export { getURLParams, parsePath, getFileIcon, iconExts, getRandomUserAgent };
getURLParams,
getAbsolutePath,
getFileIcon,
iconExts,
getRandomUserAgent,
};

View File

@ -18,14 +18,17 @@ function createWindow() {
parent: global.mainWindow, parent: global.mainWindow,
height: 212, height: 212,
width: 600, width: 600,
type: "toolbar",
maximizable: false, maximizable: false,
minimizable: false, minimizable: false,
resizable: false, resizable: false,
fullscreenable: false, fullscreenable: false,
focusable: true, focusable: true,
show: false, show: false,
backgroundColor: getMainBackgorunColor(), transparent: global.setting.appearance.transparency < 1,
backgroundColor:
global.setting.appearance.transparency === 1
? getMainBackgorunColor()
: null,
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
preload: join(__dirname, "../preload/index.js"), preload: join(__dirname, "../preload/index.js"),

View File

@ -14,7 +14,7 @@ import { getDataSqlite3 } from "../../commons/betterSqlite3";
let db = getDataSqlite3(); let db = getDataSqlite3();
// 分类表名 // 分类表名
let classificationTableName = "classification"; let tableName = "classification";
// 查询字段 // 查询字段
let selectColumn = let selectColumn =
@ -41,7 +41,7 @@ function getClassification(row: any): Classification {
*/ */
function init() { function init() {
// sql // sql
let sql = `CREATE TABLE IF NOT EXISTS ${classificationTableName} ( let sql = `CREATE TABLE IF NOT EXISTS ${tableName} (
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY AUTOINCREMENT,
parent_id INTEGER, parent_id INTEGER,
name TEXT NOT NULL, name TEXT NOT NULL,
@ -53,7 +53,7 @@ function init() {
// 运行 // 运行
db.exec(sql); db.exec(sql);
// 查询有多少条数据 // 查询有多少条数据
sql = `SELECT COUNT(id) count FROM ${classificationTableName}`; sql = `SELECT COUNT(id) count FROM ${tableName}`;
let row: any = db.prepare(sql).get(); let row: any = db.prepare(sql).get();
let count = row.count as number; let count = row.count as number;
if (count === 0) { if (count === 0) {
@ -70,7 +70,7 @@ function list(parentId: number | null = null) {
// 参数 // 参数
let params = []; let params = [];
// sql // sql
let sql = `SELECT ${selectColumn} FROM ${classificationTableName}`; let sql = `SELECT ${selectColumn} FROM ${tableName}`;
if (parentId) { if (parentId) {
sql += " WHERE parent_id = ?"; sql += " WHERE parent_id = ?";
params.push(parentId); params.push(parentId);
@ -103,7 +103,7 @@ function add(
// 获取序号 // 获取序号
let newOrder = getMaxOrder(parentId) + 1; let newOrder = getMaxOrder(parentId) + 1;
// SQL // SQL
let sql = `INSERT INTO ${classificationTableName} (parent_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`) VALUES (?, ?, ?, ?, ?, ?, ?)`; let sql = `INSERT INTO ${tableName} (parent_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`) VALUES (?, ?, ?, ?, ?, ?, ?)`;
// 运行 // 运行
let id = db let id = db
.prepare(sql) .prepare(sql)
@ -146,7 +146,7 @@ function add(
*/ */
function update(classification: Classification) { function update(classification: Classification) {
// SQL // SQL
let sql = `UPDATE ${classificationTableName} SET name = ?, type = ?, data = ?, shortcut_key = ?, global_shortcut_key = ? WHERE id = ?`; let sql = `UPDATE ${tableName} SET name = ?, type = ?, data = ?, shortcut_key = ?, global_shortcut_key = ? WHERE id = ?`;
// 运行 // 运行
return ( return (
db db
@ -169,7 +169,7 @@ function update(classification: Classification) {
*/ */
function updateData(id: number, data: ClassificationData) { function updateData(id: number, data: ClassificationData) {
// SQL // SQL
let sql = `UPDATE ${classificationTableName} SET data = ? WHERE id = ?`; let sql = `UPDATE ${tableName} SET data = ? WHERE id = ?`;
return db.prepare(sql).run(JSON.stringify(data), id).changes > 0; return db.prepare(sql).run(JSON.stringify(data), id).changes > 0;
} }
@ -179,7 +179,7 @@ function updateData(id: number, data: ClassificationData) {
*/ */
function selectById(id: number): Classification | null { function selectById(id: number): Classification | null {
// SQL // SQL
let sql = `SELECT ${selectColumn} FROM ${classificationTableName} WHERE id = ?`; let sql = `SELECT ${selectColumn} FROM ${tableName} WHERE id = ?`;
// 运行 // 运行
let row = db.prepare(sql).get(id); let row = db.prepare(sql).get(id);
// 返回 // 返回
@ -201,7 +201,7 @@ function del(id: number) {
// 查询有无子分类 // 查询有无子分类
let childList = list(classifictaion.id); let childList = list(classifictaion.id);
// SQL // SQL
let sql = `DELETE FROM ${classificationTableName} WHERE id = ? or parent_id = ?`; let sql = `DELETE FROM ${tableName} WHERE id = ? or parent_id = ?`;
// 运行 // 运行
let res = db.prepare(sql).run(id, id).changes > 0; let res = db.prepare(sql).run(id, id).changes > 0;
if (res) { if (res) {
@ -256,14 +256,14 @@ function updateOrder(
newOrder = getMaxOrder(parentId) + 1; newOrder = getMaxOrder(parentId) + 1;
} }
// SQL // SQL
let sql = `UPDATE ${classificationTableName} SET \`order\` = ? WHERE id = ?`; let sql = `UPDATE ${tableName} SET \`order\` = ? WHERE id = ?`;
// 更新排序 // 更新排序
db.prepare(sql).run(newOrder, fromClassification.id); db.prepare(sql).run(newOrder, fromClassification.id);
// 判断新序号和老序号之间的数据是+1还是-1 // 判断新序号和老序号之间的数据是+1还是-1
if (newOrder > fromClassification.order) { if (newOrder > fromClassification.order) {
// 新序号和老序号之间数据,序号-1 // 新序号和老序号之间数据,序号-1
let params = [fromClassification.order, newOrder, fromClassification.id]; let params = [fromClassification.order, newOrder, fromClassification.id];
sql = `UPDATE ${classificationTableName} SET \`order\` = \`order\` - 1 WHERE \`order\` > ? AND \`order\` <= ? AND id != ?`; sql = `UPDATE ${tableName} SET \`order\` = \`order\` - 1 WHERE \`order\` > ? AND \`order\` <= ? AND id != ?`;
if (parentId) { if (parentId) {
sql += " AND parent_id = ?"; sql += " AND parent_id = ?";
params.push(parentId); params.push(parentId);
@ -274,7 +274,7 @@ function updateOrder(
} else { } else {
// 新序号和老序号之间数据,序号+1 // 新序号和老序号之间数据,序号+1
let params = [newOrder, fromClassification.order, fromClassification.id]; let params = [newOrder, fromClassification.order, fromClassification.id];
sql = `UPDATE ${classificationTableName} SET \`order\` = \`order\` + 1 WHERE \`order\` >= ? AND \`order\` < ? AND id != ?`; sql = `UPDATE ${tableName} SET \`order\` = \`order\` + 1 WHERE \`order\` >= ? AND \`order\` < ? AND id != ?`;
if (parentId) { if (parentId) {
sql += " AND parent_id = ?"; sql += " AND parent_id = ?";
params.push(parentId); params.push(parentId);
@ -298,7 +298,7 @@ function reorder(parentId: number | null) {
// 开启事务 // 开启事务
db.transaction(() => { db.transaction(() => {
// SQL // SQL
let sql = `UPDATE ${classificationTableName} SET \`order\` = ? WHERE id = ?`; let sql = `UPDATE ${tableName} SET \`order\` = ? WHERE id = ?`;
// 更新序号 // 更新序号
for (let i = 0; i < classificationList.length; i++) { for (let i = 0; i < classificationList.length; i++) {
db.prepare(sql).run(i + 1, classificationList[i].id); db.prepare(sql).run(i + 1, classificationList[i].id);
@ -312,7 +312,7 @@ function reorder(parentId: number | null) {
*/ */
function getMaxOrder(parentId: number | null) { function getMaxOrder(parentId: number | null) {
// SQL // SQL
let sql = `SELECT MAX(\`order\`) \`order\` FROM ${classificationTableName}`; let sql = `SELECT MAX(\`order\`) \`order\` FROM ${tableName}`;
if (parentId) { if (parentId) {
sql += " WHERE parent_id = ?"; sql += " WHERE parent_id = ?";
} else { } else {
@ -337,7 +337,7 @@ function updateIcon(id: number, icon: string | null) {
let classification = selectById(id); let classification = selectById(id);
if (classification) { if (classification) {
// SQL // SQL
let sql = `UPDATE ${classificationTableName} SET data = ? WHERE id = ?`; let sql = `UPDATE ${tableName} SET data = ? WHERE id = ?`;
// 更新图标 // 更新图标
classification.data.icon = icon; classification.data.icon = icon;
return ( return (

View File

@ -43,14 +43,17 @@ function createAddEditWindow(id: number | null, parentId: number | null) {
parent: global.mainWindow, parent: global.mainWindow,
height: 174, height: 174,
width: 400, width: 400,
type: "toolbar",
maximizable: false, maximizable: false,
minimizable: false, minimizable: false,
resizable: false, resizable: false,
fullscreenable: false, fullscreenable: false,
focusable: true, focusable: true,
show: false, show: false,
backgroundColor: getMainBackgorunColor(), transparent: global.setting.appearance.transparency < 1,
backgroundColor:
global.setting.appearance.transparency === 1
? getMainBackgorunColor()
: null,
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
preload: join(__dirname, "../preload/index.js"), preload: join(__dirname, "../preload/index.js"),
@ -108,14 +111,17 @@ function createSetIconWindow(id: number) {
parent: global.mainWindow, parent: global.mainWindow,
height: 500, height: 500,
width: 358, width: 358,
type: "toolbar",
maximizable: false, maximizable: false,
minimizable: false, minimizable: false,
resizable: false, resizable: false,
fullscreenable: false, fullscreenable: false,
focusable: true, focusable: true,
show: false, show: false,
backgroundColor: getMainBackgorunColor(), transparent: global.setting.appearance.transparency < 1,
backgroundColor:
global.setting.appearance.transparency === 1
? getMainBackgorunColor()
: null,
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
preload: join(__dirname, "../preload/index.js"), preload: join(__dirname, "../preload/index.js"),
@ -168,14 +174,17 @@ function createAssociateFolderWindow(id: number) {
parent: global.mainWindow, parent: global.mainWindow,
height: 249, height: 249,
width: 400, width: 400,
type: "toolbar",
maximizable: false, maximizable: false,
minimizable: false, minimizable: false,
resizable: false, resizable: false,
fullscreenable: false, fullscreenable: false,
focusable: true, focusable: true,
show: false, show: false,
backgroundColor: getMainBackgorunColor(), transparent: global.setting.appearance.transparency < 1,
backgroundColor:
global.setting.appearance.transparency === 1
? getMainBackgorunColor()
: null,
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
preload: join(__dirname, "../preload/index.js"), preload: join(__dirname, "../preload/index.js"),
@ -233,14 +242,17 @@ function createAggregateWindow(id: number) {
parent: global.mainWindow, parent: global.mainWindow,
height: 144, height: 144,
width: 400, width: 400,
type: "toolbar",
maximizable: false, maximizable: false,
minimizable: false, minimizable: false,
resizable: false, resizable: false,
fullscreenable: false, fullscreenable: false,
focusable: true, focusable: true,
show: false, show: false,
backgroundColor: getMainBackgorunColor(), transparent: global.setting.appearance.transparency < 1,
backgroundColor:
global.setting.appearance.transparency === 1
? getMainBackgorunColor()
: null,
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
preload: join(__dirname, "../preload/index.js"), preload: join(__dirname, "../preload/index.js"),
@ -532,7 +544,7 @@ function getItemSortMenu(classification: Classification) {
if (global.setting.item.openNumber) { if (global.setting.item.openNumber) {
submenus.push( submenus.push(
new MenuItem({ new MenuItem({
label: global.language.byOpenNumber, label: global.language.byOpenCount,
icon: icon:
classification.data.itemSort === "openNumber" && !hasChild classification.data.itemSort === "openNumber" && !hasChild
? getDot() ? getDot()

View File

@ -1,4 +1,4 @@
import { Menu, MenuItem, ipcMain, dialog } from "electron"; import { Menu, MenuItem, ipcMain } from "electron";
import { Classification } from "../../../types/classification"; import { Classification } from "../../../types/classification";
import { import {
createAddEditWindow, createAddEditWindow,
@ -27,7 +27,12 @@ import {
batchUpdateFixed, batchUpdateFixed,
} from "./data"; } from "./data";
import { setShortcutKey } from "../setting"; import { setShortcutKey } from "../setting";
import { closeWindow, getDot, sendToWebContent } from "../commons/index"; import {
closeWindow,
getDot,
sendToWebContent,
showMessageBoxSync,
} from "../commons/index";
export default function () { export default function () {
// 获取分类列表 // 获取分类列表
@ -248,13 +253,12 @@ export default function () {
new MenuItem({ new MenuItem({
label: global.language.delete, label: global.language.delete,
click: () => { click: () => {
let res = dialog.showMessageBoxSync(global.mainWindow, { let res = showMessageBoxSync(
message: global.language.deleteClassificationPrompt, "mainWindow",
buttons: [global.language.ok, global.language.cancel], global.language.deleteClassificationPrompt,
type: "question", "question",
noLink: true, [global.language.ok, global.language.cancel]
cancelId: 1, );
});
if (res === 0) { if (res === 0) {
// 删除数据 // 删除数据
if (del(classification.id)) { if (del(classification.id)) {

View File

@ -6,7 +6,17 @@ import retry from "retry";
import request from "request"; import request from "request";
import * as cheerio from "cheerio"; import * as cheerio from "cheerio";
import { isAbsolutePath } from "../../../commons/utils/common"; import { isAbsolutePath } from "../../../commons/utils/common";
import { BrowserWindow, app, dialog, nativeImage, nativeTheme } from "electron"; import {
BrowserWindow,
Display,
OpenDialogOptions,
SaveDialogOptions,
app,
dialog,
nativeImage,
nativeTheme,
screen,
} from "electron";
import { getRandomUserAgent, iconExts } from "../../commons/utils"; import { getRandomUserAgent, iconExts } from "../../commons/utils";
import URI from "urijs"; import URI from "urijs";
import { hideMainWindow } from "../main"; import { hideMainWindow } from "../main";
@ -73,6 +83,8 @@ function downloadImage(windowName: string, url: string) {
headers: { headers: {
"User-Agent": getRandomUserAgent(), "User-Agent": getRandomUserAgent(),
}, },
maxRedirects: 5,
jar: true,
}, },
function (error, response, body) { function (error, response, body) {
if (operation.retry(error)) { if (operation.retry(error)) {
@ -139,6 +151,8 @@ function getURLInfo(windowName: string, url: string, redirect: boolean) {
headers: { headers: {
"User-Agent": getRandomUserAgent(), "User-Agent": getRandomUserAgent(),
}, },
maxRedirects: 5,
jar: true,
}, },
function (error, response, body) { function (error, response, body) {
if (operation.retry(error)) { if (operation.retry(error)) {
@ -195,6 +209,9 @@ function analysisHTML(windowName: string, url: string, data: string) {
let $ = cheerio.load(data); let $ = cheerio.load(data);
// 获取标题 // 获取标题
result.name = $("head").find("title").text(); result.name = $("head").find("title").text();
if (!result.name || result.name.trim() === "") {
result.name = $("title").text();
}
// 获取图标URL // 获取图标URL
let iconURL: string | null = null; let iconURL: string | null = null;
let icon = $("link[rel='icon']"); let icon = $("link[rel='icon']");
@ -237,6 +254,8 @@ function analysisHTML(windowName: string, url: string, data: string) {
headers: { headers: {
"User-Agent": getRandomUserAgent(), "User-Agent": getRandomUserAgent(),
}, },
maxRedirects: 5,
jar: true,
}, },
function (error, response, body) { function (error, response, body) {
if (operation.retry(error)) { if (operation.retry(error)) {
@ -256,6 +275,9 @@ function analysisHTML(windowName: string, url: string, data: string) {
result.status = true; result.status = true;
sendUrlInfo(windowName, result); sendUrlInfo(windowName, result);
} else { } else {
if (result.name && result.name.trim() !== "") {
result.status = true;
}
sendUrlInfo(windowName, result); sendUrlInfo(windowName, result);
} }
} }
@ -414,20 +436,6 @@ function openAfterHideWindow(type: string) {
} }
} }
/**
*
* @param windowName
* @param message
*/
function showErrorMessageBox(windowName: string, message: string) {
dialog.showMessageBoxSync(getWindow(windowName), {
message: message,
buttons: [global.language.ok],
type: "error",
noLink: true,
});
}
/** /**
* *
*/ */
@ -463,6 +471,103 @@ function getMainBackgorunColor() {
} }
} }
/**
*
*/
function getWindowInScreen(window: BrowserWindow) {
let inDisplays: Array<Display> = [];
let displays = screen.getAllDisplays();
let bounds = window.getBounds();
for (let display of displays) {
let workArea = display.workArea;
if (
((workArea.x <= bounds.x && workArea.x + workArea.width >= bounds.x) ||
(workArea.x <= bounds.x + bounds.width &&
workArea.x + workArea.width >= bounds.x + bounds.width)) &&
((workArea.y <= bounds.y && workArea.y + workArea.height >= bounds.y) ||
(workArea.y <= bounds.y + bounds.height &&
workArea.y + workArea.height >= bounds.y + bounds.height))
) {
inDisplays.push(display);
}
}
return inDisplays;
}
/**
*
*/
function showMessageBoxSync(
windowName: string,
message: string,
type: "error" | "question" | "info",
buttons: Array<string> | null
) {
// 记录状态
if (windowName === "mainWindow") {
global.mainWindowShowDialog = true;
}
let res = dialog.showMessageBoxSync(getWindow(windowName), {
title: "Dawn Launcher",
message: message,
buttons: buttons,
type: type,
noLink: true,
cancelId: 1,
});
// 删除状态
if (windowName === "mainWindow") {
global.mainWindowShowDialog = false;
}
return res;
}
/**
*
*/
function showErrorMessageBox(windowName: string, message: string) {
showMessageBoxSync(windowName, message, "error", [global.language.ok]);
}
/**
*
*/
function showSaveDialogSync(windowName: string, options: SaveDialogOptions) {
// 记录状态
if (windowName === "mainWindow") {
global.mainWindowShowDialog = true;
}
let path = dialog.showSaveDialogSync(getWindow(windowName), options);
// 删除状态
if (windowName === "mainWindow") {
global.mainWindowShowDialog = false;
}
return path;
}
/**
* /
*/
function showOpenDialogSync(windowName: string, options: OpenDialogOptions) {
// 记录状态
if (windowName === "mainWindow") {
global.mainWindowShowDialog = true;
}
let pathList = dialog.showOpenDialogSync(getWindow(windowName), options);
// 删除状态
if (windowName === "mainWindow") {
global.mainWindowShowDialog = false;
}
return pathList;
}
/**
*
*/
function mainWindowExist() {
return global.mainWindow && !global.mainWindow.isDestroyed();
}
export { export {
downloadImage, downloadImage,
getURLInfo, getURLInfo,
@ -474,8 +579,13 @@ export {
sendToWebContent, sendToWebContent,
closeAllChildProcess, closeAllChildProcess,
openAfterHideWindow, openAfterHideWindow,
showErrorMessageBox,
relaunch, relaunch,
getUserDataPath, getUserDataPath,
getMainBackgorunColor, getMainBackgorunColor,
getWindowInScreen,
showMessageBoxSync,
showErrorMessageBox,
showSaveDialogSync,
showOpenDialogSync,
mainWindowExist,
}; };

View File

@ -1,4 +1,4 @@
import { app, dialog, ipcMain, OpenDialogSyncOptions, shell } from "electron"; import { app, ipcMain, Menu, OpenDialogSyncOptions, shell } from "electron";
import { getFileIcon } from "../../commons/utils"; import { getFileIcon } from "../../commons/utils";
import mime from "mime"; import mime from "mime";
import { ShortcutInfo } from "../../../types/common"; import { ShortcutInfo } from "../../../types/common";
@ -8,9 +8,10 @@ import {
getURLInfo, getURLInfo,
sendToWebContent, sendToWebContent,
showErrorMessageBox, showErrorMessageBox,
showMessageBoxSync,
showOpenDialogSync,
} from "."; } from ".";
import { statSync } from "node:fs"; import { statSync } from "node:fs";
import { getWindow } from "../commons/index";
export default function () { export default function () {
// emit // emit
@ -23,23 +24,17 @@ export default function () {
}); });
// 信息提示框 // 信息提示框
ipcMain.on("showInfoMessageBox", (event, args) => { ipcMain.on("showInfoMessageBox", (event, args) => {
dialog.showMessageBoxSync(getWindow(args.windowName), { showMessageBoxSync(args.windowName, args.message, "info", [
message: args.message, global.language.ok,
buttons: [global.language.ok], ]);
type: "info",
noLink: true,
});
}); });
// 对话框 // 对话框
ipcMain.on("showConfirmBox", (event, args) => { ipcMain.on("showConfirmBox", (event, args) => {
// 弹出对话框 // 弹出对话框
let res = dialog.showMessageBoxSync(getWindow(args.windowName), { let res = showMessageBoxSync(args.windowName, args.message, "question", [
message: args.message, global.language.ok,
buttons: [global.language.ok, global.language.cancel], global.language.cancel,
type: "question", ]);
noLink: true,
cancelId: 1,
});
event.returnValue = res === 0; event.returnValue = res === 0;
}); });
// 选择文件 // 选择文件
@ -57,10 +52,7 @@ export default function () {
} else { } else {
options.defaultPath = app.getPath("desktop"); options.defaultPath = app.getPath("desktop");
} }
let filePathList = dialog.showOpenDialogSync( let filePathList = showOpenDialogSync(windowName, options);
getWindow(windowName),
options
);
if (filePathList && filePathList.length > 0) { if (filePathList && filePathList.length > 0) {
let filePath = filePathList[0]; let filePath = filePathList[0];
if (target) { if (target) {
@ -94,7 +86,7 @@ export default function () {
} else { } else {
options.defaultPath = app.getPath("desktop"); options.defaultPath = app.getPath("desktop");
} }
let dirPathList = dialog.showOpenDialogSync(getWindow(windowName), options); let dirPathList = showOpenDialogSync(windowName, options);
if (dirPathList && dirPathList.length > 0) { if (dirPathList && dirPathList.length > 0) {
let dirPath = dirPathList[0]; let dirPath = dirPathList[0];
event.returnValue = dirPath; event.returnValue = dirPath;
@ -103,14 +95,14 @@ export default function () {
} }
}); });
// 获取图标 // 获取图标
ipcMain.on("getFileIcon", (event, args) => { ipcMain.on("getFileIcon", async (event, args) => {
// 窗口名称 // 窗口名称
let windowName: string = args.windowName; let windowName: string = args.windowName;
// 路径 // 路径
let filePath: string | null = args.path; let filePath: string | null = args.path;
if (filePath) { if (filePath) {
// 图标 // 图标
let icon: string | null = getFileIcon(filePath); let icon: string | null = await getFileIcon(filePath);
// 发送到页面 // 发送到页面
sendToWebContent(windowName, "onGetFileIcon", icon); sendToWebContent(windowName, "onGetFileIcon", icon);
} }
@ -163,4 +155,33 @@ export default function () {
ipcMain.on("exit", () => { ipcMain.on("exit", () => {
app.quit(); app.quit();
}); });
// 运行
ipcMain.on("run", (event, args) => {
global.addon.shellExecute(
args.operation,
args.target,
args.params ?? "",
app.getPath("home")
);
});
// 文本框菜单
ipcMain.on("textRightMenu", (event, args) => {
// 菜单
let menu = Menu.buildFromTemplate([
{
role: "cut",
label: global.language.cut,
},
{
role: "copy",
label: global.language.copy,
},
{
role: "paste",
label: global.language.paste,
},
]);
// 显示
menu.popup();
});
} }

View File

@ -19,14 +19,17 @@ function createBackupRestoreDataWindow() {
parent: global.mainWindow, parent: global.mainWindow,
height: 108, height: 108,
width: 400, width: 400,
type: "toolbar",
maximizable: false, maximizable: false,
minimizable: false, minimizable: false,
resizable: false, resizable: false,
fullscreenable: false, fullscreenable: false,
focusable: true, focusable: true,
show: false, show: false,
backgroundColor: getMainBackgorunColor(), transparent: global.setting.appearance.transparency < 1,
backgroundColor:
global.setting.appearance.transparency === 1
? getMainBackgorunColor()
: null,
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
preload: join(__dirname, "../preload/index.js"), preload: join(__dirname, "../preload/index.js"),

View File

@ -1,7 +1,14 @@
import { dialog, ipcMain } from "electron"; import { ipcMain } from "electron";
import { backupData, createBackupRestoreDataWindow } from "."; import { backupData, createBackupRestoreDataWindow } from ".";
import { closeWindow, relaunch, showErrorMessageBox } from "../commons"; import {
closeWindow,
relaunch,
showErrorMessageBox,
showOpenDialogSync,
showSaveDialogSync,
} from "../commons";
import { restore } from "./data"; import { restore } from "./data";
import { rmSync } from "node:fs";
export default function () { export default function () {
// 创建备份/恢复数据窗口 // 创建备份/恢复数据窗口
@ -21,11 +28,18 @@ export default function () {
// 备份数据 // 备份数据
ipcMain.on("backupData", () => { ipcMain.on("backupData", () => {
try { try {
let filePath = dialog.showSaveDialogSync(global.backupRestoreDataWindow, { let filePath = showSaveDialogSync("backupRestoreDataWindow", {
defaultPath: "Data", defaultPath: "Data",
filters: [{ name: "DB", extensions: ["db"] }], filters: [{ name: "DB", extensions: ["db"] }],
}); });
if (filePath && filePath.trim() !== "") { if (filePath && filePath.trim() !== "") {
try {
rmSync(filePath);
} catch (e) {
if (process.env.NODE_ENV === "development") {
console.log(e);
}
}
backupData(filePath).finally(() => { backupData(filePath).finally(() => {
// 关闭备份/恢复窗口 // 关闭备份/恢复窗口
closeWindow(global.backupRestoreDataWindow); closeWindow(global.backupRestoreDataWindow);
@ -40,12 +54,9 @@ export default function () {
// 恢复数据 // 恢复数据
ipcMain.on("restoreData", () => { ipcMain.on("restoreData", () => {
try { try {
let filePathList = dialog.showOpenDialogSync( let filePathList = showOpenDialogSync("backupRestoreDataWindow", {
global.backupRestoreDataWindow, filters: [{ name: "Data", extensions: ["db", "json"] }],
{ });
filters: [{ name: "Data", extensions: ["db", "json"] }],
}
);
if (filePathList && filePathList.length > 0) { if (filePathList && filePathList.length > 0) {
let filePath = filePathList[0]; let filePath = filePathList[0];
if (restore(filePath)) { if (restore(filePath)) {

View File

@ -1,6 +1,5 @@
import { app, BrowserWindow, dialog } from "electron"; import { app, BrowserWindow, dialog } from "electron";
import { release } from "node:os"; import { join, dirname, basename } from "node:path";
import { join, dirname } from "node:path";
import indexIpcEvent from "./main/ipcEvent"; import indexIpcEvent from "./main/ipcEvent";
import classificationIpcEvent from "./classification/ipcEvent"; import classificationIpcEvent from "./classification/ipcEvent";
import { init as classificationDataInit } from "./classification/data"; import { init as classificationDataInit } from "./classification/data";
@ -9,7 +8,10 @@ import { initSystemItem } from "./item/commons/data";
import commonIpcEvent from "./commons/ipcEvent"; import commonIpcEvent from "./commons/ipcEvent";
import itemIpcEvent from "./item/ipcEvent"; import itemIpcEvent from "./item/ipcEvent";
import settingIpcEvent from "./setting/ipcEvent"; import settingIpcEvent from "./setting/ipcEvent";
import { init as settingDataInit } from "./setting/data"; import {
init as settingDataInit,
update as updateSetting,
} from "./setting/data";
import { setShortcutKey } from "./setting"; import { setShortcutKey } from "./setting";
import searchIpcEvent from "./search/ipcEvent"; import searchIpcEvent from "./search/ipcEvent";
import { createMainWindow } from "./main"; import { createMainWindow } from "./main";
@ -26,6 +28,7 @@ if (
) { ) {
app.setPath("appData", join(dirname(process.execPath), "data")); app.setPath("appData", join(dirname(process.execPath), "data"));
app.setPath("userData", join(dirname(process.execPath), "data")); app.setPath("userData", join(dirname(process.execPath), "data"));
app.setPath("sessionData", join(dirname(process.execPath), "data"));
} }
process.env.DIST_ELECTRON = join(__dirname, ".."); process.env.DIST_ELECTRON = join(__dirname, "..");
@ -34,8 +37,16 @@ process.env.VITE_PUBLIC = process.env.VITE_DEV_SERVER_URL
? join(process.env.DIST_ELECTRON, "../public") ? join(process.env.DIST_ELECTRON, "../public")
: process.env.DIST; : process.env.DIST;
// Disable GPU Acceleration for Windows 7 // 解决透明窗口闪烁
if (release().startsWith("6.1")) app.disableHardwareAcceleration(); app.commandLine.appendSwitch("wm-window-animations-disabled");
// 初始化设置数据
settingDataInit();
// 如果主窗口是非透明窗口的话禁止GPU加速解决白屏问题。
// 如果主窗口是透明窗口的话将除主窗口外的窗口都改为透明度0.99,解决解决白屏问题。
if (global.setting.appearance.transparency === 1) {
app.disableHardwareAcceleration();
}
// Set application name for Windows 10+ notifications // Set application name for Windows 10+ notifications
if (process.platform === "win32") app.setAppUserModelId(app.getName()); if (process.platform === "win32") app.setAppUserModelId(app.getName());
@ -51,10 +62,26 @@ if (!app.requestSingleInstanceLock()) {
// process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true' // process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
app.whenReady().then(() => { app.whenReady().then(() => {
try { try {
// 禁止多开
const instanceLock = app.requestSingleInstanceLock();
if (!instanceLock) {
app.quit();
return;
}
// addon // addon
global.addon = require("../../native/addon.node"); global.addon = require("../../native/addon.node");
// 初始化数据 if (global.first) {
settingDataInit(); // 首次添加,判断系统语言
if (app.getLocale().toLowerCase().indexOf("zh-") === 0) {
// 简体中文
global.setting.general.language = "SimplifiedChinese";
} else {
// 英文
global.setting.general.language = "English";
}
// 修改
updateSetting(global.setting);
}
// 获取语言 // 获取语言
global.language = getLanguage(global.setting.general.language); global.language = getLanguage(global.setting.general.language);
// 禁用debugtron // 禁用debugtron
@ -64,7 +91,7 @@ app.whenReady().then(() => {
arg.indexOf("--inspect") !== -1 || arg.indexOf("--inspect") !== -1 ||
arg.indexOf("--remote-debugging-port") !== -1 arg.indexOf("--remote-debugging-port") !== -1
) { ) {
dialog.showMessageBoxSync(null, { dialog.showMessageBoxSync({
message: "达咩呦达咩达咩~", message: "达咩呦达咩达咩~",
buttons: [global.language.ok], buttons: [global.language.ok],
type: "error", type: "error",
@ -74,12 +101,6 @@ app.whenReady().then(() => {
return; return;
} }
} }
// 禁止多开
const instanceLock = app.requestSingleInstanceLock();
if (!instanceLock) {
app.quit();
return;
}
// 初始化数据 // 初始化数据
classificationDataInit(); classificationDataInit();
itemDataInit(); itemDataInit();
@ -101,6 +122,16 @@ app.whenReady().then(() => {
} }
// 设置快捷键 // 设置快捷键
setShortcutKey(); setShortcutKey();
// 每次开启软件时都设置一次开机启动选项
if (process.env.NODE_ENV !== "development") {
const exeName = basename(process.execPath);
app.setLoginItemSettings({
openAtLogin: global.setting.general.startup,
openAsHidden: false,
path: process.execPath,
args: ["--processStart", `"${exeName}"`],
});
}
} catch (e) { } catch (e) {
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
console.log(e); console.log(e);
@ -138,13 +169,13 @@ app.on("window-all-closed", () => {
}); });
app.on("second-instance", () => { app.on("second-instance", () => {
if (mainWindow) { if (global.mainWindow) {
if (!mainWindow.isVisible()) { if (!global.mainWindow.isVisible()) {
mainWindow.show(); global.mainWindow.show();
mainWindow.focus(); global.mainWindow.focus();
global.blurHide = true; global.blurHide = true;
} else { } else {
mainWindow.focus(); global.mainWindow.focus();
} }
} }
}); });

View File

@ -7,7 +7,7 @@ import { getDataSqlite3 } from "../../commons/betterSqlite3";
let db = getDataSqlite3(); let db = getDataSqlite3();
// 项目表名 // 项目表名
let itemTableName = "item"; let tableName = "item";
// 查询字段 // 查询字段
let selectColumn = let selectColumn =
@ -36,7 +36,7 @@ function getItem(row: any): Item {
*/ */
function init() { function init() {
// sql // sql
let sql = `CREATE TABLE IF NOT EXISTS ${itemTableName} ( let sql = `CREATE TABLE IF NOT EXISTS ${tableName} (
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY AUTOINCREMENT,
classification_id INTEGER NOT NULL, classification_id INTEGER NOT NULL,
name TEXT NOT NULL, name TEXT NOT NULL,
@ -58,7 +58,7 @@ function add(item: Item, reuseId: boolean = false) {
// 获取序号 // 获取序号
let newOrder = getMaxOrder(item.classificationId) + 1; let newOrder = getMaxOrder(item.classificationId) + 1;
// SQL // SQL
let sql = `INSERT INTO ${itemTableName} let sql = `INSERT INTO ${tableName}
(classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`) (classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
VALUES (?, ?, ?, ?, ?, ?, ?)`; VALUES (?, ?, ?, ?, ?, ?, ?)`;
// 参数 // 参数
@ -73,7 +73,7 @@ function add(item: Item, reuseId: boolean = false) {
]; ];
// 重复使用ID // 重复使用ID
if (reuseId && item.id) { if (reuseId && item.id) {
sql = `INSERT INTO ${itemTableName} sql = `INSERT INTO ${tableName}
(id, classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`) (id, classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`; VALUES (?, ?, ?, ?, ?, ?, ?, ?)`;
params.unshift(item.id); params.unshift(item.id);
@ -108,7 +108,7 @@ function batchAdd(
// 循环添加 // 循环添加
for (let item of itemList) { for (let item of itemList) {
// SQL // SQL
let sql = `INSERT INTO ${itemTableName} let sql = `INSERT INTO ${tableName}
(classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`) (classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
VALUES (?, ?, ?, ?, ?, ?, ?)`; VALUES (?, ?, ?, ?, ?, ?, ?)`;
// 参数 // 参数
@ -123,7 +123,7 @@ function batchAdd(
]; ];
// 重复使用ID // 重复使用ID
if (reuseId && item.id) { if (reuseId && item.id) {
sql = `INSERT INTO ${itemTableName} sql = `INSERT INTO ${tableName}
(id, classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`) (id, classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`; VALUES (?, ?, ?, ?, ?, ?, ?, ?)`;
params.unshift(item.id); params.unshift(item.id);
@ -133,6 +133,7 @@ function batchAdd(
if (id) { if (id) {
item.id = id; item.id = id;
item.order = newOrder; item.order = newOrder;
item.classificationId = classificationId;
resultList.push(item); resultList.push(item);
} }
newOrder++; newOrder++;
@ -147,7 +148,7 @@ function batchAdd(
*/ */
function update(item: Item) { function update(item: Item) {
// SQL // SQL
let sql = `UPDATE ${itemTableName} let sql = `UPDATE ${tableName}
SET name = ?, SET name = ?,
data = ?, data = ?,
shortcut_key = ?, shortcut_key = ?,
@ -177,7 +178,7 @@ function updateClassificationId(
newClassificationId: number newClassificationId: number
) { ) {
// SQL // SQL
let sql = `UPDATE ${itemTableName} let sql = `UPDATE ${tableName}
SET classification_id = ? SET classification_id = ?
WHERE classification_id = ?`; WHERE classification_id = ?`;
// 运行 // 运行
@ -193,7 +194,7 @@ function updateClassificationId(
*/ */
function updateData(id: number, itemData: ItemData) { function updateData(id: number, itemData: ItemData) {
// SQL // SQL
let sql = `UPDATE ${itemTableName} let sql = `UPDATE ${tableName}
SET data = ? SET data = ?
WHERE id = ?`; WHERE id = ?`;
// 运行 // 运行
@ -206,7 +207,7 @@ function updateData(id: number, itemData: ItemData) {
*/ */
function getMaxOrder(classificationId: number) { function getMaxOrder(classificationId: number) {
// SQL // SQL
let sql = `SELECT MAX(\`order\`) \`order\` FROM ${itemTableName} WHERE classification_id = ?`; let sql = `SELECT MAX(\`order\`) \`order\` FROM ${tableName} WHERE classification_id = ?`;
// 运行 // 运行
let row: any = db.prepare(sql).get(classificationId); let row: any = db.prepare(sql).get(classificationId);
if (row && row.order) { if (row && row.order) {
@ -222,7 +223,7 @@ function getMaxOrder(classificationId: number) {
*/ */
function selectById(id: number): Item | null { function selectById(id: number): Item | null {
// SQL // SQL
let sql = `SELECT ${selectColumn} FROM ${itemTableName} WHERE id = ?`; let sql = `SELECT ${selectColumn} FROM ${tableName} WHERE id = ?`;
// 运行 // 运行
let row = db.prepare(sql).get(id); let row = db.prepare(sql).get(id);
// 返回 // 返回
@ -244,7 +245,7 @@ function list(simple: boolean = false, classificationId: number | null = null) {
// sql // sql
let sql = `SELECT ${ let sql = `SELECT ${
simple ? simpleSelectColumn : selectColumn simple ? simpleSelectColumn : selectColumn
} FROM ${itemTableName}`; } FROM ${tableName}`;
if (classificationId) { if (classificationId) {
sql += " WHERE classification_id = ?"; sql += " WHERE classification_id = ?";
params.push(classificationId); params.push(classificationId);
@ -269,7 +270,7 @@ function selectByIdList(simple: boolean, idList: Array<number>) {
// sql // sql
let sql = `SELECT ${ let sql = `SELECT ${
simple ? simpleSelectColumn : selectColumn simple ? simpleSelectColumn : selectColumn
} FROM ${itemTableName} WHERE id IN (`; } FROM ${tableName} WHERE id IN (`;
for (let i = 0; i < idList.length; i++) { for (let i = 0; i < idList.length; i++) {
sql += "?"; sql += "?";
if (i !== idList.length - 1) { if (i !== idList.length - 1) {
@ -307,7 +308,7 @@ function del(id: number) {
let item = selectById(id); let item = selectById(id);
if (item) { if (item) {
// SQL // SQL
let sql = `DELETE FROM ${itemTableName} WHERE id = ?`; let sql = `DELETE FROM ${tableName} WHERE id = ?`;
// 运行 // 运行
let res = db.prepare(sql).run(id).changes > 0; let res = db.prepare(sql).run(id).changes > 0;
if (res) { if (res) {
@ -322,13 +323,41 @@ function del(id: number) {
} }
} }
/**
*
*/
function batchDel(idList: Array<number>) {
// 批量查询
let itemList = selectByIdList(true, idList);
// 参数
let params = itemList.map((item) => item.id).join(",");
// SQL
let sql = `DELETE FROM ${tableName} WHERE id in (${params})`;
// 运行
let res = db.prepare(sql).run().changes > 0;
if (res) {
// 提取分类ID
let classificationIdList = new Set<number>();
itemList.forEach((item) => {
classificationIdList.add(item.classificationId);
});
// 更新序号
classificationIdList.forEach((classificationId) => {
reorder(classificationId);
});
return true;
} else {
return false;
}
}
/** /**
* *
* @param classificationId * @param classificationId
*/ */
function deleteByClassificationId(classificationId: number) { function deleteByClassificationId(classificationId: number) {
// SQL // SQL
let sql = `DELETE FROM ${itemTableName} WHERE classification_id = ?`; let sql = `DELETE FROM ${tableName} WHERE classification_id = ?`;
// 运行 // 运行
return db.prepare(sql).run(classificationId).changes > 0; return db.prepare(sql).run(classificationId).changes > 0;
} }
@ -343,7 +372,7 @@ function reorder(classification_id: number) {
// 开启事务 // 开启事务
db.transaction(() => { db.transaction(() => {
// SQL // SQL
let sql = `UPDATE ${itemTableName} SET \`order\` = ? WHERE id = ?`; let sql = `UPDATE ${tableName} SET \`order\` = ? WHERE id = ?`;
// 更新序号 // 更新序号
for (let i = 0; i < itemList.length; i++) { for (let i = 0; i < itemList.length; i++) {
db.prepare(sql).run(i + 1, itemList[i].id); db.prepare(sql).run(i + 1, itemList[i].id);
@ -396,7 +425,7 @@ function updateOrder(
// 开启事务 // 开启事务
db.transaction(() => { db.transaction(() => {
// SQL // SQL
let sql = `UPDATE ${itemTableName} SET \`order\` = ?, classification_id = ? WHERE id = ?`; let sql = `UPDATE ${tableName} SET \`order\` = ?, classification_id = ? WHERE id = ?`;
// 更新序号 // 更新序号
for (let i = 0; i < toItemList.length; i++) { for (let i = 0; i < toItemList.length; i++) {
db.prepare(sql).run(i + 1, toClassificationId, toItemList[i].id); db.prepare(sql).run(i + 1, toClassificationId, toItemList[i].id);
@ -418,6 +447,7 @@ export {
batchAdd, batchAdd,
update, update,
del, del,
batchDel,
selectById, selectById,
selectByIdList, selectByIdList,
deleteByClassificationId, deleteByClassificationId,

View File

@ -1,6 +1,6 @@
import { BrowserWindow, shell, dialog, app } from "electron"; import { BrowserWindow, shell, app } from "electron";
import { join } from "node:path"; import { extname, join } from "node:path";
import { getAbsolutePath, getURLParams } from "../../commons/utils"; import { parsePath, getURLParams, getFileIcon } from "../../commons/utils";
import { Item } from "../../../types/item"; import { Item } from "../../../types/item";
import { import {
batchAdd, batchAdd,
@ -11,12 +11,14 @@ import {
updateData, updateData,
updateOrder, updateOrder,
} from "./data"; } from "./data";
import { accessSync, writeFile, statSync, readFileSync } from "node:fs"; import { writeFile, statSync, readFileSync, accessSync } from "node:fs";
import mime from "mime"; import mime from "mime";
import { import {
deleteExtname, deleteExtname,
getFileName,
getItemName, getItemName,
isAbsolutePath, isAbsolutePath,
newItem,
} from "../../../commons/utils/common"; } from "../../../commons/utils/common";
import { iconExts } from "../../commons/utils"; import { iconExts } from "../../commons/utils";
import { addAssociateFolderWatcher } from "../classification"; import { addAssociateFolderWatcher } from "../classification";
@ -25,8 +27,11 @@ import {
convertPath, convertPath,
getMainBackgorunColor, getMainBackgorunColor,
sendToWebContent, sendToWebContent,
showMessageBoxSync,
showSaveDialogSync,
} from "../commons/index"; } from "../commons/index";
import { fork } from "../../commons/utilityProcessUtils"; import { fork } from "../../commons/utilityProcessUtils";
import { ShortcutInfo } from "../../../types/common";
// 窗口 // 窗口
let itemAddEditWindow: BrowserWindow | null = null; let itemAddEditWindow: BrowserWindow | null = null;
@ -51,14 +56,17 @@ async function createAddEditWindow(
parent: global.mainWindow, parent: global.mainWindow,
height: 500, height: 500,
width: 600, width: 600,
type: "toolbar",
maximizable: false, maximizable: false,
minimizable: false, minimizable: false,
resizable: false, resizable: false,
fullscreenable: false, fullscreenable: false,
focusable: true, focusable: true,
show: false, show: false,
backgroundColor: getMainBackgorunColor(), transparent: global.setting.appearance.transparency < 1,
backgroundColor:
global.setting.appearance.transparency === 1
? getMainBackgorunColor()
: null,
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
preload: join(__dirname, "../preload/index.js"), preload: join(__dirname, "../preload/index.js"),
@ -112,14 +120,17 @@ async function createNetworkIconWindow() {
parent: global.itemAddEditWindow, parent: global.itemAddEditWindow,
height: 230, height: 230,
width: 400, width: 400,
type: "toolbar",
maximizable: false, maximizable: false,
minimizable: false, minimizable: false,
resizable: false, resizable: false,
fullscreenable: false, fullscreenable: false,
focusable: true, focusable: true,
show: false, show: false,
backgroundColor: getMainBackgorunColor(), transparent: global.setting.appearance.transparency < 1,
backgroundColor:
global.setting.appearance.transparency === 1
? getMainBackgorunColor()
: null,
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
preload: join(__dirname, "../preload/index.js"), preload: join(__dirname, "../preload/index.js"),
@ -164,14 +175,17 @@ async function createSVGIconWindow() {
parent: global.itemAddEditWindow, parent: global.itemAddEditWindow,
height: 230, height: 230,
width: 400, width: 400,
type: "toolbar",
maximizable: false, maximizable: false,
minimizable: false, minimizable: false,
resizable: false, resizable: false,
fullscreenable: false, fullscreenable: false,
focusable: true, focusable: true,
show: false, show: false,
backgroundColor: getMainBackgorunColor(), transparent: global.setting.appearance.transparency < 1,
backgroundColor:
global.setting.appearance.transparency === 1
? getMainBackgorunColor()
: null,
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
preload: join(__dirname, "../preload/index.js"), preload: join(__dirname, "../preload/index.js"),
@ -213,7 +227,7 @@ function copy(idList: Array<number>, toClassificationId: number) {
let itemList = selectByIdList(false, idList); let itemList = selectByIdList(false, idList);
if (itemList.length > 0) { if (itemList.length > 0) {
// 清空打开信息 // 清空打开信息
resultList.forEach((item) => clearOpenInfo(item)); itemList.forEach((item) => clearOpenInfo(item));
// 批量添加 // 批量添加
resultList = batchAdd(toClassificationId, itemList); resultList = batchAdd(toClassificationId, itemList);
} }
@ -249,24 +263,17 @@ function move(idList: Array<number>, toClassificationId: number) {
* @param classificationId * @param classificationId
* @param pathList * @param pathList
*/ */
function drop(classificationId: number, pathList: Array<string>) { async function drop(classificationId: number, pathList: Array<string>) {
fork( // 获取项目信息
"getDropItemInfo", let resultList = await getDropItemInfo(classificationId, pathList);
{ // 添加项目
classificationId, let itemList = batchAdd(classificationId, resultList);
pathList, // 发送消息到页面
}, sendToWebContent("mainWindow", "onAddItem", {
(resultList: Array<Item>) => { itemList,
// 添加项目 clear: false,
let itemList = batchAdd(classificationId, resultList); classificationId: null,
// 发送消息到页面 });
sendToWebContent("mainWindow", "onAddItem", {
itemList,
clear: false,
classificationId: null,
});
}
);
} }
/** /**
@ -312,10 +319,15 @@ function updateOpenInfo(type: string, id: number) {
*/ */
function run( function run(
type: string, type: string,
operation: "open" | "runas" | "openFileLocation", operation: "open" | "runas" | "openFileLocation" | "explore",
item: Item item: Item
) { ) {
if (item.data) { if (item.data) {
if (operation === "open" && item.data.runAsAdmin) {
operation = "runas";
} else if (operation === "open" && item.type === 1) {
operation = "explore";
}
// 更新打开信息 // 更新打开信息
updateOpenInfo(type, item.id); updateOpenInfo(type, item.id);
// 判断类型 // 判断类型
@ -329,7 +341,7 @@ function run(
// 获取绝对路径 // 获取绝对路径
if (item.type === 0 || item.type === 1) { if (item.type === 0 || item.type === 1) {
// 获取路径 // 获取路径
item.data.target = getAbsolutePath(item.data.target); item.data.target = parsePath(item.data.target);
} }
try { try {
// 判断文件或文件夹是否存在 // 判断文件或文件夹是否存在
@ -355,13 +367,9 @@ function run(
message = global.language.notFoundFolder; message = global.language.notFoundFolder;
} }
message += '"' + item.data.target + '"'; message += '"' + item.data.target + '"';
dialog.showMessageBox(global.mainWindow, { showMessageBoxSync("mainWindow", message, "error", [
title: "Dawn Launcher", global.language.ok,
message: message, ]);
buttons: [global.language.ok],
type: "error",
noLink: true,
});
} }
} }
} }
@ -432,7 +440,7 @@ function exportIcon(item: Item) {
} }
// 弹出文件对话框保存 // 弹出文件对话框保存
if (extensionName && content) { if (extensionName && content) {
let path = dialog.showSaveDialogSync(global.mainWindow, { let path = showSaveDialogSync("mainWindow", {
defaultPath: "icon", defaultPath: "icon",
filters: [ filters: [
{ {
@ -499,7 +507,7 @@ async function createShortcut(item: Item) {
let target = item.data.target; let target = item.data.target;
if (item.type === 0 || item.type === 1) { if (item.type === 0 || item.type === 1) {
// 获取绝对路径 // 获取绝对路径
target = getAbsolutePath(target); target = parsePath(target);
} }
// 保存路径 // 保存路径
let savePath = let savePath =
@ -667,6 +675,119 @@ function clearOpenInfo(item: Item) {
item.data.quickSearchLastOpen = 0; item.data.quickSearchLastOpen = 0;
} }
/**
*
* @param itemId
*/
function deleteQuickSearchHistory(itemId: number) {
// 查询
let item = selectById(itemId);
if (item) {
// 重置历史记录
item.data.quickSearchLastOpen = 0;
item.data.quickSearchOpenNumber = 0;
// 更新
updateData(itemId, item.data);
// 通知主页面
sendToWebContent("mainWindow", "onUpdateOpenInfo", {
id: itemId,
quickSearchOpenNumber: item.data.quickSearchOpenNumber,
quickSearchLastOpen: item.data.quickSearchLastOpen,
type: "quickSearch",
});
// 通知快速搜索页面
sendToWebContent("quickSearchWindow", "onUpdateOpenInfo", {
id: itemId,
quickSearchOpenNumber: item.data.quickSearchOpenNumber,
quickSearchLastOpen: item.data.quickSearchLastOpen,
});
}
}
/**
*
* @param classificationId
* @param pathList
*/
async function getDropItemInfo(
classificationId: number,
pathList: Array<string>
) {
// 项目列表
let itemList: Array<Item> = [];
// 解析文件信息并添加项目
for (const path of pathList) {
try {
// item
let item = newItem({ classificationId });
// 目标
item.data.target = path;
// 名称
item.name = getFileName(item.data.target);
// 判断是否是快捷方式,如果是的话,需要获取真实路径
if (mime.getType(path) === "application/x-ms-shortcut") {
// 快捷方式
// 获取真实文件路径和参数
let shortcutInfo: ShortcutInfo | null =
global.addon.getShortcutFileInfo(path);
if (shortcutInfo) {
// 路径
if (shortcutInfo.target) {
item.data.target = shortcutInfo.target;
}
// 参数
if (shortcutInfo.arguments) {
item.data.params = shortcutInfo.arguments;
}
}
}
// 获取图标
item.data.icon = await getFileIcon(item.data.target);
// 获取后缀判断是否是url
let ext = extname(item.data.target);
if (ext && ext.toLowerCase() === ".url") {
// url
let url = parseUrlFileContent(readFileSync(item.data.target, "utf-8"));
if (url && url.trim() !== "") {
item.data.target = url;
item.type = 2;
} else {
continue;
}
} else {
// 文件类型
let stats = statSync(item.data.target);
item.type = stats.isFile() ? 0 : 1;
}
// 去掉后缀
if (item.type === 0 || item.type === 2) {
item.name = deleteExtname(item.name);
}
// push
itemList.push(item);
} catch (e) {}
}
return itemList;
}
/**
* .url文件内容以获取URL
* @param content
* @returns
*/
function parseUrlFileContent(content: string) {
if (content) {
const lines = content.split("\n");
for (const line of lines) {
if (line.startsWith("URL=")) {
const url = line.substring(4).trim();
return url;
}
}
}
return null;
}
export { export {
createAddEditWindow, createAddEditWindow,
createNetworkIconWindow, createNetworkIconWindow,
@ -684,4 +805,5 @@ export {
getClipboardImageFile, getClipboardImageFile,
pasteIcon, pasteIcon,
checkInvalid, checkInvalid,
deleteQuickSearchHistory,
}; };

View File

@ -1,12 +1,11 @@
import { import {
Menu, Menu,
MenuItem, MenuItem,
dialog,
ipcMain, ipcMain,
clipboard, clipboard,
MenuItemConstructorOptions, MenuItemConstructorOptions,
} from "electron"; } from "electron";
import { getAbsolutePath } from "../../commons/utils"; import { parsePath } from "../../commons/utils";
import { import {
convertTarget, convertTarget,
createAddEditWindow, createAddEditWindow,
@ -22,13 +21,22 @@ import {
getClipboardImageFile, getClipboardImageFile,
pasteIcon, pasteIcon,
updateOpenInfo, updateOpenInfo,
deleteQuickSearchHistory,
} from "."; } from ".";
import { import {
getAppxItemList, getAppxItemList,
getStartMenuItemList, getStartMenuItemList,
getSystemItemList, getSystemItemList,
} from "./commons"; } from "./commons";
import { add, del, list, selectById, update, updateOrder } from "./data"; import {
add,
batchDel,
del,
list,
selectById,
update,
updateOrder,
} from "./data";
import { Item } from "../../../types/item"; import { Item } from "../../../types/item";
import { getFileExtname, isAbsolutePath } from "../../../commons/utils/common"; import { getFileExtname, isAbsolutePath } from "../../../commons/utils/common";
import { import {
@ -50,6 +58,7 @@ import {
closeWindow, closeWindow,
openAfterHideWindow, openAfterHideWindow,
sendToWebContent, sendToWebContent,
showMessageBoxSync,
} from "../commons/index"; } from "../commons/index";
/** /**
@ -171,11 +180,20 @@ export default function () {
if (!classification) { if (!classification) {
return; return;
} }
// 鼠标位置
let point = global.addon.getCursorPoint();
// 菜单 // 菜单
let menuList: Array<MenuItem> = []; let menuList: Array<MenuItem> = [];
// 组装菜单 // 组装菜单
if (!batchOperation) { if (!batchOperation) {
if (item) { if (item) {
// 查询页面分类信息
let pageClassification = selectClassificationById(
args.pageClassificationId
);
if (!pageClassification && type === "main") {
return;
}
// 后缀 // 后缀
let ext: string | null = null; let ext: string | null = null;
// 排除 // 排除
@ -184,7 +202,11 @@ export default function () {
} }
// "打开"菜单 // "打开"菜单
let openMenu = false; let openMenu = false;
if (item.type === 0 && ext && (ext === "exe" || ext === "bat")) { if (
item.type === 0 ||
item.type === 4 ||
(item.type === 3 && item.data.target === "cmd.exe")
) {
menuList.push( menuList.push(
new MenuItem({ new MenuItem({
label: global.language.runAsAdministrator, label: global.language.runAsAdministrator,
@ -233,10 +255,12 @@ export default function () {
label: global.language.explorerMenu, label: global.language.explorerMenu,
click: () => { click: () => {
// 获取当前窗口所在屏幕 // 获取当前窗口所在屏幕
let screen = getWindowInScreen(); let display = getWindowInScreen(
type === "main" ? global.mainWindow : global.quickSearchWindow
);
let scaleFactor = 1; let scaleFactor = 1;
if (screen && screen.length > 0) { if (display && display.length > 0) {
scaleFactor = screen[0].scaleFactor; scaleFactor = display[0].scaleFactor;
} }
// 弹出资源管理器菜单 // 弹出资源管理器菜单
sendToWebContent( sendToWebContent(
@ -251,12 +275,17 @@ export default function () {
global.addon.disableMouseHook(); global.addon.disableMouseHook();
// 弹出资源管理器菜单 // 弹出资源管理器菜单
global.addon.explorerContextMenu( global.addon.explorerContextMenu(
global.mainWindow.getNativeWindowHandle().readInt32LE(0), (type === "main"
? global.mainWindow
: global.quickSearchWindow
)
.getNativeWindowHandle()
.readInt32LE(0),
item.type === 0 || item.type === 1 item.type === 0 || item.type === 1
? getAbsolutePath(item.data.target) ? parsePath(item.data.target)
: item.data.target, : item.data.target,
args.x * scaleFactor, point[0],
args.y * scaleFactor point[1]
); );
// 开启鼠标HOOK // 开启鼠标HOOK
global.addon.enableMouseHook(); global.addon.enableMouseHook();
@ -282,7 +311,7 @@ export default function () {
click: () => { click: () => {
clipboard.writeText( clipboard.writeText(
item.type === 0 || item.type === 1 item.type === 0 || item.type === 1
? getAbsolutePath(item.data.target) ? parsePath(item.data.target)
: item.data.target : item.data.target
); );
}, },
@ -293,7 +322,8 @@ export default function () {
if ( if (
type === "main" && type === "main" &&
(item.type === 0 || item.type === 1) && (item.type === 0 || item.type === 1) &&
classification.type === 0 classification.type === 0 &&
pageClassification.type === 0
) { ) {
menuList.push( menuList.push(
new MenuItem({ new MenuItem({
@ -310,7 +340,7 @@ export default function () {
); );
pathMenu = true; pathMenu = true;
} }
if (item.type === 0 || item.type === 1 || item.type === 2) { if (item.type === 0 || item.type === 1) {
menuList.push( menuList.push(
new MenuItem({ new MenuItem({
label: global.language.createShortcut, label: global.language.createShortcut,
@ -324,7 +354,11 @@ export default function () {
if (pathMenu) { if (pathMenu) {
menuList.push(new MenuItem({ type: "separator" })); menuList.push(new MenuItem({ type: "separator" }));
} }
if (type === "main") { if (
type === "main" &&
classification.type === 0 &&
pageClassification.type === 0
) {
// "图标"菜单 // "图标"菜单
let existPasteIcon = false; let existPasteIcon = false;
// 获取剪切板图片文件 // 获取剪切板图片文件
@ -360,7 +394,9 @@ export default function () {
if ( if (
type === "main" && type === "main" &&
(item.type === 0 || item.type === 1) && (item.type === 0 || item.type === 1) &&
!item.data.fixedIcon !item.data.fixedIcon &&
classification.type === 0 &&
pageClassification.type === 0
) { ) {
menuList.push( menuList.push(
new MenuItem({ new MenuItem({
@ -371,7 +407,11 @@ export default function () {
}) })
); );
} }
if (type === "main" && classification.type === 0) { if (
type === "main" &&
classification.type === 0 &&
pageClassification.type === 0
) {
menuList.push(new MenuItem({ type: "separator" })); menuList.push(new MenuItem({ type: "separator" }));
menuList.push( menuList.push(
new MenuItem({ new MenuItem({
@ -398,13 +438,12 @@ export default function () {
new MenuItem({ new MenuItem({
label: global.language.delete, label: global.language.delete,
click: () => { click: () => {
let res = dialog.showMessageBoxSync(global.mainWindow, { let res = showMessageBoxSync(
message: global.language.deleteItemPrompt, "mainWindow",
buttons: [global.language.ok, global.language.cancel], global.language.deleteItemPrompt,
type: "question", "question",
noLink: true, [global.language.ok, global.language.cancel]
cancelId: 1, );
});
if (res === 0) { if (res === 0) {
// 删除数据 // 删除数据
del(item.id); del(item.id);
@ -540,20 +579,17 @@ export default function () {
new MenuItem({ new MenuItem({
label: global.language.batchDelete, label: global.language.batchDelete,
click: () => { click: () => {
let res = dialog.showMessageBoxSync(global.mainWindow, { let res = showMessageBoxSync(
message: global.language.batchDeletePrompt, "mainWindow",
buttons: [global.language.ok, global.language.cancel], global.language.batchDeletePrompt,
type: "question", "question",
noLink: true, [global.language.ok, global.language.cancel]
cancelId: 1, );
});
if (res === 0) { if (res === 0) {
for (const id of batchSelectedIdList) { // 批量删除
// 删除数据 batchDel(batchSelectedIdList);
del(id); // 快捷键
// 快捷键 setShortcutKey();
setShortcutKey();
}
// 通知前端删除数据 // 通知前端删除数据
sendToWebContent( sendToWebContent(
"mainWindow", "mainWindow",
@ -665,7 +701,7 @@ export default function () {
} }
let icon = join(process.env.VITE_PUBLIC, "drag-and-drop.png"); let icon = join(process.env.VITE_PUBLIC, "drag-and-drop.png");
event.sender.startDrag({ event.sender.startDrag({
file: getAbsolutePath(item.data.target), file: parsePath(item.data.target),
icon: icon, icon: icon,
}); });
} finally { } finally {
@ -677,4 +713,8 @@ export default function () {
ipcMain.on("updateItemOpenInfo", (event, args) => { ipcMain.on("updateItemOpenInfo", (event, args) => {
updateOpenInfo(args.type, args.id); updateOpenInfo(args.type, args.id);
}); });
// 删除历史记录
ipcMain.on("deleteQuickSearchHistory", (event, args) => {
deleteQuickSearchHistory(args);
});
} }

View File

@ -10,7 +10,13 @@ import {
import { createSettingWindow } from "../setting"; import { createSettingWindow } from "../setting";
import { join } from "node:path"; import { join } from "node:path";
import cacheData from "../commons/cacheData"; import cacheData from "../commons/cacheData";
import { getMainBackgorunColor, sendToWebContent } from "../commons"; import {
getMainBackgorunColor,
getWindowInScreen,
mainWindowExist,
sendToWebContent,
} from "../commons";
import { release } from "node:os";
// 窗口 // 窗口
let mainWindow: BrowserWindow | null = null; let mainWindow: BrowserWindow | null = null;
@ -30,18 +36,18 @@ function createMainWindow() {
title: "Dawn Launcher", title: "Dawn Launcher",
width: 800, width: 800,
height: 600, height: 600,
type: "toolbar",
frame: false, frame: false,
show: false, show: false,
maximizable: false, maximizable: false,
minimizable: false, minimizable: false,
fullscreenable: false, fullscreenable: false,
transparent: global.setting.appearance.transparency < 1, transparent: global.setting.appearance.transparency < 1,
skipTaskbar: true, skipTaskbar: global.setting.general.hideTaskbar,
backgroundColor: backgroundColor:
global.setting.appearance.transparency === 1 global.setting.appearance.transparency === 1
? getMainBackgorunColor() ? getMainBackgorunColor()
: null, : null,
icon: join(process.env.VITE_PUBLIC, "logo.ico"),
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
backgroundThrottling: false, backgroundThrottling: false,
@ -56,11 +62,10 @@ function createMainWindow() {
} }
// 加载完毕 // 加载完毕
mainWindow.webContents.on("did-finish-load", () => { mainWindow.webContents.on("did-finish-load", () => {
// 恢复上一次的位置 // 设置窗口无动画
let bounds = cacheData.cacheStore.get("mainWindowBounds"); global.addon.removeWindowAnimation(
if (bounds) { mainWindow.getNativeWindowHandle().readInt32LE(0)
mainWindow.setBounds(bounds); );
}
// 永远居中不可移动 // 永远居中不可移动
if (global.setting.general.alwaysCenter) { if (global.setting.general.alwaysCenter) {
mainWindow.setMovable(false); mainWindow.setMovable(false);
@ -71,16 +76,45 @@ function createMainWindow() {
if (global.setting.general.alwaysTop) { if (global.setting.general.alwaysTop) {
mainWindow.setAlwaysOnTop(true, "screen-saver"); mainWindow.setAlwaysOnTop(true, "screen-saver");
} }
// 恢复上一次的位置
let bounds: any = cacheData.cacheStore.get("mainWindowBounds");
// 锁定尺寸 // 锁定尺寸
if (!global.setting.general.lockSize) { mainWindow.setResizable(!global.setting.general.lockSize);
mainWindow.setResizable(!global.setting.general.lockSize); // 如果是锁定尺寸的话,使用锁定尺寸来设置窗口尺寸
if (global.setting.general.lockSize) {
let lockSizeBounds: any = cacheData.cacheStore.get(
"mainWindowLockSizeBounds"
);
if (lockSizeBounds) {
if (bounds) {
bounds.width = lockSizeBounds.width;
bounds.height = lockSizeBounds.height;
} else {
bounds = {
width: lockSizeBounds.width,
height: lockSizeBounds.height,
};
}
} else {
if (bounds) {
cacheData.cacheStore.set("mainWindowLockSizeBounds", bounds);
} else {
cacheData.cacheStore.set(
"mainWindowLockSizeBounds",
mainWindow.getBounds()
);
}
}
}
if (bounds) {
mainWindow.setBounds(bounds);
} }
// 托盘 // 托盘
createTray(!global.setting.general.hideTray); createTray(!global.setting.general.hideTray);
// 永远居中 // 永远居中
alwaysCenter(); alwaysCenter();
// 判断窗口位置 // 判断窗口位置
let displays = getWindowInScreen(); let displays = getWindowInScreen(mainWindow);
if (displays.length === 0) { if (displays.length === 0) {
// 代表窗口的位置不再任一屏幕内,将窗口位置移动到主窗口 // 代表窗口的位置不再任一屏幕内,将窗口位置移动到主窗口
mainWindow.center(); mainWindow.center();
@ -106,13 +140,7 @@ function createMainWindow() {
// 失去焦点 // 失去焦点
mainWindow.on("blur", () => { mainWindow.on("blur", () => {
if (global.setting.general.edgeAutoHide && global.blurHide) { if (global.setting.general.edgeAutoHide && global.blurHide) {
let scaleFactor = screen.getPrimaryDisplay().scaleFactor; autoHide(0, false);
autoHide(
screen.getCursorScreenPoint().x * scaleFactor,
screen.getCursorScreenPoint().y * scaleFactor,
0,
false
);
} }
if ( if (
mainWindow.isVisible() && mainWindow.isVisible() &&
@ -120,7 +148,10 @@ function createMainWindow() {
!global.setting.general.alwaysTop !global.setting.general.alwaysTop
) { ) {
// 如果当前还有打开的子窗口就不执行失去焦点隐藏 // 如果当前还有打开的子窗口就不执行失去焦点隐藏
if (mainWindow.getChildWindows().length === 0) { if (
mainWindow.getChildWindows().length === 0 &&
!global.mainWindowShowDialog
) {
hideMainWindow(); hideMainWindow();
} }
} }
@ -150,31 +181,45 @@ function createMainWindow() {
sendToWebContent("mainWindow", "onCollapseSubClassification", {}); sendToWebContent("mainWindow", "onCollapseSubClassification", {});
} }
}); });
// 主窗口关闭事件
mainWindow.on("closed", () => {
app.quit();
});
// 创建鼠标hook // 创建鼠标hook
let mousedownClassName = null;
addon.createMouseHook((...args: any[]) => { addon.createMouseHook((...args: any[]) => {
let res = JSON.parse(args[1]); let res = JSON.parse(args[1]);
let event: string = res.event; let event: string = res.event;
let x: number = res.x; let x: number = res.x;
let y: number = res.y; let y: number = res.y;
let className: string =
!res.class_name || res.class_name.trim() === ""
? null
: res.class_name.trim();
// 1左键 2右键 3滚轮 // 1左键 2右键 3滚轮
let button: number = res.button; let button: number = res.button;
if (event === "mousemove") { if (event === "mousemove") {
// 鼠标移动 // 鼠标移动
if (!global.blurHide) { if (!global.blurHide) {
// 停靠在桌面边缘时自动隐藏 // 停靠在桌面边缘时自动隐藏
autoHide(x, y, 40, true); autoHide(20, true);
} }
} else if (event === "mousedown") { } else if (event === "mousedown") {
// 鼠标按下 // 鼠标按下
if (button === 1) {
mousedownClassName = className;
}
} else if (event === "mouseup") { } else if (event === "mouseup") {
// 鼠标抬起 // 鼠标抬起
if (button === 3) { if (button === 1) {
// 双击任务栏
doubleClickTaskbar(mousedownClassName, className);
} else if (button === 3) {
// 中间单击 // 中间单击
// 显示隐藏窗口
showHideMouseWheelClick(); showHideMouseWheelClick();
} }
// 双击任务栏 // 失去焦点隐藏
doubleClickTaskbar(button); onBlurHide();
} }
}); });
// 禁用标题栏右键 // 禁用标题栏右键
@ -189,18 +234,65 @@ function createMainWindow() {
}); });
} }
/**
*
*/
function onBlurHide() {
if (
mainWindowExist() &&
global.mainWindow.isVisible() &&
global.setting.general.hideLoseFocus &&
!global.setting.general.alwaysTop &&
global.mainWindow.getChildWindows().length === 0 &&
!global.mainWindowShowDialog &&
!hasCursorPosWindow(global.mainWindow)
) {
// 隐藏窗口
hideMainWindow();
}
}
/**
*
*/
function hasCursorPosWindow(window: BrowserWindow) {
if (window && !window.isDestroyed() && window.isVisible()) {
// 获取鼠标位置
let point = screen.getCursorScreenPoint();
// 窗口位置信息
let bounds = window.getBounds();
// 判断鼠标是否在窗口以外
if (
point.x < bounds.x ||
point.x > bounds.x + bounds.width ||
point.y < bounds.y ||
point.y > bounds.y + bounds.height
) {
// 窗口以外
return false;
} else {
// 窗口以内
return true;
}
}
return false;
}
/** /**
* *
* @param blurHide * @param blurHide
* @param autoHide
* @param selectedClassificationId * @param selectedClassificationId
*/ */
function showMainWindowBefore( function showMainWindowBefore(
blurHide: boolean, blurHide: boolean,
autoHide = false,
selectedClassificationId: number | null = null selectedClassificationId: number | null = null
) { ) {
// 向主窗口发送通知 // 向主窗口发送通知
sendToWebContent("mainWindow", "onShowMainWindowBefore", { sendToWebContent("mainWindow", "onShowMainWindowBefore", {
blurHide, blurHide,
autoHide,
selectedClassificationId, selectedClassificationId,
}); });
} }
@ -208,8 +300,12 @@ function showMainWindowBefore(
/** /**
* *
* @param blurHide * @param blurHide
* @param autoHide
*/ */
function showMainWindow(blurHide: boolean) { function showMainWindow(blurHide: boolean, autoHide = false) {
if (!mainWindowExist()) {
return;
}
// flag // flag
let flag = true; let flag = true;
// 是否开启勿扰模式 // 是否开启勿扰模式
@ -218,22 +314,20 @@ function showMainWindow(blurHide: boolean) {
flag = false; flag = false;
} }
} }
// 显示时跟随鼠标位置 if (!autoHide) {
showFollowMousePosition(); // 显示时跟随鼠标位置
showFollowMousePosition();
}
if (flag) { if (flag) {
if (!global.setting.general.alwaysTop) {
global.mainWindow.setAlwaysOnTop(true, "screen-saver");
}
global.mainWindow.show(); global.mainWindow.show();
// 如果没有设置置顶时,显示窗口先置顶一下,再取消
if (!global.mainWindow.isAlwaysOnTop) {
mainWindow.setAlwaysOnTop(true, "screen-saver");
mainWindow.setAlwaysOnTop(false);
}
global.mainWindow.focus(); global.mainWindow.focus();
global.blurHide = blurHide; if (!global.setting.general.alwaysTop) {
if (blurHide) { global.mainWindow.setAlwaysOnTop(false);
global.blurHide = true;
} else {
global.blurHide = false;
} }
global.blurHide = blurHide;
} }
} }
@ -241,7 +335,7 @@ function showMainWindow(blurHide: boolean) {
* *
*/ */
function hideMainWindow() { function hideMainWindow() {
if (global.mainWindow.isVisible()) { if (mainWindowExist() && global.mainWindow.isVisible()) {
global.mainWindow.hide(); global.mainWindow.hide();
global.blurHide = false; global.blurHide = false;
} }
@ -295,39 +389,20 @@ function createTray(show: boolean) {
} }
} }
/**
*
*/
function getWindowInScreen() {
let inDisplays: Array<Display> = [];
let displays = screen.getAllDisplays();
let bounds = global.mainWindow.getBounds();
for (let display of displays) {
let workArea = display.workArea;
if (
((workArea.x <= bounds.x && workArea.x + workArea.width >= bounds.x) ||
(workArea.x <= bounds.x + bounds.width &&
workArea.x + workArea.width >= bounds.x + bounds.width)) &&
((workArea.y <= bounds.y && workArea.y + workArea.height >= bounds.y) ||
(workArea.y <= bounds.y + bounds.height &&
workArea.y + workArea.height >= bounds.y + bounds.height))
) {
inDisplays.push(display);
}
}
return inDisplays;
}
/** /**
* *
* @param display * @param display
* @param workArea
* @returns * @returns
*/ */
function edgeAdsorb(display: Display | null) { function edgeAdsorb(display: Display | null, workArea = false) {
if (!mainWindowExist()) {
return;
}
// 如果勾选停靠在桌面边缘时自动隐藏,放行 // 如果勾选停靠在桌面边缘时自动隐藏,放行
if ( if (
global.mainWindow.isDestroyed() || !global.setting.general.edgeAdsorb &&
(!global.setting.general.edgeAdsorb && !global.setting.general.edgeAutoHide) !global.setting.general.edgeAutoHide
) { ) {
return; return;
} }
@ -335,37 +410,80 @@ function edgeAdsorb(display: Display | null) {
// 清空方向 // 清空方向
global.mainWindowDirection = null; global.mainWindowDirection = null;
// 屏幕 // 屏幕
let displays = display ? [display] : getWindowInScreen(); let displays = display ? [display] : getWindowInScreen(global.mainWindow);
if (displays.length > 1 || displays.length === 0) { if (displays.length > 1 || displays.length === 0) {
return; return;
} }
// 获取屏幕工作区域 // 屏幕区域
let workArea = displays[0].workArea; let displayBounds = workArea ? displays[0].workArea : displays[0].bounds;
// 窗口位置信息 // 窗口位置信息
let bounds = global.mainWindow.getBounds(); let bounds = global.mainWindow.getBounds();
if (bounds.x + bounds.width >= workArea.x + workArea.width) { if (bounds.x <= displayBounds.x && bounds.y <= displayBounds.y) {
// 左上角
global.mainWindow.setBounds({ x: displayBounds.x, y: displayBounds.y });
global.mainWindowDirection = "leftTop";
global.blurHide = false;
} else if (
bounds.x + bounds.width >= displayBounds.x + displayBounds.width &&
bounds.y <= displayBounds.y
) {
// 右上角
global.mainWindow.setBounds({
x: displayBounds.x + displayBounds.width - bounds.width,
y: displayBounds.y,
});
global.mainWindowDirection = "rightTop";
global.blurHide = false;
} else if (
bounds.x <= displayBounds.x &&
bounds.y + bounds.height >= displayBounds.y + displayBounds.height
) {
// 左下角
global.mainWindow.setBounds({
x: displayBounds.x,
y: displayBounds.y + displayBounds.height - bounds.height,
});
global.mainWindowDirection = "leftBottom";
global.blurHide = false;
} else if (
bounds.x + bounds.width >= displayBounds.x + displayBounds.width &&
bounds.y + bounds.height >= displayBounds.y + displayBounds.height
) {
// 右下角
global.mainWindow.setBounds({
x: displayBounds.x + displayBounds.width - bounds.width,
y: displayBounds.y + displayBounds.height - bounds.height,
});
global.mainWindowDirection = "rightBottom";
global.blurHide = false;
} else if (bounds.x <= displayBounds.x) {
// 左侧
global.mainWindow.setBounds({ x: displayBounds.x });
global.mainWindowDirection = "left";
global.blurHide = false;
} else if (
bounds.x + bounds.width >=
displayBounds.x + displayBounds.width
) {
// 右侧 // 右侧
global.mainWindow.setBounds({ global.mainWindow.setBounds({
x: workArea.x + workArea.width - bounds.width, x: displayBounds.x + displayBounds.width - bounds.width,
}); });
global.mainWindowDirection = "right"; global.mainWindowDirection = "right";
global.blurHide = false; global.blurHide = false;
} else if (bounds.x <= workArea.x) { } else if (
// 左侧 bounds.y + bounds.height >=
global.mainWindow.setBounds({ x: workArea.x }); displayBounds.y + displayBounds.height
global.mainWindowDirection = "left"; ) {
global.blurHide = false;
}
if (bounds.y + bounds.height >= workArea.y + workArea.height) {
// 底部 // 底部
global.mainWindow.setBounds({ global.mainWindow.setBounds({
y: workArea.y + workArea.height - bounds.height, y: displayBounds.y + displayBounds.height - bounds.height,
}); });
global.mainWindowDirection = "bottom"; global.mainWindowDirection = "bottom";
global.blurHide = false; global.blurHide = false;
} else if (bounds.y <= workArea.y) { } else if (bounds.y <= displayBounds.y) {
// 顶部 // 顶部
global.mainWindow.setBounds({ y: workArea.y }); global.mainWindow.setBounds({ y: displayBounds.y });
global.mainWindowDirection = "top"; global.mainWindowDirection = "top";
global.blurHide = false; global.blurHide = false;
} }
@ -381,6 +499,9 @@ function edgeAdsorb(display: Display | null) {
* *
*/ */
function showFollowMousePosition() { function showFollowMousePosition() {
if (!mainWindowExist()) {
return;
}
// 当永远居中、固定位置勾选后不能使用显示时跟随鼠标位置 // 当永远居中、固定位置勾选后不能使用显示时跟随鼠标位置
if ( if (
!global.setting.general.alwaysCenter && !global.setting.general.alwaysCenter &&
@ -395,13 +516,15 @@ function showFollowMousePosition() {
let y = Math.round(bounds.height / 2); let y = Math.round(bounds.height / 2);
// 设置窗口位置 // 设置窗口位置
global.mainWindow.setPosition(point.x - x, point.y - y); global.mainWindow.setPosition(point.x - x, point.y - y);
// 调整窗口位置并显示时会出现闪屏的情况
// https://github.com/electron/electron/issues/10862
for (let i = 0; i < 10; i++) { for (let i = 0; i < 10; i++) {
global.mainWindow.setSize(bounds.width, bounds.height); global.mainWindow.setSize(bounds.width, bounds.height);
} }
// 获取当前鼠标所在屏幕 // 获取当前鼠标所在屏幕
let display = screen.getDisplayNearestPoint(point); let display = screen.getDisplayNearestPoint(point);
// 边缘吸附 // 边缘吸附
edgeAdsorb(display); edgeAdsorb(display, true);
} }
} }
@ -409,6 +532,9 @@ function showFollowMousePosition() {
* / * /
*/ */
function showHideMouseWheelClick() { function showHideMouseWheelClick() {
if (!mainWindowExist()) {
return;
}
if (global.setting.general.showHideMouseWheelClick) { if (global.setting.general.showHideMouseWheelClick) {
if (global.mainWindow.isVisible()) { if (global.mainWindow.isVisible()) {
hideMainWindow(); hideMainWindow();
@ -422,65 +548,101 @@ function showHideMouseWheelClick() {
* *
*/ */
function alwaysCenter() { function alwaysCenter() {
if (!mainWindowExist()) {
return;
}
if (global.setting.general.alwaysCenter) { if (global.setting.general.alwaysCenter) {
mainWindow.center(); global.mainWindow.center();
} }
} }
/** /**
* *
* @param x
* @param y
* @param size * @param size
* @param timer / * @param timer /
* @returns * @returns
*/ */
function autoHide(x: number, y: number, size: number, timer: boolean) { function autoHide(size: number, timer: boolean) {
if (global.mainWindow.isDestroyed() || !global.setting.general.edgeAutoHide) { if (!mainWindowExist()) {
return;
}
if (!global.setting.general.edgeAutoHide) {
return; return;
} }
// 当有子窗口时不自动隐藏 // 当有子窗口时不自动隐藏
if (mainWindow.getChildWindows().length > 0) { if (
global.mainWindow.getChildWindows().length > 0 ||
global.mainWindowShowDialog
) {
return; return;
} }
let x = screen.getCursorScreenPoint().x;
let y = screen.getCursorScreenPoint().y;
try { try {
// 屏幕 // 屏幕
let displays = getWindowInScreen(); let displays = getWindowInScreen(global.mainWindow);
if (displays.length > 1 || displays.length === 0) { if (displays.length > 1 || displays.length === 0) {
return; return;
} }
// 工作区域 // 屏幕区域
let workArea = displays[0].workArea; let displayBounds = displays[0].bounds;
// 缩放比例
let scaleFactor = displays[0].scaleFactor;
// 窗口位置信息 // 窗口位置信息
let bounds = mainWindow.getBounds(); let bounds = global.mainWindow.getBounds();
if (mainWindow.isVisible()) { if (global.mainWindow.isVisible()) {
let flag = false; let flag = false;
if (bounds.x + bounds.width >= workArea.x + workArea.width) { if (bounds.x === displayBounds.x && bounds.y === displayBounds.y) {
// 左上角
flag =
x >= bounds.x + bounds.width + size ||
y >= bounds.y + bounds.height + size;
} else if (
bounds.x + bounds.width === displayBounds.x + displayBounds.width &&
bounds.y === displayBounds.y
) {
// 右上角
flag = x <= bounds.x - size || y >= bounds.y + bounds.height + size;
} else if (
bounds.x === displayBounds.x &&
bounds.y + bounds.height === displayBounds.y + displayBounds.height
) {
// 左下角
flag = x >= bounds.x + bounds.width + size || y <= bounds.y - size;
} else if (
bounds.x + bounds.width === displayBounds.x + displayBounds.width &&
bounds.y + bounds.height === displayBounds.y + displayBounds.height
) {
// 右下角
flag = x <= bounds.x - size || y <= bounds.y - size;
} else if (
bounds.x + bounds.width >=
displayBounds.x + displayBounds.width
) {
// 右侧 // 右侧
flag = flag =
x <= bounds.x * scaleFactor - size || x <= bounds.x - size ||
y <= bounds.y * scaleFactor - size || y <= bounds.y - size ||
y >= (bounds.y + bounds.height) * scaleFactor + size; y >= bounds.y + bounds.height + size;
} else if (bounds.x === workArea.x) { } else if (bounds.x === displayBounds.x) {
// 左侧 // 左侧
flag = flag =
x > (bounds.x + bounds.width) * scaleFactor + size || x > bounds.x + bounds.width + size ||
y <= bounds.y * scaleFactor - size || y <= bounds.y - size ||
y >= (bounds.y + bounds.height) * scaleFactor + size; y >= bounds.y + bounds.height + size;
} else if (bounds.y + bounds.height >= workArea.y + workArea.height) { } else if (
bounds.y + bounds.height >=
displayBounds.y + displayBounds.height
) {
// 底部 // 底部
flag = flag =
y < bounds.y * scaleFactor - size || y < bounds.y - size ||
x <= bounds.x * scaleFactor - size || x <= bounds.x - size ||
x >= (bounds.x + bounds.width) * scaleFactor + size; x >= bounds.x + bounds.width + size;
} else if (bounds.y === workArea.y) { } else if (bounds.y === displayBounds.y) {
// 顶部 // 顶部
flag = flag =
y > (bounds.y + bounds.height) * scaleFactor + size || y > bounds.y + bounds.height + size ||
x <= bounds.x * scaleFactor - size || x <= bounds.x - size ||
x >= (bounds.x + bounds.width) * scaleFactor + size; x >= bounds.x + bounds.width + size;
} }
if (flag && !global.classificationRightMenu && !global.itemRightMenu) { if (flag && !global.classificationRightMenu && !global.itemRightMenu) {
if ( if (
@ -504,39 +666,63 @@ function autoHide(x: number, y: number, size: number, timer: boolean) {
} else { } else {
if (global.mainWindowDirection) { if (global.mainWindowDirection) {
let flag = false; let flag = false;
let scaleFactorX = bounds.x * scaleFactor;
let scaleFactorY = bounds.y * scaleFactor;
let windowWidthPosition = (bounds.x + bounds.width) * scaleFactor;
let windowHeightPosition = (bounds.y + bounds.height) * scaleFactor;
if ( if (
global.mainWindowDirection === "right" && global.mainWindowDirection === "leftTop" &&
x >= windowWidthPosition - 1 && x === displayBounds.x &&
y >= scaleFactorY && y === displayBounds.y
y <= windowHeightPosition
) { ) {
// 右侧 // 左上角
flag = true;
} else if (
global.mainWindowDirection === "rightTop" &&
x === displayBounds.x + displayBounds.width - 1 &&
y === displayBounds.y
) {
// 右上角
flag = true;
} else if (
global.mainWindowDirection === "leftBottom" &&
x === displayBounds.x &&
y === displayBounds.y + displayBounds.height - 1
) {
// 左下角
flag = true;
} else if (
global.mainWindowDirection === "rightBottom" &&
x === displayBounds.x + displayBounds.width - 1 &&
y === displayBounds.y + displayBounds.height - 1
) {
// 右下角
flag = true; flag = true;
} else if ( } else if (
global.mainWindowDirection === "left" && global.mainWindowDirection === "left" &&
x <= workArea.x && x <= displayBounds.x &&
y >= scaleFactorY && y >= bounds.y &&
y <= windowHeightPosition y <= bounds.y + bounds.height
) { ) {
// 左侧 // 左侧
flag = true; flag = true;
} else if (
global.mainWindowDirection === "right" &&
x >= bounds.x + bounds.width - 1 &&
y >= bounds.y &&
y <= bounds.y + bounds.height
) {
// 右侧
flag = true;
} else if ( } else if (
global.mainWindowDirection === "bottom" && global.mainWindowDirection === "bottom" &&
y >= windowHeightPosition - 1 && y >= bounds.y + bounds.height - 1 &&
x >= scaleFactorX && x >= bounds.x &&
x <= windowWidthPosition x <= bounds.x + bounds.width
) { ) {
// 底部 // 底部
flag = true; flag = true;
} else if ( } else if (
global.mainWindowDirection === "top" && global.mainWindowDirection === "top" &&
y <= workArea.y && y <= displayBounds.y &&
x >= scaleFactorX && x >= bounds.x &&
x <= windowWidthPosition x <= bounds.x + bounds.width
) { ) {
// 顶部 // 顶部
flag = true; flag = true;
@ -549,11 +735,11 @@ function autoHide(x: number, y: number, size: number, timer: boolean) {
) { ) {
// 延迟显示 // 延迟显示
global.autoHideTimer = setTimeout(function () { global.autoHideTimer = setTimeout(function () {
showMainWindowBefore(false); showMainWindowBefore(false, true);
}, global.setting.general.delayDisplayMs); }, global.setting.general.delayDisplayMs);
} else if (!timer || global.setting.general.delayDisplayMs === 0) { } else if (!timer || global.setting.general.delayDisplayMs === 0) {
// 显示 // 显示
showMainWindowBefore(false); showMainWindowBefore(false, true);
} }
} else { } else {
// 清空timer // 清空timer
@ -573,111 +759,64 @@ function autoHide(x: number, y: number, size: number, timer: boolean) {
/** /**
* / * /
*/ */
function doubleClickTaskbar(button: number) { function doubleClickTaskbar(
mousedownClassName: string | null,
className: string | null
) {
if (!mainWindowExist()) {
return;
}
// 必须开启设置 // 必须开启设置
if (!global.setting.general.showHideDoubleClickTaskbar) { if (!global.setting.general.showHideDoubleClickTaskbar) {
return; return;
} }
// 不是左键的话
if (button !== 1) {
// 清除timeout
clearTimeout(global.doubleClickTaskbarTimer);
// 清空计数
global.doubleClickTaskbarCounter = 0;
return;
}
// 获取屏幕 // 获取屏幕
let displays = getWindowInScreen(); let displays = getWindowInScreen(global.mainWindow);
if (displays.length > 1 || displays.length === 0) { if (
displays.length > 1 ||
displays.length === 0 ||
(className !== "Shell_TrayWnd" && className !== "Shell_SecondaryTrayWnd")
) {
// 清除timeout // 清除timeout
clearTimeout(global.doubleClickTaskbarTimer); clearTimeout(global.doubleClickTaskbarTimer);
// 清空计数 // 清空计数
global.doubleClickTaskbarCounter = 0; global.doubleClickTaskbarCounter = 0;
return; return;
} }
// 获取鼠标位置 // 必须是指定Class
let point = screen.getCursorScreenPoint();
// 判断鼠标是否在当前屏幕内
if ( if (
point.x >= displays[0].bounds.x && (release().startsWith("10.0.1") &&
point.x <= displays[0].bounds.x + displays[0].bounds.width && global.addon.getCursorPosWindowClassName().indexOf("MSTask") >= 0) ||
point.y >= displays[0].bounds.y && (release().startsWith("10.0.2") &&
point.y <= displays[0].bounds.y + displays[0].bounds.height global.addon.getCursorPosWindowClassName() !== "TrayNotifyWnd")
) { ) {
// 判断是否双击在任务栏上 // 监听双击
let flag = false; if (!global.doubleClickTaskbarCounter) {
// 判断任务栏在哪一侧 global.doubleClickTaskbarCounter = 0;
if (displays[0].bounds.height > displays[0].workArea.height) {
if (displays[0].bounds.y === displays[0].workArea.y) {
// 底部
let top = displays[0].workArea.y + displays[0].workArea.height;
let bottom = displays[0].bounds.y + displays[0].bounds.height;
if (point.y >= top && point.y <= bottom) {
flag = true;
}
} else {
// 顶部
if (
point.y >= displays[0].bounds.y &&
point.y <= displays[0].workArea.y
) {
flag = true;
}
}
} else if (displays[0].bounds.width > displays[0].workArea.width) {
if (displays[0].bounds.x === displays[0].workArea.x) {
// 右侧
let left = displays[0].workArea.x + displays[0].workArea.width;
let right = displays[0].bounds.x + displays[0].bounds.width;
if (point.x >= left && point.x <= right) {
flag = true;
}
} else {
// 左侧
if (
point.x >= displays[0].bounds.x &&
point.x <= displays[0].workArea.x
) {
flag = true;
}
}
} }
if (flag) { // +1
// 监听双击 global.doubleClickTaskbarCounter++;
if (!global.doubleClickTaskbarCounter) { if (
global.doubleClickTaskbarCounter = 0; global.doubleClickTaskbarCounter &&
} global.doubleClickTaskbarCounter === 2 &&
// +1 (mousedownClassName === "Shell_TrayWnd" ||
global.doubleClickTaskbarCounter++; mousedownClassName === "Shell_SecondaryTrayWnd")
// 等于2就是双击 ) {
if (
global.doubleClickTaskbarCounter &&
global.doubleClickTaskbarCounter === 2
) {
// 清除timeout
clearTimeout(global.doubleClickTaskbarTimer);
// 清空计数
global.doubleClickTaskbarCounter = 0;
// 判断点击的窗口ClassName
let className = global.addon.getCursorPosWindowClassName();
if (className.indexOf("MSTask") >= 0 || className === "Shell_TrayWnd") {
if (mainWindow.isVisible()) {
hideMainWindow();
} else {
showMainWindowBefore(false);
}
}
} else {
// 间隔为500毫秒如果超过500毫秒就代表不是双击
global.doubleClickTaskbarTimer = setTimeout(function () {
global.doubleClickTaskbarCounter = 0;
}, 500);
}
} else {
// 清除timeout // 清除timeout
clearTimeout(global.doubleClickTaskbarTimer); clearTimeout(global.doubleClickTaskbarTimer);
// 清空计数 // 清空计数
global.doubleClickTaskbarCounter = 0; global.doubleClickTaskbarCounter = 0;
// 显示或隐藏
if (global.mainWindow.isVisible()) {
hideMainWindow();
} else {
showMainWindowBefore(false);
}
} else {
// 间隔为500毫秒如果超过500毫秒就代表不是双击
global.doubleClickTaskbarTimer = setTimeout(function () {
global.doubleClickTaskbarCounter = 0;
}, 500);
} }
} else { } else {
// 清除timeout // 清除timeout

View File

@ -2,11 +2,12 @@ import { ipcMain } from "electron";
import { createTray, hideMainWindow, showMainWindow } from "./index"; import { createTray, hideMainWindow, showMainWindow } from "./index";
import { initAssociateFolder } from "../classification"; import { initAssociateFolder } from "../classification";
import { checkInvalid } from "../item"; import { checkInvalid } from "../item";
import { getWindow } from "../commons";
export default function () { export default function () {
// 显示窗口 // 显示窗口
ipcMain.on("showMainWindow", (event, args) => { ipcMain.on("showMainWindow", (event, args) => {
showMainWindow(args.blurHide); showMainWindow(args.blurHide, args.autoHide);
}); });
// 隐藏窗口 // 隐藏窗口
ipcMain.on("hideMainWindow", () => { ipcMain.on("hideMainWindow", () => {
@ -16,6 +17,13 @@ export default function () {
ipcMain.on("setTray", (event, args) => { ipcMain.on("setTray", (event, args) => {
createTray(args); createTray(args);
}); });
// 任务栏
ipcMain.on("setTaskbar", (event, args) => {
let window = getWindow("mainWindow");
if (window) {
window.setSkipTaskbar(args);
}
});
// 初始化数据 // 初始化数据
ipcMain.on("mainWindowInitData", () => { ipcMain.on("mainWindowInitData", () => {
// 初始化关联文件夹 // 初始化关联文件夹

View File

@ -1,6 +1,10 @@
import { BrowserWindow, shell } from "electron"; import { BrowserWindow, shell, screen } from "electron";
import { join } from "node:path"; import { join } from "node:path";
import { getMainBackgorunColor, sendToWebContent } from "../commons"; import {
getMainBackgorunColor,
getWindowInScreen,
sendToWebContent,
} from "../commons";
import cacheData from "../commons/cacheData"; import cacheData from "../commons/cacheData";
// 窗口 // 窗口
@ -14,7 +18,7 @@ function createQuickSearchWindow() {
global.quickSearchWindowInit = false; global.quickSearchWindowInit = false;
quickSearchWindow = global.quickSearchWindow = new BrowserWindow({ quickSearchWindow = global.quickSearchWindow = new BrowserWindow({
title: "Dawn Launcher", title: "Dawn Launcher",
width: 600, width: global.setting.quickSearch.width,
height: 44, height: 44,
type: "toolbar", type: "toolbar",
frame: false, frame: false,
@ -24,7 +28,11 @@ function createQuickSearchWindow() {
fullscreenable: false, fullscreenable: false,
resizable: false, resizable: false,
alwaysOnTop: true, alwaysOnTop: true,
backgroundColor: getMainBackgorunColor(), transparent: global.setting.appearance.transparency < 1,
backgroundColor:
global.setting.appearance.transparency === 1
? getMainBackgorunColor()
: null,
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
backgroundThrottling: false, backgroundThrottling: false,
@ -113,7 +121,43 @@ function showQuickSearchWindowBefore() {
* *
*/ */
function showQuickSearchWindow() { function showQuickSearchWindow() {
quickSearchWindow.show(); // flag
let flag = true;
// 是否开启勿扰模式
if (global.setting.general.notDisturb) {
if (global.addon.isFullscreen()) {
flag = false;
}
}
if (flag) {
// 获取鼠标所在的屏幕
let currentDisplay = screen.getDisplayNearestPoint(
screen.getCursorScreenPoint()
);
// 获取窗口所在的屏幕
let windowDisplay = getWindowInScreen(quickSearchWindow);
if (windowDisplay.length === 0) {
// 代表窗口的位置不再任一屏幕内,将窗口位置移动到主窗口
quickSearchWindow.center();
} else if (
(windowDisplay.length === 1 &&
currentDisplay.id !== windowDisplay[0].id) ||
windowDisplay.length > 1
) {
// 在鼠标所在的屏幕显示
let workArea = currentDisplay.workArea;
let bounds = quickSearchWindow.getBounds();
let x = Math.round(workArea.x + workArea.width / 2 - bounds.width / 2);
let y = Math.round(workArea.y + workArea.height / 2 - 44 / 2);
quickSearchWindow.setPosition(x, y);
for (let i = 0; i < 10; i++) {
quickSearchWindow.setSize(global.setting.quickSearch.width, 44);
}
}
// 显示
quickSearchWindow.setBounds({ width: global.setting.quickSearch.width });
quickSearchWindow.show();
}
} }
/** /**

View File

@ -18,4 +18,8 @@ export default function () {
ipcMain.on("setQuickSearchWindowHeight", (event, args) => { ipcMain.on("setQuickSearchWindowHeight", (event, args) => {
global.quickSearchWindow.setBounds({ height: args }); global.quickSearchWindow.setBounds({ height: args });
}); });
// 设置快速搜索窗口宽度
ipcMain.on("setQuickSearchWindowWidth", (event, args) => {
global.quickSearchWindow.setBounds({ width: args });
});
} }

View File

@ -1,6 +1,7 @@
import { Setting } from "../../../types/setting"; import { Setting } from "../../../types/setting";
import { getSetting } from "../../../commons/utils/setting"; import { getSetting } from "../../../commons/utils/setting";
import { getDataSqlite3 } from "../../commons/betterSqlite3"; import { getDataSqlite3 } from "../../commons/betterSqlite3";
import { app } from "electron";
// 获取数据库 // 获取数据库
let db = getDataSqlite3(); let db = getDataSqlite3();
@ -58,6 +59,8 @@ function add(setting: Setting) {
let id = db.prepare(sql).run(1, JSON.stringify(setting)).lastInsertRowid; let id = db.prepare(sql).run(1, JSON.stringify(setting)).lastInsertRowid;
if (id) { if (id) {
global.setting = setting; global.setting = setting;
// 添加设置被视为首次打开软件
global.first = true;
return true; return true;
} }
return false; return false;

View File

@ -5,7 +5,11 @@ import { hideMainWindow, showMainWindowBefore } from "../main/index";
import { list as selectClassificationList } from "../classification/data"; import { list as selectClassificationList } from "../classification/data";
import { list as selectItemList } from "../item/data"; import { list as selectItemList } from "../item/data";
import { run } from "../item"; import { run } from "../item";
import { closeWindow, getMainBackgorunColor } from "../commons/index"; import {
closeWindow,
getMainBackgorunColor,
mainWindowExist,
} from "../commons/index";
import { import {
createQuickSearchWindow, createQuickSearchWindow,
hideQuickSearchWindow, hideQuickSearchWindow,
@ -28,14 +32,17 @@ function createSettingWindow() {
parent: global.mainWindow, parent: global.mainWindow,
height: 500, height: 500,
width: 600, width: 600,
type: "toolbar",
maximizable: false, maximizable: false,
minimizable: false, minimizable: false,
resizable: false, resizable: false,
fullscreenable: false, fullscreenable: false,
skipTaskbar: true, skipTaskbar: true,
show: false, show: false,
backgroundColor: getMainBackgorunColor(), transparent: global.setting.appearance.transparency < 1,
backgroundColor:
global.setting.appearance.transparency === 1
? getMainBackgorunColor()
: null,
webPreferences: { webPreferences: {
spellcheck: false, spellcheck: false,
preload: join(__dirname, "../preload/index.js"), preload: join(__dirname, "../preload/index.js"),
@ -76,57 +83,115 @@ function setShortcutKey(setting: Setting = global.setting) {
setting.general.showHideShortcutKey && setting.general.showHideShortcutKey &&
setting.general.showHideShortcutKey.trim() !== "" setting.general.showHideShortcutKey.trim() !== ""
) { ) {
globalShortcut.register(setting.general.showHideShortcutKey, () => { try {
if (global.mainWindow.isVisible()) { globalShortcut.register(
hideMainWindow(); setting.general.showHideShortcutKey.replace("Win", "Super"),
} else { () => {
showMainWindowBefore(true); if (mainWindowExist()) {
if (global.mainWindow.isVisible()) {
hideMainWindow();
} else {
showMainWindowBefore(true);
}
}
}
);
} catch (e) {
if (process.env.NODE_ENV === "development") {
console.log(e);
} }
}); }
} }
// 分类快捷键 // 分类快捷键
let classificationList = selectClassificationList(); let classificationList = selectClassificationList();
for (const classification of classificationList) { for (const classification of classificationList) {
if (classification.globalShortcutKey && classification.shortcutKey) { if (classification.globalShortcutKey && classification.shortcutKey) {
globalShortcut.register(classification.shortcutKey, () => { try {
// 分类 globalShortcut.register(
showMainWindowBefore(true, classification.id); classification.shortcutKey.replace("Win", "Super"),
}); () => {
if (mainWindowExist()) {
// 分类
showMainWindowBefore(true, false, classification.id);
}
}
);
} catch (e) {
if (process.env.NODE_ENV === "development") {
console.log(e);
}
}
} }
} }
// 项目快捷键 // 项目快捷键
let itemList = selectItemList(); let itemList = selectItemList();
for (const item of itemList) { for (const item of itemList) {
if (item.globalShortcutKey && item.shortcutKey) { if (item.globalShortcutKey && item.shortcutKey) {
globalShortcut.register(item.shortcutKey, () => { try {
// 项目 globalShortcut.register(
run("main", "open", item); item.shortcutKey.replace("Win", "Super"),
}); () => {
if (mainWindowExist()) {
// flag
let flag = true;
// 是否开启勿扰模式
if (global.setting.general.notDisturb) {
if (global.addon.isFullscreen()) {
flag = false;
}
}
if (flag) {
// 项目
run("main", "open", item);
}
}
}
);
} catch (e) {
if (process.env.NODE_ENV === "development") {
console.log(e);
}
}
} }
} }
// 快速搜索 // 快速搜索
if ( if (
setting.quickSearch.enable &&
setting.quickSearch.showHideShortcutKey && setting.quickSearch.showHideShortcutKey &&
setting.quickSearch.showHideShortcutKey.trim() !== "" setting.quickSearch.showHideShortcutKey.trim() !== ""
) { ) {
globalShortcut.register(setting.quickSearch.showHideShortcutKey, () => { try {
// 如果窗口不存在或者被销毁的话,就创建窗口 globalShortcut.register(
if (!global.quickSearchWindow || global.quickSearchWindow.isDestroyed()) { setting.quickSearch.showHideShortcutKey.replace("Win", "Super"),
createQuickSearchWindow(); () => {
} if (global.setting.quickSearch.enable) {
// 如果初始化完毕并且窗口状态是正常的话,可以进行显示/隐藏 // 如果窗口不存在或者被销毁的话,就创建窗口
if ( if (
global.quickSearchWindowInit && !global.quickSearchWindow ||
global.quickSearchWindow && global.quickSearchWindow.isDestroyed()
!global.quickSearchWindow.isDestroyed() ) {
) { createQuickSearchWindow();
if (global.quickSearchWindow.isVisible()) { }
hideQuickSearchWindow(); // 如果初始化完毕并且窗口状态是正常的话,可以进行显示/隐藏
} else { if (
showQuickSearchWindowBefore(); global.quickSearchWindowInit &&
global.quickSearchWindow &&
!global.quickSearchWindow.isDestroyed()
) {
if (global.quickSearchWindow.isVisible()) {
hideQuickSearchWindow();
} else {
showQuickSearchWindowBefore();
}
}
}
} }
);
} catch (e) {
if (process.env.NODE_ENV === "development") {
console.log(e);
} }
}); }
} }
} }

View File

@ -1,9 +1,10 @@
import { app, dialog, ipcMain } from "electron"; import { app, ipcMain } from "electron";
import { import {
closeWindow, closeWindow,
getUserDataPath, getUserDataPath,
relaunch, relaunch,
sendToWebContent, sendToWebContent,
showOpenDialogSync,
} from "../commons/index"; } from "../commons/index";
import { createSettingWindow, setFixedPosition, setShortcutKey } from "."; import { createSettingWindow, setFixedPosition, setShortcutKey } from ".";
import { add, select, update } from "./data"; import { add, select, update } from "./data";
@ -15,6 +16,7 @@ import { statSync, mkdirSync, copyFileSync, readFileSync } from "node:fs";
import mime from "mime"; import mime from "mime";
import { checkInvalid } from "../item"; import { checkInvalid } from "../item";
import { updateItemOpenNumberSortToDefualt } from "../classification"; import { updateItemOpenNumberSortToDefualt } from "../classification";
import cacheData from "../commons/cacheData";
export default function () { export default function () {
// 创建设置窗口 // 创建设置窗口
@ -90,6 +92,13 @@ export default function () {
// 锁定尺寸 // 锁定尺寸
ipcMain.on("setLockSize", (event, args) => { ipcMain.on("setLockSize", (event, args) => {
global.mainWindow.setResizable(!args); global.mainWindow.setResizable(!args);
if (args) {
// 存储主窗口尺寸
cacheData.cacheStore.set(
"mainWindowLockSizeBounds",
global.mainWindow.getBounds()
);
}
}); });
// 固定位置 // 固定位置
ipcMain.on("setFixedPosition", (event, args) => { ipcMain.on("setFixedPosition", (event, args) => {
@ -114,7 +123,7 @@ export default function () {
// 上传背景图 // 上传背景图
ipcMain.on("uploadBackgrounImage", (event, args) => { ipcMain.on("uploadBackgrounImage", (event, args) => {
// 打开文件对话框 // 打开文件对话框
let filePathList = dialog.showOpenDialogSync(global.settingWindow, { let filePathList = showOpenDialogSync("settingWindow", {
filters: [ filters: [
{ {
name: "Images", name: "Images",

View File

@ -7,17 +7,14 @@ import {
import { CommonItem, Item } from "../../types/item"; import { CommonItem, Item } from "../../types/item";
import { parse, join } from "node:path"; import { parse, join } from "node:path";
import { readdirSync, readFileSync, statSync, writeFileSync } from "node:fs"; import { readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
import { execSync } from "node:child_process";
import xml2js from "xml2js"; import xml2js from "xml2js";
import { newCommonItem, newCommonItemData } from "../../commons/utils/common"; import { newCommonItem, newCommonItemData } from "../../commons/utils/common";
import { ShortcutInfo } from "../../types/common"; import { ShortcutInfo } from "../../types/common";
import { getAbsolutePath, getFileIcon } from "../commons/utils"; import { parsePath, getFileIcon } from "../commons/utils";
// AppxInfo // AppxInfo
export interface AppxInfo { export interface AppxInfo {
packageFamilyName: string; id: string | null;
installLocation: string;
appId: string | null;
icon: string | null; icon: string | null;
name: string | null; name: string | null;
} }
@ -46,11 +43,6 @@ process.parentPort.once("message", async (event) => {
res = await getStartMenuItemList(dataParam); res = await getStartMenuItemList(dataParam);
} else if (params.name === "getAppxItemList") { } else if (params.name === "getAppxItemList") {
res = await getAppxItemList(); res = await getAppxItemList();
} else if (params.name === "getDropItemInfo") {
res = await getDropItemInfo(
dataParam.classificationId,
dataParam.pathList
);
} else if (params.name === "refreshItemIcon") { } else if (params.name === "refreshItemIcon") {
res = await refreshItemIcon(dataParam); res = await refreshItemIcon(dataParam);
} else if (params.name === "getDirectoryItemList") { } else if (params.name === "getDirectoryItemList") {
@ -168,7 +160,7 @@ async function getStartMenuItemList(cacheList: Array<CommonItem>) {
name, name,
data: newCommonItemData({ data: newCommonItemData({
target: filePath, target: filePath,
icon: getFileIcon(filePath), icon: await getFileIcon(filePath),
params, params,
}), }),
}); });
@ -191,76 +183,15 @@ async function getAppxItemList() {
// ID // ID
let id = 1; let id = 1;
// 获取APPX信息 // 获取APPX信息
let stdout = execSync( let appxList = global.addon.getAppxList();
'powershell -Command "Get-AppxPackage | Select-Object PackageFamilyName, InstallLocation | Format-list"'
);
let strAppxInfo = stdout.toString("utf-8");
// 按换行符分割
let lines = strAppxInfo
.trim()
.split("\r\n")
.filter((str) => str.trim() !== "");
// 临时列表 // 临时列表
let tempList: Array<AppxInfo> = []; let tempList = [];
// APPX包名
let packageFamilyName: string | null = null;
// APPX路径
let installLocation: string | null = null;
// 循环的前一个信息
let prev = null;
// 解析每一行
for (let i = 0; i < lines.length; i++) {
let line = lines[i].trim();
let arr = line.split(" : ");
if (arr.length > 1) {
if (arr[0].trim() === "PackageFamilyName") {
if (packageFamilyName && installLocation) {
tempList.push({
packageFamilyName: packageFamilyName,
installLocation: installLocation,
appId: null,
icon: null,
name: null,
});
packageFamilyName = arr[1].trim();
installLocation = null;
prev = "PackageFamilyName";
} else {
packageFamilyName = arr[1].trim();
prev = "PackageFamilyName";
}
} else if (arr[0].trim() === "InstallLocation") {
installLocation = arr[1].trim();
prev = "InstallLocation";
}
} else {
if (prev === "PackageFamilyName") {
packageFamilyName += line;
} else if (prev === "InstallLocation") {
installLocation += line;
}
}
}
if (packageFamilyName && installLocation) {
tempList.push({
packageFamilyName: packageFamilyName,
installLocation: installLocation,
appId: null,
icon: null,
name: null,
});
}
// 读取XML获取图标路径和名称 // 读取XML获取图标路径和名称
for (let temp of tempList) { for (let appx of appxList) {
let appxInfo = await getAppxInfo(temp.installLocation); tempList.push(...(await getAppxInfo(appx)));
temp.appId = appxInfo.appId;
temp.icon = appxInfo.icon;
temp.name = appxInfo.name;
} }
// 过滤
let filterList = tempList.filter((e) => e.icon && e.appId && e.name);
// 图标转BASE64 // 图标转BASE64
for (let appxInfo of filterList) { for (let appxInfo of tempList) {
try { try {
let buffer = readFileSync(appxInfo.icon); let buffer = readFileSync(appxInfo.icon);
let icon = let icon =
@ -274,20 +205,16 @@ async function getAppxItemList() {
} }
} }
// 筛选出有图标的数据 // 筛选出有图标的数据
filterList = filterList.filter((e) => e.icon); tempList = tempList.filter((e) => e.icon);
// 返回列表 // 返回列表
for (const appxInfo of filterList) { for (const appxInfo of tempList) {
resultList.push( resultList.push(
newCommonItem({ newCommonItem({
id: id++, id: id++,
name: appxInfo.name, name: appxInfo.name,
data: newCommonItemData({ data: newCommonItemData({
icon: appxInfo.icon, icon: appxInfo.icon,
target: target: "Shell:AppsFolder\\" + appxInfo.id,
"Shell:AppsFolder\\" +
appxInfo.packageFamilyName +
"!" +
appxInfo.appId,
}), }),
}) })
); );
@ -301,264 +228,272 @@ async function getAppxItemList() {
/** /**
* Appx信息 * Appx信息
*/ */
async function getAppxInfo(installLocation: string) { async function getAppxInfo(appx: any) {
// appx信息 // 结果列表
let appxInfo: AppxInfo = { let resultList = [];
packageFamilyName: null,
installLocation: null,
appId: null,
icon: null,
name: null,
};
// buffer, 解析结果 // buffer, 解析结果
let buffer: Buffer, result: any; let buffer: Buffer, result: any;
try { try {
// 解析 // 解析
buffer = readFileSync(installLocation + "\\AppxManifest.xml"); buffer = readFileSync(join(appx.path, "AppxManifest.xml"));
result = await xml2jsSync(buffer); result = await xml2jsSync(buffer);
// 备用名称 // 循环Application
let executable = null; if (
// targetsize图标 result.Package.Applications &&
let targetSizeIcon: string | null = null; result.Package.Applications[0] &&
let targetSizeIconMax: number | null = null; result.Package.Applications[0].Application &&
// scale图标 result.Package.Applications[0].Application.length > 0
let scaleIcon = null; ) {
let scaleIconMax = null; for (
// 图标 APPID let i = 0;
if (result.Package.Applications && result.Package.Applications[0]) { i < result.Package.Applications[0].Application.length;
if (result.Package.Applications[0].Application[0]) { i++
// APPID ) {
appxInfo.appId = result.Package.Applications[0].Application[0].$.Id; // appx信息
// Executable let appxInfo: AppxInfo = {
executable = result.Package.Applications[0].Application[0].$.Executable; id: null,
// 获取图标 icon: null,
if ( name: null,
result.Package.Applications[0].Application[0]["uap:VisualElements"] != };
null // Application
) { const application = result.Package.Applications[0].Application[i];
// logo地址 // 名称
let logo = if (appx["appName" + i] && appx["appName" + i].trim() !== "") {
result.Package.Applications[0].Application[0][ appxInfo.name = appx["appName" + i];
"uap:VisualElements" } else {
][0].$.Square44x44Logo; appxInfo.name = appx.displayName;
// 解析路径 }
let parsedPath = parse(logo); // 获取ID
// 获取文件夹下所有文件 let id = application.$.Id;
let fileNameList = readdirSync( if (!id || id.trim() === "") {
installLocation + "\\" + parsedPath.dir continue;
); }
// 筛选出和包含logo名称的文件名 appxInfo.id = appx.familyName + "!" + id;
let filterList = fileNameList.filter( // 图标
(f) => f.indexOf(parsedPath.name) >= 0 try {
); // targetsize图标
if (filterList.length > 1) { let targetSizeIcon: string | null = null;
// 获取targetsize图片 let targetSizeIconMax: number | null = null;
let targetSizeList = filterList.filter( // scale图标
(f) => f.indexOf(parsedPath.name + ".targetsize") >= 0 let scaleIcon = null;
let scaleIconMax = null;
// 图标
if (application["uap:VisualElements"]) {
// logo地址
let logo = application["uap:VisualElements"][0].$.Square44x44Logo;
// 解析路径
let parsedPath = parse(logo);
// 获取文件夹下所有文件
let fileNameList = readdirSync(join(appx.path, parsedPath.dir));
// 筛选出和包含logo名称的文件名
let filterList = fileNameList.filter(
(f) => f.indexOf(parsedPath.name) >= 0
); );
if (targetSizeList.length > 0) { if (filterList.length > 1) {
// 获取最大图标尺寸 // 获取targetsize图片
let max = getMaxIconSize( let targetSizeList = filterList.filter(
targetSizeList, (f) => f.indexOf(parsedPath.name + ".targetsize") >= 0
parsedPath.name,
"targetsize"
); );
if (max) { if (targetSizeList.length > 0) {
// 记录max // 获取最大图标尺寸
targetSizeIconMax = max; let max = getMaxIconSize(
// 先获取最终图标 targetSizeList,
let defaultList = targetSizeList.filter( parsedPath.name,
(f) => "targetsize"
f ===
parsedPath.name +
".targetsize-" +
max +
"_altform-unplated_devicefamily-colorfulunplated.png"
); );
targetSizeIcon = if (max) {
defaultList.length > 0 // 记录max
? installLocation + targetSizeIconMax = max;
"\\" + // 先获取最终图标
parsedPath.dir + let defaultList = targetSizeList.filter(
"\\" +
parsedPath.name +
".targetsize-" +
max +
"_altform-unplated_devicefamily-colorfulunplated.png"
: null;
if (!targetSizeIcon) {
// 获取 名称.targetsize-{max}_altform-unplated.png
let defaultUnplatedList = targetSizeList.filter(
(f) => (f) =>
f === f ===
parsedPath.name + parsedPath.name +
".targetsize-" + ".targetsize-" +
max + max +
"_altform-unplated.png" "_altform-unplated_devicefamily-colorfulunplated.png"
); );
if (defaultUnplatedList.length > 0) { targetSizeIcon =
targetSizeIcon = defaultList.length > 0
installLocation + ? appx.path +
"\\" +
parsedPath.dir +
"\\" +
parsedPath.name +
".targetsize-" +
max +
"_altform-unplated.png";
} else {
// 获取 名称.targetsize-{max}_altform.png
let defaultAltFormList = targetSizeList.filter(
(f) =>
f ===
parsedPath.name + ".targetsize-" + max + "_altform.png"
);
if (defaultAltFormList.length > 0) {
targetSizeIcon =
installLocation +
"\\" + "\\" +
parsedPath.dir + parsedPath.dir +
"\\" + "\\" +
parsedPath.name + parsedPath.name +
".targetsize-" + ".targetsize-" +
max + max +
"_altform.png"; "_altform-unplated_devicefamily-colorfulunplated.png"
: null;
if (!targetSizeIcon) {
// 获取 名称.targetsize-{max}_altform-unplated.png
let defaultUnplatedList = targetSizeList.filter(
(f) =>
f ===
parsedPath.name +
".targetsize-" +
max +
"_altform-unplated.png"
);
if (defaultUnplatedList.length > 0) {
targetSizeIcon =
appx.path +
"\\" +
parsedPath.dir +
"\\" +
parsedPath.name +
".targetsize-" +
max +
"_altform-unplated.png";
} else { } else {
// 获取 名称.targetsize-{max}.png // 获取 名称.targetsize-{max}_altform.png
let defaultTargetSizeList = targetSizeList.filter( let defaultAltFormList = targetSizeList.filter(
(f) => (f) =>
f === parsedPath.name + ".targetsize-" + max + ".png" f ===
parsedPath.name +
".targetsize-" +
max +
"_altform.png"
); );
if (defaultTargetSizeList.length > 0) { if (defaultAltFormList.length > 0) {
targetSizeIcon = targetSizeIcon =
installLocation + appx.path +
"\\" + "\\" +
parsedPath.dir + parsedPath.dir +
"\\" + "\\" +
defaultTargetSizeList[0]; parsedPath.name +
".targetsize-" +
max +
"_altform.png";
} else {
// 获取 名称.targetsize-{max}.png
let defaultTargetSizeList = targetSizeList.filter(
(f) =>
f ===
parsedPath.name + ".targetsize-" + max + ".png"
);
if (defaultTargetSizeList.length > 0) {
targetSizeIcon =
appx.path +
"\\" +
parsedPath.dir +
"\\" +
defaultTargetSizeList[0];
}
} }
} }
} }
} }
} }
} // 获取scale图片
// 获取scale图片 let scaleList = filterList.filter(
let scaleList = filterList.filter( (f) => f.indexOf(parsedPath.name + ".scale") >= 0
(f) => f.indexOf(parsedPath.name + ".scale") >= 0
);
if (scaleList.length > 0) {
// 获取最大图标尺寸
let max = getMaxIconSize(scaleList, parsedPath.name, "scale");
if (max) {
// 记录max
scaleIconMax = max;
// 获取 名称.scale-{max}.png
let defaultList = scaleList.filter(
(f) => f === parsedPath.name + ".scale-" + max + ".png"
);
if (defaultList.length > 0) {
scaleIcon =
installLocation +
"\\" +
parsedPath.dir +
"\\" +
defaultList[0];
}
}
} else {
scaleList = filterList.filter(
(f) => f.indexOf(parsedPath.name + ".Theme-Dark_Scale") >= 0
); );
if (scaleList.length > 0) { if (scaleList.length > 0) {
let max = getMaxIconSize( // 获取最大图标尺寸
scaleList, let max = getMaxIconSize(scaleList, parsedPath.name, "scale");
parsedPath.name,
"Theme-Dark_Scale"
);
if (max) { if (max) {
// 记录max // 记录max
scaleIconMax = max; scaleIconMax = max;
// 获取 名称.Theme-Dark_Scale{max}.png // 获取 名称.scale-{max}.png
let defaultList = scaleList.filter( let defaultList = scaleList.filter(
(f) => (f) => f === parsedPath.name + ".scale-" + max + ".png"
f ===
parsedPath.name + ".Theme-Dark_Scale-" + max + ".png"
); );
if (defaultList.length > 0) { if (defaultList.length > 0) {
scaleIcon = scaleIcon =
installLocation + appx.path + "\\" + parsedPath.dir + "\\" + defaultList[0];
"\\" + }
parsedPath.dir + }
"\\" + } else {
defaultList[0]; scaleList = filterList.filter(
(f) => f.indexOf(parsedPath.name + ".Theme-Dark_Scale") >= 0
);
if (scaleList.length > 0) {
let max = getMaxIconSize(
scaleList,
parsedPath.name,
"Theme-Dark_Scale"
);
if (max) {
// 记录max
scaleIconMax = max;
// 获取 名称.Theme-Dark_Scale{max}.png
let defaultList = scaleList.filter(
(f) =>
f ===
parsedPath.name + ".Theme-Dark_Scale-" + max + ".png"
);
if (defaultList.length > 0) {
scaleIcon =
appx.path +
"\\" +
parsedPath.dir +
"\\" +
defaultList[0];
}
} }
} }
} }
} else {
if (filterList.length === 1) {
// 只有一张图片
appxInfo.icon =
appx.path + "\\" + parsedPath.dir + "\\" + filterList[0];
}
} }
} else { }
if (filterList.length === 1) { if (!appxInfo.icon) {
// 只有一张图片 // 判断图标大小
appxInfo.icon = if (targetSizeIcon && !scaleIcon) {
installLocation + "\\" + parsedPath.dir + "\\" + filterList[0]; appxInfo.icon = targetSizeIcon;
} else if (!targetSizeIcon && scaleIcon) {
appxInfo.icon = scaleIcon;
} else if (targetSizeIcon && scaleIcon) {
if (
targetSizeIconMax === 256 ||
targetSizeIconMax > scaleIconMax
) {
appxInfo.icon = targetSizeIcon;
} else if (targetSizeIconMax < scaleIconMax) {
appxInfo.icon = scaleIcon;
} else {
appxInfo.icon = targetSizeIcon;
}
} else if (!targetSizeIcon && !scaleIcon) {
let propertiesIcon = getPropertiesIcon(appx.path, result);
if (propertiesIcon) {
appxInfo.icon = propertiesIcon;
}
}
}
} catch (e) {
if (result) {
let propertiesIcon = getPropertiesIcon(appx.path, result);
if (propertiesIcon) {
appxInfo.icon = propertiesIcon;
} }
} }
} }
} if (
} (!appxInfo.icon || appxInfo.icon.trim() === "") &&
if (!appxInfo.icon) { appx.logo &&
// 判断图标大小 appx.logo.trim() !== ""
if (targetSizeIcon && !scaleIcon) { ) {
appxInfo.icon = targetSizeIcon; appxInfo.icon = appx.logo;
} else if (!targetSizeIcon && scaleIcon) {
appxInfo.icon = scaleIcon;
} else if (targetSizeIcon && scaleIcon) {
if (targetSizeIconMax === 256 || targetSizeIconMax > scaleIconMax) {
appxInfo.icon = targetSizeIcon;
} else if (targetSizeIconMax < scaleIconMax) {
appxInfo.icon = scaleIcon;
} else {
appxInfo.icon = targetSizeIcon;
} }
} else if (!targetSizeIcon && !scaleIcon) { if (
let propertiesIcon = getPropertiesIcon(installLocation, result); appxInfo.name &&
if (propertiesIcon) { appxInfo.name.trim() !== "" &&
appxInfo.icon = propertiesIcon; appxInfo.id &&
appxInfo.id.trim() !== "" &&
appxInfo.icon &&
appxInfo.icon.trim() !== ""
) {
resultList.push(appxInfo);
} }
} }
} }
// 名称 } catch (ex) {}
if (result.Package.Properties) { return resultList;
if (result.Package.Properties[0].DisplayName) {
appxInfo.name = result.Package.Properties[0].DisplayName[0];
}
}
if (
!appxInfo.name ||
(appxInfo.name && appxInfo.name.indexOf("ms-resource:") >= 0)
) {
if (executable && executable.indexOf("ms-resource:") < 0) {
appxInfo.name = parse(executable).name;
} else {
appxInfo.name = null;
}
}
if (!appxInfo.name) {
if (result.Package.Identity && result.Package.Identity[0]) {
let name = result.Package.Identity[0].$.Name;
if (name && name.indexOf("ms-resource:") < 0) {
appxInfo.name = name;
}
}
}
} catch (ex) {
if (result) {
let propertiesIcon = getPropertiesIcon(installLocation, result);
if (propertiesIcon) {
appxInfo.icon = propertiesIcon;
}
}
}
return appxInfo;
} }
/** /**
@ -618,60 +553,6 @@ function getPropertiesIcon(installLocation: string, result: any) {
return null; return null;
} }
/**
*
* @param classificationId
* @param pathList
*/
async function getDropItemInfo(
classificationId: number,
pathList: Array<string>
) {
// 项目列表
let itemList: Array<Item> = [];
// 解析文件信息并添加项目
for (const path of pathList) {
try {
// item
let item = newItem({ classificationId });
// 目标
item.data.target = path;
// 名称
item.name = getFileName(item.data.target);
// 判断是否是快捷方式,如果是的话,需要获取真实路径
if (mime.getType(path) === "application/x-ms-shortcut") {
// 快捷方式
// 获取真实文件路径和参数
let shortcutInfo: ShortcutInfo | null =
global.addon.getShortcutFileInfo(path);
if (shortcutInfo) {
// 路径
if (shortcutInfo.target) {
item.data.target = shortcutInfo.target;
}
// 参数
if (shortcutInfo.arguments) {
item.data.params = shortcutInfo.arguments;
}
}
}
// 文件类型
let stats = statSync(item.data.target);
// 路径
item.type = stats.isFile() ? 0 : 1;
// 获取图标
item.data.icon = getFileIcon(item.data.target);
// 去掉后缀
if (item.type === 0) {
item.name = deleteExtname(item.name);
}
// push
itemList.push(item);
} catch (e) {}
}
return itemList;
}
/** /**
* *
* @param itemList * @param itemList
@ -685,7 +566,7 @@ async function refreshItemIcon(itemList: Array<Item>) {
// 刷新图标 // 刷新图标
for (const item of itemList) { for (const item of itemList) {
if (item.type === 0 || item.type === 1) { if (item.type === 0 || item.type === 1) {
let icon: string | null = getFileIcon(item.data.target); let icon: string | null = await getFileIcon(item.data.target);
if (icon) { if (icon) {
resultList.push({ resultList.push({
id: item.id, id: item.id,
@ -757,9 +638,10 @@ async function getDirectoryItemList(
} }
if (!item) { if (!item) {
item = newItem({ classificationId, type }); item = newItem({ classificationId, type });
item.name = deleteExtname(getFileName(path)); item.name =
type === 0 ? deleteExtname(getFileName(path)) : getFileName(path);
item.data.target = path; item.data.target = path;
item.data.icon = getFileIcon(path); item.data.icon = await getFileIcon(path);
} }
// push // push
resultList.push(item); resultList.push(item);
@ -781,7 +663,7 @@ function checkInvalidItem(itemList: Array<Item>) {
// 只校验文件和文件夹 // 只校验文件和文件夹
if (item.type === 0 || item.type === 1) { if (item.type === 0 || item.type === 1) {
// 获取绝对路径 // 获取绝对路径
let path = getAbsolutePath(item.data.target); let path = parsePath(item.data.target);
try { try {
statSync(path); statSync(path);
} catch (e) { } catch (e) {

View File

@ -105,12 +105,25 @@ contextBridge.exposeInMainWorld("api", {
exit: () => { exit: () => {
ipcRenderer.send("exit"); ipcRenderer.send("exit");
}, },
// 运行
run: (
operation: string,
target: string,
params: string | null,
startLocation: string | null
) => {
ipcRenderer.send("run", { operation, target, params, startLocation });
},
// 文本框菜单
textRightMenu: () => {
ipcRenderer.send("textRightMenu");
},
}); });
contextBridge.exposeInMainWorld("main", { contextBridge.exposeInMainWorld("main", {
// 显示窗口 // 显示窗口
showWindow: (blurHide: boolean) => { showWindow: (blurHide: boolean, autoHide: boolean) => {
ipcRenderer.send("showMainWindow", { blurHide }); ipcRenderer.send("showMainWindow", { blurHide, autoHide });
}, },
// 隐藏窗口 // 隐藏窗口
hideWindow: () => { hideWindow: () => {
@ -673,6 +686,10 @@ contextBridge.exposeInMainWorld("item", {
updateOpenInfo: (type: string, id: number) => { updateOpenInfo: (type: string, id: number) => {
ipcRenderer.send("updateItemOpenInfo", { type, id }); ipcRenderer.send("updateItemOpenInfo", { type, id });
}, },
// 删除历史记录
deleteQuickSearchHistory: (id: number) => {
ipcRenderer.send("deleteQuickSearchHistory", id);
},
}); });
contextBridge.exposeInMainWorld("setting", { contextBridge.exposeInMainWorld("setting", {
@ -717,6 +734,10 @@ contextBridge.exposeInMainWorld("setting", {
setTray: (show: boolean) => { setTray: (show: boolean) => {
ipcRenderer.send("setTray", show); ipcRenderer.send("setTray", show);
}, },
// 隐藏任务栏
setTaskbar: (show: boolean) => {
ipcRenderer.send("setTaskbar", show);
},
// 设置快捷键 // 设置快捷键
setShortcutKey: (setting: Setting) => { setShortcutKey: (setting: Setting) => {
ipcRenderer.send("setShortcutKey", setting); ipcRenderer.send("setShortcutKey", setting);
@ -809,6 +830,10 @@ contextBridge.exposeInMainWorld("quickSearch", {
setWindowHeight: (height: number) => { setWindowHeight: (height: number) => {
ipcRenderer.send("setQuickSearchWindowHeight", height); ipcRenderer.send("setQuickSearchWindowHeight", height);
}, },
// 设置窗口宽度
setWindowWidth: (width: number) => {
ipcRenderer.send("setQuickSearchWindowWidth", width);
},
}); });
contextBridge.exposeInMainWorld("about", { contextBridge.exposeInMainWorld("about", {

View File

@ -5,6 +5,8 @@ import { Setting } from "../../types/setting";
declare global { declare global {
// addon // addon
var addon: any; var addon: any;
// 是否是首次打开软件
var first: boolean;
// 语言 // 语言
var language: any; var language: any;
// 主窗口 // 主窗口
@ -57,6 +59,8 @@ declare global {
var classificationRightMenu: boolean | null; var classificationRightMenu: boolean | null;
// 项目右键菜单显示 // 项目右键菜单显示
var itemRightMenu: boolean | null; var itemRightMenu: boolean | null;
// 存储主窗口当前是否有弹出对话框
var mainWindowShowDialog: boolean;
} }
export interface ChildProcessInfo { export interface ChildProcessInfo {

View File

@ -1,7 +1,7 @@
{ {
"name": "dawn-launcher", "name": "dawn-launcher",
"productName": "Dawn Launcher", "productName": "Dawn Launcher",
"version": "1.3.1", "version": "1.5.1",
"main": "dist-electron/main/index.js", "main": "dist-electron/main/index.js",
"description": "Windows 快捷启动工具,帮助您整理杂乱无章的桌面,分门别类管理您的桌面快捷方式,让您的桌面保持干净整洁。", "description": "Windows 快捷启动工具,帮助您整理杂乱无章的桌面,分门别类管理您的桌面快捷方式,让您的桌面保持干净整洁。",
"author": "FanChenIO", "author": "FanChenIO",
@ -29,22 +29,23 @@
}, },
"devDependencies": { "devDependencies": {
"@napi-rs/cli": "^2.16.3", "@napi-rs/cli": "^2.16.3",
"@vicons/ionicons5": "^0.12.0",
"@vicons/material": "^0.12.0", "@vicons/material": "^0.12.0",
"@vicons/utils": "^0.1.4", "@vicons/utils": "^0.1.4",
"@vitejs/plugin-vue": "^4.4.0", "@vitejs/plugin-vue": "^4.4.0",
"autoprefixer": "^10.4.16", "autoprefixer": "^10.4.16",
"better-sqlite3-multiple-ciphers": "^9.0.0", "better-sqlite3-multiple-ciphers": "^9.4.1",
"electron": "^26.4.2", "electron": "^28.3.1",
"electron-builder": "^24.6.4", "electron-builder": "^24.6.5",
"less": "^4.2.0", "less": "^4.2.0",
"less-loader": "^11.1.3", "less-loader": "^11.1.3",
"naive-ui": "^2.35.0", "naive-ui": "^2.36.0",
"postcss": "^8.4.31", "postcss": "^8.4.31",
"tailwindcss": "^3.3.5", "tailwindcss": "^3.3.5",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vite": "^4.4.11", "vite": "^4.4.11",
"vite-plugin-electron": "^0.14.1", "vite-plugin-electron": "^0.15.4",
"vue": "^3.3.7", "vue": "^3.4.13",
"vue-tsc": "^1.8.22" "vue-tsc": "^1.8.22"
}, },
"dependencies": { "dependencies": {
@ -59,6 +60,7 @@
"dompurify": "^3.0.6", "dompurify": "^3.0.6",
"electron-log": "^5.0.0", "electron-log": "^5.0.0",
"electron-store": "^8.1.0", "electron-store": "^8.1.0",
"icojs": "^0.19.3",
"mime": "^3.0.0", "mime": "^3.0.0",
"pinia": "^2.1.7", "pinia": "^2.1.7",
"pinyin-pro": "^3.17.0", "pinyin-pro": "^3.17.0",

View File

@ -31,24 +31,6 @@ fn get_shortcut_file_info(path: String) -> Option<HashMap<String, String>> {
windows::get_shortcut_file_info(&path) windows::get_shortcut_file_info(&path)
} }
/**
*
*/
#[allow(dead_code)]
#[napi]
fn shell_execute(operation: String, file: String, params: String, start_location: Option<String>) {
windows::shell_execute(operation, file, params, start_location)
}
/**
*
*/
#[allow(dead_code)]
#[napi]
fn system_item_execute(target: String, params: Option<String>) {
windows::system_item_execute(&target, params.as_deref())
}
/** /**
* *
*/ */
@ -126,7 +108,7 @@ fn disable_mouse_hook() {
*/ */
#[allow(dead_code)] #[allow(dead_code)]
#[napi] #[napi]
pub fn get_cursor_pos_window_class_name() -> String { fn get_cursor_pos_window_class_name() -> String {
windows::get_cursor_pos_window_class_name() windows::get_cursor_pos_window_class_name()
} }
@ -135,7 +117,7 @@ pub fn get_cursor_pos_window_class_name() -> String {
*/ */
#[allow(dead_code)] #[allow(dead_code)]
#[napi] #[napi]
pub fn get_clipboard_file_list() -> Vec<String> { fn get_clipboard_file_list() -> Vec<String> {
windows::get_clipboard_file_list() windows::get_clipboard_file_list()
} }
@ -144,7 +126,7 @@ pub fn get_clipboard_file_list() -> Vec<String> {
*/ */
#[allow(dead_code)] #[allow(dead_code)]
#[napi] #[napi]
pub fn clipboard_has_bitmap() -> bool { fn clipboard_has_bitmap() -> bool {
windows::clipboard_has_bitmap() windows::clipboard_has_bitmap()
} }
@ -153,7 +135,7 @@ pub fn clipboard_has_bitmap() -> bool {
*/ */
#[allow(dead_code)] #[allow(dead_code)]
#[napi] #[napi]
pub fn get_clipboard_bitmap_base64() -> Option<String> { fn get_clipboard_bitmap_base64() -> Option<String> {
windows::get_clipboard_bitmap_base64() windows::get_clipboard_bitmap_base64()
} }
@ -162,6 +144,60 @@ pub fn get_clipboard_bitmap_base64() -> Option<String> {
*/ */
#[allow(dead_code)] #[allow(dead_code)]
#[napi] #[napi]
pub fn empty_recycle_bin(window: i32) { fn empty_recycle_bin(window: i32) {
windows::empty_recycle_bin(window) windows::empty_recycle_bin(window)
} }
/**
*
*/
#[allow(dead_code)]
#[napi]
fn remove_window_animation(window: i32) {
windows::remove_window_animation(window);
}
/**
* APPX列表
*/
#[allow(dead_code)]
#[napi]
fn get_appx_list() -> Vec<HashMap<String, String>> {
windows::get_appx_list()
}
/**
*
*/
#[allow(dead_code)]
#[napi]
fn get_cursor_point() -> [i32; 2] {
windows::get_cursor_point()
}
/**
*
*/
#[allow(dead_code)]
#[napi]
pub fn turn_off_monitor() {
windows::turn_off_monitor()
}
/**
*
*/
#[allow(dead_code)]
#[napi]
fn shell_execute(operation: String, file: String, params: String, start_location: Option<String>) {
windows::shell_execute(operation, file, params, start_location)
}
/**
*
*/
#[allow(dead_code)]
#[napi]
fn system_item_execute(target: String, params: Option<String>) {
windows::system_item_execute(&target, params.as_deref())
}

View File

@ -6,6 +6,7 @@ use napi::{
JsFunction, JsFunction,
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::thread;
use std::{ use std::{
collections::HashMap, collections::HashMap,
io::Cursor, io::Cursor,
@ -14,13 +15,16 @@ use std::{
sync::atomic::{AtomicBool, Ordering}, sync::atomic::{AtomicBool, Ordering},
}; };
use windows::{ use windows::{
core::{ComInterface, HSTRING, PCSTR, PCWSTR}, core::{ComInterface, HSTRING, PCSTR, PCWSTR, PSTR},
w, w,
Win32::{ Win32::{
Foundation::{HWND, LPARAM, LRESULT, MAX_PATH, POINT, RECT, SIZE, WPARAM}, Foundation::{HWND, LPARAM, LRESULT, MAX_PATH, POINT, RECT, SIZE, WPARAM},
Graphics::Gdi::{ Graphics::{
GetMonitorInfoW, GetObjectW, MonitorFromWindow, BITMAP, MONITORINFO, Dwm::{DwmSetWindowAttribute, DWMWA_TRANSITIONS_FORCEDISABLED},
MONITOR_DEFAULTTONEAREST, Gdi::{
GetMonitorInfoW, GetObjectW, MonitorFromWindow, BITMAP, MONITORINFO,
MONITOR_DEFAULTTONEAREST,
},
}, },
Storage::FileSystem::SearchPathW, Storage::FileSystem::SearchPathW,
System::{ System::{
@ -29,7 +33,6 @@ use windows::{
CLSCTX_INPROC_SERVER, COINIT_APARTMENTTHREADED, STGM_READ, CLSCTX_INPROC_SERVER, COINIT_APARTMENTTHREADED, STGM_READ,
}, },
Environment::GetEnvironmentVariableW, Environment::GetEnvironmentVariableW,
SystemInformation::GetSystemDirectoryW,
}, },
UI::{ UI::{
Input::Ime::{ Input::Ime::{
@ -39,23 +42,29 @@ use windows::{
Shell::{ Shell::{
BHID_SFUIObject, IContextMenu, IShellItem, IShellItemImageFactory, IShellLinkW, BHID_SFUIObject, IContextMenu, IShellItem, IShellItemImageFactory, IShellLinkW,
SHCreateItemFromParsingName, SHEmptyRecycleBinW, SHQueryUserNotificationState, SHCreateItemFromParsingName, SHEmptyRecycleBinW, SHQueryUserNotificationState,
ShellExecuteW, ShellLink, CMF_NORMAL, CMINVOKECOMMANDINFO, ShellLink, CMF_NORMAL, CMINVOKECOMMANDINFO, QUNS_ACCEPTS_NOTIFICATIONS, QUNS_APP,
QUNS_ACCEPTS_NOTIFICATIONS, QUNS_APP, QUNS_BUSY, QUNS_NOT_PRESENT, QUNS_BUSY, QUNS_NOT_PRESENT, QUNS_PRESENTATION_MODE, QUNS_QUIET_TIME,
QUNS_PRESENTATION_MODE, QUNS_QUIET_TIME, QUNS_RUNNING_D3D_FULL_SCREEN, QUNS_RUNNING_D3D_FULL_SCREEN, SHERB_NOSOUND, SIIGBF_ICONONLY, SLGP_UNCPRIORITY,
SHERB_NOSOUND, SIIGBF_ICONONLY, SLGP_UNCPRIORITY,
}, },
WindowsAndMessaging::{ WindowsAndMessaging::{
CallNextHookEx, CreatePopupMenu, DestroyMenu, FindWindowW, GetClassNameW, CallNextHookEx, CreatePopupMenu, DestroyMenu, FindWindowW, GetClassNameW,
GetCursorPos, GetForegroundWindow, GetSystemMetrics, GetWindowRect, SendMessageW, GetCursorPos, GetForegroundWindow, GetSystemMetrics, GetWindowRect, SendMessageW,
SetForegroundWindow, SetWindowsHookExW, TrackPopupMenu, WindowFromPoint, HHOOK, SetForegroundWindow, SetWindowsHookExW, TrackPopupMenu, WindowFromPoint, HHOOK,
MSLLHOOKSTRUCT, SC_MONITORPOWER, SM_CXSCREEN, SM_CYSCREEN, SW_NORMAL, MSLLHOOKSTRUCT, SC_MONITORPOWER, SM_CXSCREEN, SM_CYSCREEN, SW_NORMAL, TPM_NONOTIFY,
SW_SHOWDEFAULT, TPM_NONOTIFY, TPM_RETURNCMD, WH_MOUSE_LL, WM_LBUTTONDOWN, TPM_RETURNCMD, WH_MOUSE_LL, WM_LBUTTONDOWN, WM_LBUTTONUP, WM_MBUTTONDOWN,
WM_LBUTTONUP, WM_MBUTTONDOWN, WM_MBUTTONUP, WM_MOUSEHWHEEL, WM_MOUSEMOVE, WM_MBUTTONUP, WM_MOUSEHWHEEL, WM_MOUSEMOVE, WM_MOUSEWHEEL, WM_RBUTTONDOWN,
WM_MOUSEWHEEL, WM_RBUTTONDOWN, WM_RBUTTONUP, WM_SYSCOMMAND, WM_RBUTTONUP, WM_SYSCOMMAND,
}, },
}, },
}, },
}; };
use windows::{
Management::Deployment::PackageManager,
Win32::{
System::SystemInformation::GetSystemDirectoryW,
UI::{Shell::ShellExecuteW, WindowsAndMessaging::SW_SHOWDEFAULT},
},
};
// 获取图标并转为BASE64 // 获取图标并转为BASE64
pub fn get_file_icon(path: &str) -> Option<String> { pub fn get_file_icon(path: &str) -> Option<String> {
@ -172,43 +181,6 @@ fn image_buffer_to_base64(image_buffer: ImageBuffer<Rgba<u8>, Vec<u8>>) -> Strin
) )
} }
/**
*
*/
pub fn shell_execute(
operation: String,
file: String,
params: String,
start_location: Option<String>,
) {
// dir
let dir = start_location.unwrap_or_else(|| {
// 判断是否是文件夹
let path = Path::new(&file);
if path.is_dir() {
// 文件夹
file.clone()
} else {
// 文件 获取上一级目录
path.parent().unwrap().display().to_string()
}
});
// HSTRING
let operation = HSTRING::from(operation.as_str());
let file = HSTRING::from(file.as_str());
let params = HSTRING::from(params.as_str());
let dir = HSTRING::from(dir.as_str());
// PCWSTR
let operation = PCWSTR(operation.as_ptr());
let file = PCWSTR(file.as_ptr());
let params = PCWSTR(params.as_ptr());
let dir = PCWSTR(dir.as_ptr());
unsafe {
// execute
ShellExecuteW(None, operation, file, params, dir, SW_SHOWDEFAULT);
}
}
/** /**
* *
*/ */
@ -258,45 +230,6 @@ pub fn get_shortcut_file_info(path: &str) -> Option<HashMap<String, String>> {
None None
} }
/**
*
*/
pub fn system_item_execute(target: &str, params: Option<&str>) {
if target == "static:TurnOffMonitor" {
// 关闭显示器
turn_off_monitor()
} else {
let mut file = target.to_string();
if !target.starts_with("shell:") {
// 如果不是shell开头就查询路径
file = search_path(target).unwrap_or(target.to_string());
}
let file = HSTRING::from(file);
let params = match params {
Some(p) => HSTRING::from(p),
_ => HSTRING::new(),
};
// 获取系统盘路径当作工作目录
let mut buffer = [0u16; MAX_PATH as usize];
unsafe {
GetSystemDirectoryW(Some(&mut buffer));
}
let dir = u16_to_string(&buffer);
let dir = HSTRING::from(dir);
// execute
unsafe {
ShellExecuteW(
None,
w!("open"),
PCWSTR(file.as_ptr()),
PCWSTR(params.as_ptr()),
PCWSTR(dir.as_ptr()),
SW_SHOWDEFAULT,
);
}
}
}
/** /**
* *
*/ */
@ -510,6 +443,7 @@ struct MouseEvent {
y: i32, y: i32,
button: i32, button: i32,
mouse_data: u32, mouse_data: u32,
class_name: String,
} }
/** /**
@ -522,6 +456,8 @@ unsafe extern "system" fn mouse_proc(code: i32, wparam: WPARAM, lparam: LPARAM)
let x = (*msll_struct).pt.x; let x = (*msll_struct).pt.x;
let y = (*msll_struct).pt.y; let y = (*msll_struct).pt.y;
let mouse_data = (*msll_struct).mouseData; let mouse_data = (*msll_struct).mouseData;
// 类名
let mut class_name = String::new();
// 参数 // 参数
let param = wparam.0 as u32; let param = wparam.0 as u32;
// 事件 // 事件
@ -536,11 +472,14 @@ unsafe extern "system" fn mouse_proc(code: i32, wparam: WPARAM, lparam: LPARAM)
// 鼠标操作 // 鼠标操作
if param == WM_LBUTTONUP || param == WM_RBUTTONUP || param == WM_MBUTTONUP { if param == WM_LBUTTONUP || param == WM_RBUTTONUP || param == WM_MBUTTONUP {
event.push_str("mouseup"); event.push_str("mouseup");
class_name.push_str(&get_foreground_window_class_name());
} else if param == WM_LBUTTONDOWN || param == WM_RBUTTONDOWN || param == WM_MBUTTONDOWN } else if param == WM_LBUTTONDOWN || param == WM_RBUTTONDOWN || param == WM_MBUTTONDOWN
{ {
event.push_str("mousedown"); event.push_str("mousedown");
class_name.push_str(&get_foreground_window_class_name());
} else if param == WM_MOUSEWHEEL || param == WM_MOUSEHWHEEL { } else if param == WM_MOUSEWHEEL || param == WM_MOUSEHWHEEL {
event.push_str("mousewheel"); event.push_str("mousewheel");
class_name.push_str(&get_foreground_window_class_name());
} }
// 按键类型 // 按键类型
if param == WM_LBUTTONUP || param == WM_LBUTTONDOWN { if param == WM_LBUTTONUP || param == WM_LBUTTONDOWN {
@ -563,6 +502,7 @@ unsafe extern "system" fn mouse_proc(code: i32, wparam: WPARAM, lparam: LPARAM)
y, y,
mouse_data, mouse_data,
button, button,
class_name,
}; };
func.call( func.call(
Ok(serde_json::to_string(&mouse_event).unwrap()), Ok(serde_json::to_string(&mouse_event).unwrap()),
@ -671,3 +611,196 @@ pub fn empty_recycle_bin(window: i32) {
let _ = SHEmptyRecycleBinW(hwnd, None, SHERB_NOSOUND); let _ = SHEmptyRecycleBinW(hwnd, None, SHERB_NOSOUND);
}; };
} }
/**
*
*/
pub fn remove_window_animation(window: i32) {
// HWND
let hwnd = HWND(window as isize);
let pvattribute = &mut true as *mut _ as *const _;
unsafe {
let _ = DwmSetWindowAttribute(
hwnd,
DWMWA_TRANSITIONS_FORCEDISABLED,
pvattribute,
std::mem::size_of_val(&pvattribute) as u32,
);
};
}
/**
* APPX列表
*/
pub fn get_appx_list() -> Vec<HashMap<String, String>> {
let mut result_list = vec![];
let package_manager: Result<PackageManager, windows::core::Error> = PackageManager::new();
if package_manager.is_err() {
return result_list;
}
let packages = package_manager
.unwrap()
.FindPackagesByUserSecurityId(&HSTRING::default());
if packages.is_err() {
return result_list;
}
for package in packages.unwrap() {
let mut map = HashMap::new();
if let Ok(diaplay_name) = package.DisplayName() {
map.insert(String::from("displayName"), diaplay_name.to_string());
}
if let Ok(path) = package.InstalledPath() {
map.insert(String::from("path"), path.to_string());
}
if let Ok(id) = package.Id() {
if let Ok(family_name) = id.FamilyName() {
map.insert(String::from("familyName"), family_name.to_string());
}
}
if let Ok(logo) = package.Logo() {
if let Ok(path) = logo.Path() {
map.insert(String::from("logo"), path.to_string());
}
}
if let Ok(app_list) = package.GetAppListEntriesAsync() {
if let Ok(app_list) = app_list.get() {
for (index, app) in app_list.into_iter().enumerate() {
if app.DisplayInfo().is_err()
|| app.DisplayInfo().unwrap().DisplayName().is_err()
{
continue;
}
map.insert(
format!("appName{}", index),
app.DisplayInfo()
.unwrap()
.DisplayName()
.unwrap()
.to_string(),
);
}
}
}
result_list.push(map);
}
result_list
}
/**
*
*/
fn get_foreground_window_class_name() -> String {
let hwnd = unsafe { GetForegroundWindow() };
// 获取窗口的ClassName
let mut buffer = [0u16; MAX_PATH as usize];
unsafe {
GetClassNameW(hwnd, &mut buffer);
};
// 返回
u16_to_string(&buffer)
}
/**
*
*/
pub fn get_cursor_point() -> [i32; 2] {
let mut point = POINT::default();
unsafe {
GetCursorPos(&mut point);
};
[point.x, point.y]
}
/**
*
*/
pub fn shell_execute(
operation: String,
file: String,
params: String,
start_location: Option<String>,
) {
thread::spawn(move || {
// 是否是打开文件夹
let is_dir = operation == "explore";
// dir
let dir = start_location.unwrap_or_else(|| {
// 判断是否是文件夹
let path = Path::new(&file);
if path.is_dir() {
// 文件夹
file.clone()
} else {
// 文件 获取上一级目录
path.parent().unwrap().display().to_string()
}
});
// 文件夹
let dir_param = format!("\"{}\"", file.to_string());
let dir_param = HSTRING::from(dir_param.as_str());
let dir_param = PCWSTR(dir_param.as_ptr());
// HSTRING
let operation = HSTRING::from(operation.as_str());
let file = HSTRING::from(file.as_str());
let params = HSTRING::from(params.as_str());
let dir = HSTRING::from(dir.as_str());
// PCWSTR
let operation = PCWSTR(operation.as_ptr());
let file = PCWSTR(file.as_ptr());
let params = PCWSTR(params.as_ptr());
let dir = PCWSTR(dir.as_ptr());
unsafe {
if is_dir {
ShellExecuteW(
None,
w!("open"),
w!("explorer.exe"),
dir_param,
None,
SW_SHOWDEFAULT,
);
} else {
ShellExecuteW(None, operation, file, params, dir, SW_SHOWDEFAULT);
}
}
});
}
/**
*
*/
pub fn system_item_execute(target: &str, params: Option<&str>) {
if target == "static:TurnOffMonitor" {
// 关闭显示器
turn_off_monitor()
} else {
let mut file = target.to_string();
if !target.starts_with("shell:") {
// 如果不是shell开头就查询路径
file = search_path(target).unwrap_or(target.to_string());
}
let file = HSTRING::from(file);
let params = match params {
Some(p) => HSTRING::from(p),
_ => HSTRING::new(),
};
// 获取系统盘路径当作工作目录
let mut buffer = [0u16; MAX_PATH as usize];
unsafe {
GetSystemDirectoryW(Some(&mut buffer));
}
let dir = u16_to_string(&buffer);
let dir = HSTRING::from(dir);
// execute
unsafe {
ShellExecuteW(
None,
w!("open"),
PCWSTR(file.as_ptr()),
PCWSTR(params.as_ptr()),
PCWSTR(dir.as_ptr()),
SW_SHOWDEFAULT,
);
}
}
}

View File

@ -91,10 +91,35 @@ function setTheme() {
padding: "6px", padding: "6px",
}, },
Checkbox: { Checkbox: {
color: store.setting.appearance.theme.mainBackgroundColor, color: hexToRGBA(store.setting.appearance.theme.mainBackgroundColor, 1),
textColor: store.setting.appearance.theme.mainFontColor, textColor: hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
borderChecked: "1px solid " + store.setting.appearance.theme.borderColor, border:
colorChecked: store.setting.appearance.theme.secondBackgroundColor, "1px solid " + hexToRGBA(store.setting.appearance.theme.borderColor, 1),
borderChecked:
"1px solid " +
hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
colorChecked: "none",
checkMarkColor: hexToRGBA(
store.setting.appearance.theme.mainFontColor,
1
),
},
Radio: {
boxShadowActive:
"inset 0 0 0 1px " +
hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
boxShadowFocus:
"inset 0 0 0 1px " +
hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
boxShadowHover:
"inset 0 0 0 1px " +
hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
dotColorActive: hexToRGBA(
store.setting.appearance.theme.mainFontColor,
1
),
color: hexToRGBA(store.setting.appearance.theme.mainBackgroundColor, 1),
textColor: hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
}, },
Form: { Form: {
labelTextColor: store.setting.appearance.theme.mainFontColor, labelTextColor: store.setting.appearance.theme.mainFontColor,
@ -172,6 +197,26 @@ watch(
} }
); );
function createStyle() { function createStyle() {
// style
let styleElement = document.getElementById("placeholder-style");
// style
if (styleElement && styleElement.parentNode) {
styleElement.parentNode.removeChild(styleElement);
}
//
let style = document.createElement("style");
style.setAttribute("id", "placeholder-style");
style.type = "text/css";
//
style.innerHTML =
"input::placeholder, textarea::placeholder {" +
"color: " +
hexToRGBA(store.setting.appearance.theme.mainFontColor, 0.5) +
";" +
"}";
// head
document.head.appendChild(style);
// style // style
let oldRangeStyleElement = document.getElementById("range-style"); let oldRangeStyleElement = document.getElementById("range-style");
// style // style
@ -251,12 +296,33 @@ function keydown(e: any) {
e.preventDefault(); e.preventDefault();
} }
// //
if (shortcutKey.toLowerCase() === "ctrl + w") { if (
shortcutKey.toLowerCase() === "ctrl + w" ||
shortcutKey.toLowerCase() === "alt + f4"
) {
e.preventDefault(); e.preventDefault();
} }
} }
} }
} }
//
function contextmenu(e: MouseEvent) {
let target = e.target as HTMLInputElement;
if (target) {
if (
(target.nodeName != null &&
target.nodeName.toLowerCase() == "input" &&
target.type != null &&
target.type.toLowerCase() == "text") ||
(target.nodeName != null && target.nodeName.toLowerCase() == "textarea")
) {
window.api.textRightMenu();
e.preventDefault();
e.stopPropagation();
return;
}
}
}
// //
let onUpdateSettingUnListen: Function | null = null; let onUpdateSettingUnListen: Function | null = null;
// mounted // mounted
@ -265,6 +331,8 @@ onMounted(() => {
createStyle(); createStyle();
// //
window.addEventListener("keydown", keydown, true); window.addEventListener("keydown", keydown, true);
//
window.addEventListener("contextmenu", contextmenu, true);
// //
onUpdateSettingUnListen = window.setting.onUpdate((data) => { onUpdateSettingUnListen = window.setting.onUpdate((data) => {
store.setting = data; store.setting = data;
@ -274,6 +342,8 @@ onMounted(() => {
onUnmounted(() => { onUnmounted(() => {
// //
window.removeEventListener("keydown", keydown, true); window.removeEventListener("keydown", keydown, true);
//
window.removeEventListener("contextmenu", contextmenu, true);
// //
if (onUpdateSettingUnListen) { if (onUpdateSettingUnListen) {
onUpdateSettingUnListen(); onUpdateSettingUnListen();

View File

@ -0,0 +1,20 @@
<template>
<span
class="ml-auto text-[12px] py-[4px] px-[6px]"
style="border-radius: 4px"
:style="{
color: store.setting.appearance.theme.mainFontColor,
backgroundColor: store.setting.appearance.theme.secondBackgroundColor,
}"
>{{ text }}</span
>
</template>
<script setup lang="ts">
import { useMainStore } from "../store";
// pinia
const store = useMainStore();
// props
const props = defineProps<{
text: string;
}>();
</script>

12
src/index.d.ts vendored
View File

@ -31,9 +31,16 @@ declare global {
openURL: (url: string) => void; openURL: (url: string) => void;
getVersion: () => string; getVersion: () => string;
exit: () => void; exit: () => void;
run: (
operation: string,
target: string,
params: string | null,
startLocation: string | null
) => void;
textRightMenu: () => void;
}; };
main: { main: {
showWindow: (blurHide: boolean) => void; showWindow: (blurHide: boolean, autoHide: boolean) => void;
hideWindow: () => void; hideWindow: () => void;
initData: () => void; initData: () => void;
onShowWindowBefore: (callback: Callback) => Function; onShowWindowBefore: (callback: Callback) => Function;
@ -138,6 +145,7 @@ declare global {
onUpdateOpenInfo: (callback: Callback) => Function; onUpdateOpenInfo: (callback: Callback) => Function;
onCheckInvalid: (callback: Callback) => Function; onCheckInvalid: (callback: Callback) => Function;
updateOpenInfo: (type: string, id: number) => void; updateOpenInfo: (type: string, id: number) => void;
deleteQuickSearchHistory: (id: number) => void;
}; };
setting: { setting: {
createWindow: () => void; createWindow: () => void;
@ -149,6 +157,7 @@ declare global {
onUpdate: (callback: Callback) => Function; onUpdate: (callback: Callback) => Function;
setStartup: (value: boolean) => void; setStartup: (value: boolean) => void;
setTray: (show: boolean) => void; setTray: (show: boolean) => void;
setTaskbar: (show: boolean) => void;
setShortcutKey: (setting: Setting) => void; setShortcutKey: (setting: Setting) => void;
setAlwaysTop: (value: boolean) => void; setAlwaysTop: (value: boolean) => void;
setLockSize: (value: boolean) => void; setLockSize: (value: boolean) => void;
@ -168,6 +177,7 @@ declare global {
onShowWindowBefore: (callback: Callback) => Function; onShowWindowBefore: (callback: Callback) => Function;
onClearData: (callback: Callback) => Function; onClearData: (callback: Callback) => Function;
setWindowHeight: (height: number) => void; setWindowHeight: (height: number) => void;
setWindowWidth: (width: number) => void;
}; };
about: { about: {
createWindow: () => void; createWindow: () => void;

View File

@ -4,6 +4,11 @@
:style="{ :style="{
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
borderRadius:
store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded
? '8px'
: undefined,
}" }"
> >
<div class="flex items-center px-2 app-region-drag"> <div class="flex items-center px-2 app-region-drag">
@ -29,7 +34,7 @@
/> />
<p class="mt-4">Dawn Launcher {{ version }}</p> <p class="mt-4">Dawn Launcher {{ version }}</p>
<p class="mt-2"> <p class="mt-2">
Copyright © 2022-2023 Dawn Launcher. All Rights Reserved Copyright © 2022-2025 Dawn Launcher. All Rights Reserved
</p> </p>
<p class="mt-2"> <p class="mt-2">
{{ store.language.officialWebsite }}{{ store.language.colon {{ store.language.officialWebsite }}{{ store.language.colon

View File

@ -4,6 +4,11 @@
:style="{ :style="{
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
borderRadius:
store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded
? '8px'
: undefined,
}" }"
> >
<div class="flex items-center app-region-drag"> <div class="flex items-center app-region-drag">

View File

@ -4,6 +4,11 @@
:style="{ :style="{
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
borderRadius:
store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded
? '8px'
: undefined,
}" }"
> >
<div class="flex items-center app-region-drag"> <div class="flex items-center app-region-drag">
@ -131,7 +136,7 @@ let sortOptions = ref([
value: "initial", value: "initial",
}, },
{ {
label: store.language.byOpenNumber, label: store.language.byOpenCount,
value: "openNumber", value: "openNumber",
}, },
{ {

View File

@ -4,6 +4,11 @@
:style="{ :style="{
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
borderRadius:
store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded
? '8px'
: undefined,
}" }"
> >
<div class="flex items-center app-region-drag"> <div class="flex items-center app-region-drag">

File diff suppressed because it is too large Load Diff

View File

@ -78,7 +78,7 @@
@dragleave="clearMouseOverChangeClassificationSetTimeout" @dragleave="clearMouseOverChangeClassificationSetTimeout"
> >
<span <span
class="overflow-hidden text-ellipsis whitespace-nowrap" class="overflow-hidden whitespace-nowrap"
:style="{ :style="{
filter: store.setting.appearance.fontShadow filter: store.setting.appearance.fontShadow
? 'drop-shadow(1px 1px 1px ' + ? 'drop-shadow(1px 1px 1px ' +
@ -130,20 +130,20 @@
<KeyboardArrowDownRound></KeyboardArrowDownRound> <KeyboardArrowDownRound></KeyboardArrowDownRound>
</Icon> </Icon>
</div> </div>
<ul <div
v-show=" v-show="
classification.childList && classification.childList &&
classification.childList.length > 0 && classification.childList.length > 0 &&
classificationChildShowHiddenMap.has(classification.id) classificationChildShowHiddenMap.has(classification.id)
" "
class="classification-child-list"
:class="[ :class="[
`${ `${
store.setting.classification.layout === 'top' store.setting.classification.layout === 'top'
? 'fixed z-[10000] rounded drop-shadow-[0_0_6px_rgba(0,0,0,0.2)] origin-top-left pt-1 mt-1' ? '!fixed !z-[10000] !rounded-lg !origin-top-left !pt-1 !mt-1'
: '' : ''
}`, }`,
]" ]"
:data-simplebar="store.setting.classification.layout === 'top'"
:style="{ :style="{
backgroundColor: backgroundColor:
store.setting.classification.layout === 'top' store.setting.classification.layout === 'top'
@ -156,87 +156,99 @@
store.setting.classification.layout === 'top' store.setting.classification.layout === 'top'
? classificationWidth + 'px' ? classificationWidth + 'px'
: '', : '',
maxHeight:
store.setting.classification.layout === 'top' ? '300px' : 'auto',
'box-shadow':
store.setting.classification.layout === 'top'
? '0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05'
: '',
}" }"
:classification-parent-id="classification.id"
> >
<li <ul
v-for="( class="classification-child-list h-full"
childClassification, childIndex
) of classification.childList"
:id="'classification-child-' + classification.id"
:key="
'classification-' +
classification.id +
'-' +
childClassification.id +
'-' +
childIndex
"
class="classification-child mb-1 px-2 flex items-center h-[30px]"
:class="[
`${
store.setting.classification.nameAlign === 'center' ||
store.setting.classification.mode === 'icon'
? 'justify-center'
: ''
}`,
`${
store.setting.classification.layout !== 'top' ? 'rounded' : ''
}`,
`${store.setting.classification.mode === 'normal' ? 'px-2' : ''}`,
]"
:style="{
color:
isSelectedChild(childClassification.id, classification.id) ||
(store.itemSorting &&
store.mouseoverClassificationId === childClassification.id)
? store.setting.appearance.theme.secondFontColor
: undefined,
backgroundColor:
isSelectedChild(childClassification.id, classification.id) ||
(store.itemSorting &&
store.mouseoverClassificationId === childClassification.id)
? hexToRGBA(
store.setting.appearance.theme.secondBackgroundColor,
store.setting.appearance.transparency
)
: undefined,
}"
:classification-parent-id="classification.id" :classification-parent-id="classification.id"
:classification-id="childClassification.id"
@click="
switchChildClassification(
classification.id,
childClassification.id
)
"
@dragleave="clearMouseOverChangeClassificationSetTimeout"
> >
<span <li
class="overflow-hidden text-ellipsis whitespace-nowrap" v-for="(
childClassification, childIndex
) of classification.childList"
:id="'classification-child-' + classification.id"
:key="
'classification-' +
classification.id +
'-' +
childClassification.id +
'-' +
childIndex
"
class="classification-child mb-1 px-2 flex items-center h-[30px]"
:class="[
`${
store.setting.classification.nameAlign === 'center' ||
store.setting.classification.mode === 'icon'
? 'justify-center'
: ''
}`,
`${
store.setting.classification.layout !== 'top' ? 'rounded' : ''
}`,
`${
store.setting.classification.mode === 'normal' ? 'px-2' : ''
}`,
]"
:style="{ :style="{
filter: store.setting.appearance.fontShadow color:
? 'drop-shadow(1px 1px 1px ' + isSelectedChild(childClassification.id, classification.id) ||
store.setting.appearance.fontShadowColor + (store.itemSorting &&
')' store.mouseoverClassificationId === childClassification.id)
: undefined, ? store.setting.appearance.theme.secondFontColor
: undefined,
backgroundColor:
isSelectedChild(childClassification.id, classification.id) ||
(store.itemSorting &&
store.mouseoverClassificationId === childClassification.id)
? hexToRGBA(
store.setting.appearance.theme.secondBackgroundColor,
store.setting.appearance.transparency
)
: undefined,
}" }"
:classification-parent-id="classification.id"
:classification-id="childClassification.id"
@click="
switchChildClassification(
classification.id,
childClassification.id
)
"
@dragleave="clearMouseOverChangeClassificationSetTimeout"
> >
{{ getClassificationName(childClassification) }} <span
</span> class="overflow-hidden whitespace-nowrap"
</li> :style="{
<li filter: store.setting.appearance.fontShadow
v-show="store.setting.classification.layout !== 'top'" ? 'drop-shadow(1px 1px 1px ' +
class="h-[1px] my-1 border-t-[1px]" store.setting.appearance.fontShadowColor +
style="border-top-style: solid" ')'
:style="{ : undefined,
borderColor: hexToRGBA( }"
store.setting.appearance.theme.borderColor, >
store.setting.appearance.transparency {{ getClassificationName(childClassification) }}
), </span>
}" </li>
></li> <li
</ul> v-show="store.setting.classification.layout !== 'top'"
class="h-[1px] my-1 border-t-[1px]"
style="border-top-style: solid"
:style="{
borderColor: hexToRGBA(
store.setting.appearance.theme.borderColor,
store.setting.appearance.transparency
),
}"
></li>
</ul>
</div>
</li> </li>
</ul> </ul>
</div> </div>
@ -299,10 +311,17 @@ watch(
() => { () => {
// +1 // +1
count.value = count.value + 1; count.value = count.value + 1;
classificationChildShowHiddenMap.value = new Map();
// DOM // DOM
nextTick(() => { nextTick(() => {
//
createSimpleBar();
// //
setClassificationWidth(); setClassificationWidth();
// ;
createClassificationParentSortable();
//
createClassificationChildSortable();
}); });
} }
); );
@ -787,6 +806,8 @@ function createClassificationParentSortable() {
setClassificationWidth(); setClassificationWidth();
// - 34 // - 34
height.value = document.documentElement.clientHeight - 34; height.value = document.documentElement.clientHeight - 34;
//
createClassificationChildSortable();
}); });
} }
}, },
@ -862,6 +883,8 @@ function createClassificationChildSortable() {
nextTick(() => { nextTick(() => {
// //
setClassificationWidth(); setClassificationWidth();
//
createClassificationChildSortable();
}); });
}, },
}) })

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,11 @@
:style="{ :style="{
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
borderRadius:
store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded
? '8px'
: undefined,
}" }"
> >
<div class="flex items-center px-2 app-region-drag"> <div class="flex items-center px-2 app-region-drag">

View File

@ -17,7 +17,7 @@
borderRadius: borderRadius:
store.setting.appearance.transparency < 1 && store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded store.setting.appearance.windowRounded
? '2%' ? '8px'
: undefined, : undefined,
backgroundImage: backgroundImage:
store.setting.appearance.backgroundImage && store.setting.appearance.backgroundImage &&
@ -300,15 +300,6 @@ let topRightMenuOptions = ref<Array<any>>([
}, },
}, },
}, },
{
label: store.language.rewardSponsor,
key: "RewardSponsor",
props: {
onclick: () => {
window.api.openURL("https://dawnlauncher.com/sponsor");
},
},
},
{ {
label: store.language.feedback, label: store.language.feedback,
key: "Feedback", key: "Feedback",
@ -371,7 +362,7 @@ function resize() {
// dom // dom
nextTick(() => { nextTick(() => {
if (!store.setting.general.startupTray) { if (!store.setting.general.startupTray) {
window.main.showWindow(false); window.main.showWindow(false, false);
} }
window.main.initData(); window.main.initData();
}); });
@ -418,6 +409,10 @@ function createBackgroundImageStyle() {
"opacity: " + "opacity: " +
store.setting.appearance.backgroundImageTransparency + store.setting.appearance.backgroundImageTransparency +
";" + ";" +
(store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded
? "border-radius: 8px;"
: "") +
"}"; "}";
// head // head
document.head.appendChild(backgroundImageStyle); document.head.appendChild(backgroundImageStyle);
@ -528,6 +523,8 @@ onMounted(() => {
// //
listens.push( listens.push(
window.main.onShowWindowBefore((data) => { window.main.onShowWindowBefore((data) => {
//
store.search = false;
if (classificationContentRef.value) { if (classificationContentRef.value) {
// IDID // IDID
let selectedClassificationId: number | null = let selectedClassificationId: number | null =
@ -549,8 +546,8 @@ onMounted(() => {
nextTick(() => { nextTick(() => {
setTimeout(() => { setTimeout(() => {
// //
window.main.showWindow(data.blurHide); window.main.showWindow(data.blurHide, data.autoHide);
}, 100); }, 10);
}); });
}) })
); );

View File

@ -5,6 +5,11 @@
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
height: height + 'px', height: height + 'px',
borderRadius:
store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded
? '8px'
: undefined,
}" }"
> >
<div class="flex items-center px-2 app-region-drag"> <div class="flex items-center px-2 app-region-drag">
@ -247,7 +252,9 @@
(selectedMenuId === 4 && id) (selectedMenuId === 4 && id)
" "
> >
<span class="block">{{ store.language.target }}</span> <span class="block">{{
selectedMenuId === 2 ? store.language.url : store.language.path
}}</span>
<NInput <NInput
class="mt-1.5" class="mt-1.5"
type="textarea" type="textarea"
@ -322,9 +329,7 @@
v-if=" v-if="
selectedMenuId === 0 && selectedMenuId === 0 &&
form.data.target && form.data.target &&
form.data.target.trim() !== '' && form.data.target.trim() !== ''
(getFileExtname(form.data.target) === 'exe' ||
getFileExtname(form.data.target) === 'bat')
" "
v-model:checked="form.data.runAsAdmin" v-model:checked="form.data.runAsAdmin"
:focusable="false" :focusable="false"
@ -452,7 +457,6 @@ import {
isAbsolutePath, isAbsolutePath,
deleteExtname, deleteExtname,
getFileName, getFileName,
getFileExtname,
} from "../../../commons/utils/common"; } from "../../../commons/utils/common";
import SystemItemList from "./components/SystemItemList.vue"; import SystemItemList from "./components/SystemItemList.vue";
import StartMenuItemList from "./components/StartMenuItemList.vue"; import StartMenuItemList from "./components/StartMenuItemList.vue";
@ -628,10 +632,8 @@ let getURLInfoLoading = ref<boolean>(false);
function getURLInfo() { function getURLInfo() {
if (form.data.target) { if (form.data.target) {
getURLInfoLoading.value = true; getURLInfoLoading.value = true;
if ( const regex = /^.+:\/\/.*/;
form.data.target.indexOf("http://") < 0 && if (!regex.test(form.data.target)) {
form.data.target.indexOf("https://") < 0
) {
form.data.target = "http://" + form.data.target; form.data.target = "http://" + form.data.target;
} }
// //
@ -651,12 +653,6 @@ async function confirm() {
if (!success) { if (!success) {
return; return;
} }
//
let ext = getFileExtname(form.data.target);
// exebatfalse
if (form.data.runAsAdmin && (!ext || (ext !== "exe" && ext !== "bat"))) {
form.data.runAsAdmin = false;
}
if (!id) { if (!id) {
// //
await addItem(); await addItem();
@ -833,8 +829,10 @@ onMounted(() => {
getURLInfoLoading.value = false; getURLInfoLoading.value = false;
let res: Result = data; let res: Result = data;
if (res.status) { if (res.status) {
form.data.icon = res.icon; if (res.icon && res.icon.trim() !== "") {
form.data.htmlIcon = null; form.data.icon = res.icon;
form.data.htmlIcon = null;
}
form.name = res.name ?? ""; form.name = res.name ?? "";
} else { } else {
window.api.showErrorMessageBox( window.api.showErrorMessageBox(

View File

@ -4,6 +4,11 @@
:style="{ :style="{
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
borderRadius:
store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded
? '8px'
: undefined,
}" }"
> >
<div class="flex items-center px-2 app-region-drag"> <div class="flex items-center px-2 app-region-drag">

View File

@ -4,6 +4,11 @@
:style="{ :style="{
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
borderRadius:
store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded
? '8px'
: undefined,
}" }"
> >
<div class="flex items-center px-2 app-region-drag"> <div class="flex items-center px-2 app-region-drag">

View File

@ -65,6 +65,19 @@
: 'item-name-tile-1' : 'item-name-tile-1'
}`, }`,
]" ]"
:style="{
fontSize: store.setting.item.fontSize + 'px',
fontWeight: store.setting.item.fontWeight,
lineHeight: store.setting.item.fontLineHeight + 'rem',
maxHeight:
store.setting.item.itemNameRowCount == 2
? store.setting.item.hideEllipsis
? store.setting.item.fontLineHeight * 2 + 'rem'
: undefined
: store.setting.item.hideEllipsis
? store.setting.item.fontLineHeight * 1 + 'rem'
: undefined,
}"
> >
{{ item.name }} {{ item.name }}
</p> </p>

View File

@ -41,6 +41,11 @@
lineHeight: lineHeight:
store.setting.subClassification.itemAreaNameFontLineHeight + store.setting.subClassification.itemAreaNameFontLineHeight +
'rem', 'rem',
textAlign: store.setting.subClassification.itemAreaNameAlign,
marginRight:
store.setting.subClassification.itemAreaNameAlign === 'right'
? '4px'
: undefined,
}" }"
> >
{{ classification.name }} {{ classification.name }}
@ -125,6 +130,7 @@ import {
setItemWidth, setItemWidth,
run, run,
removeInvalidItem, removeInvalidItem,
showItemList,
} from "../js"; } from "../js";
import ItemList from "./List.vue"; import ItemList from "./List.vue";
import { Item } from "../../../../types/item"; import { Item } from "../../../../types/item";
@ -149,6 +155,12 @@ watch(
nextTick(() => { nextTick(() => {
// //
resize(); resize();
//
setItemWidth();
//
createItemSortable();
//
clearBatchOperation();
// //
scrollToTop(itemContentSimpleBar); scrollToTop(itemContentSimpleBar);
}); });
@ -304,12 +316,21 @@ function createItemSortable() {
let fromClassificationId = parseInt( let fromClassificationId = parseInt(
event.from.getAttribute("classification-id")! event.from.getAttribute("classification-id")!
); );
// let fromClassification =
const currentItem = getClassificationById(fromClassificationId);
getItemListByClassificationId(fromClassificationId)[ if (fromClassification) {
event.oldIndex let itemList =
]; getItemListByClassificationId(fromClassificationId);
fromIdList.push(currentItem.id); if (itemList) {
let copyItemList = JSON.parse(JSON.stringify(itemList));
//
const currentItem = showItemList(
copyItemList,
fromClassification
)[event.oldIndex];
fromIdList.push(currentItem.id);
}
}
} else { } else {
// //
for (const value of store.itemBatchOperationDataArray) { for (const value of store.itemBatchOperationDataArray) {
@ -531,7 +552,7 @@ function drop(e: any, classificationId: number | null) {
) { ) {
// 使 // 使
if (item.id !== store.itemDragOutData.id) { if (item.id !== store.itemDragOutData.id) {
let params = store.itemDragOutData.data.target; let params = '"' + store.itemDragOutData.data.target + '"';
if (item.data.params) { if (item.data.params) {
params += " " + item.data.params; params += " " + item.data.params;
} }
@ -612,6 +633,14 @@ async function contextmenu(e: any) {
// ID // ID
store.itemRightMenuItemId = id; store.itemRightMenuItemId = id;
} }
//
let pageClassificationId = null;
let itemListElement = getClassElement(e, "item-list");
if (itemListElement) {
pageClassificationId = parseInt(
itemListElement.getAttribute("classification-id")
);
}
// //
window.item.showRightMenu({ window.item.showRightMenu({
classificationId: getSelectedClassificationId(), classificationId: getSelectedClassificationId(),
@ -622,6 +651,7 @@ async function contextmenu(e: any) {
x: e.screenX, x: e.screenX,
y: e.screenY, y: e.screenY,
type: "main", type: "main",
pageClassificationId,
}); });
} }
// beforeMount // beforeMount
@ -710,6 +740,8 @@ onMounted(() => {
// //
removeInvalidItem(id); removeInvalidItem(id);
} }
//
clearBatchOperation();
// DOM // DOM
nextTick(() => { nextTick(() => {
// //

View File

@ -37,7 +37,7 @@
<p <p
class="text-center mx-2" class="text-center mx-2"
:class="[ :class="[
`${getLayout(classificationId) === 'tile' ? 'mt-2' : ''}`, `${getLayout(classificationId) === 'tile' ? 'mt-2 text-center' : ''}`,
`${ `${
getLayout(classificationId) === 'list' getLayout(classificationId) === 'list'
? store.setting.item.hideEllipsis ? store.setting.item.hideEllipsis
@ -60,6 +60,18 @@
: undefined, : undefined,
fontWeight: store.setting.item.fontWeight, fontWeight: store.setting.item.fontWeight,
lineHeight: store.setting.item.fontLineHeight + 'rem', lineHeight: store.setting.item.fontLineHeight + 'rem',
maxHeight:
getLayout(classificationId) === 'list'
? store.setting.item.hideEllipsis
? store.setting.item.fontLineHeight * 1 + 'rem'
: undefined
: store.setting.item.itemNameRowCount === 2
? store.setting.item.hideEllipsis
? store.setting.item.fontLineHeight * 2 + 'rem'
: undefined
: store.setting.item.hideEllipsis
? store.setting.item.fontLineHeight * 1 + 'rem'
: undefined,
}" }"
v-if="!store.setting.item.hideItemName" v-if="!store.setting.item.hideItemName"
> >
@ -228,9 +240,9 @@ function runItem(e: any, dbclick: boolean) {
let item = getItemById(itemId); let item = getItemById(itemId);
if (item && item.data) { if (item && item.data) {
if (dbclick && store.setting.item.doubleClickOpen) { if (dbclick && store.setting.item.doubleClickOpen) {
run("main", item.data.runAsAdmin ? "runas" : "open", item); run("main", "open", item);
} else if (!dbclick && !store.setting.item.doubleClickOpen) { } else if (!dbclick && !store.setting.item.doubleClickOpen) {
run("main", item.data.runAsAdmin ? "runas" : "open", item); run("main", "open", item);
} }
} }
} }

View File

@ -65,6 +65,19 @@
: 'item-name-tile-1' : 'item-name-tile-1'
}`, }`,
]" ]"
:style="{
fontSize: store.setting.item.fontSize + 'px',
fontWeight: store.setting.item.fontWeight,
lineHeight: store.setting.item.fontLineHeight + 'rem',
maxHeight:
store.setting.item.itemNameRowCount == 2
? store.setting.item.hideEllipsis
? store.setting.item.fontLineHeight * 2 + 'rem'
: undefined
: store.setting.item.hideEllipsis
? store.setting.item.fontLineHeight * 1 + 'rem'
: undefined,
}"
> >
{{ item.name }} {{ item.name }}
</p> </p>

View File

@ -66,6 +66,19 @@
: 'item-name-tile-1' : 'item-name-tile-1'
}`, }`,
]" ]"
:style="{
fontSize: store.setting.item.fontSize + 'px',
fontWeight: store.setting.item.fontWeight,
lineHeight: store.setting.item.fontLineHeight + 'rem',
maxHeight:
store.setting.item.itemNameRowCount == 2
? store.setting.item.hideEllipsis
? store.setting.item.fontLineHeight * 2 + 'rem'
: undefined
: store.setting.item.hideEllipsis
? store.setting.item.fontLineHeight * 1 + 'rem'
: undefined,
}"
> >
{{ item.name }} {{ item.name }}
</p> </p>

View File

@ -36,7 +36,7 @@ function setItemWidth() {
// 获取项目数量 // 获取项目数量
let itemList = itemListElement.getElementsByClassName("item"); let itemList = itemListElement.getElementsByClassName("item");
// 每行数量 // 每行数量
let num = null; let num = 1;
// 布局 // 布局
let layout = getLayout( let layout = getLayout(
classificationId ? parseInt(classificationId) : null classificationId ? parseInt(classificationId) : null
@ -69,19 +69,9 @@ function setItemWidth() {
} }
} }
} }
if ( for (let i = 0; i < itemList.length; i++) {
num !== null && let itemElement = itemList[i] as HTMLElement;
((layout === "tile" && itemList.length >= num) || layout === "list") itemElement.style.width = (width - num * 4) / num + "px";
) {
for (let i = 0; i < itemList.length; i++) {
let itemElement = itemList[i] as HTMLElement;
itemElement.style.width = (width - num * 4) / num + "px";
}
} else {
for (let i = 0; i < itemList.length; i++) {
let itemElement = itemList[i] as HTMLElement;
itemElement.style.width = minWidth + "px";
}
} }
} }
} }
@ -750,18 +740,36 @@ function getName(name: string | null) {
* @param item * @param item
* @returns * @returns
*/ */
function getItemTitle(item: Item) { function getItemTitle(item: Item, quickSearch: boolean = false) {
let name = let name =
store.language.name + store.language.name +
store.language.colon + store.language.colon +
(item.name ? item.name.replace(/\\n/g, " ") : ""); (item.name ? item.name.replace(/\\n/g, " ") : "");
if (store.setting.item.openNumber) { if (
quickSearch &&
store.setting.quickSearch.showHistorySort === "openNumber"
) {
name += name +=
"\n" + "\n" +
store.language.openNumber + store.language.openCount +
store.language.colon +
(item.data.quickSearchOpenNumber ?? 0);
} else if (store.setting.item.openNumber) {
name +=
"\n" +
store.language.openCount +
store.language.colon + store.language.colon +
(item.data.openNumber ?? 0); (item.data.openNumber ?? 0);
} }
if (store.setting.item.promptShowPath) {
name += "\n";
if (item.type === 2) {
name += store.language.url;
} else {
name += store.language.path;
}
name += store.language.colon + item.data.target;
}
if (item.data.remark) { if (item.data.remark) {
name += name +=
"\n" + store.language.remark + store.language.colon + item.data.remark; "\n" + store.language.remark + store.language.colon + item.data.remark;

View File

@ -1,10 +1,14 @@
<template> <template>
<div <div
class="overflow-x-hidden max-h-[525px]" class="overflow-x-hidden max-h-[525px]"
style="text-shadow: none"
:style="{ :style="{
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
borderRadius:
store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded
? '8px'
: undefined,
}" }"
> >
<div <div
@ -16,20 +20,16 @@
resultList && resultList.length > 0 ? 'solid' : undefined, resultList && resultList.length > 0 ? 'solid' : undefined,
}" }"
> >
<div class="mx-2 whitespace-nowrap flex items-center"> <div class="mx-[10px] whitespace-nowrap flex items-center">
<svg <Icon class="app-region-drag" size="22" v-if="mode === 'search'">
class="w-[24px] h-[24px] app-region-drag" <SearchOutline></SearchOutline>
viewBox="0 96 960 960" </Icon>
v-if="!webSearch" <Icon class="app-region-drag" size="22" v-if="mode === 'commandLine'">
> <TerminalOutline></TerminalOutline>
<path </Icon>
fill="currentColor"
d="M779.385 902.154 528.923 651.693q-30 25.538-69 39.538-39 14-78.385 14-96.1 0-162.665-66.529-66.566-66.529-66.566-162.577t66.529-162.702q66.529-66.654 162.577-66.654 96.049 0 162.702 66.565Q610.769 379.899 610.769 476q0 41.692-14.769 80.692-14.769 39-38.769 66.693l250.462 250.461-28.308 28.308ZM381.538 665.231q79.616 0 134.423-54.808Q570.769 555.615 570.769 476q0-79.615-54.808-134.423-54.807-54.808-134.423-54.808-79.615 0-134.423 54.808Q192.308 396.385 192.308 476q0 79.615 54.807 134.423 54.808 54.808 134.423 54.808Z"
/>
</svg>
<span <span
class="text-2xl block app-region-drag" class="text-xl block app-region-drag"
v-else-if="webSearch && webSearchSource" v-if="mode === 'webSearch' && webSearchSource"
>{{ webSearchSource.name }}</span >{{ webSearchSource.name }}</span
> >
</div> </div>
@ -37,12 +37,12 @@
ref="searchInput" ref="searchInput"
type="text" type="text"
v-model="value" v-model="value"
class="w-full resize-none text-2xl font-light hover:outline-0 focus-visible:outline-0" class="w-full resize-none text-xl font-light hover:outline-0 focus-visible:outline-0"
:style="{ :style="{
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
}" }"
placeholder="Dawn Launcher" :placeholder="getPlaceholder()"
/> />
</div> </div>
<ul <ul
@ -59,7 +59,7 @@
> >
<li <li
v-for="(item, index) of resultList" v-for="(item, index) of resultList"
class="item flex items-center px-2 h-[48px]" class="item flex items-center px-[12px] h-[48px]"
:key="'item-' + item.id + '-' + index" :key="'item-' + item.id + '-' + index"
:id="'item-' + index" :id="'item-' + index"
:item-id="item.id" :item-id="item.id"
@ -73,35 +73,79 @@
) )
: undefined, : undefined,
}" }"
:title="getItemTitle(item as Item)" :title="getItemTitle(item as Item, true)"
:index="index" :index="index"
:target="item.data.target"
> >
<CustomItemIcon :item="(item as Item)" :icon-size="32"></CustomItemIcon> <CustomItemIcon :item="(item as Item)" :icon-size="28"></CustomItemIcon>
<span <span
class="text-sm ml-2 overflow-hidden text-ellipsis whitespace-nowrap h-[20px] flex-1 pr-[10px]" class="text-sm ml-[10px] overflow-hidden text-ellipsis whitespace-nowrap h-[20px]"
>{{ getName(item.name) >{{ getName(item.name) }}</span
}}<span class="text-xs ml-2">{{
getSearchItemClassificationName((item as Item).classificationId)
}}</span></span
> >
<span <span
class="ml-auto text-[12px]" v-if="mode === 'search'"
class="text-xs ml-2 max-w-[100px] flex-shrink-0 pr-[10px]"
>{{
getSearchItemClassificationName((item as Item).classificationId)
}}</span
>
<!-- 快捷键 -->
<div
class="ml-auto max-w-[100px] flex-shrink-0"
v-if=" v-if="
store.setting.quickSearch.openShortcutKey !== 'none' && index <= 9 store.setting.quickSearch.openShortcutKey !== 'none' && index <= 9
" "
:style="{
color: hexToRGBA(store.setting.appearance.theme.mainFontColor, 0.7),
}"
>{{
showHistory
? "Alt + "
: store.setting.quickSearch.openShortcutKey === "numberKey"
? store.language.numberKey
: store.setting.quickSearch.openShortcutKey === "ctrlNumberKey"
? "Ctrl + "
: "Alt + "
}}{{ index + 1 === 10 ? 0 : index + 1 }}</span
> >
<template
v-if="
showHistory ||
store.setting.quickSearch.openShortcutKey === 'altNumberKey'
"
>
<keyText text="Alt"></keyText>
&nbsp;+&nbsp;
<keyText
:text="(index + 1 === 10 ? 0 : index + 1).toString()"
></keyText>
</template>
<template
v-else-if="
store.setting.quickSearch.openShortcutKey === 'numberKey'
"
>
<keyText
:text="
store.language.numberKey +
(index + 1 === 10 ? 0 : index + 1).toString()
"
></keyText>
</template>
<template
v-else-if="
store.setting.quickSearch.openShortcutKey === 'ctrlNumberKey'
"
>
<keyText text="Ctrl"></keyText>
&nbsp;+&nbsp;
<keyText
:text="(index + 1 === 10 ? 0 : index + 1).toString()"
></keyText>
</template>
</div>
<!-- 删除历史记录 -->
<Icon
v-if="showHistory"
class="delete-history-icon text-[10px] p-[2px] ml-[10px] cursor-pointer"
style="border-radius: 12px"
:style="{
color: store.setting.appearance.theme.mainFontColor,
backgroundColor:
store.setting.appearance.theme.secondBackgroundColor,
}"
:title="store.language.deleteHistory"
>
<CloseRound></CloseRound>
</Icon>
</li> </li>
</ul> </ul>
</div> </div>
@ -131,7 +175,16 @@ import "simplebar/dist/simplebar.css";
import CustomItemIcon from "../../components/CustomItemIcon.vue"; import CustomItemIcon from "../../components/CustomItemIcon.vue";
import { getClassElement, hexToRGBA } from "../../utils/style"; import { getClassElement, hexToRGBA } from "../../utils/style";
import { convert } from "../../../commons/utils/common"; import { convert } from "../../../commons/utils/common";
import { itemAllRemoveStyle, searchResultDivMoveScroll } from "./js/index"; import {
itemAllRemoveStyle,
searchResultDivMoveScroll,
getCommandLineItemList,
commandLineRun as commonCommandLineRun,
} from "./js/index";
import keyText from "../../components/KeyText.vue";
import { Icon } from "@vicons/utils";
import { SearchOutline, TerminalOutline } from "@vicons/ionicons5";
import { CloseRound } from "@vicons/material";
import { useMainStore } from "../../store"; import { useMainStore } from "../../store";
// pinia // pinia
const store = useMainStore(); const store = useMainStore();
@ -142,7 +195,7 @@ let searchInput = ref<any>(null);
// //
let value = ref<string | null>(null); let value = ref<string | null>(null);
// //
let webSearch = ref(false); let mode = ref<"search" | "webSearch" | "commandLine">("search");
// //
let webSearchSource = ref<WebSearchSource | null>(null); let webSearchSource = ref<WebSearchSource | null>(null);
// //
@ -160,7 +213,8 @@ watch(
); );
// //
function search() { function search() {
if (!webSearch.value) { if (mode.value === "search") {
//
if (value.value) { if (value.value) {
showHistory.value = false; showHistory.value = false;
resultList.value = searchItem(value.value, searchMap, 50); resultList.value = searchItem(value.value, searchMap, 50);
@ -178,21 +232,25 @@ function search() {
// //
getHistory(); getHistory();
} }
// refresh();
resetScroll();
// DOM
nextTick(() => {
//
let height =
!resultList.value || resultList.value.length === 0
? 0
: resultList.value.length > 9
? 10 * 48 + 1
: resultList.value.length * 48 + 1;
window.quickSearch.setWindowHeight(height + 44);
});
} }
} }
//
function refresh() {
//
resetScroll();
// DOM
nextTick(() => {
//
let height =
!resultList.value || resultList.value.length === 0
? 0
: resultList.value.length > 9
? 10 * 48 + 1
: resultList.value.length * 48 + 1;
window.quickSearch.setWindowHeight(height + 44);
});
}
/** /**
* 重置滚动条 * 重置滚动条
*/ */
@ -268,34 +326,45 @@ function getHistory() {
resultList.value = []; resultList.value = [];
showHistory.value = false; showHistory.value = false;
} }
// refresh();
resetScroll();
// DOM
nextTick(() => {
//
let height =
!resultList.value || resultList.value.length === 0
? 0
: resultList.value.length > 9
? 10 * 48 + 1
: resultList.value.length * 48 + 1;
window.quickSearch.setWindowHeight(height + 44);
});
} }
// //
function parentRunItem(e: any) { function parentRunItem(e: any) {
// item // delete-history-icon
let itemElement = getClassElement(e, "item"); let deleteHistoryElement = getClassElement(e, "delete-history-icon");
if (itemElement) { if (deleteHistoryElement) {
// item
let itemElement = getClassElement(e, "item");
// ID // ID
let itemId = parseInt(itemElement.getAttribute("item-id")); let itemId = parseInt(itemElement.getAttribute("item-id"));
// //
let item = getItemById(itemId); window.item.deleteQuickSearchHistory(itemId);
if (item && item.data) { } else {
runItem(item); // item
let itemElement = getClassElement(e, "item");
if (itemElement) {
if (mode.value === "search") {
// ID
let itemId = parseInt(itemElement.getAttribute("item-id"));
//
let item = getItemById(itemId);
if (item && item.data) {
runItem(item);
}
} else if (mode.value === "commandLine") {
//
commandLineRun(itemElement.getAttribute("target"));
}
} }
} }
} }
//
function commandLineRun(target: string) {
if (store.setting.quickSearch.openAfterHideQuickSearchWindow) {
hide();
}
commonCommandLineRun(target, value.value);
}
// //
function runItem(item: Item) { function runItem(item: Item) {
if (store.setting.quickSearch.openAfterHideQuickSearchWindow) { if (store.setting.quickSearch.openAfterHideQuickSearchWindow) {
@ -303,6 +372,21 @@ function runItem(item: Item) {
} }
run("quickSearch", "open", item); run("quickSearch", "open", item);
} }
// placeholder
function getPlaceholder() {
let text = "Dawn Launcher";
if (
mode.value === "webSearch" &&
webSearchSource.value &&
webSearchSource.value.description &&
webSearchSource.value.description.trim() !== ""
) {
text = webSearchSource.value.description.trim();
} else if (mode.value === "commandLine") {
text = "Command Line";
}
return text;
}
// //
function hide() { function hide() {
window.quickSearch.hideWindow(); window.quickSearch.hideWindow();
@ -311,33 +395,35 @@ function hide() {
function contextmenu(e: any) { function contextmenu(e: any) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
// if (mode.value === "search") {
let item: Item | null = null; //
// let item: Item | null = null;
if (getClassElement(e, "item")) { //
// if (getClassElement(e, "item")) {
// ID //
let element = getClassElement(e, "item"); // ID
// ID let element = getClassElement(e, "item");
let id = parseInt(element.getAttribute("item-id")); // ID
// let id = parseInt(element.getAttribute("item-id"));
item = convert(getItemById(id)); //
} item = convert(getItemById(id));
if (item) { }
// if (item) {
store.quickSearchItemRightMenuItemId = item.id; //
window.item.showRightMenu({ store.quickSearchItemRightMenuItemId = item.id;
item, window.item.showRightMenu({
x: e.screenX, item,
y: e.screenY, x: e.screenX,
type: "quickSearch", y: e.screenY,
}); type: "quickSearch",
});
}
} }
} }
// dragover // dragover
function dragover(e: any) { function dragover(e: any) {
// //
if (store.setting.quickSearch.useItemOpen) { if (mode.value === "search" && store.setting.quickSearch.useItemOpen) {
// //
let target = findElement(e.target, "item"); let target = findElement(e.target, "item");
// //
@ -363,40 +449,42 @@ function dragover(e: any) {
} }
// drop // drop
function drop(e: any) { function drop(e: any) {
// if (mode.value === "search") {
let item: Item | null = null; //
let itemElement = findElement(e.target, "item"); let item: Item | null = null;
if (itemElement) { let itemElement = findElement(e.target, "item");
let id = itemElement.getAttribute("item-id"); if (itemElement) {
if (id) { let id = itemElement.getAttribute("item-id");
item = getItemById(parseInt(id)); if (id) {
} item = getItemById(parseInt(id));
}
//
let pathList = [];
for (const file of e.dataTransfer.files) {
pathList.push(file.path);
}
//
if (store.setting.quickSearch.useItemOpen && item && pathList.length > 0) {
//
if (pathList.length === 1 && pathList[0] === item.data.target) {
return;
}
let params = "";
for (let i = 0; i < pathList.length; i++) {
if (i > 0) {
params += " ";
} }
params += '"' + pathList[i] + '"';
} }
if (item.data.params) { //
params += " " + item.data.params; let pathList = [];
for (const file of e.dataTransfer.files) {
pathList.push(file.path);
}
//
if (store.setting.quickSearch.useItemOpen && item && pathList.length > 0) {
//
if (pathList.length === 1 && pathList[0] === item.data.target) {
return;
}
let params = "";
for (let i = 0; i < pathList.length; i++) {
if (i > 0) {
params += " ";
}
params += '"' + pathList[i] + '"';
}
if (item.data.params) {
params += " " + item.data.params;
}
let copyItem: Item = convert(item);
copyItem.data.params = params;
//
runItem(copyItem);
} }
let copyItem: Item = convert(item);
copyItem.data.params = params;
//
runItem(copyItem);
} }
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
@ -430,7 +518,7 @@ function keydown(e: any) {
} }
// //
if (e.keyCode === 32) { if (e.keyCode === 32) {
if (!webSearch.value) { if (mode.value !== "webSearch") {
// //
if (value.value && value.value.trim() !== "") { if (value.value && value.value.trim() !== "") {
let flag = false; let flag = false;
@ -448,7 +536,7 @@ function keydown(e: any) {
: value.value; : value.value;
for (let searchSource of store.setting.webSearch.searchSourceList) { for (let searchSource of store.setting.webSearch.searchSourceList) {
if (keyword === searchSource.keyword) { if (keyword === searchSource.keyword) {
webSearch.value = true; mode.value = "webSearch";
webSearchSource.value = searchSource; webSearchSource.value = searchSource;
value.value = null; value.value = null;
resultList.value = []; resultList.value = [];
@ -461,32 +549,57 @@ function keydown(e: any) {
} }
} }
} }
if (mode.value !== "webSearch" && mode.value !== "commandLine") {
//
if (value.value && value.value.trim() !== "") {
if (value.value === ">") {
mode.value = "commandLine";
value.value = null;
resultList.value = getCommandLineItemList();
selected.value = 0;
refresh();
e.stopPropagation();
e.preventDefault();
}
}
}
} }
// enter // enter
if (e.keyCode === 13) { if (e.keyCode === 13) {
if (webSearch.value && webSearchSource.value) { if (mode.value === "webSearch" && webSearchSource.value) {
let url = webSearchSource.value.url.replace("{w}", value.value ?? ""); let url = webSearchSource.value.url.replace("{w}", value.value ?? "");
window.api.openURL(url); window.api.openURL(url);
if (store.setting.quickSearch.openAfterHideQuickSearchWindow) { if (store.setting.quickSearch.openAfterHideQuickSearchWindow) {
hide(); hide();
} }
} else if ( } else if (
!webSearch.value && mode.value === "search" &&
resultList.value.length - 1 >= selected.value resultList.value.length - 1 >= selected.value
) { ) {
runItem(resultList.value[selected.value] as Item); runItem(resultList.value[selected.value] as Item);
} else if (
mode.value === "commandLine" &&
resultList.value.length - 1 >= selected.value
) {
commandLineRun(resultList.value[selected.value].data.target!);
} }
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
} }
// 退 // 退
if (e.keyCode === 8) { if (e.keyCode === 8) {
if (webSearch.value) { if (mode.value === "webSearch") {
if (!value.value || value.value.trim() === "") { if (!value.value || value.value.trim() === "") {
webSearch.value = false; mode.value = "search";
webSearchSource.value = null; webSearchSource.value = null;
window.quickSearch.setWindowHeight(44); window.quickSearch.setWindowHeight(44);
} }
} else if (mode.value === "commandLine") {
if (!value.value || value.value.trim() === "") {
mode.value = "search";
resultList.value = [];
window.quickSearch.setWindowHeight(44);
}
} }
} }
if (showHistory.value) { if (showHistory.value) {
@ -547,7 +660,11 @@ function keydown(e: any) {
index = e.key - 1; index = e.key - 1;
} }
if (resultList.value && index < resultList.value.length) { if (resultList.value && index < resultList.value.length) {
runItem(resultList.value[index] as Item); if (mode.value === "search") {
runItem(resultList.value[index] as Item);
} else if (mode.value === "commandLine") {
commandLineRun(resultList.value[index].data.target!);
}
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
} }
@ -591,12 +708,10 @@ onMounted(() => {
// //
searchInput.value.focus(); searchInput.value.focus();
// DOM // DOM
nextTick(() => { setTimeout(() => {
setTimeout(() => { //
// window.quickSearch.showWindow();
window.quickSearch.showWindow(); }, 10);
}, 100);
});
}) })
); );
// //
@ -606,7 +721,7 @@ onMounted(() => {
value.value = null; value.value = null;
resultList.value = []; resultList.value = [];
selected.value = 0; selected.value = 0;
webSearch.value = false; mode.value = "search";
webSearchSource.value = null; webSearchSource.value = null;
}) })
); );
@ -625,6 +740,17 @@ onMounted(() => {
} }
}) })
); );
//
listens.push(
window.item.onUpdateOpenInfo((data) => {
let item = getItemById(data.id);
if (item) {
item.data.quickSearchOpenNumber = data.quickSearchOpenNumber;
item.data.quickSearchLastOpen = data.quickSearchLastOpen;
}
getHistory();
})
);
}); });
// unmounted // unmounted
onUnmounted(() => { onUnmounted(() => {

View File

@ -18,20 +18,17 @@
}" }"
> >
<div class="mx-2 whitespace-nowrap flex items-center"> <div class="mx-2 whitespace-nowrap flex items-center">
<svg <Icon size="18" v-if="mode === 'search'">
class="w-[18px] h-[18px]" <SearchOutline></SearchOutline>
:style="{ color: store.setting.appearance.theme.mainFontColor }" </Icon>
viewBox="0 0 24 24" <Icon size="18" v-if="mode === 'commandLine'">
v-if="!webSearch" <TerminalOutline></TerminalOutline>
</Icon>
<span
class="text-sm block"
v-if="mode === 'webSearch' && webSearchSource"
>{{ webSearchSource.name }}</span
> >
<path
fill="currentColor"
d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"
/>
</svg>
<span class="text-sm block" v-else-if="webSearch && webSearchSource">{{
webSearchSource.name
}}</span>
</div> </div>
<input <input
ref="searchInput" ref="searchInput"
@ -42,14 +39,7 @@
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
}" }"
:placeholder=" :placeholder="getPlaceholder()"
webSearch &&
webSearchSource &&
webSearchSource.description &&
webSearchSource.description.trim() !== ''
? webSearchSource.description
: store.language.search
"
/> />
<Icon <Icon
size="18" size="18"
@ -89,14 +79,19 @@
:item-id="item.id" :item-id="item.id"
:title="getItemTitle(item as Item)" :title="getItemTitle(item as Item)"
:index="index" :index="index"
:target="item.data.target"
> >
<CustomItemIcon :item="(item as Item)" :icon-size="32"></CustomItemIcon> <CustomItemIcon :item="(item as Item)" :icon-size="32"></CustomItemIcon>
<span <span
class="text-sm ml-2 overflow-hidden text-ellipsis whitespace-nowrap h-[20px]" class="text-sm ml-2 overflow-hidden text-ellipsis whitespace-nowrap h-[20px]"
>{{ getName(item.name) >{{ getName(item.name) }}</span
}}<span class="text-xs ml-2">{{ >
<span
v-if="mode === 'search'"
class="text-xs ml-2 max-w-[100px] flex-shrink-0"
>{{
getSearchItemClassificationName((item as Item).classificationId) getSearchItemClassificationName((item as Item).classificationId)
}}</span></span }}</span
> >
</li> </li>
</ul> </ul>
@ -130,14 +125,20 @@ import { WebSearchSource } from "../../../../types/setting";
import { convert } from "../../../../commons/utils/common"; import { convert } from "../../../../commons/utils/common";
import "simplebar"; import "simplebar";
import "simplebar/dist/simplebar.css"; import "simplebar/dist/simplebar.css";
import { itemAllRemoveStyle, searchResultDivMoveScroll } from "../js/index"; import {
getCommandLineItemList,
itemAllRemoveStyle,
searchResultDivMoveScroll,
commandLineRun,
} from "../js/index";
import { SearchOutline, TerminalOutline } from "@vicons/ionicons5";
import { useMainStore } from "../../../store"; import { useMainStore } from "../../../store";
// pinia // pinia
const store = useMainStore(); const store = useMainStore();
// //
let searchInput = ref<any>(null); let searchInput = ref<any>(null);
// //
let webSearch = ref(false); let mode = ref<"search" | "webSearch" | "commandLine">("search");
// //
let webSearchSource = ref<WebSearchSource | null>(null); let webSearchSource = ref<WebSearchSource | null>(null);
// //
@ -162,7 +163,7 @@ watch(
); );
// //
function search() { function search() {
if (!webSearch.value) { if (mode.value === "search") {
if (value.value) { if (value.value) {
resultList.value = searchItem(value.value, searchMap, 50); resultList.value = searchItem(value.value, searchMap, 50);
if (resultList.value && resultList.value.length > 0) { if (resultList.value && resultList.value.length > 0) {
@ -190,16 +191,37 @@ function runItem(e: any) {
// item // item
let itemElement = getClassElement(e, "search-result-item"); let itemElement = getClassElement(e, "search-result-item");
if (itemElement) { if (itemElement) {
// ID if (mode.value === "search") {
let itemId = parseInt(itemElement.getAttribute("item-id")); // ID
// let itemId = parseInt(itemElement.getAttribute("item-id"));
let item = getItemById(itemId); //
if (item && item.data) { let item = getItemById(itemId);
run("search", "open", item); if (item && item.data) {
run("search", "open", item);
close();
}
} else if (mode.value === "commandLine") {
//
commandLineRun(itemElement.getAttribute("target"), value.value);
close(); close();
} }
} }
} }
// placeholder
function getPlaceholder() {
let text = store.language.search;
if (
mode.value === "webSearch" &&
webSearchSource.value &&
webSearchSource.value.description &&
webSearchSource.value.description.trim() !== ""
) {
text = webSearchSource.value.description.trim();
} else if (mode.value === "commandLine") {
text = "Command Line";
}
return text;
}
// //
function close() { function close() {
store.search = false; store.search = false;
@ -217,27 +239,29 @@ watch(
function contextmenu(e: any) { function contextmenu(e: any) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
// if (mode.value === "search") {
let item: Item | null = null; //
// let item: Item | null = null;
if (getClassElement(e, "search-result-item")) { //
// if (getClassElement(e, "search-result-item")) {
// ID //
let element = getClassElement(e, "search-result-item"); // ID
// ID let element = getClassElement(e, "search-result-item");
let id = parseInt(element.getAttribute("item-id")); // ID
// let id = parseInt(element.getAttribute("item-id"));
item = convert(getItemById(id)); //
} item = convert(getItemById(id));
if (item) { }
// if (item) {
store.searchItemRightMenuItemId = item.id; //
window.item.showRightMenu({ store.searchItemRightMenuItemId = item.id;
item, window.item.showRightMenu({
x: e.screenX, item,
y: e.screenY, x: e.screenX,
type: "search", y: e.screenY,
}); type: "search",
});
}
} }
} }
function keydown(e: any) { function keydown(e: any) {
@ -275,7 +299,7 @@ function keydown(e: any) {
} }
// //
if (e.keyCode === 32) { if (e.keyCode === 32) {
if (!webSearch.value) { if (mode.value === "search") {
// //
if (value.value && value.value.trim() !== "") { if (value.value && value.value.trim() !== "") {
let flag = false; let flag = false;
@ -293,7 +317,7 @@ function keydown(e: any) {
: value.value; : value.value;
for (let searchSource of store.setting.webSearch.searchSourceList) { for (let searchSource of store.setting.webSearch.searchSourceList) {
if (keyword === searchSource.keyword) { if (keyword === searchSource.keyword) {
webSearch.value = true; mode.value = "webSearch";
webSearchSource.value = searchSource; webSearchSource.value = searchSource;
value.value = null; value.value = null;
resultList.value = []; resultList.value = [];
@ -304,29 +328,55 @@ function keydown(e: any) {
} }
} }
} }
if (mode.value !== "webSearch" && mode.value !== "commandLine") {
//
if (value.value && value.value.trim() !== "") {
if (value.value === ">") {
mode.value = "commandLine";
value.value = null;
resultList.value = getCommandLineItemList();
selected.value = 0;
e.preventDefault();
}
}
}
} }
// enter // enter
if (e.keyCode === 13) { if (e.keyCode === 13) {
if (webSearch.value && webSearchSource.value) { if (mode.value === "webSearch" && webSearchSource.value) {
let url = webSearchSource.value.url.replace("{w}", value.value ?? ""); let url = webSearchSource.value.url.replace("{w}", value.value ?? "");
window.api.openURL(url); window.api.openURL(url);
close(); close();
} else if ( } else if (
!webSearch.value && mode.value === "search" &&
resultList.value.length - 1 >= selected.value resultList.value.length - 1 >= selected.value
) { ) {
run("search", "open", resultList.value[selected.value] as Item); run("search", "open", resultList.value[selected.value] as Item);
close(); close();
} else if (
mode.value === "commandLine" &&
resultList.value.length - 1 >= selected.value
) {
commandLineRun(
resultList.value[selected.value].data.target!,
value.value
);
close();
} }
e.preventDefault(); e.preventDefault();
} }
// 退 // 退
if (e.keyCode === 8) { if (e.keyCode === 8) {
if (webSearch.value) { if (mode.value === "webSearch") {
if (!value.value || value.value.trim() === "") { if (!value.value || value.value.trim() === "") {
webSearch.value = false; mode.value = "search";
webSearchSource.value = null; webSearchSource.value = null;
} }
} else if (mode.value === "commandLine") {
if (!value.value || value.value.trim() === "") {
mode.value = "search";
resultList.value = [];
}
} }
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,11 @@
backgroundColor: store.setting.appearance.theme.mainBackgroundColor, backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
color: store.setting.appearance.theme.mainFontColor, color: store.setting.appearance.theme.mainFontColor,
height: height + 'px', height: height + 'px',
borderRadius:
store.setting.appearance.transparency < 1 &&
store.setting.appearance.windowRounded
? '8px'
: undefined,
}" }"
> >
<div class="flex items-center px-2 app-region-drag"> <div class="flex items-center px-2 app-region-drag">
@ -63,7 +68,7 @@
size="small" size="small"
> >
<span class="block font-semibold">{{ <span class="block font-semibold">{{
store.language.startup store.language.system
}}</span> }}</span>
<NFormItem class="mt-1"> <NFormItem class="mt-1">
<NCheckbox <NCheckbox
@ -88,6 +93,14 @@
>{{ store.language.hideTray }}</NCheckbox >{{ store.language.hideTray }}</NCheckbox
></NFormItem ></NFormItem
> >
<NFormItem
><NCheckbox
v-model:checked="setting.general.hideTaskbar"
:focusable="false"
@update:checked="setTaskbar"
>{{ store.language.hideTaskbar }}</NCheckbox
></NFormItem
>
</NForm> </NForm>
<NForm <NForm
label-placement="left" label-placement="left"
@ -393,47 +406,95 @@
<span class="block font-semibold">{{ <span class="block font-semibold">{{
store.language.color store.language.color
}}</span> }}</span>
<NFormItem class="mt-1" :label="store.language.mainColor"> <div
<NColorPicker :class="[
:modes="['hex']" `${
v-model:value="mainBackgroundColor" store.setting.general.language !== 'English'
@complete="changeMainBackgroundColor" ? 'flex items-center'
:to="false" : ''
></NColorPicker> }`,
</NFormItem> ]"
<NFormItem class="mt-1" :label="store.language.secondaryColor">
<NColorPicker
:modes="['hex']"
v-model:value="secondBackgroundColor"
@complete="changeSecondBackgroundColor"
:to="false"
></NColorPicker>
</NFormItem>
<NFormItem class="mt-1" :label="store.language.fontMainColor">
<NColorPicker
:modes="['hex']"
v-model:value="mainFontColor"
@complete="changeMainFontColor"
:to="false"
></NColorPicker>
</NFormItem>
<NFormItem
class="mt-1"
:label="store.language.fontSecondaryColor"
> >
<NColorPicker <NFormItem
:modes="['hex']" class="mt-1 flex-1"
v-model:value="secondFontColor" :label="store.language.mainColor"
@complete="changeSecondFontColor" >
:to="false" <NColorPicker
></NColorPicker> :modes="['hex']"
</NFormItem> v-model:value="mainBackgroundColor"
@complete="changeMainBackgroundColor"
:to="false"
:show-alpha="false"
></NColorPicker>
</NFormItem>
<NFormItem
class="mt-1 flex-1"
:label="store.language.fontMainColor"
:class="[
`${
store.setting.general.language !== 'English'
? 'ml-[10px]'
: ''
}`,
]"
>
<NColorPicker
:modes="['hex']"
v-model:value="mainFontColor"
@complete="changeMainFontColor"
:to="false"
:show-alpha="false"
></NColorPicker>
</NFormItem>
</div>
<div
:class="[
`${
store.setting.general.language !== 'English'
? 'flex items-center'
: ''
}`,
]"
>
<NFormItem
class="mt-1 flex-1"
:label="store.language.secondaryColor"
>
<NColorPicker
:modes="['hex']"
v-model:value="secondBackgroundColor"
@complete="changeSecondBackgroundColor"
:to="false"
:show-alpha="false"
></NColorPicker>
</NFormItem>
<NFormItem
class="mt-1 flex-1"
:label="store.language.fontSecondaryColor"
:class="[
`${
store.setting.general.language !== 'English'
? 'ml-[10px]'
: ''
}`,
]"
>
<NColorPicker
:modes="['hex']"
v-model:value="secondFontColor"
@complete="changeSecondFontColor"
:to="false"
:show-alpha="false"
></NColorPicker>
</NFormItem>
</div>
<NFormItem class="mt-1" :label="store.language.borderColor"> <NFormItem class="mt-1" :label="store.language.borderColor">
<NColorPicker <NColorPicker
:modes="['hex']" :modes="['hex']"
v-model:value="borderColor" v-model:value="borderColor"
@complete="changeBorderColor" @complete="changeBorderColor"
:to="false" :to="false"
:show-alpha="false"
></NColorPicker> ></NColorPicker>
</NFormItem> </NFormItem>
</NForm> </NForm>
@ -443,28 +504,39 @@
size="small" size="small"
class="mt-3" class="mt-3"
> >
<span class="block font-semibold" <span class="block font-semibold">{{
>{{ store.language.backgroundTransparent }}({{ store.language.backgroundTransparent
transparency }}</span>
}})</span <NFormItem class="mt-1">
> <NRadio
<NFormItem> :checked="setting.appearance.transparency === 1"
<input :value="false"
type="range" @change="changeTransparency"
v-model="transparency" >{{ store.language.notTransparent }}</NRadio
min="0.1" >
max="1.0" <NRadio
step="0.01" :checked="setting.appearance.transparency < 1"
class="mt-2 w-full range" :value="true"
@change="setTransparency" @change="changeTransparency"
/> >{{ store.language.transparent }}</NRadio
>
</NFormItem> </NFormItem>
<NSlider
v-if="setting.appearance.transparency < 1"
class="mt-1"
v-model:value="transparency"
:step="0.01"
:min="0.1"
:max="0.99"
:on-dragend="setTransparency"
:keyboard="false"
></NSlider>
</NForm> </NForm>
<NForm <NForm
label-placement="left" label-placement="left"
:show-feedback="false" :show-feedback="false"
size="small" size="small"
class="mt-1" class="mt-3"
> >
<span class="block font-semibold">{{ <span class="block font-semibold">{{
store.language.backgroundImage store.language.backgroundImage
@ -499,21 +571,18 @@
class="mt-3" class="mt-3"
v-if="setting.appearance.backgroundImage && store.backgroundImage" v-if="setting.appearance.backgroundImage && store.backgroundImage"
> >
<span class="block font-semibold" <span class="block font-semibold">{{
>{{ store.language.backgroundImageTransparent }}({{ store.language.backgroundImageTransparent
setting.appearance.backgroundImageTransparency }}</span>
}})</span
>
<NFormItem> <NFormItem>
<input <NSlider
type="range" v-model:value="backgroundImageTransparency"
v-model="backgroundImageTransparency" :step="0.01"
min="0.1" :min="0.1"
max="1.0" :max="1.0"
step="0.01" :on-dragend="setBackgroundImageTransparency"
class="mt-2 w-full range" :keyboard="false"
@change="setBackgroundImageTransparency" ></NSlider>
/>
</NFormItem> </NFormItem>
</NForm> </NForm>
<NForm <NForm
@ -542,7 +611,7 @@
v-if="setting.appearance.backgroundImage && store.backgroundImage" v-if="setting.appearance.backgroundImage && store.backgroundImage"
> >
<span class="block font-semibold">{{ <span class="block font-semibold">{{
store.language.backgroundImagePostion store.language.backgroundImagePosition
}}</span> }}</span>
<NFormItem class="mt-2"> <NFormItem class="mt-2">
<NSelect <NSelect
@ -771,6 +840,13 @@
<div class="mx-2" v-if="selectedMenuId === 3"> <div class="mx-2" v-if="selectedMenuId === 3">
<NForm label-placement="left" :show-feedback="false" size="small"> <NForm label-placement="left" :show-feedback="false" size="small">
<span class="block font-semibold">{{ store.language.name }}</span> <span class="block font-semibold">{{ store.language.name }}</span>
<NFormItem :label="store.language.align" class="mt-1">
<NSelect
v-model:value="setting.subClassification.itemAreaNameAlign"
:options="itemAreaSubclassificationNameAlignOptions"
size="small"
></NSelect>
</NFormItem>
<NFormItem :label="store.language.fontSize" class="mt-1"> <NFormItem :label="store.language.fontSize" class="mt-1">
<NInputNumber <NInputNumber
v-model:value="setting.subClassification.itemAreaNameFontSize" v-model:value="setting.subClassification.itemAreaNameFontSize"
@ -857,21 +933,18 @@
size="small" size="small"
class="mt-3" class="mt-3"
> >
<span class="block font-semibold" <span class="block font-semibold">{{
>{{ store.language.columnNumber }}({{ store.language.columnNumber
setting.item.columnNumber }}</span>
}})</span
>
<NFormItem> <NFormItem>
<input <NSlider
type="range" v-model:value="columnNumber"
v-model="columnNumber" :step="1"
min="1" :min="1"
max="20" :max="20"
step="1" :on-dragend="setColumnNumber"
class="mt-2 w-full range" :keyboard="false"
@change="setColumnNumber" ></NSlider>
/>
</NFormItem> </NFormItem>
<Desc <Desc
class="mt-1" class="mt-1"
@ -968,7 +1041,24 @@
v-model:checked="setting.item.openNumber" v-model:checked="setting.item.openNumber"
:focusable="false" :focusable="false"
@update:checked="setOpenNumber" @update:checked="setOpenNumber"
>{{ store.language.recordOpenNumber }}</NCheckbox >{{ store.language.recordOpenCount }}</NCheckbox
>
</NFormItem>
</NForm>
<NForm
label-placement="left"
:show-feedback="false"
size="small"
class="mt-3"
>
<span class="block font-semibold">{{
store.language.prompt
}}</span>
<NFormItem class="mt-1">
<NCheckbox
v-model:checked="setting.item.promptShowPath"
:focusable="false"
>{{ store.language.showPath }}</NCheckbox
> >
</NFormItem> </NFormItem>
</NForm> </NForm>
@ -1000,6 +1090,7 @@
<NCheckbox <NCheckbox
v-model:checked="setting.quickSearch.enable" v-model:checked="setting.quickSearch.enable"
:focusable="false" :focusable="false"
@update:checked="setEnable"
>{{ store.language.useQuickSearch }}</NCheckbox >{{ store.language.useQuickSearch }}</NCheckbox
> >
</NFormItem> </NFormItem>
@ -1051,6 +1142,25 @@
> >
</div> </div>
</NForm> </NForm>
<NForm
label-placement="left"
:show-feedback="false"
size="small"
class="mt-3"
>
<span class="block font-semibold">{{ store.language.size }}</span>
<NFormItem :label="store.language.width" class="mt-1">
<NInputNumber
v-model:value="setting.quickSearch.width"
size="small"
:min="0"
class="w-full"
placeholder=""
:show-button="false"
@update:value="updateQuickSearchWidth"
></NInputNumber>
</NFormItem>
</NForm>
<NForm <NForm
label-placement="left" label-placement="left"
:show-feedback="false" :show-feedback="false"
@ -1188,7 +1298,7 @@
:style="{ :style="{
backgroundColor: hexToRGBA( backgroundColor: hexToRGBA(
setting.appearance.theme.secondBackgroundColor, setting.appearance.theme.secondBackgroundColor,
0.8 0.7
), ),
color: setting.appearance.theme.secondFontColor, color: setting.appearance.theme.secondFontColor,
}" }"
@ -1231,7 +1341,7 @@
searchSourceId === item.id searchSourceId === item.id
? hexToRGBA( ? hexToRGBA(
setting.appearance.theme.secondBackgroundColor, setting.appearance.theme.secondBackgroundColor,
0.8 0.7
) )
: undefined, : undefined,
color: color:
@ -1248,7 +1358,7 @@
'background-color', 'background-color',
hexToRGBA( hexToRGBA(
setting.appearance.theme.secondBackgroundColor, setting.appearance.theme.secondBackgroundColor,
0.8 0.7
), ),
], ],
['color', setting.appearance.theme.secondFontColor], ['color', setting.appearance.theme.secondFontColor],
@ -1386,6 +1496,24 @@
</NForm> </NForm>
</div> </div>
<div class="mx-2" v-if="selectedMenuId === 7"> <div class="mx-2" v-if="selectedMenuId === 7">
<NForm label-placement="left" :show-feedback="false" size="small">
<span class="block font-semibold">{{
store.language.default
}}</span>
<NFormItem class="mt-2">
<NSelect
v-model:value="setting.commandLine.defaultUse"
:options="commandLineDefultUseOptions"
size="small"
></NSelect>
</NFormItem>
<Desc
class="mt-2"
:content="store.language.commandLinePrompt1"
></Desc>
</NForm>
</div>
<div class="mx-2" v-if="selectedMenuId === 8">
<NForm label-placement="left" :show-feedback="false" size="small"> <NForm label-placement="left" :show-feedback="false" size="small">
<span class="block font-semibold">{{ <span class="block font-semibold">{{
store.language.proxy store.language.proxy
@ -1449,6 +1577,8 @@ import {
NColorPicker, NColorPicker,
NInputNumber, NInputNumber,
NSelect, NSelect,
NRadio,
NSlider,
} from "naive-ui"; } from "naive-ui";
import SimpleBar from "simplebar"; import SimpleBar from "simplebar";
import "simplebar/dist/simplebar.css"; import "simplebar/dist/simplebar.css";
@ -1535,6 +1665,10 @@ let menuList = [
}, },
{ {
id: 7, id: 7,
label: store.language.commandLine,
},
{
id: 8,
label: store.language.network, label: store.language.network,
}, },
]; ];
@ -1771,6 +1905,21 @@ let backgroundImagePositionOptions = ref([
value: "right", value: "right",
}, },
]); ]);
//
let itemAreaSubclassificationNameAlignOptions = ref([
{
label: store.language.left,
value: "left",
},
{
label: store.language.center,
value: "center",
},
{
label: store.language.right,
value: "right",
},
]);
// //
watch( watch(
() => setting.value, () => setting.value,
@ -1812,6 +1961,10 @@ function setStartup(value: boolean) {
function setTray(value: boolean) { function setTray(value: boolean) {
window.setting.setTray(!value); window.setting.setTray(!value);
} }
//
function setTaskbar(value: boolean) {
window.setting.setTaskbar(value);
}
// //
async function checkGeneralShowHideShortcutKey() { async function checkGeneralShowHideShortcutKey() {
let success = true; let success = true;
@ -1971,6 +2124,14 @@ function changeFontShadowColor(value: string) {
} }
// //
let transparency = ref(setting.value.appearance.transparency); let transparency = ref(setting.value.appearance.transparency);
function changeTransparency(e: Event) {
let val = (e.target as HTMLInputElement).value;
if (val === "true") {
setting.value.appearance.transparency = 0.9;
} else {
setting.value.appearance.transparency = 1;
}
}
function setTransparency() { function setTransparency() {
setting.value.appearance.transparency = Number(transparency.value); setting.value.appearance.transparency = Number(transparency.value);
} }
@ -2018,6 +2179,11 @@ function setCheckInvalidItem(value: boolean) {
function setOpenNumber(value: boolean) { function setOpenNumber(value: boolean) {
window.setting.setOpenNumber(value); window.setting.setOpenNumber(value);
} }
//
function setEnable() {
//
window.setting.setShortcutKey(convert(setting.value));
}
// //
let quickSearchShortcutKeyOpenOptions = ref([ let quickSearchShortcutKeyOpenOptions = ref([
{ {
@ -2044,10 +2210,16 @@ let quickSearchHistorySortOptions = ref([
value: "lastOpen", value: "lastOpen",
}, },
{ {
label: store.language.byOpenNumber, label: store.language.byOpenCount,
value: "openNumber", value: "openNumber",
}, },
]); ]);
//
function updateQuickSearchWidth(value: number | null) {
if (value) {
window.quickSearch.setWindowWidth(value);
}
}
// //
let webSearchModeOptions = ref([ let webSearchModeOptions = ref([
{ {
@ -2071,7 +2243,7 @@ let searchSourceName = ref<string | null>(null);
let searchSourceURL = ref<string | null>(null); let searchSourceURL = ref<string | null>(null);
// //
let searchSourceDescription = ref<string | null>(null); let searchSourceDescription = ref<string | null>(null);
// //
function showAddSearchSource() { function showAddSearchSource() {
searchSourceType.value = "add"; searchSourceType.value = "add";
searchSourceId.value = null; searchSourceId.value = null;
@ -2179,6 +2351,17 @@ function closeSaveSearchSource() {
searchSourceURL.value = null; searchSourceURL.value = null;
searchSourceDescription.value = null; searchSourceDescription.value = null;
} }
// 使
let commandLineDefultUseOptions = ref([
{
label: store.language.commandPrompt,
value: "cmd",
},
{
label: store.language.powerShell,
value: "powershell",
},
]);
// //
let height = ref(0); let height = ref(0);
// //

View File

@ -75,7 +75,7 @@ input::-webkit-inner-spin-button {
} }
.item-name-tile-2 { .item-name-tile-2 {
word-break: break-all; word-break: break-word;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
@ -85,8 +85,7 @@ input::-webkit-inner-spin-button {
} }
.item-name-tile-2-no-ellipsis { .item-name-tile-2-no-ellipsis {
max-height: 40px; word-break: break-word;
word-break: break-all;
overflow: hidden; overflow: hidden;
} }
@ -101,7 +100,6 @@ input::-webkit-inner-spin-button {
} }
.item-name-tile-1-no-ellipsis { .item-name-tile-1-no-ellipsis {
max-height: 20px;
word-break: break-all; word-break: break-all;
overflow: hidden; overflow: hidden;
} }
@ -117,7 +115,6 @@ input::-webkit-inner-spin-button {
} }
.item-name-list-no-ellipsis { .item-name-list-no-ellipsis {
max-height: 20px;
word-break: break-all; word-break: break-all;
overflow: hidden; overflow: hidden;
} }

View File

@ -105,6 +105,7 @@ function checkKeyCode(e: any) {
// e.keyCode == 16 Shift // e.keyCode == 16 Shift
// e.keyCode == 17 Control // e.keyCode == 17 Control
// e.keyCode == 18 Alt // e.keyCode == 18 Alt
// e.keyCode == 91 Mate(Win)
// e.keyCode == 20 Cape Lock 大小写 // e.keyCode == 20 Cape Lock 大小写
// e.keyCode == 27 Esc // e.keyCode == 27 Esc
// (e.keyCode >= 32 && e.keyCode <= 40) 控制键盘区 // (e.keyCode >= 32 && e.keyCode <= 40) 控制键盘区
@ -125,6 +126,7 @@ function checkKeyCode(e: any) {
e.keyCode === 16 || e.keyCode === 16 ||
e.keyCode === 17 || e.keyCode === 17 ||
e.keyCode === 18 || e.keyCode === 18 ||
e.keyCode === 91 ||
e.keyCode === 20 || e.keyCode === 20 ||
e.keyCode === 27 || e.keyCode === 27 ||
(e.keyCode >= 32 && e.keyCode <= 40) || (e.keyCode >= 32 && e.keyCode <= 40) ||

View File

@ -26,6 +26,19 @@ async function checkShortcutKey(
| "GeneralSearch" | "GeneralSearch"
| "QuickSearch" | "QuickSearch"
): Promise<boolean> { ): Promise<boolean> {
if (shortcutKey) {
// 校验是否有特殊字符
for (let i = 0; i < shortcutKey.length; i++) {
let charCode = shortcutKey.charCodeAt(i);
if (charCode < 0 || charCode > 127) {
window.api.showErrorMessageBox(
windowName,
store.language.shortcutKeyPrompt7
);
return false;
}
}
}
// 校验完整性 // 校验完整性
if (!checkShortcutKeyComplete(shortcutKey)) { if (!checkShortcutKeyComplete(shortcutKey)) {
window.api.showErrorMessageBox( window.api.showErrorMessageBox(

16
types/setting.d.ts vendored
View File

@ -20,6 +20,8 @@ export interface General {
hideLoseFocus: boolean; hideLoseFocus: boolean;
// 隐藏托盘图标 // 隐藏托盘图标
hideTray: boolean; hideTray: boolean;
// 隐藏任务栏
hideTaskbar: boolean;
// 固定位置 // 固定位置
fixedPosition: boolean; fixedPosition: boolean;
// 永远居中 // 永远居中
@ -118,6 +120,8 @@ export interface SubClassification {
itemAreaNameFontWeight: number; itemAreaNameFontWeight: number;
// 名称字体行高(项目区域) // 名称字体行高(项目区域)
itemAreaNameFontLineHeight: number; itemAreaNameFontLineHeight: number;
// 名称对齐(项目区域)
itemAreaNameAlign: "left" | "center" | "right";
} }
// 项目 // 项目
@ -152,6 +156,8 @@ export interface Item {
fontWeight: number; fontWeight: number;
// 字体行高 // 字体行高
fontLineHeight: number; fontLineHeight: number;
// 提示:显示路径
promptShowPath: boolean;
} }
// 快速搜索 // 快速搜索
@ -176,6 +182,8 @@ export interface QuickSearch {
openAfterHideQuickSearchWindow: boolean; openAfterHideQuickSearchWindow: boolean;
// 匹配条件:备注 // 匹配条件:备注
matchConditionsRemark: boolean; matchConditionsRemark: boolean;
// 宽度
width: number;
} }
// 网络搜索 // 网络搜索
@ -186,6 +194,12 @@ export interface WebSearch {
searchSourceList: Array<WebSearchSource>; searchSourceList: Array<WebSearchSource>;
} }
// 命令行
export interface CommandLine {
// 默认使用
defaultUse: string;
}
// 网络搜索源 // 网络搜索源
export interface WebSearchSource { export interface WebSearchSource {
// ID // ID
@ -234,6 +248,8 @@ export interface Setting {
quickSearch: QuickSearch; quickSearch: QuickSearch;
// 网络搜索 // 网络搜索
webSearch: WebSearch; webSearch: WebSearch;
// 命令行
commandLine: CommandLine;
// 网络 // 网络
network: Network; network: Network;
} }

467
yarn.lock
View File

@ -2,10 +2,10 @@
# yarn lockfile v1 # yarn lockfile v1
"7zip-bin@~5.1.1": "7zip-bin@~5.2.0":
version "5.1.1" version "5.2.0"
resolved "https://registry.npmmirror.com/7zip-bin/-/7zip-bin-5.1.1.tgz#9274ec7460652f9c632c59addf24efb1684ef876" resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-5.2.0.tgz#7a03314684dd6572b7dfa89e68ce31d60286854d"
integrity sha512-sAP4LldeWNz0lNzmTird3uWfFDWWTeg6V/MsmyyLR9X1idwKBWIgt/ZvinqQldJm3LecKEs1emkbquO6PCiLVQ== integrity sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A==
"@alloc/quick-lru@^5.2.0": "@alloc/quick-lru@^5.2.0":
version "5.2.0" version "5.2.0"
@ -17,6 +17,11 @@
resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==
"@babel/parser@^7.24.4":
version "7.24.5"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790"
integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==
"@babel/runtime@^7.21.0": "@babel/runtime@^7.21.0":
version "7.23.2" version "7.23.2"
resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885" resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885"
@ -24,6 +29,11 @@
dependencies: dependencies:
regenerator-runtime "^0.14.0" regenerator-runtime "^0.14.0"
"@canvas/image-data@^1.0.0":
version "1.0.0"
resolved "https://registry.npmmirror.com/@canvas/image-data/-/image-data-1.0.0.tgz#3bd2cd856e13fc9e2c25feff360a4056857b0367"
integrity sha512-BxOqI5LgsIQP1odU5KMwV9yoijleOPzHL18/YvNqF9KFSGF2K/DLlYAbDQsWqd/1nbaFuSkYD/191dpMtNh4vw==
"@css-render/plugin-bem@^0.15.12": "@css-render/plugin-bem@^0.15.12":
version "0.15.12" version "0.15.12"
resolved "https://registry.npmmirror.com/@css-render/plugin-bem/-/plugin-bem-0.15.12.tgz#cd88e46a388e4786436bd622414da0aa6019af3b" resolved "https://registry.npmmirror.com/@css-render/plugin-bem/-/plugin-bem-0.15.12.tgz#cd88e46a388e4786436bd622414da0aa6019af3b"
@ -66,10 +76,10 @@
optionalDependencies: optionalDependencies:
global-agent "^3.0.0" global-agent "^3.0.0"
"@electron/notarize@2.1.0": "@electron/notarize@2.2.1":
version "2.1.0" version "2.2.1"
resolved "https://registry.npmmirror.com/@electron/notarize/-/notarize-2.1.0.tgz#76aaec10c8687225e8d0a427cc9df67611c46ff3" resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.2.1.tgz#d0aa6bc43cba830c41bfd840b85dbe0e273f59fe"
integrity sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA== integrity sha512-aL+bFMIkpR0cmmj5Zgy0LMKEpgy43/hw5zadEArgmAMWWlKc5buwFvFT9G/o/YJkvXAJm5q3iuTuLaiaXW39sg==
dependencies: dependencies:
debug "^4.1.1" debug "^4.1.1"
fs-extra "^9.0.1" fs-extra "^9.0.1"
@ -87,10 +97,10 @@
minimist "^1.2.6" minimist "^1.2.6"
plist "^3.0.5" plist "^3.0.5"
"@electron/universal@1.4.1": "@electron/universal@1.5.1":
version "1.4.1" version "1.5.1"
resolved "https://registry.npmmirror.com/@electron/universal/-/universal-1.4.1.tgz#3fbda2a5ed9ff9f3304c8e8316b94c1e3a7b3785" resolved "https://registry.yarnpkg.com/@electron/universal/-/universal-1.5.1.tgz#f338bc5bcefef88573cf0ab1d5920fac10d06ee5"
integrity sha512-lE/U3UNw1YHuowNbTmKNs9UlS3En3cPgwM5MI+agIgr/B1hSze9NdOP0qn7boZaI9Lph8IDv3/24g9IxnJP7aQ== integrity sha512-kbgXxyEauPJiQQUNG2VgUeyfQNFk6hBF11ISN2PNI6agUgPl55pv4eQmaqHzTAzchBvqZ2tQuRVaPStGf0mxGw==
dependencies: dependencies:
"@electron/asar" "^3.2.1" "@electron/asar" "^3.2.1"
"@malept/cross-spawn-promise" "^1.1.0" "@malept/cross-spawn-promise" "^1.1.0"
@ -215,6 +225,21 @@
resolved "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" resolved "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d"
integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==
"@jimp/bmp@^0.22.10":
version "0.22.12"
resolved "https://registry.npmmirror.com/@jimp/bmp/-/bmp-0.22.12.tgz#0316044dc7b1a90274aef266d50349347fb864d4"
integrity sha512-aeI64HD0npropd+AR76MCcvvRaa+Qck6loCOS03CkkxGHN5/r336qTM5HPUdHKMDOGzqknuVPA8+kK1t03z12g==
dependencies:
"@jimp/utils" "^0.22.12"
bmp-js "^0.1.0"
"@jimp/utils@^0.22.12":
version "0.22.12"
resolved "https://registry.npmmirror.com/@jimp/utils/-/utils-0.22.12.tgz#8ffaed8f2dc2962539ccaf14727ac60793c7a537"
integrity sha512-yJ5cWUknGnilBq97ZXOyOS0HhsHOyAyjHwYfHxGbSyMTohgQI6sVyE8KPgDwH8HHW/nMKXk8TrSwAE71zt716Q==
dependencies:
regenerator-runtime "^0.13.3"
"@jridgewell/gen-mapping@^0.3.2": "@jridgewell/gen-mapping@^0.3.2":
version "0.3.3" version "0.3.3"
resolved "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" resolved "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098"
@ -307,6 +332,11 @@
dependencies: dependencies:
defer-to-connect "^2.0.0" defer-to-connect "^2.0.0"
"@tokenizer/token@^0.3.0":
version "0.3.0"
resolved "https://registry.npmmirror.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276"
integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==
"@tootallnate/once@2": "@tootallnate/once@2":
version "2.0.0" version "2.0.0"
resolved "https://registry.npmmirror.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" resolved "https://registry.npmmirror.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
@ -475,6 +505,11 @@
dependencies: dependencies:
"@types/node" "*" "@types/node" "*"
"@vicons/ionicons5@^0.12.0":
version "0.12.0"
resolved "https://registry.npmmirror.com/@vicons/ionicons5/-/ionicons5-0.12.0.tgz#c39fda04420dfae3b58053faf8aaf3555253299d"
integrity sha512-Iy1EUVRpX0WWxeu1VIReR1zsZLMc4fqpt223czR+Rpnrwu7pt46nbnC2ycO7ItI/uqDLJxnbcMC7FujKs9IfFA==
"@vicons/material@^0.12.0": "@vicons/material@^0.12.0":
version "0.12.0" version "0.12.0"
resolved "https://registry.npmmirror.com/@vicons/material/-/material-0.12.0.tgz#068e72fa40bd7f780af5fc68011fb69010c8e0b5" resolved "https://registry.npmmirror.com/@vicons/material/-/material-0.12.0.tgz#068e72fa40bd7f780af5fc68011fb69010c8e0b5"
@ -524,7 +559,26 @@
estree-walker "^2.0.2" estree-walker "^2.0.2"
source-map-js "^1.0.2" source-map-js "^1.0.2"
"@vue/compiler-dom@3.3.7", "@vue/compiler-dom@^3.3.0": "@vue/compiler-core@3.4.26":
version "3.4.26"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.4.26.tgz#d507886520e83a6f8339ed55ed0b2b5d84b44b73"
integrity sha512-N9Vil6Hvw7NaiyFUFBPXrAyETIGlQ8KcFMkyk6hW1Cl6NvoqvP+Y8p1Eqvx+UdqsnrnI9+HMUEJegzia3mhXmQ==
dependencies:
"@babel/parser" "^7.24.4"
"@vue/shared" "3.4.26"
entities "^4.5.0"
estree-walker "^2.0.2"
source-map-js "^1.2.0"
"@vue/compiler-dom@3.4.26":
version "3.4.26"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.4.26.tgz#acc7b788b48152d087d4bb9e655b795e3dbec554"
integrity sha512-4CWbR5vR9fMg23YqFOhr6t6WB1Fjt62d6xdFPyj8pxrYub7d+OgZaObMsoxaF9yBUHPMiPFK303v61PwAuGvZA==
dependencies:
"@vue/compiler-core" "3.4.26"
"@vue/shared" "3.4.26"
"@vue/compiler-dom@^3.3.0":
version "3.3.7" version "3.3.7"
resolved "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.3.7.tgz#a245aa03f9bfcdb537a239bf02842072de0644c9" resolved "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.3.7.tgz#a245aa03f9bfcdb537a239bf02842072de0644c9"
integrity sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw== integrity sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw==
@ -532,29 +586,28 @@
"@vue/compiler-core" "3.3.7" "@vue/compiler-core" "3.3.7"
"@vue/shared" "3.3.7" "@vue/shared" "3.3.7"
"@vue/compiler-sfc@3.3.7": "@vue/compiler-sfc@3.4.26":
version "3.3.7" version "3.4.26"
resolved "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.3.7.tgz#219d04b3013c7b15fbc536e2279e07810b731cc2" resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.4.26.tgz#c679f206829954c3c078d8a9be76d0098b8377ae"
integrity sha512-7pfldWy/J75U/ZyYIXRVqvLRw3vmfxDo2YLMwVtWVNew8Sm8d6wodM+OYFq4ll/UxfqVr0XKiVwti32PCrruAw== integrity sha512-It1dp+FAOCgluYSVYlDn5DtZBxk1NCiJJfu2mlQqa/b+k8GL6NG/3/zRbJnHdhV2VhxFghaDq5L4K+1dakW6cw==
dependencies: dependencies:
"@babel/parser" "^7.23.0" "@babel/parser" "^7.24.4"
"@vue/compiler-core" "3.3.7" "@vue/compiler-core" "3.4.26"
"@vue/compiler-dom" "3.3.7" "@vue/compiler-dom" "3.4.26"
"@vue/compiler-ssr" "3.3.7" "@vue/compiler-ssr" "3.4.26"
"@vue/reactivity-transform" "3.3.7" "@vue/shared" "3.4.26"
"@vue/shared" "3.3.7"
estree-walker "^2.0.2" estree-walker "^2.0.2"
magic-string "^0.30.5" magic-string "^0.30.10"
postcss "^8.4.31" postcss "^8.4.38"
source-map-js "^1.0.2" source-map-js "^1.2.0"
"@vue/compiler-ssr@3.3.7": "@vue/compiler-ssr@3.4.26":
version "3.3.7" version "3.4.26"
resolved "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.3.7.tgz#eff4a70f7ceb800d60e68d208b96a030c0f1b636" resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.4.26.tgz#22842d8adfff972d87bb798b8d496111f7f814b5"
integrity sha512-TxOfNVVeH3zgBc82kcUv+emNHo+vKnlRrkv8YvQU5+Y5LJGJwSNzcmLUoxD/dNzv0bhQ/F0s+InlgV0NrApJZg== integrity sha512-FNwLfk7LlEPRY/g+nw2VqiDKcnDTVdCfBREekF8X74cPLiWHUX6oldktf/Vx28yh4STNy7t+/yuLoMBBF7YDiQ==
dependencies: dependencies:
"@vue/compiler-dom" "3.3.7" "@vue/compiler-dom" "3.4.26"
"@vue/shared" "3.3.7" "@vue/shared" "3.4.26"
"@vue/devtools-api@^6.5.0": "@vue/devtools-api@^6.5.0":
version "6.5.1" version "6.5.1"
@ -575,54 +628,48 @@
muggle-string "^0.3.1" muggle-string "^0.3.1"
vue-template-compiler "^2.7.14" vue-template-compiler "^2.7.14"
"@vue/reactivity-transform@3.3.7": "@vue/reactivity@3.4.26":
version "3.3.7" version "3.4.26"
resolved "https://registry.npmmirror.com/@vue/reactivity-transform/-/reactivity-transform-3.3.7.tgz#eb9f5110af5085079b851d162205394bc790d539" resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.4.26.tgz#1191f543809d4c93e5b3e842ba83022350a3f205"
integrity sha512-APhRmLVbgE1VPGtoLQoWBJEaQk4V8JUsqrQihImVqKT+8U6Qi3t5ATcg4Y9wGAPb3kIhetpufyZ1RhwbZCIdDA== integrity sha512-E/ynEAu/pw0yotJeLdvZEsp5Olmxt+9/WqzvKff0gE67tw73gmbx6tRkiagE/eH0UCubzSlGRebCbidB1CpqZQ==
dependencies: dependencies:
"@babel/parser" "^7.23.0" "@vue/shared" "3.4.26"
"@vue/compiler-core" "3.3.7"
"@vue/shared" "3.3.7"
estree-walker "^2.0.2"
magic-string "^0.30.5"
"@vue/reactivity@3.3.7": "@vue/runtime-core@3.4.26":
version "3.3.7" version "3.4.26"
resolved "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.3.7.tgz#48b6671a45ba33039da2c0eb25ae702f924486a9" resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.4.26.tgz#51ee971cb700370a67e5a510c4a84eff7491d658"
integrity sha512-cZNVjWiw00708WqT0zRpyAgduG79dScKEPYJXq2xj/aMtk3SKvL3FBt2QKUlh6EHBJ1m8RhBY+ikBUzwc7/khg== integrity sha512-AFJDLpZvhT4ujUgZSIL9pdNcO23qVFh7zWCsNdGQBw8ecLNxOOnPcK9wTTIYCmBJnuPHpukOwo62a2PPivihqw==
dependencies: dependencies:
"@vue/shared" "3.3.7" "@vue/reactivity" "3.4.26"
"@vue/shared" "3.4.26"
"@vue/runtime-core@3.3.7": "@vue/runtime-dom@3.4.26":
version "3.3.7" version "3.4.26"
resolved "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.3.7.tgz#c1eece1c98f936dc69dd0667d11b464579b128fd" resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.4.26.tgz#179aa7c8dc964112e6d096bc8ec5f361111009a1"
integrity sha512-LHq9du3ubLZFdK/BP0Ysy3zhHqRfBn80Uc+T5Hz3maFJBGhci1MafccnL3rpd5/3wVfRHAe6c+PnlO2PAavPTQ== integrity sha512-UftYA2hUXR2UOZD/Fc3IndZuCOOJgFxJsWOxDkhfVcwLbsfh2CdXE2tG4jWxBZuDAs9J9PzRTUFt1PgydEtItw==
dependencies: dependencies:
"@vue/reactivity" "3.3.7" "@vue/runtime-core" "3.4.26"
"@vue/shared" "3.3.7" "@vue/shared" "3.4.26"
csstype "^3.1.3"
"@vue/runtime-dom@3.3.7": "@vue/server-renderer@3.4.26":
version "3.3.7" version "3.4.26"
resolved "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.3.7.tgz#e7cf88cc01591fdf6e3164825554fdadc3137ffc" resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.4.26.tgz#6d0c6b0366bfe0232579aea00e3ff6784e5a1c60"
integrity sha512-PFQU1oeJxikdDmrfoNQay5nD4tcPNYixUBruZzVX/l0eyZvFKElZUjW4KctCcs52nnpMGO6UDK+jF5oV4GT5Lw== integrity sha512-xoGAqSjYDPGAeRWxeoYwqJFD/gw7mpgzOvSxEmjWaFO2rE6qpbD1PC172YRpvKhrihkyHJkNDADFXTfCyVGhKw==
dependencies: dependencies:
"@vue/runtime-core" "3.3.7" "@vue/compiler-ssr" "3.4.26"
"@vue/shared" "3.3.7" "@vue/shared" "3.4.26"
csstype "^3.1.2"
"@vue/server-renderer@3.3.7":
version "3.3.7"
resolved "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.3.7.tgz#0cc3dc6ad39a54693e6e8f853caa3c7bb43b0364"
integrity sha512-UlpKDInd1hIZiNuVVVvLgxpfnSouxKQOSE2bOfQpBuGwxRV/JqqTCyyjXUWiwtVMyeRaZhOYYqntxElk8FhBhw==
dependencies:
"@vue/compiler-ssr" "3.3.7"
"@vue/shared" "3.3.7"
"@vue/shared@3.3.7", "@vue/shared@^3.3.0": "@vue/shared@3.3.7", "@vue/shared@^3.3.0":
version "3.3.7" version "3.3.7"
resolved "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.7.tgz#0091852fe5cc4237c8440fe32f3ab6bc920ae6d9" resolved "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.7.tgz#0091852fe5cc4237c8440fe32f3ab6bc920ae6d9"
integrity sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg== integrity sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg==
"@vue/shared@3.4.26":
version "3.4.26"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.4.26.tgz#f17854fb1faf889854aed4b23b60e86a8cab6403"
integrity sha512-Fg4zwR0GNnjzodMt3KRy2AWGMKQXByl56+4HjN87soxLNU9P5xcJkstAlIeEF3cU6UYOzmJl1tV0dVPGIljCnQ==
"@xicons/utils@^0.1.4": "@xicons/utils@^0.1.4":
version "0.1.4" version "0.1.4"
resolved "https://registry.npmmirror.com/@xicons/utils/-/utils-0.1.4.tgz#cece50613b34d4b4c71e73bb0be92981067e11e1" resolved "https://registry.npmmirror.com/@xicons/utils/-/utils-0.1.4.tgz#cece50613b34d4b4c71e73bb0be92981067e11e1"
@ -704,26 +751,25 @@ app-builder-bin@4.0.0:
resolved "https://registry.npmmirror.com/app-builder-bin/-/app-builder-bin-4.0.0.tgz#1df8e654bd1395e4a319d82545c98667d7eed2f0" resolved "https://registry.npmmirror.com/app-builder-bin/-/app-builder-bin-4.0.0.tgz#1df8e654bd1395e4a319d82545c98667d7eed2f0"
integrity sha512-xwdG0FJPQMe0M0UA4Tz0zEB8rBJTRA5a476ZawAqiBkMv16GRK5xpXThOjMaEOFnZ6zabejjG4J3da0SXG63KA== integrity sha512-xwdG0FJPQMe0M0UA4Tz0zEB8rBJTRA5a476ZawAqiBkMv16GRK5xpXThOjMaEOFnZ6zabejjG4J3da0SXG63KA==
app-builder-lib@24.6.4: app-builder-lib@24.13.3:
version "24.6.4" version "24.13.3"
resolved "https://registry.npmmirror.com/app-builder-lib/-/app-builder-lib-24.6.4.tgz#5bf77dd89d3ee557bc615b9ddfaf383f3e51577b" resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-24.13.3.tgz#36e47b65fecb8780bb73bff0fee4e0480c28274b"
integrity sha512-m9931WXb83teb32N0rKg+ulbn6+Hl8NV5SUpVDOVz9MWOXfhV6AQtTdftf51zJJvCQnQugGtSqoLvgw6mdF/Rg== integrity sha512-FAzX6IBit2POXYGnTCT8YHFO/lr5AapAII6zzhQO3Rw4cEDOgK+t1xhLc5tNcKlicTHlo9zxIwnYCX9X2DLkig==
dependencies: dependencies:
"7zip-bin" "~5.1.1"
"@develar/schema-utils" "~2.6.5" "@develar/schema-utils" "~2.6.5"
"@electron/notarize" "2.1.0" "@electron/notarize" "2.2.1"
"@electron/osx-sign" "1.0.5" "@electron/osx-sign" "1.0.5"
"@electron/universal" "1.4.1" "@electron/universal" "1.5.1"
"@malept/flatpak-bundler" "^0.4.0" "@malept/flatpak-bundler" "^0.4.0"
"@types/fs-extra" "9.0.13" "@types/fs-extra" "9.0.13"
async-exit-hook "^2.0.1" async-exit-hook "^2.0.1"
bluebird-lst "^1.0.9" bluebird-lst "^1.0.9"
builder-util "24.5.0" builder-util "24.13.1"
builder-util-runtime "9.2.1" builder-util-runtime "9.2.4"
chromium-pickle-js "^0.2.0" chromium-pickle-js "^0.2.0"
debug "^4.3.4" debug "^4.3.4"
ejs "^3.1.8" ejs "^3.1.8"
electron-publish "24.5.0" electron-publish "24.13.1"
form-data "^4.0.0" form-data "^4.0.0"
fs-extra "^10.1.0" fs-extra "^10.1.0"
hosted-git-info "^4.1.0" hosted-git-info "^4.1.0"
@ -834,10 +880,10 @@ bcrypt-pbkdf@^1.0.0:
dependencies: dependencies:
tweetnacl "^0.14.3" tweetnacl "^0.14.3"
better-sqlite3-multiple-ciphers@^9.0.0: better-sqlite3-multiple-ciphers@^9.4.1:
version "9.0.0" version "9.5.0"
resolved "https://registry.npmmirror.com/better-sqlite3-multiple-ciphers/-/better-sqlite3-multiple-ciphers-9.0.0.tgz#ce6f10dd5950a508c2bd1596e2863fd5faa3b0bc" resolved "https://registry.yarnpkg.com/better-sqlite3-multiple-ciphers/-/better-sqlite3-multiple-ciphers-9.5.0.tgz#15948374ee42cf5c7deeb56d7c4693faa33f2d2e"
integrity sha512-bM0gv20exF1X1Q8/Rz0PasxCYcgb8VIbQKOhYe3Js35uFAmrvnX8AUqW6c/eq+i8WRtAoRw4yAOBs5Nxx7qaXw== integrity sha512-6A9xBRvssONJW07Lur6pmkaUwlCGz1bnjFmXrrAR3qXETUBk92OI4C/+LhMOatn5wQ8AQzLScFZC/CKUpxkTaw==
dependencies: dependencies:
bindings "^1.5.0" bindings "^1.5.0"
prebuild-install "^7.1.1" prebuild-install "^7.1.1"
@ -875,6 +921,11 @@ bluebird@^3.5.5:
resolved "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" resolved "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
bmp-js@^0.1.0:
version "0.1.0"
resolved "https://registry.npmmirror.com/bmp-js/-/bmp-js-0.1.0.tgz#e05a63f796a6c1ff25f4771ec7adadc148c07233"
integrity sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw==
boolbase@^1.0.0: boolbase@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" resolved "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
@ -940,24 +991,24 @@ buffer@^5.1.0, buffer@^5.5.0:
base64-js "^1.3.1" base64-js "^1.3.1"
ieee754 "^1.1.13" ieee754 "^1.1.13"
builder-util-runtime@9.2.1: builder-util-runtime@9.2.4:
version "9.2.1" version "9.2.4"
resolved "https://registry.npmmirror.com/builder-util-runtime/-/builder-util-runtime-9.2.1.tgz#3184dcdf7ed6c47afb8df733813224ced4f624fd" resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-9.2.4.tgz#13cd1763da621e53458739a1e63f7fcba673c42a"
integrity sha512-2rLv/uQD2x+dJ0J3xtsmI12AlRyk7p45TEbE/6o/fbb633e/S3pPgm+ct+JHsoY7r39dKHnGEFk/AASRFdnXmA== integrity sha512-upp+biKpN/XZMLim7aguUyW8s0FUpDvOtK6sbanMFDAMBzpHDqdhgVYm6zc9HJ6nWo7u2Lxk60i2M6Jd3aiNrA==
dependencies: dependencies:
debug "^4.3.4" debug "^4.3.4"
sax "^1.2.4" sax "^1.2.4"
builder-util@24.5.0: builder-util@24.13.1:
version "24.5.0" version "24.13.1"
resolved "https://registry.npmmirror.com/builder-util/-/builder-util-24.5.0.tgz#8683c9a7a1c5c9f9a4c4d2789ecca0e47dddd3f9" resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-24.13.1.tgz#4a4c4f9466b016b85c6990a0ea15aa14edec6816"
integrity sha512-STnBmZN/M5vGcv01u/K8l+H+kplTaq4PAIn3yeuufUKSpcdro0DhJWxPI81k5XcNfC//bjM3+n9nr8F9uV4uAQ== integrity sha512-NhbCSIntruNDTOVI9fdXz0dihaqX2YuE1D6zZMrwiErzH4ELZHE6mdiB40wEgZNprDia+FghRFgKoAqMZRRjSA==
dependencies: dependencies:
"7zip-bin" "~5.1.1" "7zip-bin" "~5.2.0"
"@types/debug" "^4.1.6" "@types/debug" "^4.1.6"
app-builder-bin "4.0.0" app-builder-bin "4.0.0"
bluebird-lst "^1.0.9" bluebird-lst "^1.0.9"
builder-util-runtime "9.2.1" builder-util-runtime "9.2.4"
chalk "^4.1.2" chalk "^4.1.2"
cross-spawn "^7.0.3" cross-spawn "^7.0.3"
debug "^4.3.4" debug "^4.3.4"
@ -1234,10 +1285,10 @@ cssesc@^3.0.0:
resolved "https://registry.npmmirror.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" resolved "https://registry.npmmirror.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
csstype@^3.1.2: csstype@^3.1.3:
version "3.1.2" version "3.1.3"
resolved "https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==
csstype@~3.0.5: csstype@~3.0.5:
version "3.0.11" version "3.0.11"
@ -1289,6 +1340,23 @@ debug@^3.2.6:
dependencies: dependencies:
ms "^2.1.1" ms "^2.1.1"
decode-bmp@^0.2.0:
version "0.2.1"
resolved "https://registry.npmmirror.com/decode-bmp/-/decode-bmp-0.2.1.tgz#cec3e0197ec3b6c60f02220f50e8757030ff2427"
integrity sha512-NiOaGe+GN0KJqi2STf24hfMkFitDUaIoUU3eKvP/wAbLe8o6FuW5n/x7MHPR0HKvBokp6MQY/j7w8lewEeVCIA==
dependencies:
"@canvas/image-data" "^1.0.0"
to-data-view "^1.1.0"
decode-ico@^0.4.1:
version "0.4.1"
resolved "https://registry.npmmirror.com/decode-ico/-/decode-ico-0.4.1.tgz#e0f7373081532c7b8495bd51fb225d354e14de25"
integrity sha512-69NZfbKIzux1vBOd31al3XnMnH+2mqDhEgLdpygErm4d60N+UwA5Sq5WFjmEDQzumgB9fElojGwWG0vybVfFmA==
dependencies:
"@canvas/image-data" "^1.0.0"
decode-bmp "^0.2.0"
to-data-view "^1.1.0"
decompress-response@^6.0.0: decompress-response@^6.0.0:
version "6.0.0" version "6.0.0"
resolved "https://registry.npmmirror.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" resolved "https://registry.npmmirror.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc"
@ -1357,14 +1425,14 @@ dlv@^1.1.3:
resolved "https://registry.npmmirror.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" resolved "https://registry.npmmirror.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79"
integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==
dmg-builder@24.6.4: dmg-builder@24.13.3:
version "24.6.4" version "24.13.3"
resolved "https://registry.npmmirror.com/dmg-builder/-/dmg-builder-24.6.4.tgz#e19b8305f7e1ea0b4faaa30382c81b9d6de39863" resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-24.13.3.tgz#95d5b99c587c592f90d168a616d7ec55907c7e55"
integrity sha512-BNcHRc9CWEuI9qt0E655bUBU/j/3wUCYBVKGu1kVpbN5lcUdEJJJeiO0NHK3dgKmra6LUUZlo+mWqc+OCbi0zw== integrity sha512-rcJUkMfnJpfCboZoOOPf4L29TRtEieHNOeAbYPWPxlaBw/Z1RKrRA86dOI9rwaI4tQSc/RD82zTNHprfUHXsoQ==
dependencies: dependencies:
app-builder-lib "24.6.4" app-builder-lib "24.13.3"
builder-util "24.5.0" builder-util "24.13.1"
builder-util-runtime "9.2.1" builder-util-runtime "9.2.4"
fs-extra "^10.1.0" fs-extra "^10.1.0"
iconv-lite "^0.6.2" iconv-lite "^0.6.2"
js-yaml "^4.1.0" js-yaml "^4.1.0"
@ -1452,16 +1520,16 @@ ejs@^3.1.8:
dependencies: dependencies:
jake "^10.8.5" jake "^10.8.5"
electron-builder@^24.6.4: electron-builder@^24.6.5:
version "24.6.4" version "24.13.3"
resolved "https://registry.npmmirror.com/electron-builder/-/electron-builder-24.6.4.tgz#c51271e49b9a02c9a3ec444f866b6008c4d98a1d" resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-24.13.3.tgz#c506dfebd36d9a50a83ee8aa32d803d83dbe4616"
integrity sha512-uNWQoU7pE7qOaIQ6CJHpBi44RJFVG8OHRBIadUxrsDJVwLLo8Nma3K/EEtx5/UyWAQYdcK4nVPYKoRqBb20hbA== integrity sha512-yZSgVHft5dNVlo31qmJAe4BVKQfFdwpRw7sFp1iQglDRCDD6r22zfRJuZlhtB5gp9FHUxCMEoWGq10SkCnMAIg==
dependencies: dependencies:
app-builder-lib "24.6.4" app-builder-lib "24.13.3"
builder-util "24.5.0" builder-util "24.13.1"
builder-util-runtime "9.2.1" builder-util-runtime "9.2.4"
chalk "^4.1.2" chalk "^4.1.2"
dmg-builder "24.6.4" dmg-builder "24.13.3"
fs-extra "^10.1.0" fs-extra "^10.1.0"
is-ci "^3.0.0" is-ci "^3.0.0"
lazy-val "^1.0.5" lazy-val "^1.0.5"
@ -1474,14 +1542,14 @@ electron-log@^5.0.0:
resolved "https://registry.npmmirror.com/electron-log/-/electron-log-5.0.0.tgz#b5fab83500fce1c61ec7493701f5e228b752d2e2" resolved "https://registry.npmmirror.com/electron-log/-/electron-log-5.0.0.tgz#b5fab83500fce1c61ec7493701f5e228b752d2e2"
integrity sha512-vB3akupmQvA8jAyNL9rULZtf6WoP8vsabjXsRtiqXS6/D37SwN/4LEyj4JD+9Bv6xoTcx/LrVnsIKEEWdq5ClQ== integrity sha512-vB3akupmQvA8jAyNL9rULZtf6WoP8vsabjXsRtiqXS6/D37SwN/4LEyj4JD+9Bv6xoTcx/LrVnsIKEEWdq5ClQ==
electron-publish@24.5.0: electron-publish@24.13.1:
version "24.5.0" version "24.13.1"
resolved "https://registry.npmmirror.com/electron-publish/-/electron-publish-24.5.0.tgz#492a4d7caa232e88ee3c18f5c3b4dc637e5e1b3a" resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.13.1.tgz#57289b2f7af18737dc2ad134668cdd4a1b574a0c"
integrity sha512-zwo70suH15L15B4ZWNDoEg27HIYoPsGJUF7xevLJLSI7JUPC8l2yLBdLGwqueJ5XkDL7ucYyRZzxJVR8ElV9BA== integrity sha512-2ZgdEqJ8e9D17Hwp5LEq5mLQPjqU3lv/IALvgp+4W8VeNhryfGhYEQC/PgDPMrnWUp+l60Ou5SJLsu+k4mhQ8A==
dependencies: dependencies:
"@types/fs-extra" "^9.0.11" "@types/fs-extra" "^9.0.11"
builder-util "24.5.0" builder-util "24.13.1"
builder-util-runtime "9.2.1" builder-util-runtime "9.2.4"
chalk "^4.1.2" chalk "^4.1.2"
fs-extra "^10.1.0" fs-extra "^10.1.0"
lazy-val "^1.0.5" lazy-val "^1.0.5"
@ -1500,10 +1568,10 @@ electron-to-chromium@^1.4.535:
resolved "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.569.tgz#1298b67727187ffbaac005a7425490d157f3ad03" resolved "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.569.tgz#1298b67727187ffbaac005a7425490d157f3ad03"
integrity sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg== integrity sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg==
electron@^26.4.2: electron@^28.3.1:
version "26.4.2" version "28.3.3"
resolved "https://registry.npmmirror.com/electron/-/electron-26.4.2.tgz#2f976a3c30558f09ced3f5876862b4c21172c02c" resolved "https://registry.npmmirror.com/electron/-/electron-28.3.3.tgz#2df898f653c4f77b66b4cf3eeba79d8bea6d03c0"
integrity sha512-BOfQUOIvsq5NnssWOMqcZnA5M0ull620wvQoJq3WhXN1wJAsWu+cdjHvREyxnHbArPkV+F+x3YAi5Dt+UKoqhw== integrity sha512-ObKMLSPNhomtCOBAxFS8P2DW/4umkh72ouZUlUKzXGtYuPzgr1SYhskhFWgzAsPtUzhL2CzyV2sfbHcEW4CXqw==
dependencies: dependencies:
"@electron/get" "^2.0.0" "@electron/get" "^2.0.0"
"@types/node" "^18.11.18" "@types/node" "^18.11.18"
@ -1521,7 +1589,7 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1:
dependencies: dependencies:
once "^1.4.0" once "^1.4.0"
entities@^4.2.0, entities@^4.4.0: entities@^4.2.0, entities@^4.4.0, entities@^4.5.0:
version "4.5.0" version "4.5.0"
resolved "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" resolved "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48"
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
@ -1662,6 +1730,15 @@ fd-slicer@~1.1.0:
dependencies: dependencies:
pend "~1.2.0" pend "~1.2.0"
file-type@^18.7.0:
version "18.7.0"
resolved "https://registry.npmmirror.com/file-type/-/file-type-18.7.0.tgz#cddb16f184d6b94106cfc4bb56978726b25cb2a2"
integrity sha512-ihHtXRzXEziMrQ56VSgU7wkxh55iNchFkosu7Y9/S+tXHdKyrGjVK0ujbqNnsxzea+78MaLhN6PGmfYSAv1ACw==
dependencies:
readable-web-to-node-stream "^3.0.2"
strtok3 "^7.0.0"
token-types "^5.0.1"
file-uri-to-path@1.0.0: file-uri-to-path@1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" resolved "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
@ -2008,6 +2085,18 @@ https-proxy-agent@^5.0.1:
agent-base "6" agent-base "6"
debug "4" debug "4"
icojs@^0.19.3:
version "0.19.3"
resolved "https://registry.npmmirror.com/icojs/-/icojs-0.19.3.tgz#1c0a4e593c8cb3ce61aee4aa4f4a3befb3165527"
integrity sha512-Q6syRxwoEACLRl7uTiee72038vDbq4gF6ot7JFsXmxj0WtkgGQiUxCdEJtwxd8nfADr9mPmGtpmbORJursaOsQ==
dependencies:
"@jimp/bmp" "^0.22.10"
decode-ico "^0.4.1"
file-type "^18.7.0"
jpeg-js "^0.4.4"
pngjs "^7.0.0"
to-data-view "^2.0.0"
iconv-corefoundation@^1.1.7: iconv-corefoundation@^1.1.7:
version "1.1.7" version "1.1.7"
resolved "https://registry.npmmirror.com/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz#31065e6ab2c9272154c8b0821151e2c88f1b002a" resolved "https://registry.npmmirror.com/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz#31065e6ab2c9272154c8b0821151e2c88f1b002a"
@ -2023,7 +2112,7 @@ iconv-lite@^0.6.2, iconv-lite@^0.6.3:
dependencies: dependencies:
safer-buffer ">= 2.1.2 < 3.0.0" safer-buffer ">= 2.1.2 < 3.0.0"
ieee754@^1.1.13: ieee754@^1.1.13, ieee754@^1.2.1:
version "1.2.1" version "1.2.1"
resolved "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" resolved "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
@ -2144,6 +2233,11 @@ jiti@^1.19.1:
resolved "https://registry.npmmirror.com/jiti/-/jiti-1.20.0.tgz#2d823b5852ee8963585c8dd8b7992ffc1ae83b42" resolved "https://registry.npmmirror.com/jiti/-/jiti-1.20.0.tgz#2d823b5852ee8963585c8dd8b7992ffc1ae83b42"
integrity sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA== integrity sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==
jpeg-js@^0.4.4:
version "0.4.4"
resolved "https://registry.npmmirror.com/jpeg-js/-/jpeg-js-0.4.4.tgz#a9f1c6f1f9f0fa80cdb3484ed9635054d28936aa"
integrity sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==
js-yaml@^4.1.0: js-yaml@^4.1.0:
version "4.1.0" version "4.1.0"
resolved "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" resolved "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
@ -2291,10 +2385,10 @@ lru-cache@^6.0.0:
dependencies: dependencies:
yallist "^4.0.0" yallist "^4.0.0"
magic-string@^0.30.5: magic-string@^0.30.10:
version "0.30.5" version "0.30.10"
resolved "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.10.tgz#123d9c41a0cb5640c892b041d4cfb3bd0aa4b39e"
integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA== integrity sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==
dependencies: dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15" "@jridgewell/sourcemap-codec" "^1.4.15"
@ -2453,10 +2547,10 @@ mz@^2.7.0:
object-assign "^4.0.1" object-assign "^4.0.1"
thenify-all "^1.0.0" thenify-all "^1.0.0"
naive-ui@^2.35.0: naive-ui@^2.36.0:
version "2.35.0" version "2.39.0"
resolved "https://registry.npmmirror.com/naive-ui/-/naive-ui-2.35.0.tgz#fe1fc2404694b4114486fa31e609e35714e8ed25" resolved "https://registry.npmmirror.com/naive-ui/-/naive-ui-2.39.0.tgz#f0d47d30ce86b178242ad5de9de4066eb8a3f0c9"
integrity sha512-PdnLpOip1LQaKs5+rXLZoPDPQkTq26TnHWeABvUA2eOQjtHxE4+TQvj0Jq/W8clM2On/7jptoGmenLt48G3Bhg== integrity sha512-5oUJzRG+rtLSH8eRU+fJvVYiQids2BxF9jp+fwGoAqHOptEINrBlgBu9uy+95RHE5FLJ7Q/z41o+qkoGnUrKxQ==
dependencies: dependencies:
"@css-render/plugin-bem" "^0.15.12" "@css-render/plugin-bem" "^0.15.12"
"@css-render/vue3-ssr" "^0.15.12" "@css-render/vue3-ssr" "^0.15.12"
@ -2465,23 +2559,29 @@ naive-ui@^2.35.0:
"@types/lodash-es" "^4.17.9" "@types/lodash-es" "^4.17.9"
async-validator "^4.2.5" async-validator "^4.2.5"
css-render "^0.15.12" css-render "^0.15.12"
csstype "^3.1.3"
date-fns "^2.30.0" date-fns "^2.30.0"
date-fns-tz "^2.0.0" date-fns-tz "^2.0.0"
evtd "^0.2.4" evtd "^0.2.4"
highlight.js "^11.8.0" highlight.js "^11.8.0"
lodash "^4.17.21" lodash "^4.17.21"
lodash-es "^4.17.21" lodash-es "^4.17.21"
seemly "^0.3.6" seemly "^0.3.8"
treemate "^0.3.11" treemate "^0.3.11"
vdirs "^0.1.8" vdirs "^0.1.8"
vooks "^0.2.12" vooks "^0.2.12"
vueuc "^0.4.51" vueuc "^0.4.58"
nanoid@^3.3.6: nanoid@^3.3.6:
version "3.3.6" version "3.3.6"
resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
nanoid@^3.3.7:
version "3.3.7"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
napi-build-utils@^1.0.1: napi-build-utils@^1.0.1:
version "1.0.2" version "1.0.2"
resolved "https://registry.npmmirror.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" resolved "https://registry.npmmirror.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806"
@ -2638,6 +2738,11 @@ path-parse@^1.0.7:
resolved "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" resolved "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
peek-readable@^5.0.0:
version "5.1.1"
resolved "https://registry.npmmirror.com/peek-readable/-/peek-readable-5.1.1.tgz#7dbeafa1ce271a3eba3fba808883bdb03769b822"
integrity sha512-4hEOSH7KeEaZpMDF/xfm1W9fS5rT7Ett3BkXWHqAEzRLLwLaHkwOL+GvvpIEh9UrvX9BDhzfkvteslgraoH69w==
pend@~1.2.0: pend@~1.2.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.npmmirror.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" resolved "https://registry.npmmirror.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
@ -2702,6 +2807,11 @@ plist@^3.0.4, plist@^3.0.5:
base64-js "^1.5.1" base64-js "^1.5.1"
xmlbuilder "^15.1.1" xmlbuilder "^15.1.1"
pngjs@^7.0.0:
version "7.0.0"
resolved "https://registry.npmmirror.com/pngjs/-/pngjs-7.0.0.tgz#a8b7446020ebbc6ac739db6c5415a65d17090e26"
integrity sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==
postcss-import@^15.1.0: postcss-import@^15.1.0:
version "15.1.0" version "15.1.0"
resolved "https://registry.npmmirror.com/postcss-import/-/postcss-import-15.1.0.tgz#41c64ed8cc0e23735a9698b3249ffdbf704adc70" resolved "https://registry.npmmirror.com/postcss-import/-/postcss-import-15.1.0.tgz#41c64ed8cc0e23735a9698b3249ffdbf704adc70"
@ -2755,6 +2865,15 @@ postcss@^8.4.23, postcss@^8.4.27, postcss@^8.4.31:
picocolors "^1.0.0" picocolors "^1.0.0"
source-map-js "^1.0.2" source-map-js "^1.0.2"
postcss@^8.4.38:
version "8.4.38"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e"
integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==
dependencies:
nanoid "^3.3.7"
picocolors "^1.0.0"
source-map-js "^1.2.0"
prebuild-install@^7.1.1: prebuild-install@^7.1.1:
version "7.1.1" version "7.1.1"
resolved "https://registry.npmmirror.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" resolved "https://registry.npmmirror.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45"
@ -2853,7 +2972,7 @@ read-config-file@6.3.2:
json5 "^2.2.0" json5 "^2.2.0"
lazy-val "^1.0.4" lazy-val "^1.0.4"
readable-stream@^3.1.1, readable-stream@^3.4.0: readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0:
version "3.6.2" version "3.6.2"
resolved "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" resolved "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
@ -2862,6 +2981,13 @@ readable-stream@^3.1.1, readable-stream@^3.4.0:
string_decoder "^1.1.1" string_decoder "^1.1.1"
util-deprecate "^1.0.1" util-deprecate "^1.0.1"
readable-web-to-node-stream@^3.0.2:
version "3.0.2"
resolved "https://registry.npmmirror.com/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz#5d52bb5df7b54861fd48d015e93a2cb87b3ee0bb"
integrity sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==
dependencies:
readable-stream "^3.6.0"
readdirp@~3.6.0: readdirp@~3.6.0:
version "3.6.0" version "3.6.0"
resolved "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" resolved "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
@ -2869,6 +2995,11 @@ readdirp@~3.6.0:
dependencies: dependencies:
picomatch "^2.2.1" picomatch "^2.2.1"
regenerator-runtime@^0.13.3:
version "0.13.11"
resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
regenerator-runtime@^0.14.0: regenerator-runtime@^0.14.0:
version "0.14.0" version "0.14.0"
resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45"
@ -3006,6 +3137,11 @@ seemly@^0.3.6:
resolved "https://registry.npmmirror.com/seemly/-/seemly-0.3.6.tgz#7ef97e8083dea00804965e2662f572a5df9cb18e" resolved "https://registry.npmmirror.com/seemly/-/seemly-0.3.6.tgz#7ef97e8083dea00804965e2662f572a5df9cb18e"
integrity sha512-lEV5VB8BUKTo/AfktXJcy+JeXns26ylbMkIUco8CYREsQijuz4mrXres2Q+vMLdwkuLxJdIPQ8IlCIxLYm71Yw== integrity sha512-lEV5VB8BUKTo/AfktXJcy+JeXns26ylbMkIUco8CYREsQijuz4mrXres2Q+vMLdwkuLxJdIPQ8IlCIxLYm71Yw==
seemly@^0.3.8:
version "0.3.8"
resolved "https://registry.npmmirror.com/seemly/-/seemly-0.3.8.tgz#42879d8375d73126a04dc16b1bf92a773d2e5974"
integrity sha512-MW8Qs6vbzo0pHmDpFSYPna+lwpZ6Zk1ancbajw/7E8TKtHdV+1DfZZD+kKJEhG/cAoB/i+LiT+5msZOqj0DwRA==
semver-compare@^1.0.0: semver-compare@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.npmmirror.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" resolved "https://registry.npmmirror.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
@ -3110,6 +3246,11 @@ source-map-js@^1.0.2:
resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
source-map-js@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af"
integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==
source-map-support@^0.5.19: source-map-support@^0.5.19:
version "0.5.21" version "0.5.21"
resolved "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" resolved "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
@ -3176,6 +3317,14 @@ strip-json-comments@~2.0.1:
resolved "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" resolved "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==
strtok3@^7.0.0:
version "7.0.0"
resolved "https://registry.npmmirror.com/strtok3/-/strtok3-7.0.0.tgz#868c428b4ade64a8fd8fee7364256001c1a4cbe5"
integrity sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==
dependencies:
"@tokenizer/token" "^0.3.0"
peek-readable "^5.0.0"
sucrase@^3.32.0: sucrase@^3.32.0:
version "3.34.0" version "3.34.0"
resolved "https://registry.npmmirror.com/sucrase/-/sucrase-3.34.0.tgz#1e0e2d8fcf07f8b9c3569067d92fbd8690fb576f" resolved "https://registry.npmmirror.com/sucrase/-/sucrase-3.34.0.tgz#1e0e2d8fcf07f8b9c3569067d92fbd8690fb576f"
@ -3305,6 +3454,16 @@ tmp@^0.2.0:
dependencies: dependencies:
rimraf "^3.0.0" rimraf "^3.0.0"
to-data-view@^1.1.0:
version "1.1.0"
resolved "https://registry.npmmirror.com/to-data-view/-/to-data-view-1.1.0.tgz#08d6492b0b8deb9b29bdf1f61c23eadfa8994d00"
integrity sha512-1eAdufMg6mwgmlojAx3QeMnzB/BTVp7Tbndi3U7ftcT2zCZadjxkkmLmd97zmaxWi+sgGcgWrokmpEoy0Dn0vQ==
to-data-view@^2.0.0:
version "2.0.0"
resolved "https://registry.npmmirror.com/to-data-view/-/to-data-view-2.0.0.tgz#4cc3f5c9eb59514a7436fc54c587c3c34c9b1d60"
integrity sha512-RGEM5KqlPHr+WVTPmGNAXNeFEmsBnlkxXaIfEpUYV0AST2Z5W1EGq9L/MENFrMMmL2WQr1wjkmZy/M92eKhjYA==
to-regex-range@^5.0.1: to-regex-range@^5.0.1:
version "5.0.1" version "5.0.1"
resolved "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" resolved "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
@ -3312,6 +3471,14 @@ to-regex-range@^5.0.1:
dependencies: dependencies:
is-number "^7.0.0" is-number "^7.0.0"
token-types@^5.0.1:
version "5.0.1"
resolved "https://registry.npmmirror.com/token-types/-/token-types-5.0.1.tgz#aa9d9e6b23c420a675e55413b180635b86a093b4"
integrity sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==
dependencies:
"@tokenizer/token" "^0.3.0"
ieee754 "^1.2.1"
tough-cookie@~2.5.0: tough-cookie@~2.5.0:
version "2.5.0" version "2.5.0"
resolved "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" resolved "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
@ -3449,10 +3616,10 @@ verror@^1.10.0:
core-util-is "1.0.2" core-util-is "1.0.2"
extsprintf "^1.2.0" extsprintf "^1.2.0"
vite-plugin-electron@^0.14.1: vite-plugin-electron@^0.15.4:
version "0.14.1" version "0.15.4"
resolved "https://registry.npmmirror.com/vite-plugin-electron/-/vite-plugin-electron-0.14.1.tgz#faad1e26d853ea7960b812272c19521c7f180482" resolved "https://registry.npmmirror.com/vite-plugin-electron/-/vite-plugin-electron-0.15.4.tgz#29552461940ed7ec398f59ee8b5ee63aa559a6c9"
integrity sha512-QGQ2nJ4wjMf1FaDSkdoC/UskQGiYGcAToATJqJXvqrL4Jmt0CFaZqoDjh1xLicUWEo/X7urHYjhKTqwEeP7F7g== integrity sha512-aXGDjTXebJxNX+cf+KSZEsa9BcMrTbNhjZJaUhU5999/ATYZq4PlZpebfyeslyuYpjk6OdyA/pNC+fTeDYK5Kw==
vite@^4.4.11: vite@^4.4.11:
version "4.5.0" version "4.5.0"
@ -3501,21 +3668,21 @@ vue-tsc@^1.8.22:
"@vue/language-core" "1.8.22" "@vue/language-core" "1.8.22"
semver "^7.5.4" semver "^7.5.4"
vue@^3.3.7: vue@^3.4.13:
version "3.3.7" version "3.4.26"
resolved "https://registry.npmmirror.com/vue/-/vue-3.3.7.tgz#972a218682443a3819d121261b2bff914417f4f0" resolved "https://registry.yarnpkg.com/vue/-/vue-3.4.26.tgz#936c97e37672c737705d7bdfa62c31af18742269"
integrity sha512-YEMDia1ZTv1TeBbnu6VybatmSteGOS3A3YgfINOfraCbf85wdKHzscD6HSS/vB4GAtI7sa1XPX7HcQaJ1l24zA== integrity sha512-bUIq/p+VB+0xrJubaemrfhk1/FiW9iX+pDV+62I/XJ6EkspAO9/DXEjbDFoe8pIfOZBqfk45i9BMc41ptP/uRg==
dependencies: dependencies:
"@vue/compiler-dom" "3.3.7" "@vue/compiler-dom" "3.4.26"
"@vue/compiler-sfc" "3.3.7" "@vue/compiler-sfc" "3.4.26"
"@vue/runtime-dom" "3.3.7" "@vue/runtime-dom" "3.4.26"
"@vue/server-renderer" "3.3.7" "@vue/server-renderer" "3.4.26"
"@vue/shared" "3.3.7" "@vue/shared" "3.4.26"
vueuc@^0.4.51: vueuc@^0.4.58:
version "0.4.51" version "0.4.58"
resolved "https://registry.npmmirror.com/vueuc/-/vueuc-0.4.51.tgz#35cd5364db4b71fc791a9823748711b91d910d49" resolved "https://registry.npmmirror.com/vueuc/-/vueuc-0.4.58.tgz#03ee2ea6febf360ca9cbe490841fce91742eea12"
integrity sha512-pLiMChM4f+W8czlIClGvGBYo656lc2Y0/mXFSCydcSmnCR1izlKPGMgiYBGjbY9FDkFG8a2HEVz7t0DNzBWbDw== integrity sha512-Wnj/N8WbPRSxSt+9ji1jtDHPzda5h2OH/0sFBhvdxDRuyCZbjGg3/cKMaKqEoe+dErTexG2R+i6Q8S/Toq1MYg==
dependencies: dependencies:
"@css-render/vue3-ssr" "^0.15.10" "@css-render/vue3-ssr" "^0.15.10"
"@juggle/resize-observer" "^3.3.1" "@juggle/resize-observer" "^3.3.1"