mirror of
https://github.com/fanchenio/DawnLauncher.git
synced 2025-09-14 13:56:46 +08:00
Compare commits
113 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5800cbbdaa | ||
![]() |
56517f059c | ||
![]() |
342d8939ab | ||
![]() |
92270def83 | ||
![]() |
881fbc9f56 | ||
![]() |
2cd721263e | ||
![]() |
ea851c652c | ||
![]() |
9243140d3b | ||
![]() |
36b77ce32b | ||
![]() |
d51a5404ee | ||
![]() |
018bd91931 | ||
![]() |
d4520eef0c | ||
![]() |
0c2ae8ae5b | ||
![]() |
07912ea276 | ||
![]() |
bebe8272cf | ||
![]() |
4e3947ab7e | ||
![]() |
5c791874c6 | ||
![]() |
a2ccd8670b | ||
![]() |
78cf39bec7 | ||
![]() |
62a1780197 | ||
![]() |
dd3cf64f5d | ||
![]() |
ed77cc4fb4 | ||
![]() |
0327dfc0cc | ||
![]() |
0ad813a315 | ||
![]() |
2ba01403a5 | ||
![]() |
f365005bd8 | ||
![]() |
3ffbd110dc | ||
![]() |
7ec78fef08 | ||
![]() |
b9ac69cf22 | ||
![]() |
c23e4f51f0 | ||
![]() |
a411674e3a | ||
![]() |
e1f896e963 | ||
![]() |
8228495918 | ||
![]() |
bcc5ad1989 | ||
![]() |
dd06149fb4 | ||
![]() |
0cb66ffaa5 | ||
![]() |
6386518171 | ||
![]() |
49124e7eeb | ||
![]() |
ac96cfd6be | ||
![]() |
950cff7a6c | ||
![]() |
f0eeea8483 | ||
![]() |
8c17275169 | ||
![]() |
6f04f8ccbd | ||
![]() |
8c6de3fdc2 | ||
![]() |
c170df8691 | ||
![]() |
2d82702efe | ||
![]() |
acb9231915 | ||
![]() |
fac3bda8f4 | ||
![]() |
333f0888be | ||
![]() |
a94d5a2244 | ||
![]() |
27a32c7eed | ||
![]() |
2cdefb513a | ||
![]() |
c9593f379f | ||
![]() |
df499a0517 | ||
![]() |
4048f4a230 | ||
![]() |
7c866f57b4 | ||
![]() |
e7ce285ae9 | ||
![]() |
d117397dc3 | ||
![]() |
6b71805274 | ||
![]() |
480f88d558 | ||
![]() |
37a62c1cb5 | ||
![]() |
fb0ce7d3ca | ||
![]() |
467f33bc99 | ||
![]() |
28f3ed000f | ||
![]() |
235f964198 | ||
![]() |
52847f8629 | ||
![]() |
a11913c785 | ||
![]() |
c683d0f167 | ||
![]() |
8a0d1ea08a | ||
![]() |
d655198b1d | ||
![]() |
607ff84af9 | ||
![]() |
ac9c8c834f | ||
![]() |
af25b93004 | ||
![]() |
90fdc9b8ac | ||
![]() |
ace6f282d0 | ||
![]() |
64007a12e9 | ||
![]() |
ee94f20392 | ||
![]() |
ca43708a22 | ||
![]() |
c73a2b3709 | ||
![]() |
90594e7f21 | ||
![]() |
5167e0c084 | ||
![]() |
88b5fa8a15 | ||
![]() |
da4a19f81a | ||
![]() |
87ab4e3060 | ||
![]() |
e6289d0344 | ||
![]() |
ffd7c1d8df | ||
![]() |
f40cab0107 | ||
![]() |
26ae2093e3 | ||
![]() |
dfe16dd36c | ||
![]() |
d6894662ea | ||
![]() |
f556343883 | ||
![]() |
82f5fe8cfe | ||
![]() |
1d1edb95e7 | ||
![]() |
da23211600 | ||
![]() |
2bdbdbab16 | ||
![]() |
515944539c | ||
![]() |
b982367793 | ||
![]() |
426e261397 | ||
![]() |
3432c7aa6a | ||
![]() |
028845c159 | ||
![]() |
dcb2b1cc38 | ||
![]() |
0d93c2f922 | ||
![]() |
946d94cb5b | ||
![]() |
55e247a5a3 | ||
![]() |
5173d73b42 | ||
![]() |
e688210a58 | ||
![]() |
21cddb6d00 | ||
![]() |
e91dcdfbdb | ||
![]() |
f2d0a81042 | ||
![]() |
187ffeb636 | ||
![]() |
f6fe6c9558 | ||
![]() |
80f1c40ad7 | ||
![]() |
5d575216a8 |
18
.vscode/c_cpp_properties.json
vendored
Normal file
18
.vscode/c_cpp_properties.json
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "windows-gcc-x64",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"compilerPath": "gcc",
|
||||
"cStandard": "${default}",
|
||||
"cppStandard": "${default}",
|
||||
"intelliSenseMode": "windows-gcc-x64",
|
||||
"compilerArgs": [
|
||||
""
|
||||
]
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
23
.vscode/launch.json
vendored
23
.vscode/launch.json
vendored
@ -1,7 +1,4 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"compounds": [
|
||||
{
|
||||
@ -45,9 +42,27 @@
|
||||
"<node_internals>/**",
|
||||
"${workspaceRoot}/node_modules/**",
|
||||
"${workspaceRoot}/dist-electron/**",
|
||||
// Skip files in host(VITE_DEV_SERVER_URL)
|
||||
"http://127.0.0.1:3344/**"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "C/C++ Runner: Debug Session",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"cwd": "d:/GITHUB-DAWN-LAUNCHER/DawnLauncher",
|
||||
"program": "d:/GITHUB-DAWN-LAUNCHER/DawnLauncher/build/Debug/outDebug",
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
59
.vscode/settings.json
vendored
59
.vscode/settings.json
vendored
@ -9,5 +9,62 @@
|
||||
],
|
||||
"url": "https://json.schemastore.org/electron-builder"
|
||||
}
|
||||
]
|
||||
],
|
||||
"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
78
LICENSE
@ -1,65 +1,21 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
MIT License
|
||||
|
||||
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.
|
||||
|
||||
"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.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"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.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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
|
||||
SOFTWARE.
|
||||
|
@ -1,9 +1,5 @@
|
||||
# [简体中文](https://github.com/fanchenio/DawnLauncher) | English
|
||||
|
||||
# Update
|
||||
|
||||
After disappearing for more than three months, I refactored the `Dawn Launcher` code. Because I had no experience in developing `NodeJS` and `Electron` at the beginning, `Vue` was not well written, and the code was a bit sloppy, so I carried out Code refactoring, the new version uses `Electron26 + Vite + Vue3 + TS`, the UI framework uses `Naive`, regarding the native API, I switched from `C++` to `Rust`, and the database switched from `electron-store` With `SQLite3`, the language has also added `English`.
|
||||
|
||||
# Dawn Launcher
|
||||
|
||||
The `Windows` quick launch tool helps you organize your messy desktop, manage your desktop shortcuts by category, and keep your desktop clean and tidy.
|
||||
@ -12,7 +8,7 @@ Supports associated folders (real-time synchronization of folder contents), quic
|
||||
|
||||
# Technology Stack
|
||||
|
||||
`Electron + Vite + Vue3 + TS`
|
||||
`Electron + Vite + Vue3 + TS + Rust`
|
||||
|
||||
# Support Platform
|
||||
|
||||
@ -20,24 +16,17 @@ Supports associated folders (real-time synchronization of folder contents), quic
|
||||
|
||||
# Compilation Steps
|
||||
|
||||
1. First you need to install `node-gyp`, which is needed to compile local modules.
|
||||
2. Then run `yarn install` to install the project dependencies (if you modify the `Rust` code, you need to re-run `yarn install`).
|
||||
3. `yarn run dev` runs the project locally.
|
||||
4. `yarn run build` packages the project.
|
||||
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.
|
||||
1. Install `node-gyp`, required to compile SQLite3.
|
||||
2. Install the `Rust` environment + `Cargo`, which is needed to compile Rust.
|
||||
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 dev` runs the project locally.
|
||||
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
|
||||
|
||||
[dawnlauncher.com](https://dawnlauncher.com/)
|
||||
|
||||
# Donate(Wechat)
|
||||
|
||||

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

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

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

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

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

|
||||
369652112
|
||||
|
||||
# 界面
|
||||
|
||||
@ -70,6 +63,10 @@
|
||||
|
||||

|
||||
|
||||
# License
|
||||
## Stargazers over time
|
||||
|
||||
Apache License Version 2.0
|
||||
[](https://starchart.cc/fanchenio/DawnLauncher)
|
||||
|
||||
## License
|
||||
|
||||
MIT License
|
||||
|
@ -30,6 +30,11 @@ features = [
|
||||
"Win32_System_Environment",
|
||||
"Win32_UI_Input_Ime",
|
||||
"Win32_Globalization",
|
||||
"Win32_Graphics_Dwm",
|
||||
"Management_Deployment",
|
||||
"ApplicationModel",
|
||||
"Foundation_Collections",
|
||||
"ApplicationModel_Core",
|
||||
]
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -5,8 +5,8 @@ let simplifiedChinese = {
|
||||
address: "地址",
|
||||
aggregateClassification: "聚合分类",
|
||||
aggregateClassificationPrompt1:
|
||||
"聚合分类可以将所有分类下的项目聚合到一起,按照设定的排序方式、项目数量进行排序和显示。",
|
||||
aggregateClassificationPrompt2: "当前分类为父级分类,不能设置聚合分类。",
|
||||
"聚合分类会将所有分类下项目聚合到一起,按照设定的排序方式、项目数量进行显示。",
|
||||
aggregateClassificationPrompt2: "当前分类是父级分类,不能设置为聚合分类。",
|
||||
aggregateClassificationPrompt3:
|
||||
"当前设置排序为按打开次数,需开启设置-项目-记录打开次数。",
|
||||
aggregateClassificationPrompt4:
|
||||
@ -22,7 +22,7 @@ let simplifiedChinese = {
|
||||
associateFolderPrompt1:
|
||||
"关联文件夹可以实时监控指定文件夹内的变化并同步到对应分类中。",
|
||||
associateFolderPrompt2: "需要隐藏的文件/文件夹名称,多个按英文逗号分割",
|
||||
associateFolderPrompt3: "当前分类为父级分类,不能设置关联文件夹。",
|
||||
associateFolderPrompt3: "当前分类是父级分类,不能设置为关联文件夹。",
|
||||
associateFolderPrompt4: "目标路径不存在。",
|
||||
associateFolderPrompt5: "目标路径必须是文件夹。",
|
||||
associateFolderPrompt6:
|
||||
@ -33,15 +33,14 @@ let simplifiedChinese = {
|
||||
backgroundIcon: "背景图标",
|
||||
backgroundImage: "背景图",
|
||||
backgroundImageMode: "背景图模式",
|
||||
backgroundImagePostion: "背景图定位",
|
||||
backgroundImageTransparent: "背景图透明",
|
||||
backgroundTransparent: "背景透明",
|
||||
backgroundImagePosition: "背景图定位",
|
||||
backgroundImageTransparency: "背景图透明度",
|
||||
backup: "备份",
|
||||
backupRestoreData: "备份/还原数据",
|
||||
backupRestoreDataPrompt:
|
||||
"如果要还原1.2.3及之前版本的备份数据,请在还原时选择导入JSON格式的文件。",
|
||||
batchConvertAbsolutePath: "转为绝对路径",
|
||||
batchConvertRelativePath: "转为相对路径",
|
||||
"如果要还原 1.2.3 及之前版本的数据,请在还原时选择导入 JSON 格式的文件。",
|
||||
batchConvertAbsolutePath: "批量转为绝对路径",
|
||||
batchConvertRelativePath: "批量转为相对路径",
|
||||
batchCopyTo: "批量复制到",
|
||||
batchDelete: "批量删除",
|
||||
batchDeletePrompt: "是否批量删除项目?",
|
||||
@ -52,7 +51,7 @@ let simplifiedChinese = {
|
||||
bottom: "底部",
|
||||
byInitialLetter: "按首字母",
|
||||
byLastOpen: "按最后打开",
|
||||
byOpenNumber: "按打开次数",
|
||||
byOpenCount: "按打开次数",
|
||||
calculator: "计算器",
|
||||
cancel: "取消",
|
||||
cancelBatchOperation: "取消批量操作",
|
||||
@ -70,16 +69,20 @@ let simplifiedChinese = {
|
||||
colonKeywordSpace: "冒号 + 关键字 + 空格",
|
||||
color: "颜色",
|
||||
columnNumber: "列数",
|
||||
commandLine: "命令行",
|
||||
commandLinePrompt1: '在"快速搜索"或"搜索"中使用"> + 空格"进入命令行模式。',
|
||||
commandPrompt: "命令提示符",
|
||||
computer: "计算机",
|
||||
computerManagement: "计算机管理",
|
||||
controlPanel: "控制面板",
|
||||
convertAbsolutePath: "转为绝对路径",
|
||||
convertRelativePath: "转为相对路径",
|
||||
copy: "复制",
|
||||
copyFullPath: "复制完整路径",
|
||||
copyTo: "复制到",
|
||||
createShortcut: "创建快捷方式",
|
||||
ctrlNumberKey: "Ctrl + 数字键",
|
||||
cut: "剪切",
|
||||
default: "默认",
|
||||
defaultIcon: "默认图标",
|
||||
delayDisplay: "延迟显示",
|
||||
@ -88,9 +91,10 @@ let simplifiedChinese = {
|
||||
deleteClassificationPrompt: "是否删除当前分类?",
|
||||
deleteIcon: "删除图标",
|
||||
deleteItemPrompt: "是否删除当前项目?",
|
||||
deleteHistory: "删除历史记录",
|
||||
description: "描述",
|
||||
display: "显示",
|
||||
displayMainWindow: "显示主界面",
|
||||
displayMainInterface: "显示主界面",
|
||||
documents: "文档",
|
||||
doubleClickOpen: "双击打开",
|
||||
doubleClickTaskbar: "双击任务栏",
|
||||
@ -105,6 +109,7 @@ let simplifiedChinese = {
|
||||
editSubclassification: "编辑子分类",
|
||||
emptyRecycleBin: "清空回收站",
|
||||
enable: "启用",
|
||||
enableQuickSearch: "启用快速搜索",
|
||||
english: "英语",
|
||||
excludeSearch: "排除搜索",
|
||||
exit: "退出",
|
||||
@ -132,10 +137,12 @@ let simplifiedChinese = {
|
||||
globalShortcutKey: "全局快捷键",
|
||||
hiddenItems: "隐藏项",
|
||||
hideEllipses: "隐藏省略号",
|
||||
hideLoseFocus: "失去焦点后隐藏",
|
||||
hideLoseFocus: "失去焦点隐藏",
|
||||
hideName: "隐藏名称",
|
||||
hideTray: "隐藏托盘图标",
|
||||
hideWindowCollapseSubClassification: "隐藏窗口时收起子分类",
|
||||
hideTaskbar: "隐藏任务栏",
|
||||
hideWindowCollapseSubClassification: "隐藏窗口收起子分类",
|
||||
hideWindowAfterOpen: "打开后隐藏窗口",
|
||||
history: "历史记录",
|
||||
hover: "悬停",
|
||||
icon: "图标",
|
||||
@ -175,7 +182,7 @@ let simplifiedChinese = {
|
||||
name: "名称",
|
||||
network: "网络",
|
||||
networkIcon: "网络图标",
|
||||
networkIconPrompt1: "支持JPG/JPEG/GIF/PNG/ICO/SVG/WEBP格式图片。",
|
||||
networkIconPrompt1: "支持 JPG/JPEG/GIF/PNG/ICO/SVG/WEBP 格式图片。",
|
||||
networkShareCenter: "网络和共享中心",
|
||||
newClassification: "新建分类",
|
||||
newClassificationName: "新分类",
|
||||
@ -186,29 +193,32 @@ let simplifiedChinese = {
|
||||
normal: "普通",
|
||||
notDisturb: "勿扰模式",
|
||||
notDisturbPrompt:
|
||||
"开启勿扰模式后,计算机在游戏、应用全屏模式下不会弹出Dawn Launcher窗口。",
|
||||
"开启勿扰模式后,计算机在游戏、应用全屏模式下不会弹出 Dawn Launcher 窗口。",
|
||||
notFoundFile: "找不到指定的文件",
|
||||
notFoundFolder: "找不到指定的文件夹",
|
||||
notTransparent: "不透明",
|
||||
number: "数量",
|
||||
numberKey: "数字键",
|
||||
officialWebsite: "官方网站",
|
||||
ok: "确定",
|
||||
open: "打开",
|
||||
openAfterHideMainInterface: "打开后隐藏主界面",
|
||||
openAfterHideQuickSearchWindow: "打开后隐藏窗口",
|
||||
openFileLocation: "打开文件所在位置",
|
||||
openNow: "仅剩一项时立即打开",
|
||||
openNumber: "打开次数",
|
||||
openNow: "仅剩一项立即打开",
|
||||
openCount: "打开次数",
|
||||
parameters: "参数",
|
||||
password: "密码",
|
||||
pasteIcon: "粘贴图标",
|
||||
paste: "粘贴",
|
||||
path: "路径",
|
||||
powerOptions: "电源选项",
|
||||
powerShell: "PowerShell",
|
||||
programsFeatures: "程序和功能",
|
||||
proxy: "代理",
|
||||
proxyPrompt:
|
||||
"仅支持HTTP代理,填写“地址”时需要带通信协议和端口,例如:http://127.0.0.1:7890,如果没有用户名和密码,为空即可。",
|
||||
'仅支持 HTTP 代理,填写"地址"时需要带通信协议和端口,例如:http://127.0.0.1:7890,如果没有用户名和密码,为空即可。',
|
||||
prompt: "提示",
|
||||
quickSearch: "快速搜索",
|
||||
recordOpenNumber: "记录打开次数",
|
||||
recordOpenCount: "记录打开次数",
|
||||
recycleBin: "回收站",
|
||||
refreshIcon: "刷新图标",
|
||||
registryEditor: "注册表编辑器",
|
||||
@ -219,7 +229,6 @@ let simplifiedChinese = {
|
||||
restart: "重启",
|
||||
restore: "还原",
|
||||
restoreDataPrompt: "还原数据失败。",
|
||||
rewardSponsor: "打赏&赞助",
|
||||
right: "右侧",
|
||||
roundedCorners: "圆角",
|
||||
runAsAdministrator: "以管理员身份运行",
|
||||
@ -248,11 +257,13 @@ let simplifiedChinese = {
|
||||
shortcutKeyPrompt5: '与"设置-常规"中的"搜索"快捷键产生冲突,请重新设置。',
|
||||
shortcutKeyPrompt6:
|
||||
'与"设置-快速搜索"中的"显示/隐藏"快捷键产生冲突,请重新设置。',
|
||||
shortcutKeyPrompt7: "非法字符。",
|
||||
show: "显示",
|
||||
showFollowMousePosition: "显示时跟随鼠标位置",
|
||||
showHide: "显示/隐藏",
|
||||
showOnlyFiles: "只显示文件",
|
||||
showOnlyFolders: "只显示文件夹",
|
||||
showPath: "显示路径",
|
||||
shutdown: "关机",
|
||||
simplifiedChinese: "简体中文",
|
||||
size: "尺寸",
|
||||
@ -265,10 +276,9 @@ let simplifiedChinese = {
|
||||
startupTray: "启动后最小化到系统托盘",
|
||||
subclassification: "子分类",
|
||||
svgIcon: "SVG图标",
|
||||
svgIconPrompt1: "输入SVG代码后,需要先点击“校验代码”按钮。",
|
||||
svgIconPrompt1: '输入 SVG 代码后,需要先点击"校验代码"按钮。',
|
||||
switch: "切换",
|
||||
switchClassificationCollapseOtherSubClassification:
|
||||
"切换分类时收起其他子分类",
|
||||
switchClassificationCollapseOtherSubClassification: "切换分类收起其他子分类",
|
||||
switchEnglish: "显示窗口时将输入法切换为英文模式",
|
||||
system: "系统",
|
||||
target: "目标",
|
||||
@ -279,14 +289,14 @@ let simplifiedChinese = {
|
||||
title: "标题",
|
||||
top: "顶部",
|
||||
traditionalChinese: "繁体中文",
|
||||
transparent: "透明",
|
||||
turnOffMonitor: "关闭显示器",
|
||||
unlockClassification: "解锁分类",
|
||||
unlockItem: "解锁项目",
|
||||
uploadIcon: "上传图标",
|
||||
url: "网址",
|
||||
useItemOpen: "从程序外拖动文件到项目图标上时用此项目打开文件",
|
||||
useItemOpen: "从程序外拖动文件到项目图标上用此项目打开文件",
|
||||
useProxy: "使用代理",
|
||||
useQuickSearch: "使用快速搜索",
|
||||
username: "用户名",
|
||||
update: "更新",
|
||||
webSearch: "网络搜索",
|
||||
@ -295,6 +305,7 @@ let simplifiedChinese = {
|
||||
webSearchModePrompt2: "{w}为搜索关键字。",
|
||||
width: "宽度",
|
||||
window: "窗口",
|
||||
windowTransparency: "窗口透明度",
|
||||
zoom: "缩放",
|
||||
};
|
||||
|
||||
@ -304,8 +315,8 @@ let traditionalChinese = {
|
||||
address: "地址",
|
||||
aggregateClassification: "聚合分類",
|
||||
aggregateClassificationPrompt1:
|
||||
"聚合分類可以將所有分類下的項目聚合到一起,按照設定的排序方式、項目數量進行排序和顯示。",
|
||||
aggregateClassificationPrompt2: "當前分類為父級分類,不能設置聚合分類。",
|
||||
"聚合分類會將所有分類下項目聚合到一起,按照設定的排序方式、項目數量進行顯示。",
|
||||
aggregateClassificationPrompt2: "當前分類是父級分類,不能設置為聚合分類。",
|
||||
aggregateClassificationPrompt3:
|
||||
"當前設置排序為按打開次數,需開啟設置-項目-記錄打開次數。",
|
||||
aggregateClassificationPrompt4:
|
||||
@ -321,7 +332,7 @@ let traditionalChinese = {
|
||||
associateFolderPrompt1:
|
||||
"關聯文件夾可以實時監控指定文件夾內的變化並同步到對應分類中。",
|
||||
associateFolderPrompt2: "需要隱藏的文件/文件夾名稱,多個按英文逗號分割",
|
||||
associateFolderPrompt3: "當前分類為父級分類,不能設置關聯文件夾。",
|
||||
associateFolderPrompt3: "當前分類是父級分類,不能設置為關聯文件夾。",
|
||||
associateFolderPrompt4: "目標路徑不存在。",
|
||||
associateFolderPrompt5: "目標路徑必須是文件夾。",
|
||||
associateFolderPrompt6:
|
||||
@ -332,15 +343,14 @@ let traditionalChinese = {
|
||||
backgroundIcon: "背景圖標",
|
||||
backgroundImage: "背景圖",
|
||||
backgroundImageMode: "背景圖模式",
|
||||
backgroundImagePostion: "背景圖定位",
|
||||
backgroundImageTransparent: "背景圖透明",
|
||||
backgroundTransparent: "背景透明",
|
||||
backgroundImagePosition: "背景圖定位",
|
||||
backgroundImageTransparency: "背景圖透明度",
|
||||
backup: "備份",
|
||||
backupRestoreData: "備份/還原數據",
|
||||
backupRestoreDataPrompt:
|
||||
"如果要還原1.2.3及之前版本的備份數據,請在還原時選擇導入JSON格式的文件。",
|
||||
batchConvertAbsolutePath: "轉為絕對路徑",
|
||||
batchConvertRelativePath: "轉為相對路徑",
|
||||
"如果要還原 1.2.3 及之前版本的數據,請在還原時選擇導入 JSON 格式的文件。",
|
||||
batchConvertAbsolutePath: "批量轉為絕對路徑",
|
||||
batchConvertRelativePath: "批量轉為相對路徑",
|
||||
batchCopyTo: "批量復製到",
|
||||
batchDelete: "批量刪除",
|
||||
batchDeletePrompt: "是否批量刪除項目?",
|
||||
@ -351,7 +361,7 @@ let traditionalChinese = {
|
||||
bottom: "底部",
|
||||
byInitialLetter: "按首字母",
|
||||
byLastOpen: "按最後打開",
|
||||
byOpenNumber: "按打開次數",
|
||||
byOpenCount: "按打開次數",
|
||||
calculator: "計算器",
|
||||
cancel: "取消",
|
||||
cancelBatchOperation: "取消批量操作",
|
||||
@ -369,16 +379,20 @@ let traditionalChinese = {
|
||||
colonKeywordSpace: "冒號 + 關鍵字 + 空格",
|
||||
color: "顏色",
|
||||
columnNumber: "列數",
|
||||
commandLine: "命令行",
|
||||
commandLinePrompt1: '在"快速搜索"或"搜索"中使用"> + 空格"進入命令行模式。',
|
||||
commandPrompt: "命令提示符",
|
||||
computer: "計算機",
|
||||
computerManagement: "計算機管理",
|
||||
controlPanel: "控製面板",
|
||||
convertAbsolutePath: "轉為絕對路徑",
|
||||
convertRelativePath: "轉為相對路徑",
|
||||
copy: "復製",
|
||||
copyFullPath: "復製完整路徑",
|
||||
copyTo: "復製到",
|
||||
createShortcut: "創建快捷方式",
|
||||
ctrlNumberKey: "Ctrl + 數字鍵",
|
||||
cut: "剪切",
|
||||
default: "默認",
|
||||
defaultIcon: "默認圖標",
|
||||
delayDisplay: "延遲顯示",
|
||||
@ -387,9 +401,10 @@ let traditionalChinese = {
|
||||
deleteClassificationPrompt: "是否刪除當前分類?",
|
||||
deleteIcon: "刪除圖標",
|
||||
deleteItemPrompt: "是否刪除當前項目?",
|
||||
deleteHistory: "刪除歷史記錄",
|
||||
description: "描述",
|
||||
display: "顯示",
|
||||
displayMainWindow: "顯示主界面",
|
||||
displayMainInterface: "顯示主界面",
|
||||
documents: "文檔",
|
||||
doubleClickOpen: "雙擊打開",
|
||||
doubleClickTaskbar: "雙擊任務欄",
|
||||
@ -404,6 +419,7 @@ let traditionalChinese = {
|
||||
editSubclassification: "編輯子分類",
|
||||
emptyRecycleBin: "清空回收站",
|
||||
enable: "啟用",
|
||||
enableQuickSearch: "啟用快速搜索",
|
||||
english: "英語",
|
||||
excludeSearch: "排除搜索",
|
||||
exit: "退出",
|
||||
@ -431,10 +447,12 @@ let traditionalChinese = {
|
||||
globalShortcutKey: "全局快捷鍵",
|
||||
hiddenItems: "隱藏項",
|
||||
hideEllipses: "隱藏省略號",
|
||||
hideLoseFocus: "失去焦點後隱藏",
|
||||
hideLoseFocus: "失去焦點隱藏",
|
||||
hideName: "隱藏名稱",
|
||||
hideTray: "隱藏托盤圖標",
|
||||
hideWindowCollapseSubClassification: "隱藏窗口時收起子分類",
|
||||
hideTaskbar: "隱藏任務欄",
|
||||
hideWindowCollapseSubClassification: "隱藏窗口收起子分類",
|
||||
hideWindowAfterOpen: "打開後隱藏窗口",
|
||||
history: "歷史記錄",
|
||||
hover: "懸停",
|
||||
icon: "圖標",
|
||||
@ -474,7 +492,7 @@ let traditionalChinese = {
|
||||
name: "名稱",
|
||||
network: "網絡",
|
||||
networkIcon: "網絡圖標",
|
||||
networkIconPrompt1: "支持JPG/JPEG/GIF/PNG/ICO/SVG/WEBP格式圖片。",
|
||||
networkIconPrompt1: "支持 JPG/JPEG/GIF/PNG/ICO/SVG/WEBP 格式圖片。",
|
||||
networkShareCenter: "網絡和共享中心",
|
||||
newClassification: "新建分類",
|
||||
newClassificationName: "新分類",
|
||||
@ -485,29 +503,32 @@ let traditionalChinese = {
|
||||
normal: "普通",
|
||||
notDisturb: "勿擾模式",
|
||||
notDisturbPrompt:
|
||||
"開啟勿擾模式後,計算機在遊戲、應用全屏模式下不會彈出Dawn Launcher窗口。",
|
||||
"開啟勿擾模式後,計算機在遊戲、應用全屏模式下不會彈出 Dawn Launcher 窗口。",
|
||||
notFoundFile: "找不到指定的文件",
|
||||
notFoundFolder: "找不到指定的文件夾",
|
||||
notTransparent: "不透明",
|
||||
number: "數量",
|
||||
numberKey: "數字鍵",
|
||||
officialWebsite: "官方網站",
|
||||
ok: "確定",
|
||||
open: "打開",
|
||||
openAfterHideMainInterface: "打開後隱藏主界面",
|
||||
openAfterHideQuickSearchWindow: "打開後隱藏窗口",
|
||||
openFileLocation: "打開文件所在位置",
|
||||
openNow: "僅剩一項時立即打開",
|
||||
openNumber: "打開次數",
|
||||
openNow: "僅剩一項立即打開",
|
||||
openCount: "打開次數",
|
||||
parameters: "參數",
|
||||
password: "密碼",
|
||||
pasteIcon: "粘貼圖標",
|
||||
paste: "粘貼",
|
||||
path: "路徑",
|
||||
powerOptions: "電源選項",
|
||||
powerShell: "PowerShell",
|
||||
programsFeatures: "程序和功能",
|
||||
proxy: "代理",
|
||||
proxyPrompt:
|
||||
"僅支持HTTP代理,填寫「地址」時需要帶通信協議和端口,例如:http://127.0.0.1:7890,如果沒有用戶名和密碼,為空即可。",
|
||||
'僅支持 HTTP 代理,填寫"地址"時需要帶通信協議和端口,例如:http://127.0.0.1:7890,如果沒有用戶名和密碼,為空即可。',
|
||||
prompt: "提示",
|
||||
quickSearch: "快速搜索",
|
||||
recordOpenNumber: "記錄打開次數",
|
||||
recordOpenCount: "記錄打開次數",
|
||||
recycleBin: "回收站",
|
||||
refreshIcon: "刷新圖標",
|
||||
registryEditor: "註冊表編輯器",
|
||||
@ -518,7 +539,6 @@ let traditionalChinese = {
|
||||
restart: "重啟",
|
||||
restore: "還原",
|
||||
restoreDataPrompt: "還原數據失敗。",
|
||||
rewardSponsor: "打賞&贊助",
|
||||
right: "右側",
|
||||
roundedCorners: "圓角",
|
||||
runAsAdministrator: "以管理員身份運行",
|
||||
@ -547,11 +567,13 @@ let traditionalChinese = {
|
||||
shortcutKeyPrompt5: '與"設置-常規"中的"搜索"快捷鍵產生沖突,請重新設置。',
|
||||
shortcutKeyPrompt6:
|
||||
'與"設置-快速搜索"中的"顯示/隱藏"快捷鍵產生沖突,請重新設置。',
|
||||
shortcutKeyPrompt7: "非法字符。",
|
||||
show: "顯示",
|
||||
showFollowMousePosition: "顯示時跟隨鼠標位置",
|
||||
showHide: "顯示/隱藏",
|
||||
showOnlyFiles: "只顯示文件",
|
||||
showOnlyFolders: "只顯示文件夾",
|
||||
showPath: "顯示路徑",
|
||||
shutdown: "關機",
|
||||
simplifiedChinese: "簡體中文",
|
||||
size: "尺寸",
|
||||
@ -564,10 +586,9 @@ let traditionalChinese = {
|
||||
startupTray: "啟動後最小化到系統托盤",
|
||||
subclassification: "子分類",
|
||||
svgIcon: "SVG圖標",
|
||||
svgIconPrompt1: "輸入SVG代碼後,需要先點擊「校驗代碼」按鈕。",
|
||||
svgIconPrompt1: '輸入 SVG 代碼後,需要先點擊"校驗代碼"按鈕。',
|
||||
switch: "切換",
|
||||
switchClassificationCollapseOtherSubClassification:
|
||||
"切換分類時收起其他子分類",
|
||||
switchClassificationCollapseOtherSubClassification: "切換分類收起其他子分類",
|
||||
switchEnglish: "顯示窗口時將輸入法切換為英文模式",
|
||||
system: "系統",
|
||||
target: "目標",
|
||||
@ -578,14 +599,14 @@ let traditionalChinese = {
|
||||
title: "標題",
|
||||
top: "頂部",
|
||||
traditionalChinese: "繁體中文",
|
||||
transparent: "透明",
|
||||
turnOffMonitor: "關閉顯示器",
|
||||
unlockClassification: "解鎖分類",
|
||||
unlockItem: "解鎖項目",
|
||||
uploadIcon: "上傳圖標",
|
||||
url: "網址",
|
||||
useItemOpen: "從程序外拖動文件到項目圖標上時用此項目打開文件",
|
||||
useItemOpen: "從程序外拖動文件到項目圖標上用此項目打開文件",
|
||||
useProxy: "使用代理",
|
||||
useQuickSearch: "使用快速搜索",
|
||||
username: "用戶名",
|
||||
update: "更新",
|
||||
webSearch: "網絡搜索",
|
||||
@ -594,6 +615,7 @@ let traditionalChinese = {
|
||||
webSearchModePrompt2: "{w}為搜索關鍵字。",
|
||||
width: "寬度",
|
||||
window: "窗口",
|
||||
windowTransparency: "窗口透明度",
|
||||
zoom: "縮放",
|
||||
};
|
||||
|
||||
@ -604,44 +626,44 @@ let english = {
|
||||
address: "Address",
|
||||
aggregateClassification: "Aggregate Classification",
|
||||
aggregateClassificationPrompt1:
|
||||
"Aggregation classification can aggregate items under all categories together, sort and display them according to the set sorting method and number of items.",
|
||||
"Aggregate classification will combine items from all classifications and display them according to the set sorting order and item count.",
|
||||
aggregateClassificationPrompt2:
|
||||
"The current classification is the parent classification, and aggregate classification cannot be set.",
|
||||
"The current classification is a parent classification and cannot be set as an aggregate classification.",
|
||||
aggregateClassificationPrompt3:
|
||||
"The current settings are sorted by the number of opens. You need to enable Settings-Item-Open Count the number of opens.",
|
||||
"The current sorting is set to by open count. You need to enable Settings - Item - Record open count.",
|
||||
aggregateClassificationPrompt4:
|
||||
"Setting an aggregation classification will clear all items under the original classification. Please operate with caution. Are you sure?",
|
||||
"Setting an aggregate classification will clear all items under the original classification. Please proceed with caution. Are you sure?",
|
||||
align: "Align",
|
||||
all: "All",
|
||||
altNumberKey: "Alt + Number Key",
|
||||
alwaysCenter: "Always Center",
|
||||
alwaysTop: "Always Top",
|
||||
alwaysTop: "Always on Top",
|
||||
appearance: "Appearance",
|
||||
appx: "Appx",
|
||||
associateFolder: "Associate Folder",
|
||||
associateFolderPrompt1:
|
||||
"Associate folder can monitor changes in the specified folder in real time and synchronize them to the corresponding classification.",
|
||||
"Associate folder can monitor changes in the specified folder in real-time and synchronize them with the corresponding classification.",
|
||||
associateFolderPrompt2:
|
||||
"Name of the file/folder to be hidden, multiple separated by commas",
|
||||
associateFolderPrompt3:
|
||||
"The current classification is the parent classification and associate folder cannot be set.",
|
||||
"The current classification is a parent classification and cannot be set as an associate folder.",
|
||||
associateFolderPrompt4: "The target path does not exist.",
|
||||
associateFolderPrompt5: "The destination path must be a folder.",
|
||||
associateFolderPrompt6:
|
||||
"Setting the associate folder will clear all items under the original classification. Please operate with caution. Are you sure?",
|
||||
"Setting an associate folder will clear all items under the original classification. Please proceed with caution. Are you sure?",
|
||||
associateFolderPrompt7:
|
||||
"The target path is empty. The current classification will be automatically converted to a normal classification. Are you sure?",
|
||||
autoSwitchClassification: "Auto Switch Classification on Scroll",
|
||||
"The target path is empty. The current classification will be automatically converted to a regular classification. Are you sure?",
|
||||
autoSwitchClassification:
|
||||
"Automatically switch classification when the item list scrolls to the bottom or top",
|
||||
backgroundIcon: "Background Icon",
|
||||
backgroundImage: "Background Image",
|
||||
backgroundImageMode: "Background Image Mode",
|
||||
backgroundImagePostion: "Background Image Postion",
|
||||
backgroundImageTransparent: "Background Image Transparent",
|
||||
backgroundTransparent: "Background Transparent",
|
||||
backgroundImagePosition: "Background Image Position",
|
||||
backgroundImageTransparency: "Background Image Transparency",
|
||||
backup: "Backup",
|
||||
backupRestoreData: "Backup/Restore Data",
|
||||
backupRestoreDataPrompt:
|
||||
"If you want to restore the backup data of versions 1.2.3 and earlier, please choose to import a file in JSON format when restoring.",
|
||||
"To restore data from version 1.2.3 and earlier, please choose to import a JSON file during the restoration process.",
|
||||
batchConvertAbsolutePath: "Batch Convert to Absolute Path",
|
||||
batchConvertRelativePath: "Batch Convert to Relative Path",
|
||||
batchCopyTo: "Batch Copy to",
|
||||
@ -652,9 +674,9 @@ let english = {
|
||||
batchRefreshIcon: "Batch Refresh Icon",
|
||||
borderColor: "Border Color",
|
||||
bottom: "Bottom",
|
||||
byInitialLetter: "by Initial Letter",
|
||||
byLastOpen: "by Last Open",
|
||||
byOpenNumber: "by Open Count",
|
||||
byInitialLetter: "By Initial Letter",
|
||||
byLastOpen: "By Last Open",
|
||||
byOpenCount: "By Open Count",
|
||||
calculator: "Calculator",
|
||||
cancel: "Cancel",
|
||||
cancelBatchOperation: "Cancel Batch Operation",
|
||||
@ -663,10 +685,10 @@ let english = {
|
||||
checkInvalidItem: "Check for Invalid Items",
|
||||
checkUpdates: "Check Updates",
|
||||
checkUpdatesPrompt1:
|
||||
'Check that there is a new version, click "OK" to jump to the official website to download the latest version.',
|
||||
checkUpdatesPrompt2: "It is currently the latest version.",
|
||||
"A new version has been detected. Click 'OK' to go to the official website and download the latest version.",
|
||||
checkUpdatesPrompt2: "You are already on the latest version.",
|
||||
checkUpdatesPrompt3:
|
||||
"Failed to check for updates, please confirm the network.",
|
||||
"Update check failed. Please check your network connection.",
|
||||
classification: "Classification",
|
||||
clear: "Clear",
|
||||
close: "Close",
|
||||
@ -674,16 +696,21 @@ let english = {
|
||||
colonKeywordSpace: "Colon + Keyword + Space",
|
||||
color: "Color",
|
||||
columnNumber: "Column Number",
|
||||
commandLine: "Command Line",
|
||||
commandLinePrompt1:
|
||||
'Use "> + Space" in "Quick Search" or "Search" to enter command-line mode.',
|
||||
commandPrompt: "Command Prompt",
|
||||
computer: "Computer",
|
||||
computerManagement: "Computer Management",
|
||||
controlPanel: "Control Panel",
|
||||
convertAbsolutePath: "Convert to Absolute Path",
|
||||
convertRelativePath: "Convert to Relative Path",
|
||||
copy: "Copy",
|
||||
copyFullPath: "Copy Full Path",
|
||||
copyTo: "Copy to",
|
||||
createShortcut: "Create Shortcut",
|
||||
ctrlNumberKey: "Ctrl + Number Key",
|
||||
cut: "Cut",
|
||||
default: "Default",
|
||||
defaultIcon: "Default Icon",
|
||||
delayDisplay: "Delay Display",
|
||||
@ -692,16 +719,17 @@ let english = {
|
||||
deleteClassificationPrompt: "Delete current classification?",
|
||||
deleteIcon: "Delete Icon",
|
||||
deleteItemPrompt: "Delete current item?",
|
||||
deleteHistory: "Delete History",
|
||||
description: "Description",
|
||||
display: "Display",
|
||||
displayMainWindow: "Display Main Interface",
|
||||
displayMainInterface: "Display Main Interface",
|
||||
documents: "Documents",
|
||||
doubleClickOpen: "Double Click Open",
|
||||
doubleClickTaskbar: "Double Click Taskbar",
|
||||
downloadImagePrompt1: "Failed to download image.",
|
||||
downloadImagePrompt2: "The link is not in image format.",
|
||||
dontPromptAgain: "Don't prompt again",
|
||||
edgeAutoHide: "Auto Hide at Desktop Edge",
|
||||
edgeAutoHide: "Automatically hide when docked to the edge of the desktop",
|
||||
edgeDock: "Edge Dock",
|
||||
edit: "Edit",
|
||||
editClassification: "Edit Classification",
|
||||
@ -709,6 +737,7 @@ let english = {
|
||||
editSubclassification: "Edit Subclassification",
|
||||
emptyRecycleBin: "Empty Recycle Bin",
|
||||
enable: "Enable",
|
||||
enableQuickSearch: "Enable Quick Search",
|
||||
english: "English",
|
||||
excludeSearch: "Exclude Search",
|
||||
exit: "Exit",
|
||||
@ -736,22 +765,24 @@ let english = {
|
||||
globalShortcutKey: "Global Shortcut Key",
|
||||
hiddenItems: "Hidden Items",
|
||||
hideEllipses: "Hide Ellipses",
|
||||
hideLoseFocus: "Hide After Lose Focus",
|
||||
hideLoseFocus: "Loss of Focus Hide",
|
||||
hideName: "Hide Name",
|
||||
hideTray: "Hide Tray",
|
||||
hideTray: "Hide Tray Icon",
|
||||
hideTaskbar: "Hide Taskbar",
|
||||
hideWindowCollapseSubClassification:
|
||||
"Collapse Subclassification when Hide Window",
|
||||
"Collapse subclassifications when the window is hidden",
|
||||
hideWindowAfterOpen: "Hide Window After Opening",
|
||||
history: "History",
|
||||
hover: "Hover",
|
||||
icon: "Icon",
|
||||
imageLink: "Image Link",
|
||||
item: "Item",
|
||||
itemAddEditPrompt1:
|
||||
"After selecting the fixed icon, the current project will not participate in refreshing the icon.",
|
||||
itemAddEditPrompt2: "Leave it blank if there are no special requirements",
|
||||
"After selecting a fixed icon, the current item will not participate in icon refreshing.",
|
||||
itemAddEditPrompt2: "Leave empty if there are no special requirements",
|
||||
itemAddEditPrompt3: "Add successfully.",
|
||||
itemAddEditPrompt4: "The target does not exist.",
|
||||
itemAddEditPrompt5: "Failed to obtain URL information.",
|
||||
itemAddEditPrompt5: "Failed to retrieve website information.",
|
||||
itemList: "Item List",
|
||||
keyword: "Keyword",
|
||||
keywordSpace: "Leyword + Space",
|
||||
@ -781,7 +812,7 @@ let english = {
|
||||
name: "Name",
|
||||
network: "Network",
|
||||
networkIcon: "Network Icon",
|
||||
networkIconPrompt1: "Supports JPG/JPEG/GIF/PNG/ICO/SVG/WEBP format images.",
|
||||
networkIconPrompt1: "Supports JPG/JPEG/GIF/PNG/ICO/SVG/WEBP image formats.",
|
||||
networkShareCenter: "Network Share Center",
|
||||
newClassification: "New Classification",
|
||||
newClassificationName: "New Classification",
|
||||
@ -792,29 +823,32 @@ let english = {
|
||||
normal: "Normal",
|
||||
notDisturb: "Not Disturb Mode",
|
||||
notDisturbPrompt:
|
||||
"After turning on Do Not Disturb mode, the Dawn Launcher window will not pop up when the computer is in full-screen mode for games or applications.",
|
||||
"After enabling Do Not Disturb mode, Dawn Launcher will not pop up during full-screen games or applications.",
|
||||
notFoundFile: "The file specified cannot be found",
|
||||
notFoundFolder: "The specified folder cannot be found",
|
||||
notTransparent: "Not Transparent",
|
||||
number: "Number",
|
||||
numberKey: "Number Key",
|
||||
officialWebsite: "Official Website",
|
||||
ok: "OK",
|
||||
open: "Open",
|
||||
openAfterHideMainInterface: "Hide Main Interface After Open",
|
||||
openAfterHideQuickSearchWindow: "Hide Window After Open",
|
||||
openFileLocation: "Open File Location",
|
||||
openNow: "Open when Only One Item",
|
||||
openNumber: "Open Count",
|
||||
openNow: "Only one item left to open immediately",
|
||||
openCount: "Open Count",
|
||||
parameters: "Parameters",
|
||||
password: "Password",
|
||||
pasteIcon: "Paste Icon",
|
||||
paste: "Paste",
|
||||
path: "Path",
|
||||
powerOptions: "Power Options",
|
||||
powerShell: "PowerShell",
|
||||
programsFeatures: "Programs Features",
|
||||
proxy: "Proxy",
|
||||
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.',
|
||||
prompt: "Prompt",
|
||||
quickSearch: "Quick Search",
|
||||
recordOpenNumber: "Record Open Count",
|
||||
recordOpenCount: "Record Open Count",
|
||||
recycleBin: "Recycle Bin",
|
||||
refreshIcon: "Refresh Icon",
|
||||
registryEditor: "Registry Editor",
|
||||
@ -825,7 +859,6 @@ let english = {
|
||||
restart: "Restart",
|
||||
restore: "Restore",
|
||||
restoreDataPrompt: "Failed to restore data.",
|
||||
rewardSponsor: "Reward&Sponsor",
|
||||
right: "Right",
|
||||
roundedCorners: "Rounded Corners",
|
||||
runAsAdministrator: "Run as Administrator",
|
||||
@ -864,12 +897,14 @@ let english = {
|
||||
'It conflicts with the "Search" shortcut key in "Settings-General", please reset it.',
|
||||
shortcutKeyPrompt6:
|
||||
'It conflicts with the "Show/Hide" shortcut key in "Settings-Quick Search", please reset it.',
|
||||
shortcutKeyPrompt7: "Invaild symbol.",
|
||||
show: "Show",
|
||||
showFollowMousePosition: "Follows Mouse Position on Display",
|
||||
showFollowMousePosition: "Follow the mouse position when displayed",
|
||||
showHide: "Show/Hide",
|
||||
showOnlyFiles: "Show Only Files",
|
||||
showOnlyFolders: "Show Only Folders",
|
||||
shutdown: "Shutdown关机",
|
||||
showPath: "Show Path",
|
||||
shutdown: "Shutdown",
|
||||
simplifiedChinese: "Simplified Chinese",
|
||||
size: "Size",
|
||||
sleep: "Sleep",
|
||||
@ -878,15 +913,16 @@ let english = {
|
||||
startLocation: "Start Location",
|
||||
startMenu: "Start Menu",
|
||||
startup: "Startup",
|
||||
startupTray: "Minimize to System Tray on Startup",
|
||||
startupTray: "Minimize to system tray on startup",
|
||||
subclassification: "Subclassification",
|
||||
svgIcon: "SVG Icon",
|
||||
svgIconPrompt1:
|
||||
'After entering the SVG code, you need to click the "Check Code" button first.',
|
||||
'After entering SVG code, you need to click the "Validate Code" button first.',
|
||||
switch: "Switch",
|
||||
switchClassificationCollapseOtherSubClassification:
|
||||
"Collapse Other Subclassification on Classification Switch",
|
||||
switchEnglish: "Switch to English Input on Window Display",
|
||||
"Collapse other subclassifications when switching classifications",
|
||||
switchEnglish:
|
||||
"Switch the input method to English mode when the window is displayed",
|
||||
system: "System",
|
||||
target: "Target",
|
||||
taskManager: "Task Manager",
|
||||
@ -896,14 +932,15 @@ let english = {
|
||||
title: "Title",
|
||||
top: "Top",
|
||||
traditionalChinese: "Traditional Chinese",
|
||||
transparent: "Transparent",
|
||||
turnOffMonitor: "Turn Off Monitor",
|
||||
unlockClassification: "Unlock Classification",
|
||||
unlockItem: "Unlock Item",
|
||||
uploadIcon: "Upload Icon",
|
||||
url: "URL",
|
||||
useItemOpen: "Use This Item to Open Dragged Files",
|
||||
useItemOpen:
|
||||
"Open files with this item when dragging files from outside the program to the item icon",
|
||||
useProxy: "Use Proxy",
|
||||
useQuickSearch: "Use Quick Search",
|
||||
username: "Username",
|
||||
update: "Update",
|
||||
webSearch: "Web Search",
|
||||
@ -912,6 +949,7 @@ let english = {
|
||||
webSearchModePrompt2: "{w} is the search keyword.",
|
||||
width: "Width",
|
||||
window: "Window",
|
||||
windowTransparency: "Window Transparency",
|
||||
zoom: "Zoom",
|
||||
};
|
||||
|
||||
|
@ -3,83 +3,83 @@ import { Theme } from "../../types/setting";
|
||||
const themeList: Array<Theme> = [
|
||||
{
|
||||
name: "#FFFFFF",
|
||||
mainFontColor: "#505050FF",
|
||||
secondFontColor: "#505050FF",
|
||||
mainBackgroundColor: "#FFFFFFFF",
|
||||
secondBackgroundColor: "#DCDEDFFF",
|
||||
borderColor: "#F0F0F0FF",
|
||||
mainFontColor: "#505050",
|
||||
secondFontColor: "#505050",
|
||||
mainBackgroundColor: "#FFFFFF",
|
||||
secondBackgroundColor: "#DCDEDF",
|
||||
borderColor: "#F0F0F0",
|
||||
},
|
||||
{
|
||||
name: "#2B2B2B",
|
||||
mainFontColor: "#BBBBBBFF",
|
||||
secondFontColor: "#BBBBBBFF",
|
||||
mainBackgroundColor: "#2B2B2BFF",
|
||||
secondBackgroundColor: "#3C3F41FF",
|
||||
borderColor: "#3C3F41FF",
|
||||
mainFontColor: "#BBBBBB",
|
||||
secondFontColor: "#BBBBBB",
|
||||
mainBackgroundColor: "#2B2B2B",
|
||||
secondBackgroundColor: "#3C3F41",
|
||||
borderColor: "#373737",
|
||||
},
|
||||
{
|
||||
name: "#508CC8",
|
||||
mainFontColor: "#FFFFFFFF",
|
||||
secondFontColor: "#FFFFFFFF",
|
||||
mainBackgroundColor: "#508CC8FF",
|
||||
secondBackgroundColor: "#6FA0D2FF",
|
||||
borderColor: "#6FA0D2FF",
|
||||
mainFontColor: "#FFFFFF",
|
||||
secondFontColor: "#FFFFFF",
|
||||
mainBackgroundColor: "#508CC8",
|
||||
secondBackgroundColor: "#6FA0D2",
|
||||
borderColor: "#5A94CD",
|
||||
},
|
||||
{
|
||||
name: "#024351",
|
||||
mainFontColor: "#FFFFFFFF",
|
||||
secondFontColor: "#FFFFFFFF",
|
||||
mainBackgroundColor: "#024351FF",
|
||||
secondBackgroundColor: "#025A6CFF",
|
||||
borderColor: "#025A6CFF",
|
||||
mainFontColor: "#FFFFFF",
|
||||
secondFontColor: "#FFFFFF",
|
||||
mainBackgroundColor: "#024351",
|
||||
secondBackgroundColor: "#025A6C",
|
||||
borderColor: "#064D5C",
|
||||
},
|
||||
{
|
||||
name: "#516FA3",
|
||||
mainFontColor: "#FFFFFFFF",
|
||||
secondFontColor: "#FFFFFFFF",
|
||||
mainBackgroundColor: "#516FA3FF",
|
||||
secondBackgroundColor: "#91A8D0FF",
|
||||
borderColor: "#91A8D0FF",
|
||||
mainFontColor: "#FFFFFF",
|
||||
secondFontColor: "#FFFFFF",
|
||||
mainBackgroundColor: "#516FA3",
|
||||
secondBackgroundColor: "#91A8D0",
|
||||
borderColor: "#5D78A7",
|
||||
},
|
||||
{
|
||||
name: "#45326E",
|
||||
mainFontColor: "#FFFFFFFF",
|
||||
secondFontColor: "#FFFFFFFF",
|
||||
mainBackgroundColor: "#45326EFF",
|
||||
secondBackgroundColor: "#5F4B8BFF",
|
||||
borderColor: "#5F4B8BFF",
|
||||
mainFontColor: "#FFFFFF",
|
||||
secondFontColor: "#FFFFFF",
|
||||
mainBackgroundColor: "#45326E",
|
||||
secondBackgroundColor: "#5F4B8B",
|
||||
borderColor: "#4C3A73",
|
||||
},
|
||||
{
|
||||
name: "#693030",
|
||||
mainFontColor: "#FFFFFFFF",
|
||||
secondFontColor: "#FFFFFFFF",
|
||||
mainBackgroundColor: "#693030FF",
|
||||
secondBackgroundColor: "#955151FF",
|
||||
borderColor: "#803A3AFF",
|
||||
mainFontColor: "#FFFFFF",
|
||||
secondFontColor: "#FFFFFF",
|
||||
mainBackgroundColor: "#693030",
|
||||
secondBackgroundColor: "#955151",
|
||||
borderColor: "#733535",
|
||||
},
|
||||
{
|
||||
name: "#9F2F4A",
|
||||
mainFontColor: "#FFFFFFFF",
|
||||
secondFontColor: "#FFFFFFFF",
|
||||
mainBackgroundColor: "#9F2F4AFF",
|
||||
secondBackgroundColor: "#EA6F8CFF",
|
||||
borderColor: "#AD3350FF",
|
||||
mainFontColor: "#FFFFFF",
|
||||
secondFontColor: "#FFFFFF",
|
||||
mainBackgroundColor: "#9F2F4A",
|
||||
secondBackgroundColor: "#EA6F8C",
|
||||
borderColor: "#AD3350",
|
||||
},
|
||||
{
|
||||
name: "#000000,#FFDB00",
|
||||
mainFontColor: "#B3B3B3FF",
|
||||
secondFontColor: "#000000FF",
|
||||
mainBackgroundColor: "#000000FF",
|
||||
secondBackgroundColor: "#FFDB00FF",
|
||||
borderColor: "#1D1D1DFF",
|
||||
mainFontColor: "#B3B3B3",
|
||||
secondFontColor: "#000000",
|
||||
mainBackgroundColor: "#000000",
|
||||
secondBackgroundColor: "#FFDB00",
|
||||
borderColor: "#1D1D1D",
|
||||
},
|
||||
{
|
||||
name: "#000000,#FFFFFF",
|
||||
mainFontColor: "#B3B3B3FF",
|
||||
secondFontColor: "#000000FF",
|
||||
mainBackgroundColor: "#000000FF",
|
||||
secondBackgroundColor: "#FFFFFFFF",
|
||||
borderColor: "#1D1D1DFF",
|
||||
mainFontColor: "#B3B3B3",
|
||||
secondFontColor: "#000000",
|
||||
mainBackgroundColor: "#000000",
|
||||
secondBackgroundColor: "#FFFFFF",
|
||||
borderColor: "#1D1D1D",
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -14,7 +14,7 @@ function convert<F, T>(from: F): T {
|
||||
* @returns
|
||||
*/
|
||||
function isAbsolutePath(path: string) {
|
||||
const regex = /^[a-zA-Z]:\\/;
|
||||
const regex = /^[a-zA-Z]:\\|^\\\\/;
|
||||
return regex.test(path);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import {
|
||||
Appearance,
|
||||
Classification,
|
||||
CommandLine,
|
||||
General,
|
||||
Item,
|
||||
Network,
|
||||
@ -31,6 +32,7 @@ function getGeneral({
|
||||
lockSize = false,
|
||||
hideLoseFocus = false,
|
||||
hideTray = false,
|
||||
hideTaskbar = true,
|
||||
fixedPosition = false,
|
||||
alwaysCenter = false,
|
||||
showHideMouseWheelClick = false,
|
||||
@ -53,6 +55,7 @@ function getGeneral({
|
||||
lockSize?: boolean | null;
|
||||
hideLoseFocus?: boolean | null;
|
||||
hideTray?: boolean | null;
|
||||
hideTaskbar?: boolean | null;
|
||||
fixedPosition?: boolean | null;
|
||||
alwaysCenter?: boolean | null;
|
||||
showHideMouseWheelClick?: boolean | null;
|
||||
@ -76,6 +79,7 @@ function getGeneral({
|
||||
lockSize: lockSize ?? false,
|
||||
hideLoseFocus: hideLoseFocus ?? false,
|
||||
hideTray: hideTray ?? false,
|
||||
hideTaskbar: hideTaskbar ?? true,
|
||||
fixedPosition: fixedPosition ?? false,
|
||||
alwaysCenter: alwaysCenter ?? false,
|
||||
showHideMouseWheelClick: showHideMouseWheelClick ?? false,
|
||||
@ -185,15 +189,18 @@ function getSubClassification({
|
||||
itemAreaNameFontSize = 14,
|
||||
itemAreaNameFontWeight = 700,
|
||||
itemAreaNameFontLineHeight = 1.25,
|
||||
itemAreaNameAlign = "left",
|
||||
}: {
|
||||
itemAreaNameFontSize?: number | null;
|
||||
itemAreaNameFontWeight?: number | null;
|
||||
itemAreaNameFontLineHeight?: number | null;
|
||||
itemAreaNameAlign?: "left" | "center" | "right" | null;
|
||||
}): SubClassification {
|
||||
return {
|
||||
itemAreaNameFontSize: itemAreaNameFontSize ?? 14,
|
||||
itemAreaNameFontWeight: itemAreaNameFontWeight ?? 700,
|
||||
itemAreaNameFontLineHeight: itemAreaNameFontLineHeight ?? 1.25,
|
||||
itemAreaNameAlign: itemAreaNameAlign ?? "left",
|
||||
};
|
||||
}
|
||||
|
||||
@ -217,6 +224,7 @@ function getItem({
|
||||
fontSize = 14,
|
||||
fontWeight = 400,
|
||||
fontLineHeight = 1.25,
|
||||
promptShowPath = false,
|
||||
}: {
|
||||
layout?: string | null;
|
||||
iconSize?: number | null;
|
||||
@ -233,6 +241,7 @@ function getItem({
|
||||
fontSize?: number | null;
|
||||
fontWeight?: number | null;
|
||||
fontLineHeight?: number | null;
|
||||
promptShowPath?: boolean | null;
|
||||
}): Item {
|
||||
return {
|
||||
layout: layout ?? "tile",
|
||||
@ -250,6 +259,7 @@ function getItem({
|
||||
fontSize: fontSize ?? 14,
|
||||
fontWeight: fontWeight ?? 400,
|
||||
fontLineHeight: fontLineHeight ?? 1.25,
|
||||
promptShowPath: promptShowPath ?? false,
|
||||
};
|
||||
}
|
||||
|
||||
@ -268,6 +278,7 @@ function getQuickSearch({
|
||||
useItemOpen = false,
|
||||
openAfterHideQuickSearchWindow = true,
|
||||
matchConditionsRemark = false,
|
||||
width = 600,
|
||||
}: {
|
||||
enable?: boolean | null;
|
||||
showHideShortcutKey?: string | null;
|
||||
@ -279,6 +290,7 @@ function getQuickSearch({
|
||||
useItemOpen?: boolean | null;
|
||||
openAfterHideQuickSearchWindow?: boolean | null;
|
||||
matchConditionsRemark?: boolean | null;
|
||||
width?: number | null;
|
||||
}): QuickSearch {
|
||||
return {
|
||||
enable: enable ?? true,
|
||||
@ -291,6 +303,7 @@ function getQuickSearch({
|
||||
useItemOpen: useItemOpen ?? false,
|
||||
openAfterHideQuickSearchWindow: openAfterHideQuickSearchWindow ?? true,
|
||||
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
|
||||
@ -371,6 +398,9 @@ function getSetting(setting: Setting | null): Setting {
|
||||
webSearch: getWebSearch(
|
||||
setting && setting.webSearch ? setting.webSearch : {}
|
||||
),
|
||||
commandLine: getCommandLine(
|
||||
setting && setting.commandLine ? setting.commandLine : {}
|
||||
),
|
||||
network: getNetwork(setting && setting.network ? setting.network : {}),
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { resolve, dirname, parse } from "node:path";
|
||||
import { resolve, dirname, parse, join } from "node:path";
|
||||
import { isAbsolutePath } from "../../commons/utils/common";
|
||||
import mime from "mime";
|
||||
import { readFileSync } from "node:fs";
|
||||
import icojs from "icojs";
|
||||
|
||||
// 图标格式
|
||||
const iconExts = ["jpg", "jpeg", "png", "gif", "ico", "svg", "webp"];
|
||||
@ -59,12 +60,21 @@ function getURLParams(paramsMap: Map<string, any>) {
|
||||
function parseEnvPath(path: string) {
|
||||
// 尝试解析路径中的环境变量
|
||||
let parsedPath = parse(path);
|
||||
let isBase = false;
|
||||
// 路径数组
|
||||
let pathArr: Array<string> = [];
|
||||
// 判断是否是网络路径,以\\开头
|
||||
let isNetwork = false;
|
||||
if (path.indexOf("\\\\") === 0) {
|
||||
isNetwork = true;
|
||||
}
|
||||
// 是否是一级路径
|
||||
let isBase = false;
|
||||
if (!parsedPath.dir || parsedPath.dir.trim() === "") {
|
||||
// 如果为空代表路径只有一级,也就是当前文件本身,比如C:/1.txt
|
||||
pathArr = parsedPath.base.split("\\");
|
||||
isBase = true;
|
||||
} else {
|
||||
// 不为空代表有父级目录
|
||||
pathArr = parsedPath.dir.split("\\");
|
||||
}
|
||||
// 新路径
|
||||
@ -93,22 +103,24 @@ function parseEnvPath(path: string) {
|
||||
if (!isBase) {
|
||||
newPathArr.push(parsedPath.base);
|
||||
}
|
||||
// 拼接并返回
|
||||
return newPathArr.join("\\");
|
||||
// 拼接
|
||||
let newPath = join(...newPathArr);
|
||||
// 如果是网络路径,在最前面加\\
|
||||
if (isNetwork) {
|
||||
newPath = "\\\\" + newPath;
|
||||
}
|
||||
return newPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取绝对路径
|
||||
* @param path
|
||||
* 解析路径
|
||||
* @returns
|
||||
*/
|
||||
function getAbsolutePath(path: string) {
|
||||
if (!isAbsolutePath(path)) {
|
||||
function parsePath(path: string) {
|
||||
// 尝试解析环境变量
|
||||
let newPath = parseEnvPath(path);
|
||||
// 判断解析之后的路径是否是绝对路径
|
||||
if (isAbsolutePath(newPath)) {
|
||||
return newPath;
|
||||
} else {
|
||||
path = parseEnvPath(path);
|
||||
// 是否是相对路径
|
||||
if (!isAbsolutePath(path)) {
|
||||
return resolve(
|
||||
process.env.NODE_ENV === "development"
|
||||
? resolve(".")
|
||||
@ -116,7 +128,6 @@ function getAbsolutePath(path: string) {
|
||||
path
|
||||
);
|
||||
}
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
@ -124,7 +135,7 @@ function getAbsolutePath(path: string) {
|
||||
* 获取文件图标
|
||||
* @param filePath
|
||||
*/
|
||||
function getFileIcon(filePath: string | null) {
|
||||
async function getFileIcon(filePath: string | null) {
|
||||
// 图标
|
||||
let icon: string | null = null;
|
||||
if (filePath) {
|
||||
@ -133,6 +144,16 @@ function getFileIcon(filePath: string | null) {
|
||||
if (iconExts.includes(ext)) {
|
||||
// 读取文件
|
||||
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 =
|
||||
"data:" +
|
||||
mime.getType(filePath) +
|
||||
@ -146,10 +167,4 @@ function getFileIcon(filePath: string | null) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
export {
|
||||
getURLParams,
|
||||
getAbsolutePath,
|
||||
getFileIcon,
|
||||
iconExts,
|
||||
getRandomUserAgent,
|
||||
};
|
||||
export { getURLParams, parsePath, getFileIcon, iconExts, getRandomUserAgent };
|
||||
|
@ -18,14 +18,17 @@ function createWindow() {
|
||||
parent: global.mainWindow,
|
||||
height: 212,
|
||||
width: 600,
|
||||
type: "toolbar",
|
||||
maximizable: false,
|
||||
minimizable: false,
|
||||
resizable: false,
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
|
@ -14,7 +14,7 @@ import { getDataSqlite3 } from "../../commons/betterSqlite3";
|
||||
let db = getDataSqlite3();
|
||||
|
||||
// 分类表名
|
||||
let classificationTableName = "classification";
|
||||
let tableName = "classification";
|
||||
|
||||
// 查询字段
|
||||
let selectColumn =
|
||||
@ -41,7 +41,7 @@ function getClassification(row: any): Classification {
|
||||
*/
|
||||
function init() {
|
||||
// sql
|
||||
let sql = `CREATE TABLE IF NOT EXISTS ${classificationTableName} (
|
||||
let sql = `CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
parent_id INTEGER,
|
||||
name TEXT NOT NULL,
|
||||
@ -53,7 +53,7 @@ function init() {
|
||||
// 运行
|
||||
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 count = row.count as number;
|
||||
if (count === 0) {
|
||||
@ -70,7 +70,7 @@ function list(parentId: number | null = null) {
|
||||
// 参数
|
||||
let params = [];
|
||||
// sql
|
||||
let sql = `SELECT ${selectColumn} FROM ${classificationTableName}`;
|
||||
let sql = `SELECT ${selectColumn} FROM ${tableName}`;
|
||||
if (parentId) {
|
||||
sql += " WHERE parent_id = ?";
|
||||
params.push(parentId);
|
||||
@ -103,7 +103,7 @@ function add(
|
||||
// 获取序号
|
||||
let newOrder = getMaxOrder(parentId) + 1;
|
||||
// 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
|
||||
.prepare(sql)
|
||||
@ -146,7 +146,7 @@ function add(
|
||||
*/
|
||||
function update(classification: Classification) {
|
||||
// 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 (
|
||||
db
|
||||
@ -169,7 +169,7 @@ function update(classification: Classification) {
|
||||
*/
|
||||
function updateData(id: number, data: ClassificationData) {
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ function updateData(id: number, data: ClassificationData) {
|
||||
*/
|
||||
function selectById(id: number): Classification | null {
|
||||
// SQL
|
||||
let sql = `SELECT ${selectColumn} FROM ${classificationTableName} WHERE id = ?`;
|
||||
let sql = `SELECT ${selectColumn} FROM ${tableName} WHERE id = ?`;
|
||||
// 运行
|
||||
let row = db.prepare(sql).get(id);
|
||||
// 返回
|
||||
@ -201,7 +201,7 @@ function del(id: number) {
|
||||
// 查询有无子分类
|
||||
let childList = list(classifictaion.id);
|
||||
// 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;
|
||||
if (res) {
|
||||
@ -256,14 +256,14 @@ function updateOrder(
|
||||
newOrder = getMaxOrder(parentId) + 1;
|
||||
}
|
||||
// SQL
|
||||
let sql = `UPDATE ${classificationTableName} SET \`order\` = ? WHERE id = ?`;
|
||||
let sql = `UPDATE ${tableName} SET \`order\` = ? WHERE id = ?`;
|
||||
// 更新排序
|
||||
db.prepare(sql).run(newOrder, fromClassification.id);
|
||||
// 判断新序号和老序号之间的数据是+1还是-1
|
||||
if (newOrder > fromClassification.order) {
|
||||
// 新序号和老序号之间数据,序号-1
|
||||
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) {
|
||||
sql += " AND parent_id = ?";
|
||||
params.push(parentId);
|
||||
@ -274,7 +274,7 @@ function updateOrder(
|
||||
} else {
|
||||
// 新序号和老序号之间数据,序号+1
|
||||
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) {
|
||||
sql += " AND parent_id = ?";
|
||||
params.push(parentId);
|
||||
@ -298,7 +298,7 @@ function reorder(parentId: number | null) {
|
||||
// 开启事务
|
||||
db.transaction(() => {
|
||||
// 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++) {
|
||||
db.prepare(sql).run(i + 1, classificationList[i].id);
|
||||
@ -312,7 +312,7 @@ function reorder(parentId: number | null) {
|
||||
*/
|
||||
function getMaxOrder(parentId: number | null) {
|
||||
// SQL
|
||||
let sql = `SELECT MAX(\`order\`) \`order\` FROM ${classificationTableName}`;
|
||||
let sql = `SELECT MAX(\`order\`) \`order\` FROM ${tableName}`;
|
||||
if (parentId) {
|
||||
sql += " WHERE parent_id = ?";
|
||||
} else {
|
||||
@ -337,7 +337,7 @@ function updateIcon(id: number, icon: string | null) {
|
||||
let classification = selectById(id);
|
||||
if (classification) {
|
||||
// SQL
|
||||
let sql = `UPDATE ${classificationTableName} SET data = ? WHERE id = ?`;
|
||||
let sql = `UPDATE ${tableName} SET data = ? WHERE id = ?`;
|
||||
// 更新图标
|
||||
classification.data.icon = icon;
|
||||
return (
|
||||
|
@ -43,14 +43,17 @@ function createAddEditWindow(id: number | null, parentId: number | null) {
|
||||
parent: global.mainWindow,
|
||||
height: 174,
|
||||
width: 400,
|
||||
type: "toolbar",
|
||||
maximizable: false,
|
||||
minimizable: false,
|
||||
resizable: false,
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -108,14 +111,17 @@ function createSetIconWindow(id: number) {
|
||||
parent: global.mainWindow,
|
||||
height: 500,
|
||||
width: 358,
|
||||
type: "toolbar",
|
||||
maximizable: false,
|
||||
minimizable: false,
|
||||
resizable: false,
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -168,14 +174,17 @@ function createAssociateFolderWindow(id: number) {
|
||||
parent: global.mainWindow,
|
||||
height: 249,
|
||||
width: 400,
|
||||
type: "toolbar",
|
||||
maximizable: false,
|
||||
minimizable: false,
|
||||
resizable: false,
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -233,14 +242,17 @@ function createAggregateWindow(id: number) {
|
||||
parent: global.mainWindow,
|
||||
height: 144,
|
||||
width: 400,
|
||||
type: "toolbar",
|
||||
maximizable: false,
|
||||
minimizable: false,
|
||||
resizable: false,
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -532,7 +544,7 @@ function getItemSortMenu(classification: Classification) {
|
||||
if (global.setting.item.openNumber) {
|
||||
submenus.push(
|
||||
new MenuItem({
|
||||
label: global.language.byOpenNumber,
|
||||
label: global.language.byOpenCount,
|
||||
icon:
|
||||
classification.data.itemSort === "openNumber" && !hasChild
|
||||
? getDot()
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Menu, MenuItem, ipcMain, dialog } from "electron";
|
||||
import { Menu, MenuItem, ipcMain } from "electron";
|
||||
import { Classification } from "../../../types/classification";
|
||||
import {
|
||||
createAddEditWindow,
|
||||
@ -27,7 +27,12 @@ import {
|
||||
batchUpdateFixed,
|
||||
} from "./data";
|
||||
import { setShortcutKey } from "../setting";
|
||||
import { closeWindow, getDot, sendToWebContent } from "../commons/index";
|
||||
import {
|
||||
closeWindow,
|
||||
getDot,
|
||||
sendToWebContent,
|
||||
showMessageBoxSync,
|
||||
} from "../commons/index";
|
||||
|
||||
export default function () {
|
||||
// 获取分类列表
|
||||
@ -248,13 +253,12 @@ export default function () {
|
||||
new MenuItem({
|
||||
label: global.language.delete,
|
||||
click: () => {
|
||||
let res = dialog.showMessageBoxSync(global.mainWindow, {
|
||||
message: global.language.deleteClassificationPrompt,
|
||||
buttons: [global.language.ok, global.language.cancel],
|
||||
type: "question",
|
||||
noLink: true,
|
||||
cancelId: 1,
|
||||
});
|
||||
let res = showMessageBoxSync(
|
||||
"mainWindow",
|
||||
global.language.deleteClassificationPrompt,
|
||||
"question",
|
||||
[global.language.ok, global.language.cancel]
|
||||
);
|
||||
if (res === 0) {
|
||||
// 删除数据
|
||||
if (del(classification.id)) {
|
||||
|
@ -6,7 +6,17 @@ import retry from "retry";
|
||||
import request from "request";
|
||||
import * as cheerio from "cheerio";
|
||||
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 URI from "urijs";
|
||||
import { hideMainWindow } from "../main";
|
||||
@ -73,6 +83,8 @@ function downloadImage(windowName: string, url: string) {
|
||||
headers: {
|
||||
"User-Agent": getRandomUserAgent(),
|
||||
},
|
||||
maxRedirects: 5,
|
||||
jar: true,
|
||||
},
|
||||
function (error, response, body) {
|
||||
if (operation.retry(error)) {
|
||||
@ -139,6 +151,8 @@ function getURLInfo(windowName: string, url: string, redirect: boolean) {
|
||||
headers: {
|
||||
"User-Agent": getRandomUserAgent(),
|
||||
},
|
||||
maxRedirects: 5,
|
||||
jar: true,
|
||||
},
|
||||
function (error, response, body) {
|
||||
if (operation.retry(error)) {
|
||||
@ -195,6 +209,9 @@ function analysisHTML(windowName: string, url: string, data: string) {
|
||||
let $ = cheerio.load(data);
|
||||
// 获取标题
|
||||
result.name = $("head").find("title").text();
|
||||
if (!result.name || result.name.trim() === "") {
|
||||
result.name = $("title").text();
|
||||
}
|
||||
// 获取图标URL
|
||||
let iconURL: string | null = null;
|
||||
let icon = $("link[rel='icon']");
|
||||
@ -237,6 +254,8 @@ function analysisHTML(windowName: string, url: string, data: string) {
|
||||
headers: {
|
||||
"User-Agent": getRandomUserAgent(),
|
||||
},
|
||||
maxRedirects: 5,
|
||||
jar: true,
|
||||
},
|
||||
function (error, response, body) {
|
||||
if (operation.retry(error)) {
|
||||
@ -256,6 +275,9 @@ function analysisHTML(windowName: string, url: string, data: string) {
|
||||
result.status = true;
|
||||
sendUrlInfo(windowName, result);
|
||||
} else {
|
||||
if (result.name && result.name.trim() !== "") {
|
||||
result.status = true;
|
||||
}
|
||||
sendUrlInfo(windowName, result);
|
||||
}
|
||||
}
|
||||
@ -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 {
|
||||
downloadImage,
|
||||
getURLInfo,
|
||||
@ -474,8 +579,13 @@ export {
|
||||
sendToWebContent,
|
||||
closeAllChildProcess,
|
||||
openAfterHideWindow,
|
||||
showErrorMessageBox,
|
||||
relaunch,
|
||||
getUserDataPath,
|
||||
getMainBackgorunColor,
|
||||
getWindowInScreen,
|
||||
showMessageBoxSync,
|
||||
showErrorMessageBox,
|
||||
showSaveDialogSync,
|
||||
showOpenDialogSync,
|
||||
mainWindowExist,
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { app, dialog, ipcMain, OpenDialogSyncOptions, shell } from "electron";
|
||||
import { app, ipcMain, Menu, OpenDialogSyncOptions, shell } from "electron";
|
||||
import { getFileIcon } from "../../commons/utils";
|
||||
import mime from "mime";
|
||||
import { ShortcutInfo } from "../../../types/common";
|
||||
@ -8,9 +8,10 @@ import {
|
||||
getURLInfo,
|
||||
sendToWebContent,
|
||||
showErrorMessageBox,
|
||||
showMessageBoxSync,
|
||||
showOpenDialogSync,
|
||||
} from ".";
|
||||
import { statSync } from "node:fs";
|
||||
import { getWindow } from "../commons/index";
|
||||
|
||||
export default function () {
|
||||
// emit
|
||||
@ -23,23 +24,17 @@ export default function () {
|
||||
});
|
||||
// 信息提示框
|
||||
ipcMain.on("showInfoMessageBox", (event, args) => {
|
||||
dialog.showMessageBoxSync(getWindow(args.windowName), {
|
||||
message: args.message,
|
||||
buttons: [global.language.ok],
|
||||
type: "info",
|
||||
noLink: true,
|
||||
});
|
||||
showMessageBoxSync(args.windowName, args.message, "info", [
|
||||
global.language.ok,
|
||||
]);
|
||||
});
|
||||
// 对话框
|
||||
ipcMain.on("showConfirmBox", (event, args) => {
|
||||
// 弹出对话框
|
||||
let res = dialog.showMessageBoxSync(getWindow(args.windowName), {
|
||||
message: args.message,
|
||||
buttons: [global.language.ok, global.language.cancel],
|
||||
type: "question",
|
||||
noLink: true,
|
||||
cancelId: 1,
|
||||
});
|
||||
let res = showMessageBoxSync(args.windowName, args.message, "question", [
|
||||
global.language.ok,
|
||||
global.language.cancel,
|
||||
]);
|
||||
event.returnValue = res === 0;
|
||||
});
|
||||
// 选择文件
|
||||
@ -57,10 +52,7 @@ export default function () {
|
||||
} else {
|
||||
options.defaultPath = app.getPath("desktop");
|
||||
}
|
||||
let filePathList = dialog.showOpenDialogSync(
|
||||
getWindow(windowName),
|
||||
options
|
||||
);
|
||||
let filePathList = showOpenDialogSync(windowName, options);
|
||||
if (filePathList && filePathList.length > 0) {
|
||||
let filePath = filePathList[0];
|
||||
if (target) {
|
||||
@ -94,7 +86,7 @@ export default function () {
|
||||
} else {
|
||||
options.defaultPath = app.getPath("desktop");
|
||||
}
|
||||
let dirPathList = dialog.showOpenDialogSync(getWindow(windowName), options);
|
||||
let dirPathList = showOpenDialogSync(windowName, options);
|
||||
if (dirPathList && dirPathList.length > 0) {
|
||||
let dirPath = dirPathList[0];
|
||||
event.returnValue = dirPath;
|
||||
@ -103,14 +95,14 @@ export default function () {
|
||||
}
|
||||
});
|
||||
// 获取图标
|
||||
ipcMain.on("getFileIcon", (event, args) => {
|
||||
ipcMain.on("getFileIcon", async (event, args) => {
|
||||
// 窗口名称
|
||||
let windowName: string = args.windowName;
|
||||
// 路径
|
||||
let filePath: string | null = args.path;
|
||||
if (filePath) {
|
||||
// 图标
|
||||
let icon: string | null = getFileIcon(filePath);
|
||||
let icon: string | null = await getFileIcon(filePath);
|
||||
// 发送到页面
|
||||
sendToWebContent(windowName, "onGetFileIcon", icon);
|
||||
}
|
||||
@ -163,4 +155,33 @@ export default function () {
|
||||
ipcMain.on("exit", () => {
|
||||
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();
|
||||
});
|
||||
}
|
||||
|
@ -19,14 +19,17 @@ function createBackupRestoreDataWindow() {
|
||||
parent: global.mainWindow,
|
||||
height: 108,
|
||||
width: 400,
|
||||
type: "toolbar",
|
||||
maximizable: false,
|
||||
minimizable: false,
|
||||
resizable: false,
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
|
@ -1,7 +1,14 @@
|
||||
import { dialog, ipcMain } from "electron";
|
||||
import { ipcMain } from "electron";
|
||||
import { backupData, createBackupRestoreDataWindow } from ".";
|
||||
import { closeWindow, relaunch, showErrorMessageBox } from "../commons";
|
||||
import {
|
||||
closeWindow,
|
||||
relaunch,
|
||||
showErrorMessageBox,
|
||||
showOpenDialogSync,
|
||||
showSaveDialogSync,
|
||||
} from "../commons";
|
||||
import { restore } from "./data";
|
||||
import { rmSync } from "node:fs";
|
||||
|
||||
export default function () {
|
||||
// 创建备份/恢复数据窗口
|
||||
@ -21,11 +28,18 @@ export default function () {
|
||||
// 备份数据
|
||||
ipcMain.on("backupData", () => {
|
||||
try {
|
||||
let filePath = dialog.showSaveDialogSync(global.backupRestoreDataWindow, {
|
||||
let filePath = showSaveDialogSync("backupRestoreDataWindow", {
|
||||
defaultPath: "Data",
|
||||
filters: [{ name: "DB", extensions: ["db"] }],
|
||||
});
|
||||
if (filePath && filePath.trim() !== "") {
|
||||
try {
|
||||
rmSync(filePath);
|
||||
} catch (e) {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
backupData(filePath).finally(() => {
|
||||
// 关闭备份/恢复窗口
|
||||
closeWindow(global.backupRestoreDataWindow);
|
||||
@ -40,12 +54,9 @@ export default function () {
|
||||
// 恢复数据
|
||||
ipcMain.on("restoreData", () => {
|
||||
try {
|
||||
let filePathList = dialog.showOpenDialogSync(
|
||||
global.backupRestoreDataWindow,
|
||||
{
|
||||
let filePathList = showOpenDialogSync("backupRestoreDataWindow", {
|
||||
filters: [{ name: "Data", extensions: ["db", "json"] }],
|
||||
}
|
||||
);
|
||||
});
|
||||
if (filePathList && filePathList.length > 0) {
|
||||
let filePath = filePathList[0];
|
||||
if (restore(filePath)) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { app, BrowserWindow, dialog } from "electron";
|
||||
import { release } from "node:os";
|
||||
import { join, dirname } from "node:path";
|
||||
import { join, dirname, basename } from "node:path";
|
||||
import indexIpcEvent from "./main/ipcEvent";
|
||||
import classificationIpcEvent from "./classification/ipcEvent";
|
||||
import { init as classificationDataInit } from "./classification/data";
|
||||
@ -9,7 +8,10 @@ import { initSystemItem } from "./item/commons/data";
|
||||
import commonIpcEvent from "./commons/ipcEvent";
|
||||
import itemIpcEvent from "./item/ipcEvent";
|
||||
import settingIpcEvent from "./setting/ipcEvent";
|
||||
import { init as settingDataInit } from "./setting/data";
|
||||
import {
|
||||
init as settingDataInit,
|
||||
update as updateSetting,
|
||||
} from "./setting/data";
|
||||
import { setShortcutKey } from "./setting";
|
||||
import searchIpcEvent from "./search/ipcEvent";
|
||||
import { createMainWindow } from "./main";
|
||||
@ -26,6 +28,7 @@ if (
|
||||
) {
|
||||
app.setPath("appData", 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, "..");
|
||||
@ -34,8 +37,16 @@ process.env.VITE_PUBLIC = process.env.VITE_DEV_SERVER_URL
|
||||
? join(process.env.DIST_ELECTRON, "../public")
|
||||
: 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
|
||||
if (process.platform === "win32") app.setAppUserModelId(app.getName());
|
||||
@ -51,10 +62,26 @@ if (!app.requestSingleInstanceLock()) {
|
||||
// process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
|
||||
app.whenReady().then(() => {
|
||||
try {
|
||||
// 禁止多开
|
||||
const instanceLock = app.requestSingleInstanceLock();
|
||||
if (!instanceLock) {
|
||||
app.quit();
|
||||
return;
|
||||
}
|
||||
// addon
|
||||
global.addon = require("../../native/addon.node");
|
||||
// 初始化数据
|
||||
settingDataInit();
|
||||
if (global.first) {
|
||||
// 首次添加,判断系统语言
|
||||
if (app.getLocale().toLowerCase().indexOf("zh-") === 0) {
|
||||
// 简体中文
|
||||
global.setting.general.language = "SimplifiedChinese";
|
||||
} else {
|
||||
// 英文
|
||||
global.setting.general.language = "English";
|
||||
}
|
||||
// 修改
|
||||
updateSetting(global.setting);
|
||||
}
|
||||
// 获取语言
|
||||
global.language = getLanguage(global.setting.general.language);
|
||||
// 禁用debugtron
|
||||
@ -64,7 +91,7 @@ app.whenReady().then(() => {
|
||||
arg.indexOf("--inspect") !== -1 ||
|
||||
arg.indexOf("--remote-debugging-port") !== -1
|
||||
) {
|
||||
dialog.showMessageBoxSync(null, {
|
||||
dialog.showMessageBoxSync({
|
||||
message: "达咩呦达咩达咩~",
|
||||
buttons: [global.language.ok],
|
||||
type: "error",
|
||||
@ -74,12 +101,6 @@ app.whenReady().then(() => {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 禁止多开
|
||||
const instanceLock = app.requestSingleInstanceLock();
|
||||
if (!instanceLock) {
|
||||
app.quit();
|
||||
return;
|
||||
}
|
||||
// 初始化数据
|
||||
classificationDataInit();
|
||||
itemDataInit();
|
||||
@ -101,6 +122,16 @@ app.whenReady().then(() => {
|
||||
}
|
||||
// 设置快捷键
|
||||
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) {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
console.log(e);
|
||||
@ -138,13 +169,13 @@ app.on("window-all-closed", () => {
|
||||
});
|
||||
|
||||
app.on("second-instance", () => {
|
||||
if (mainWindow) {
|
||||
if (!mainWindow.isVisible()) {
|
||||
mainWindow.show();
|
||||
mainWindow.focus();
|
||||
if (global.mainWindow) {
|
||||
if (!global.mainWindow.isVisible()) {
|
||||
global.mainWindow.show();
|
||||
global.mainWindow.focus();
|
||||
global.blurHide = true;
|
||||
} else {
|
||||
mainWindow.focus();
|
||||
global.mainWindow.focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ import { getDataSqlite3 } from "../../commons/betterSqlite3";
|
||||
let db = getDataSqlite3();
|
||||
|
||||
// 项目表名
|
||||
let itemTableName = "item";
|
||||
let tableName = "item";
|
||||
|
||||
// 查询字段
|
||||
let selectColumn =
|
||||
@ -36,7 +36,7 @@ function getItem(row: any): Item {
|
||||
*/
|
||||
function init() {
|
||||
// sql
|
||||
let sql = `CREATE TABLE IF NOT EXISTS ${itemTableName} (
|
||||
let sql = `CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
classification_id INTEGER NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
@ -58,7 +58,7 @@ function add(item: Item, reuseId: boolean = false) {
|
||||
// 获取序号
|
||||
let newOrder = getMaxOrder(item.classificationId) + 1;
|
||||
// SQL
|
||||
let sql = `INSERT INTO ${itemTableName}
|
||||
let sql = `INSERT INTO ${tableName}
|
||||
(classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)`;
|
||||
// 参数
|
||||
@ -73,7 +73,7 @@ function add(item: Item, reuseId: boolean = false) {
|
||||
];
|
||||
// 重复使用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\`)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`;
|
||||
params.unshift(item.id);
|
||||
@ -108,7 +108,7 @@ function batchAdd(
|
||||
// 循环添加
|
||||
for (let item of itemList) {
|
||||
// SQL
|
||||
let sql = `INSERT INTO ${itemTableName}
|
||||
let sql = `INSERT INTO ${tableName}
|
||||
(classification_id, name, type, data, shortcut_key, global_shortcut_key, \`order\`)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)`;
|
||||
// 参数
|
||||
@ -123,7 +123,7 @@ function batchAdd(
|
||||
];
|
||||
// 重复使用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\`)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`;
|
||||
params.unshift(item.id);
|
||||
@ -133,6 +133,7 @@ function batchAdd(
|
||||
if (id) {
|
||||
item.id = id;
|
||||
item.order = newOrder;
|
||||
item.classificationId = classificationId;
|
||||
resultList.push(item);
|
||||
}
|
||||
newOrder++;
|
||||
@ -147,7 +148,7 @@ function batchAdd(
|
||||
*/
|
||||
function update(item: Item) {
|
||||
// SQL
|
||||
let sql = `UPDATE ${itemTableName}
|
||||
let sql = `UPDATE ${tableName}
|
||||
SET name = ?,
|
||||
data = ?,
|
||||
shortcut_key = ?,
|
||||
@ -177,7 +178,7 @@ function updateClassificationId(
|
||||
newClassificationId: number
|
||||
) {
|
||||
// SQL
|
||||
let sql = `UPDATE ${itemTableName}
|
||||
let sql = `UPDATE ${tableName}
|
||||
SET classification_id = ?
|
||||
WHERE classification_id = ?`;
|
||||
// 运行
|
||||
@ -193,7 +194,7 @@ function updateClassificationId(
|
||||
*/
|
||||
function updateData(id: number, itemData: ItemData) {
|
||||
// SQL
|
||||
let sql = `UPDATE ${itemTableName}
|
||||
let sql = `UPDATE ${tableName}
|
||||
SET data = ?
|
||||
WHERE id = ?`;
|
||||
// 运行
|
||||
@ -206,7 +207,7 @@ function updateData(id: number, itemData: ItemData) {
|
||||
*/
|
||||
function getMaxOrder(classificationId: number) {
|
||||
// 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);
|
||||
if (row && row.order) {
|
||||
@ -222,7 +223,7 @@ function getMaxOrder(classificationId: number) {
|
||||
*/
|
||||
function selectById(id: number): Item | null {
|
||||
// SQL
|
||||
let sql = `SELECT ${selectColumn} FROM ${itemTableName} WHERE id = ?`;
|
||||
let sql = `SELECT ${selectColumn} FROM ${tableName} WHERE id = ?`;
|
||||
// 运行
|
||||
let row = db.prepare(sql).get(id);
|
||||
// 返回
|
||||
@ -244,7 +245,7 @@ function list(simple: boolean = false, classificationId: number | null = null) {
|
||||
// sql
|
||||
let sql = `SELECT ${
|
||||
simple ? simpleSelectColumn : selectColumn
|
||||
} FROM ${itemTableName}`;
|
||||
} FROM ${tableName}`;
|
||||
if (classificationId) {
|
||||
sql += " WHERE classification_id = ?";
|
||||
params.push(classificationId);
|
||||
@ -269,7 +270,7 @@ function selectByIdList(simple: boolean, idList: Array<number>) {
|
||||
// sql
|
||||
let sql = `SELECT ${
|
||||
simple ? simpleSelectColumn : selectColumn
|
||||
} FROM ${itemTableName} WHERE id IN (`;
|
||||
} FROM ${tableName} WHERE id IN (`;
|
||||
for (let i = 0; i < idList.length; i++) {
|
||||
sql += "?";
|
||||
if (i !== idList.length - 1) {
|
||||
@ -307,7 +308,7 @@ function del(id: number) {
|
||||
let item = selectById(id);
|
||||
if (item) {
|
||||
// SQL
|
||||
let sql = `DELETE FROM ${itemTableName} WHERE id = ?`;
|
||||
let sql = `DELETE FROM ${tableName} WHERE id = ?`;
|
||||
// 运行
|
||||
let res = db.prepare(sql).run(id).changes > 0;
|
||||
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
|
||||
*/
|
||||
function deleteByClassificationId(classificationId: number) {
|
||||
// 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;
|
||||
}
|
||||
@ -343,7 +372,7 @@ function reorder(classification_id: number) {
|
||||
// 开启事务
|
||||
db.transaction(() => {
|
||||
// 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++) {
|
||||
db.prepare(sql).run(i + 1, itemList[i].id);
|
||||
@ -396,7 +425,7 @@ function updateOrder(
|
||||
// 开启事务
|
||||
db.transaction(() => {
|
||||
// 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++) {
|
||||
db.prepare(sql).run(i + 1, toClassificationId, toItemList[i].id);
|
||||
@ -418,6 +447,7 @@ export {
|
||||
batchAdd,
|
||||
update,
|
||||
del,
|
||||
batchDel,
|
||||
selectById,
|
||||
selectByIdList,
|
||||
deleteByClassificationId,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { BrowserWindow, shell, dialog, app } from "electron";
|
||||
import { join } from "node:path";
|
||||
import { getAbsolutePath, getURLParams } from "../../commons/utils";
|
||||
import { BrowserWindow, shell, app } from "electron";
|
||||
import { extname, join } from "node:path";
|
||||
import { parsePath, getURLParams, getFileIcon } from "../../commons/utils";
|
||||
import { Item } from "../../../types/item";
|
||||
import {
|
||||
batchAdd,
|
||||
@ -11,12 +11,14 @@ import {
|
||||
updateData,
|
||||
updateOrder,
|
||||
} from "./data";
|
||||
import { accessSync, writeFile, statSync, readFileSync } from "node:fs";
|
||||
import { writeFile, statSync, readFileSync, accessSync } from "node:fs";
|
||||
import mime from "mime";
|
||||
import {
|
||||
deleteExtname,
|
||||
getFileName,
|
||||
getItemName,
|
||||
isAbsolutePath,
|
||||
newItem,
|
||||
} from "../../../commons/utils/common";
|
||||
import { iconExts } from "../../commons/utils";
|
||||
import { addAssociateFolderWatcher } from "../classification";
|
||||
@ -25,8 +27,11 @@ import {
|
||||
convertPath,
|
||||
getMainBackgorunColor,
|
||||
sendToWebContent,
|
||||
showMessageBoxSync,
|
||||
showSaveDialogSync,
|
||||
} from "../commons/index";
|
||||
import { fork } from "../../commons/utilityProcessUtils";
|
||||
import { ShortcutInfo } from "../../../types/common";
|
||||
|
||||
// 窗口
|
||||
let itemAddEditWindow: BrowserWindow | null = null;
|
||||
@ -51,14 +56,17 @@ async function createAddEditWindow(
|
||||
parent: global.mainWindow,
|
||||
height: 500,
|
||||
width: 600,
|
||||
type: "toolbar",
|
||||
maximizable: false,
|
||||
minimizable: false,
|
||||
resizable: false,
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -112,14 +120,17 @@ async function createNetworkIconWindow() {
|
||||
parent: global.itemAddEditWindow,
|
||||
height: 230,
|
||||
width: 400,
|
||||
type: "toolbar",
|
||||
maximizable: false,
|
||||
minimizable: false,
|
||||
resizable: false,
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -164,14 +175,17 @@ async function createSVGIconWindow() {
|
||||
parent: global.itemAddEditWindow,
|
||||
height: 230,
|
||||
width: 400,
|
||||
type: "toolbar",
|
||||
maximizable: false,
|
||||
minimizable: false,
|
||||
resizable: false,
|
||||
fullscreenable: false,
|
||||
focusable: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -213,7 +227,7 @@ function copy(idList: Array<number>, toClassificationId: number) {
|
||||
let itemList = selectByIdList(false, idList);
|
||||
if (itemList.length > 0) {
|
||||
// 清空打开信息
|
||||
resultList.forEach((item) => clearOpenInfo(item));
|
||||
itemList.forEach((item) => clearOpenInfo(item));
|
||||
// 批量添加
|
||||
resultList = batchAdd(toClassificationId, itemList);
|
||||
}
|
||||
@ -249,14 +263,9 @@ function move(idList: Array<number>, toClassificationId: number) {
|
||||
* @param classificationId
|
||||
* @param pathList
|
||||
*/
|
||||
function drop(classificationId: number, pathList: Array<string>) {
|
||||
fork(
|
||||
"getDropItemInfo",
|
||||
{
|
||||
classificationId,
|
||||
pathList,
|
||||
},
|
||||
(resultList: Array<Item>) => {
|
||||
async function drop(classificationId: number, pathList: Array<string>) {
|
||||
// 获取项目信息
|
||||
let resultList = await getDropItemInfo(classificationId, pathList);
|
||||
// 添加项目
|
||||
let itemList = batchAdd(classificationId, resultList);
|
||||
// 发送消息到页面
|
||||
@ -265,8 +274,6 @@ function drop(classificationId: number, pathList: Array<string>) {
|
||||
clear: false,
|
||||
classificationId: null,
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -312,10 +319,15 @@ function updateOpenInfo(type: string, id: number) {
|
||||
*/
|
||||
function run(
|
||||
type: string,
|
||||
operation: "open" | "runas" | "openFileLocation",
|
||||
operation: "open" | "runas" | "openFileLocation" | "explore",
|
||||
item: Item
|
||||
) {
|
||||
if (item.data) {
|
||||
if (operation === "open" && item.data.runAsAdmin) {
|
||||
operation = "runas";
|
||||
} else if (operation === "open" && item.type === 1) {
|
||||
operation = "explore";
|
||||
}
|
||||
// 更新打开信息
|
||||
updateOpenInfo(type, item.id);
|
||||
// 判断类型
|
||||
@ -329,7 +341,7 @@ function run(
|
||||
// 获取绝对路径
|
||||
if (item.type === 0 || item.type === 1) {
|
||||
// 获取路径
|
||||
item.data.target = getAbsolutePath(item.data.target);
|
||||
item.data.target = parsePath(item.data.target);
|
||||
}
|
||||
try {
|
||||
// 判断文件或文件夹是否存在
|
||||
@ -355,13 +367,9 @@ function run(
|
||||
message = global.language.notFoundFolder;
|
||||
}
|
||||
message += '"' + item.data.target + '"';
|
||||
dialog.showMessageBox(global.mainWindow, {
|
||||
title: "Dawn Launcher",
|
||||
message: message,
|
||||
buttons: [global.language.ok],
|
||||
type: "error",
|
||||
noLink: true,
|
||||
});
|
||||
showMessageBoxSync("mainWindow", message, "error", [
|
||||
global.language.ok,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -432,7 +440,7 @@ function exportIcon(item: Item) {
|
||||
}
|
||||
// 弹出文件对话框保存
|
||||
if (extensionName && content) {
|
||||
let path = dialog.showSaveDialogSync(global.mainWindow, {
|
||||
let path = showSaveDialogSync("mainWindow", {
|
||||
defaultPath: "icon",
|
||||
filters: [
|
||||
{
|
||||
@ -499,7 +507,7 @@ async function createShortcut(item: Item) {
|
||||
let target = item.data.target;
|
||||
if (item.type === 0 || item.type === 1) {
|
||||
// 获取绝对路径
|
||||
target = getAbsolutePath(target);
|
||||
target = parsePath(target);
|
||||
}
|
||||
// 保存路径
|
||||
let savePath =
|
||||
@ -667,6 +675,119 @@ function clearOpenInfo(item: Item) {
|
||||
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 {
|
||||
createAddEditWindow,
|
||||
createNetworkIconWindow,
|
||||
@ -684,4 +805,5 @@ export {
|
||||
getClipboardImageFile,
|
||||
pasteIcon,
|
||||
checkInvalid,
|
||||
deleteQuickSearchHistory,
|
||||
};
|
||||
|
@ -1,12 +1,11 @@
|
||||
import {
|
||||
Menu,
|
||||
MenuItem,
|
||||
dialog,
|
||||
ipcMain,
|
||||
clipboard,
|
||||
MenuItemConstructorOptions,
|
||||
} from "electron";
|
||||
import { getAbsolutePath } from "../../commons/utils";
|
||||
import { parsePath } from "../../commons/utils";
|
||||
import {
|
||||
convertTarget,
|
||||
createAddEditWindow,
|
||||
@ -22,13 +21,22 @@ import {
|
||||
getClipboardImageFile,
|
||||
pasteIcon,
|
||||
updateOpenInfo,
|
||||
deleteQuickSearchHistory,
|
||||
} from ".";
|
||||
import {
|
||||
getAppxItemList,
|
||||
getStartMenuItemList,
|
||||
getSystemItemList,
|
||||
} from "./commons";
|
||||
import { add, del, list, selectById, update, updateOrder } from "./data";
|
||||
import {
|
||||
add,
|
||||
batchDel,
|
||||
del,
|
||||
list,
|
||||
selectById,
|
||||
update,
|
||||
updateOrder,
|
||||
} from "./data";
|
||||
import { Item } from "../../../types/item";
|
||||
import { getFileExtname, isAbsolutePath } from "../../../commons/utils/common";
|
||||
import {
|
||||
@ -50,6 +58,7 @@ import {
|
||||
closeWindow,
|
||||
openAfterHideWindow,
|
||||
sendToWebContent,
|
||||
showMessageBoxSync,
|
||||
} from "../commons/index";
|
||||
|
||||
/**
|
||||
@ -171,11 +180,20 @@ export default function () {
|
||||
if (!classification) {
|
||||
return;
|
||||
}
|
||||
// 鼠标位置
|
||||
let point = global.addon.getCursorPoint();
|
||||
// 菜单
|
||||
let menuList: Array<MenuItem> = [];
|
||||
// 组装菜单
|
||||
if (!batchOperation) {
|
||||
if (item) {
|
||||
// 查询页面分类信息
|
||||
let pageClassification = selectClassificationById(
|
||||
args.pageClassificationId
|
||||
);
|
||||
if (!pageClassification && type === "main") {
|
||||
return;
|
||||
}
|
||||
// 后缀
|
||||
let ext: string | null = null;
|
||||
// 排除
|
||||
@ -184,7 +202,11 @@ export default function () {
|
||||
}
|
||||
// "打开"菜单
|
||||
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(
|
||||
new MenuItem({
|
||||
label: global.language.runAsAdministrator,
|
||||
@ -233,10 +255,12 @@ export default function () {
|
||||
label: global.language.explorerMenu,
|
||||
click: () => {
|
||||
// 获取当前窗口所在屏幕
|
||||
let screen = getWindowInScreen();
|
||||
let display = getWindowInScreen(
|
||||
type === "main" ? global.mainWindow : global.quickSearchWindow
|
||||
);
|
||||
let scaleFactor = 1;
|
||||
if (screen && screen.length > 0) {
|
||||
scaleFactor = screen[0].scaleFactor;
|
||||
if (display && display.length > 0) {
|
||||
scaleFactor = display[0].scaleFactor;
|
||||
}
|
||||
// 弹出资源管理器菜单
|
||||
sendToWebContent(
|
||||
@ -251,12 +275,17 @@ export default function () {
|
||||
global.addon.disableMouseHook();
|
||||
// 弹出资源管理器菜单
|
||||
global.addon.explorerContextMenu(
|
||||
global.mainWindow.getNativeWindowHandle().readInt32LE(0),
|
||||
(type === "main"
|
||||
? global.mainWindow
|
||||
: global.quickSearchWindow
|
||||
)
|
||||
.getNativeWindowHandle()
|
||||
.readInt32LE(0),
|
||||
item.type === 0 || item.type === 1
|
||||
? getAbsolutePath(item.data.target)
|
||||
? parsePath(item.data.target)
|
||||
: item.data.target,
|
||||
args.x * scaleFactor,
|
||||
args.y * scaleFactor
|
||||
point[0],
|
||||
point[1]
|
||||
);
|
||||
// 开启鼠标HOOK
|
||||
global.addon.enableMouseHook();
|
||||
@ -282,7 +311,7 @@ export default function () {
|
||||
click: () => {
|
||||
clipboard.writeText(
|
||||
item.type === 0 || item.type === 1
|
||||
? getAbsolutePath(item.data.target)
|
||||
? parsePath(item.data.target)
|
||||
: item.data.target
|
||||
);
|
||||
},
|
||||
@ -293,7 +322,8 @@ export default function () {
|
||||
if (
|
||||
type === "main" &&
|
||||
(item.type === 0 || item.type === 1) &&
|
||||
classification.type === 0
|
||||
classification.type === 0 &&
|
||||
pageClassification.type === 0
|
||||
) {
|
||||
menuList.push(
|
||||
new MenuItem({
|
||||
@ -310,7 +340,7 @@ export default function () {
|
||||
);
|
||||
pathMenu = true;
|
||||
}
|
||||
if (item.type === 0 || item.type === 1 || item.type === 2) {
|
||||
if (item.type === 0 || item.type === 1) {
|
||||
menuList.push(
|
||||
new MenuItem({
|
||||
label: global.language.createShortcut,
|
||||
@ -324,7 +354,11 @@ export default function () {
|
||||
if (pathMenu) {
|
||||
menuList.push(new MenuItem({ type: "separator" }));
|
||||
}
|
||||
if (type === "main") {
|
||||
if (
|
||||
type === "main" &&
|
||||
classification.type === 0 &&
|
||||
pageClassification.type === 0
|
||||
) {
|
||||
// "图标"菜单
|
||||
let existPasteIcon = false;
|
||||
// 获取剪切板图片文件
|
||||
@ -360,7 +394,9 @@ export default function () {
|
||||
if (
|
||||
type === "main" &&
|
||||
(item.type === 0 || item.type === 1) &&
|
||||
!item.data.fixedIcon
|
||||
!item.data.fixedIcon &&
|
||||
classification.type === 0 &&
|
||||
pageClassification.type === 0
|
||||
) {
|
||||
menuList.push(
|
||||
new MenuItem({
|
||||
@ -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({
|
||||
@ -398,13 +438,12 @@ export default function () {
|
||||
new MenuItem({
|
||||
label: global.language.delete,
|
||||
click: () => {
|
||||
let res = dialog.showMessageBoxSync(global.mainWindow, {
|
||||
message: global.language.deleteItemPrompt,
|
||||
buttons: [global.language.ok, global.language.cancel],
|
||||
type: "question",
|
||||
noLink: true,
|
||||
cancelId: 1,
|
||||
});
|
||||
let res = showMessageBoxSync(
|
||||
"mainWindow",
|
||||
global.language.deleteItemPrompt,
|
||||
"question",
|
||||
[global.language.ok, global.language.cancel]
|
||||
);
|
||||
if (res === 0) {
|
||||
// 删除数据
|
||||
del(item.id);
|
||||
@ -540,20 +579,17 @@ export default function () {
|
||||
new MenuItem({
|
||||
label: global.language.batchDelete,
|
||||
click: () => {
|
||||
let res = dialog.showMessageBoxSync(global.mainWindow, {
|
||||
message: global.language.batchDeletePrompt,
|
||||
buttons: [global.language.ok, global.language.cancel],
|
||||
type: "question",
|
||||
noLink: true,
|
||||
cancelId: 1,
|
||||
});
|
||||
let res = showMessageBoxSync(
|
||||
"mainWindow",
|
||||
global.language.batchDeletePrompt,
|
||||
"question",
|
||||
[global.language.ok, global.language.cancel]
|
||||
);
|
||||
if (res === 0) {
|
||||
for (const id of batchSelectedIdList) {
|
||||
// 删除数据
|
||||
del(id);
|
||||
// 批量删除
|
||||
batchDel(batchSelectedIdList);
|
||||
// 快捷键
|
||||
setShortcutKey();
|
||||
}
|
||||
// 通知前端删除数据
|
||||
sendToWebContent(
|
||||
"mainWindow",
|
||||
@ -665,7 +701,7 @@ export default function () {
|
||||
}
|
||||
let icon = join(process.env.VITE_PUBLIC, "drag-and-drop.png");
|
||||
event.sender.startDrag({
|
||||
file: getAbsolutePath(item.data.target),
|
||||
file: parsePath(item.data.target),
|
||||
icon: icon,
|
||||
});
|
||||
} finally {
|
||||
@ -677,4 +713,8 @@ export default function () {
|
||||
ipcMain.on("updateItemOpenInfo", (event, args) => {
|
||||
updateOpenInfo(args.type, args.id);
|
||||
});
|
||||
// 删除历史记录
|
||||
ipcMain.on("deleteQuickSearchHistory", (event, args) => {
|
||||
deleteQuickSearchHistory(args);
|
||||
});
|
||||
}
|
||||
|
@ -10,7 +10,13 @@ import {
|
||||
import { createSettingWindow } from "../setting";
|
||||
import { join } from "node:path";
|
||||
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;
|
||||
@ -30,18 +36,18 @@ function createMainWindow() {
|
||||
title: "Dawn Launcher",
|
||||
width: 800,
|
||||
height: 600,
|
||||
type: "toolbar",
|
||||
frame: false,
|
||||
show: false,
|
||||
maximizable: false,
|
||||
minimizable: false,
|
||||
fullscreenable: false,
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
skipTaskbar: true,
|
||||
skipTaskbar: global.setting.general.hideTaskbar,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
icon: join(process.env.VITE_PUBLIC, "logo.ico"),
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
backgroundThrottling: false,
|
||||
@ -56,11 +62,10 @@ function createMainWindow() {
|
||||
}
|
||||
// 加载完毕
|
||||
mainWindow.webContents.on("did-finish-load", () => {
|
||||
// 恢复上一次的位置
|
||||
let bounds = cacheData.cacheStore.get("mainWindowBounds");
|
||||
if (bounds) {
|
||||
mainWindow.setBounds(bounds);
|
||||
}
|
||||
// 设置窗口无动画
|
||||
global.addon.removeWindowAnimation(
|
||||
mainWindow.getNativeWindowHandle().readInt32LE(0)
|
||||
);
|
||||
// 永远居中不可移动
|
||||
if (global.setting.general.alwaysCenter) {
|
||||
mainWindow.setMovable(false);
|
||||
@ -71,16 +76,45 @@ function createMainWindow() {
|
||||
if (global.setting.general.alwaysTop) {
|
||||
mainWindow.setAlwaysOnTop(true, "screen-saver");
|
||||
}
|
||||
// 恢复上一次的位置
|
||||
let bounds: any = cacheData.cacheStore.get("mainWindowBounds");
|
||||
// 锁定尺寸
|
||||
if (!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);
|
||||
// 永远居中
|
||||
alwaysCenter();
|
||||
// 判断窗口位置
|
||||
let displays = getWindowInScreen();
|
||||
let displays = getWindowInScreen(mainWindow);
|
||||
if (displays.length === 0) {
|
||||
// 代表窗口的位置不再任一屏幕内,将窗口位置移动到主窗口
|
||||
mainWindow.center();
|
||||
@ -106,13 +140,7 @@ function createMainWindow() {
|
||||
// 失去焦点
|
||||
mainWindow.on("blur", () => {
|
||||
if (global.setting.general.edgeAutoHide && global.blurHide) {
|
||||
let scaleFactor = screen.getPrimaryDisplay().scaleFactor;
|
||||
autoHide(
|
||||
screen.getCursorScreenPoint().x * scaleFactor,
|
||||
screen.getCursorScreenPoint().y * scaleFactor,
|
||||
0,
|
||||
false
|
||||
);
|
||||
autoHide(0, false);
|
||||
}
|
||||
if (
|
||||
mainWindow.isVisible() &&
|
||||
@ -120,7 +148,10 @@ function createMainWindow() {
|
||||
!global.setting.general.alwaysTop
|
||||
) {
|
||||
// 如果当前还有打开的子窗口就不执行失去焦点隐藏
|
||||
if (mainWindow.getChildWindows().length === 0) {
|
||||
if (
|
||||
mainWindow.getChildWindows().length === 0 &&
|
||||
!global.mainWindowShowDialog
|
||||
) {
|
||||
hideMainWindow();
|
||||
}
|
||||
}
|
||||
@ -150,31 +181,45 @@ function createMainWindow() {
|
||||
sendToWebContent("mainWindow", "onCollapseSubClassification", {});
|
||||
}
|
||||
});
|
||||
// 主窗口关闭事件
|
||||
mainWindow.on("closed", () => {
|
||||
app.quit();
|
||||
});
|
||||
// 创建鼠标hook
|
||||
let mousedownClassName = null;
|
||||
addon.createMouseHook((...args: any[]) => {
|
||||
let res = JSON.parse(args[1]);
|
||||
let event: string = res.event;
|
||||
let x: number = res.x;
|
||||
let y: number = res.y;
|
||||
let className: string =
|
||||
!res.class_name || res.class_name.trim() === ""
|
||||
? null
|
||||
: res.class_name.trim();
|
||||
// 1左键 2右键 3滚轮
|
||||
let button: number = res.button;
|
||||
if (event === "mousemove") {
|
||||
// 鼠标移动
|
||||
if (!global.blurHide) {
|
||||
// 停靠在桌面边缘时自动隐藏
|
||||
autoHide(x, y, 40, true);
|
||||
autoHide(20, true);
|
||||
}
|
||||
} else if (event === "mousedown") {
|
||||
// 鼠标按下
|
||||
if (button === 1) {
|
||||
mousedownClassName = className;
|
||||
}
|
||||
} else if (event === "mouseup") {
|
||||
// 鼠标抬起
|
||||
if (button === 3) {
|
||||
if (button === 1) {
|
||||
// 双击任务栏
|
||||
doubleClickTaskbar(mousedownClassName, className);
|
||||
} else if (button === 3) {
|
||||
// 中间单击
|
||||
// 显示隐藏窗口
|
||||
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 autoHide
|
||||
* @param selectedClassificationId
|
||||
*/
|
||||
function showMainWindowBefore(
|
||||
blurHide: boolean,
|
||||
autoHide = false,
|
||||
selectedClassificationId: number | null = null
|
||||
) {
|
||||
// 向主窗口发送通知
|
||||
sendToWebContent("mainWindow", "onShowMainWindowBefore", {
|
||||
blurHide,
|
||||
autoHide,
|
||||
selectedClassificationId,
|
||||
});
|
||||
}
|
||||
@ -208,8 +300,12 @@ function showMainWindowBefore(
|
||||
/**
|
||||
* 显示窗口
|
||||
* @param blurHide
|
||||
* @param autoHide
|
||||
*/
|
||||
function showMainWindow(blurHide: boolean) {
|
||||
function showMainWindow(blurHide: boolean, autoHide = false) {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
// flag
|
||||
let flag = true;
|
||||
// 是否开启勿扰模式
|
||||
@ -218,22 +314,20 @@ function showMainWindow(blurHide: boolean) {
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
if (!autoHide) {
|
||||
// 显示时跟随鼠标位置
|
||||
showFollowMousePosition();
|
||||
}
|
||||
if (flag) {
|
||||
if (!global.setting.general.alwaysTop) {
|
||||
global.mainWindow.setAlwaysOnTop(true, "screen-saver");
|
||||
}
|
||||
global.mainWindow.show();
|
||||
// 如果没有设置置顶时,显示窗口先置顶一下,再取消
|
||||
if (!global.mainWindow.isAlwaysOnTop) {
|
||||
mainWindow.setAlwaysOnTop(true, "screen-saver");
|
||||
mainWindow.setAlwaysOnTop(false);
|
||||
}
|
||||
global.mainWindow.focus();
|
||||
global.blurHide = blurHide;
|
||||
if (blurHide) {
|
||||
global.blurHide = true;
|
||||
} else {
|
||||
global.blurHide = false;
|
||||
if (!global.setting.general.alwaysTop) {
|
||||
global.mainWindow.setAlwaysOnTop(false);
|
||||
}
|
||||
global.blurHide = blurHide;
|
||||
}
|
||||
}
|
||||
|
||||
@ -241,7 +335,7 @@ function showMainWindow(blurHide: boolean) {
|
||||
* 隐藏窗口
|
||||
*/
|
||||
function hideMainWindow() {
|
||||
if (global.mainWindow.isVisible()) {
|
||||
if (mainWindowExist() && global.mainWindow.isVisible()) {
|
||||
global.mainWindow.hide();
|
||||
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 workArea
|
||||
* @returns
|
||||
*/
|
||||
function edgeAdsorb(display: Display | null) {
|
||||
function edgeAdsorb(display: Display | null, workArea = false) {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
// 如果勾选停靠在桌面边缘时自动隐藏,放行
|
||||
if (
|
||||
global.mainWindow.isDestroyed() ||
|
||||
(!global.setting.general.edgeAdsorb && !global.setting.general.edgeAutoHide)
|
||||
!global.setting.general.edgeAdsorb &&
|
||||
!global.setting.general.edgeAutoHide
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@ -335,37 +410,80 @@ function edgeAdsorb(display: Display | null) {
|
||||
// 清空方向
|
||||
global.mainWindowDirection = null;
|
||||
// 屏幕
|
||||
let displays = display ? [display] : getWindowInScreen();
|
||||
let displays = display ? [display] : getWindowInScreen(global.mainWindow);
|
||||
if (displays.length > 1 || displays.length === 0) {
|
||||
return;
|
||||
}
|
||||
// 获取屏幕工作区域
|
||||
let workArea = displays[0].workArea;
|
||||
// 屏幕区域
|
||||
let displayBounds = workArea ? displays[0].workArea : displays[0].bounds;
|
||||
// 窗口位置信息
|
||||
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({
|
||||
x: workArea.x + workArea.width - bounds.width,
|
||||
x: displayBounds.x + displayBounds.width - bounds.width,
|
||||
});
|
||||
global.mainWindowDirection = "right";
|
||||
global.blurHide = false;
|
||||
} else if (bounds.x <= workArea.x) {
|
||||
// 左侧
|
||||
global.mainWindow.setBounds({ x: workArea.x });
|
||||
global.mainWindowDirection = "left";
|
||||
global.blurHide = false;
|
||||
}
|
||||
if (bounds.y + bounds.height >= workArea.y + workArea.height) {
|
||||
} else if (
|
||||
bounds.y + bounds.height >=
|
||||
displayBounds.y + displayBounds.height
|
||||
) {
|
||||
// 底部
|
||||
global.mainWindow.setBounds({
|
||||
y: workArea.y + workArea.height - bounds.height,
|
||||
y: displayBounds.y + displayBounds.height - bounds.height,
|
||||
});
|
||||
global.mainWindowDirection = "bottom";
|
||||
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.blurHide = false;
|
||||
}
|
||||
@ -381,6 +499,9 @@ function edgeAdsorb(display: Display | null) {
|
||||
* 显示时跟随鼠标位置
|
||||
*/
|
||||
function showFollowMousePosition() {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
// 当永远居中、固定位置勾选后不能使用显示时跟随鼠标位置
|
||||
if (
|
||||
!global.setting.general.alwaysCenter &&
|
||||
@ -395,13 +516,15 @@ function showFollowMousePosition() {
|
||||
let y = Math.round(bounds.height / 2);
|
||||
// 设置窗口位置
|
||||
global.mainWindow.setPosition(point.x - x, point.y - y);
|
||||
// 调整窗口位置并显示时会出现闪屏的情况
|
||||
// https://github.com/electron/electron/issues/10862
|
||||
for (let i = 0; i < 10; i++) {
|
||||
global.mainWindow.setSize(bounds.width, bounds.height);
|
||||
}
|
||||
// 获取当前鼠标所在屏幕
|
||||
let display = screen.getDisplayNearestPoint(point);
|
||||
// 边缘吸附
|
||||
edgeAdsorb(display);
|
||||
edgeAdsorb(display, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -409,6 +532,9 @@ function showFollowMousePosition() {
|
||||
* 中间单击显示/隐藏窗口
|
||||
*/
|
||||
function showHideMouseWheelClick() {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
if (global.setting.general.showHideMouseWheelClick) {
|
||||
if (global.mainWindow.isVisible()) {
|
||||
hideMainWindow();
|
||||
@ -422,65 +548,101 @@ function showHideMouseWheelClick() {
|
||||
* 永远居中
|
||||
*/
|
||||
function alwaysCenter() {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
if (global.setting.general.alwaysCenter) {
|
||||
mainWindow.center();
|
||||
global.mainWindow.center();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 边缘自动隐藏
|
||||
* @param x
|
||||
* @param y
|
||||
* @param size
|
||||
* @param timer 是否启用延迟显示/隐藏
|
||||
* @returns
|
||||
*/
|
||||
function autoHide(x: number, y: number, size: number, timer: boolean) {
|
||||
if (global.mainWindow.isDestroyed() || !global.setting.general.edgeAutoHide) {
|
||||
function autoHide(size: number, timer: boolean) {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
if (!global.setting.general.edgeAutoHide) {
|
||||
return;
|
||||
}
|
||||
// 当有子窗口时不自动隐藏
|
||||
if (mainWindow.getChildWindows().length > 0) {
|
||||
if (
|
||||
global.mainWindow.getChildWindows().length > 0 ||
|
||||
global.mainWindowShowDialog
|
||||
) {
|
||||
return;
|
||||
}
|
||||
let x = screen.getCursorScreenPoint().x;
|
||||
let y = screen.getCursorScreenPoint().y;
|
||||
try {
|
||||
// 屏幕
|
||||
let displays = getWindowInScreen();
|
||||
let displays = getWindowInScreen(global.mainWindow);
|
||||
if (displays.length > 1 || displays.length === 0) {
|
||||
return;
|
||||
}
|
||||
// 工作区域
|
||||
let workArea = displays[0].workArea;
|
||||
// 缩放比例
|
||||
let scaleFactor = displays[0].scaleFactor;
|
||||
// 屏幕区域
|
||||
let displayBounds = displays[0].bounds;
|
||||
// 窗口位置信息
|
||||
let bounds = mainWindow.getBounds();
|
||||
if (mainWindow.isVisible()) {
|
||||
let bounds = global.mainWindow.getBounds();
|
||||
if (global.mainWindow.isVisible()) {
|
||||
let flag = false;
|
||||
if (bounds.x + 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 =
|
||||
x <= bounds.x * scaleFactor - size ||
|
||||
y <= bounds.y * scaleFactor - size ||
|
||||
y >= (bounds.y + bounds.height) * scaleFactor + size;
|
||||
} else if (bounds.x === workArea.x) {
|
||||
x <= bounds.x - size ||
|
||||
y <= bounds.y - size ||
|
||||
y >= bounds.y + bounds.height + size;
|
||||
} else if (bounds.x === displayBounds.x) {
|
||||
// 左侧
|
||||
flag =
|
||||
x > (bounds.x + bounds.width) * scaleFactor + size ||
|
||||
y <= bounds.y * scaleFactor - size ||
|
||||
y >= (bounds.y + bounds.height) * scaleFactor + size;
|
||||
} else if (bounds.y + bounds.height >= workArea.y + workArea.height) {
|
||||
x > bounds.x + bounds.width + size ||
|
||||
y <= bounds.y - size ||
|
||||
y >= bounds.y + bounds.height + size;
|
||||
} else if (
|
||||
bounds.y + bounds.height >=
|
||||
displayBounds.y + displayBounds.height
|
||||
) {
|
||||
// 底部
|
||||
flag =
|
||||
y < bounds.y * scaleFactor - size ||
|
||||
x <= bounds.x * scaleFactor - size ||
|
||||
x >= (bounds.x + bounds.width) * scaleFactor + size;
|
||||
} else if (bounds.y === workArea.y) {
|
||||
y < bounds.y - size ||
|
||||
x <= bounds.x - size ||
|
||||
x >= bounds.x + bounds.width + size;
|
||||
} else if (bounds.y === displayBounds.y) {
|
||||
// 顶部
|
||||
flag =
|
||||
y > (bounds.y + bounds.height) * scaleFactor + size ||
|
||||
x <= bounds.x * scaleFactor - size ||
|
||||
x >= (bounds.x + bounds.width) * scaleFactor + size;
|
||||
y > bounds.y + bounds.height + size ||
|
||||
x <= bounds.x - size ||
|
||||
x >= bounds.x + bounds.width + size;
|
||||
}
|
||||
if (flag && !global.classificationRightMenu && !global.itemRightMenu) {
|
||||
if (
|
||||
@ -504,39 +666,63 @@ function autoHide(x: number, y: number, size: number, timer: boolean) {
|
||||
} else {
|
||||
if (global.mainWindowDirection) {
|
||||
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 (
|
||||
global.mainWindowDirection === "right" &&
|
||||
x >= windowWidthPosition - 1 &&
|
||||
y >= scaleFactorY &&
|
||||
y <= windowHeightPosition
|
||||
global.mainWindowDirection === "leftTop" &&
|
||||
x === displayBounds.x &&
|
||||
y === displayBounds.y
|
||||
) {
|
||||
// 右侧
|
||||
// 左上角
|
||||
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;
|
||||
} else if (
|
||||
global.mainWindowDirection === "left" &&
|
||||
x <= workArea.x &&
|
||||
y >= scaleFactorY &&
|
||||
y <= windowHeightPosition
|
||||
x <= displayBounds.x &&
|
||||
y >= bounds.y &&
|
||||
y <= bounds.y + bounds.height
|
||||
) {
|
||||
// 左侧
|
||||
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 (
|
||||
global.mainWindowDirection === "bottom" &&
|
||||
y >= windowHeightPosition - 1 &&
|
||||
x >= scaleFactorX &&
|
||||
x <= windowWidthPosition
|
||||
y >= bounds.y + bounds.height - 1 &&
|
||||
x >= bounds.x &&
|
||||
x <= bounds.x + bounds.width
|
||||
) {
|
||||
// 底部
|
||||
flag = true;
|
||||
} else if (
|
||||
global.mainWindowDirection === "top" &&
|
||||
y <= workArea.y &&
|
||||
x >= scaleFactorX &&
|
||||
x <= windowWidthPosition
|
||||
y <= displayBounds.y &&
|
||||
x >= bounds.x &&
|
||||
x <= bounds.x + bounds.width
|
||||
) {
|
||||
// 顶部
|
||||
flag = true;
|
||||
@ -549,11 +735,11 @@ function autoHide(x: number, y: number, size: number, timer: boolean) {
|
||||
) {
|
||||
// 延迟显示
|
||||
global.autoHideTimer = setTimeout(function () {
|
||||
showMainWindowBefore(false);
|
||||
showMainWindowBefore(false, true);
|
||||
}, global.setting.general.delayDisplayMs);
|
||||
} else if (!timer || global.setting.general.delayDisplayMs === 0) {
|
||||
// 显示
|
||||
showMainWindowBefore(false);
|
||||
showMainWindowBefore(false, true);
|
||||
}
|
||||
} else {
|
||||
// 清空timer
|
||||
@ -573,100 +759,59 @@ function autoHide(x: number, y: number, size: number, timer: boolean) {
|
||||
/**
|
||||
* 双击任务栏显示/隐藏
|
||||
*/
|
||||
function doubleClickTaskbar(button: number) {
|
||||
function doubleClickTaskbar(
|
||||
mousedownClassName: string | null,
|
||||
className: string | null
|
||||
) {
|
||||
if (!mainWindowExist()) {
|
||||
return;
|
||||
}
|
||||
// 必须开启设置
|
||||
if (!global.setting.general.showHideDoubleClickTaskbar) {
|
||||
return;
|
||||
}
|
||||
// 不是左键的话
|
||||
if (button !== 1) {
|
||||
// 清除timeout
|
||||
clearTimeout(global.doubleClickTaskbarTimer);
|
||||
// 清空计数
|
||||
global.doubleClickTaskbarCounter = 0;
|
||||
return;
|
||||
}
|
||||
// 获取屏幕
|
||||
let displays = getWindowInScreen();
|
||||
if (displays.length > 1 || displays.length === 0) {
|
||||
let displays = getWindowInScreen(global.mainWindow);
|
||||
if (
|
||||
displays.length > 1 ||
|
||||
displays.length === 0 ||
|
||||
(className !== "Shell_TrayWnd" && className !== "Shell_SecondaryTrayWnd")
|
||||
) {
|
||||
// 清除timeout
|
||||
clearTimeout(global.doubleClickTaskbarTimer);
|
||||
// 清空计数
|
||||
global.doubleClickTaskbarCounter = 0;
|
||||
return;
|
||||
}
|
||||
// 获取鼠标位置
|
||||
let point = screen.getCursorScreenPoint();
|
||||
// 判断鼠标是否在当前屏幕内
|
||||
// 必须是指定Class
|
||||
if (
|
||||
point.x >= displays[0].bounds.x &&
|
||||
point.x <= displays[0].bounds.x + displays[0].bounds.width &&
|
||||
point.y >= displays[0].bounds.y &&
|
||||
point.y <= displays[0].bounds.y + displays[0].bounds.height
|
||||
(release().startsWith("10.0.1") &&
|
||||
global.addon.getCursorPosWindowClassName().indexOf("MSTask") >= 0) ||
|
||||
(release().startsWith("10.0.2") &&
|
||||
global.addon.getCursorPosWindowClassName() !== "TrayNotifyWnd")
|
||||
) {
|
||||
// 判断是否双击在任务栏上
|
||||
let flag = false;
|
||||
// 判断任务栏在哪一侧
|
||||
if (displays[0].bounds.height > displays[0].workArea.height) {
|
||||
if (displays[0].bounds.y === displays[0].workArea.y) {
|
||||
// 底部
|
||||
let top = displays[0].workArea.y + displays[0].workArea.height;
|
||||
let bottom = displays[0].bounds.y + displays[0].bounds.height;
|
||||
if (point.y >= top && point.y <= bottom) {
|
||||
flag = true;
|
||||
}
|
||||
} else {
|
||||
// 顶部
|
||||
if (
|
||||
point.y >= displays[0].bounds.y &&
|
||||
point.y <= displays[0].workArea.y
|
||||
) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
} else if (displays[0].bounds.width > displays[0].workArea.width) {
|
||||
if (displays[0].bounds.x === displays[0].workArea.x) {
|
||||
// 右侧
|
||||
let left = displays[0].workArea.x + displays[0].workArea.width;
|
||||
let right = displays[0].bounds.x + displays[0].bounds.width;
|
||||
if (point.x >= left && point.x <= right) {
|
||||
flag = true;
|
||||
}
|
||||
} else {
|
||||
// 左侧
|
||||
if (
|
||||
point.x >= displays[0].bounds.x &&
|
||||
point.x <= displays[0].workArea.x
|
||||
) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
// 监听双击
|
||||
if (!global.doubleClickTaskbarCounter) {
|
||||
global.doubleClickTaskbarCounter = 0;
|
||||
}
|
||||
// +1
|
||||
global.doubleClickTaskbarCounter++;
|
||||
// 等于2就是双击
|
||||
if (
|
||||
global.doubleClickTaskbarCounter &&
|
||||
global.doubleClickTaskbarCounter === 2
|
||||
global.doubleClickTaskbarCounter === 2 &&
|
||||
(mousedownClassName === "Shell_TrayWnd" ||
|
||||
mousedownClassName === "Shell_SecondaryTrayWnd")
|
||||
) {
|
||||
// 清除timeout
|
||||
clearTimeout(global.doubleClickTaskbarTimer);
|
||||
// 清空计数
|
||||
global.doubleClickTaskbarCounter = 0;
|
||||
// 判断点击的窗口ClassName
|
||||
let className = global.addon.getCursorPosWindowClassName();
|
||||
if (className.indexOf("MSTask") >= 0 || className === "Shell_TrayWnd") {
|
||||
if (mainWindow.isVisible()) {
|
||||
// 显示或隐藏
|
||||
if (global.mainWindow.isVisible()) {
|
||||
hideMainWindow();
|
||||
} else {
|
||||
showMainWindowBefore(false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 间隔为500毫秒,如果超过500毫秒就代表不是双击
|
||||
global.doubleClickTaskbarTimer = setTimeout(function () {
|
||||
@ -679,12 +824,6 @@ function doubleClickTaskbar(button: number) {
|
||||
// 清空计数
|
||||
global.doubleClickTaskbarCounter = 0;
|
||||
}
|
||||
} else {
|
||||
// 清除timeout
|
||||
clearTimeout(global.doubleClickTaskbarTimer);
|
||||
// 清空计数
|
||||
global.doubleClickTaskbarCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
|
@ -2,11 +2,12 @@ import { ipcMain } from "electron";
|
||||
import { createTray, hideMainWindow, showMainWindow } from "./index";
|
||||
import { initAssociateFolder } from "../classification";
|
||||
import { checkInvalid } from "../item";
|
||||
import { getWindow } from "../commons";
|
||||
|
||||
export default function () {
|
||||
// 显示窗口
|
||||
ipcMain.on("showMainWindow", (event, args) => {
|
||||
showMainWindow(args.blurHide);
|
||||
showMainWindow(args.blurHide, args.autoHide);
|
||||
});
|
||||
// 隐藏窗口
|
||||
ipcMain.on("hideMainWindow", () => {
|
||||
@ -16,6 +17,13 @@ export default function () {
|
||||
ipcMain.on("setTray", (event, args) => {
|
||||
createTray(args);
|
||||
});
|
||||
// 任务栏
|
||||
ipcMain.on("setTaskbar", (event, args) => {
|
||||
let window = getWindow("mainWindow");
|
||||
if (window) {
|
||||
window.setSkipTaskbar(args);
|
||||
}
|
||||
});
|
||||
// 初始化数据
|
||||
ipcMain.on("mainWindowInitData", () => {
|
||||
// 初始化关联文件夹
|
||||
|
@ -1,6 +1,10 @@
|
||||
import { BrowserWindow, shell } from "electron";
|
||||
import { BrowserWindow, shell, screen } from "electron";
|
||||
import { join } from "node:path";
|
||||
import { getMainBackgorunColor, sendToWebContent } from "../commons";
|
||||
import {
|
||||
getMainBackgorunColor,
|
||||
getWindowInScreen,
|
||||
sendToWebContent,
|
||||
} from "../commons";
|
||||
import cacheData from "../commons/cacheData";
|
||||
|
||||
// 窗口
|
||||
@ -14,7 +18,7 @@ function createQuickSearchWindow() {
|
||||
global.quickSearchWindowInit = false;
|
||||
quickSearchWindow = global.quickSearchWindow = new BrowserWindow({
|
||||
title: "Dawn Launcher",
|
||||
width: 600,
|
||||
width: global.setting.quickSearch.width,
|
||||
height: 44,
|
||||
type: "toolbar",
|
||||
frame: false,
|
||||
@ -24,7 +28,11 @@ function createQuickSearchWindow() {
|
||||
fullscreenable: false,
|
||||
resizable: false,
|
||||
alwaysOnTop: true,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
backgroundThrottling: false,
|
||||
@ -113,7 +121,43 @@ function showQuickSearchWindowBefore() {
|
||||
* 显示快速搜索窗口
|
||||
*/
|
||||
function showQuickSearchWindow() {
|
||||
// flag
|
||||
let flag = true;
|
||||
// 是否开启勿扰模式
|
||||
if (global.setting.general.notDisturb) {
|
||||
if (global.addon.isFullscreen()) {
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
// 获取鼠标所在的屏幕
|
||||
let currentDisplay = screen.getDisplayNearestPoint(
|
||||
screen.getCursorScreenPoint()
|
||||
);
|
||||
// 获取窗口所在的屏幕
|
||||
let windowDisplay = getWindowInScreen(quickSearchWindow);
|
||||
if (windowDisplay.length === 0) {
|
||||
// 代表窗口的位置不再任一屏幕内,将窗口位置移动到主窗口
|
||||
quickSearchWindow.center();
|
||||
} else if (
|
||||
(windowDisplay.length === 1 &&
|
||||
currentDisplay.id !== windowDisplay[0].id) ||
|
||||
windowDisplay.length > 1
|
||||
) {
|
||||
// 在鼠标所在的屏幕显示
|
||||
let workArea = currentDisplay.workArea;
|
||||
let bounds = quickSearchWindow.getBounds();
|
||||
let x = Math.round(workArea.x + workArea.width / 2 - bounds.width / 2);
|
||||
let y = Math.round(workArea.y + workArea.height / 2 - 44 / 2);
|
||||
quickSearchWindow.setPosition(x, y);
|
||||
for (let i = 0; i < 10; i++) {
|
||||
quickSearchWindow.setSize(global.setting.quickSearch.width, 44);
|
||||
}
|
||||
}
|
||||
// 显示
|
||||
quickSearchWindow.setBounds({ width: global.setting.quickSearch.width });
|
||||
quickSearchWindow.show();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -18,4 +18,8 @@ export default function () {
|
||||
ipcMain.on("setQuickSearchWindowHeight", (event, args) => {
|
||||
global.quickSearchWindow.setBounds({ height: args });
|
||||
});
|
||||
// 设置快速搜索窗口宽度
|
||||
ipcMain.on("setQuickSearchWindowWidth", (event, args) => {
|
||||
global.quickSearchWindow.setBounds({ width: args });
|
||||
});
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Setting } from "../../../types/setting";
|
||||
import { getSetting } from "../../../commons/utils/setting";
|
||||
import { getDataSqlite3 } from "../../commons/betterSqlite3";
|
||||
import { app } from "electron";
|
||||
|
||||
// 获取数据库
|
||||
let db = getDataSqlite3();
|
||||
@ -58,6 +59,8 @@ function add(setting: Setting) {
|
||||
let id = db.prepare(sql).run(1, JSON.stringify(setting)).lastInsertRowid;
|
||||
if (id) {
|
||||
global.setting = setting;
|
||||
// 添加设置被视为首次打开软件
|
||||
global.first = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -5,7 +5,11 @@ import { hideMainWindow, showMainWindowBefore } from "../main/index";
|
||||
import { list as selectClassificationList } from "../classification/data";
|
||||
import { list as selectItemList } from "../item/data";
|
||||
import { run } from "../item";
|
||||
import { closeWindow, getMainBackgorunColor } from "../commons/index";
|
||||
import {
|
||||
closeWindow,
|
||||
getMainBackgorunColor,
|
||||
mainWindowExist,
|
||||
} from "../commons/index";
|
||||
import {
|
||||
createQuickSearchWindow,
|
||||
hideQuickSearchWindow,
|
||||
@ -28,14 +32,17 @@ function createSettingWindow() {
|
||||
parent: global.mainWindow,
|
||||
height: 500,
|
||||
width: 600,
|
||||
type: "toolbar",
|
||||
maximizable: false,
|
||||
minimizable: false,
|
||||
resizable: false,
|
||||
fullscreenable: false,
|
||||
skipTaskbar: true,
|
||||
show: false,
|
||||
backgroundColor: getMainBackgorunColor(),
|
||||
transparent: global.setting.appearance.transparency < 1,
|
||||
backgroundColor:
|
||||
global.setting.appearance.transparency === 1
|
||||
? getMainBackgorunColor()
|
||||
: null,
|
||||
webPreferences: {
|
||||
spellcheck: false,
|
||||
preload: join(__dirname, "../preload/index.js"),
|
||||
@ -76,42 +83,93 @@ function setShortcutKey(setting: Setting = global.setting) {
|
||||
setting.general.showHideShortcutKey &&
|
||||
setting.general.showHideShortcutKey.trim() !== ""
|
||||
) {
|
||||
globalShortcut.register(setting.general.showHideShortcutKey, () => {
|
||||
try {
|
||||
globalShortcut.register(
|
||||
setting.general.showHideShortcutKey.replace("Win", "Super"),
|
||||
() => {
|
||||
if (mainWindowExist()) {
|
||||
if (global.mainWindow.isVisible()) {
|
||||
hideMainWindow();
|
||||
} else {
|
||||
showMainWindowBefore(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (e) {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 分类快捷键
|
||||
let classificationList = selectClassificationList();
|
||||
for (const classification of classificationList) {
|
||||
if (classification.globalShortcutKey && classification.shortcutKey) {
|
||||
globalShortcut.register(classification.shortcutKey, () => {
|
||||
try {
|
||||
globalShortcut.register(
|
||||
classification.shortcutKey.replace("Win", "Super"),
|
||||
() => {
|
||||
if (mainWindowExist()) {
|
||||
// 分类
|
||||
showMainWindowBefore(true, classification.id);
|
||||
});
|
||||
showMainWindowBefore(true, false, classification.id);
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (e) {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 项目快捷键
|
||||
let itemList = selectItemList();
|
||||
for (const item of itemList) {
|
||||
if (item.globalShortcutKey && item.shortcutKey) {
|
||||
globalShortcut.register(item.shortcutKey, () => {
|
||||
try {
|
||||
globalShortcut.register(
|
||||
item.shortcutKey.replace("Win", "Super"),
|
||||
() => {
|
||||
if (mainWindowExist()) {
|
||||
// flag
|
||||
let flag = true;
|
||||
// 是否开启勿扰模式
|
||||
if (global.setting.general.notDisturb) {
|
||||
if (global.addon.isFullscreen()) {
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
// 项目
|
||||
run("main", "open", item);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (e) {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 快速搜索
|
||||
if (
|
||||
setting.quickSearch.enable &&
|
||||
setting.quickSearch.showHideShortcutKey &&
|
||||
setting.quickSearch.showHideShortcutKey.trim() !== ""
|
||||
) {
|
||||
globalShortcut.register(setting.quickSearch.showHideShortcutKey, () => {
|
||||
try {
|
||||
globalShortcut.register(
|
||||
setting.quickSearch.showHideShortcutKey.replace("Win", "Super"),
|
||||
() => {
|
||||
if (global.setting.quickSearch.enable) {
|
||||
// 如果窗口不存在或者被销毁的话,就创建窗口
|
||||
if (!global.quickSearchWindow || global.quickSearchWindow.isDestroyed()) {
|
||||
if (
|
||||
!global.quickSearchWindow ||
|
||||
global.quickSearchWindow.isDestroyed()
|
||||
) {
|
||||
createQuickSearchWindow();
|
||||
}
|
||||
// 如果初始化完毕并且窗口状态是正常的话,可以进行显示/隐藏
|
||||
@ -126,7 +184,14 @@ function setShortcutKey(setting: Setting = global.setting) {
|
||||
showQuickSearchWindowBefore();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (e) {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { app, dialog, ipcMain } from "electron";
|
||||
import { app, ipcMain } from "electron";
|
||||
import {
|
||||
closeWindow,
|
||||
getUserDataPath,
|
||||
relaunch,
|
||||
sendToWebContent,
|
||||
showOpenDialogSync,
|
||||
} from "../commons/index";
|
||||
import { createSettingWindow, setFixedPosition, setShortcutKey } from ".";
|
||||
import { add, select, update } from "./data";
|
||||
@ -15,6 +16,7 @@ import { statSync, mkdirSync, copyFileSync, readFileSync } from "node:fs";
|
||||
import mime from "mime";
|
||||
import { checkInvalid } from "../item";
|
||||
import { updateItemOpenNumberSortToDefualt } from "../classification";
|
||||
import cacheData from "../commons/cacheData";
|
||||
|
||||
export default function () {
|
||||
// 创建设置窗口
|
||||
@ -90,6 +92,13 @@ export default function () {
|
||||
// 锁定尺寸
|
||||
ipcMain.on("setLockSize", (event, args) => {
|
||||
global.mainWindow.setResizable(!args);
|
||||
if (args) {
|
||||
// 存储主窗口尺寸
|
||||
cacheData.cacheStore.set(
|
||||
"mainWindowLockSizeBounds",
|
||||
global.mainWindow.getBounds()
|
||||
);
|
||||
}
|
||||
});
|
||||
// 固定位置
|
||||
ipcMain.on("setFixedPosition", (event, args) => {
|
||||
@ -114,7 +123,7 @@ export default function () {
|
||||
// 上传背景图
|
||||
ipcMain.on("uploadBackgrounImage", (event, args) => {
|
||||
// 打开文件对话框
|
||||
let filePathList = dialog.showOpenDialogSync(global.settingWindow, {
|
||||
let filePathList = showOpenDialogSync("settingWindow", {
|
||||
filters: [
|
||||
{
|
||||
name: "Images",
|
||||
|
@ -7,17 +7,14 @@ import {
|
||||
import { CommonItem, Item } from "../../types/item";
|
||||
import { parse, join } from "node:path";
|
||||
import { readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
||||
import { execSync } from "node:child_process";
|
||||
import xml2js from "xml2js";
|
||||
import { newCommonItem, newCommonItemData } from "../../commons/utils/common";
|
||||
import { ShortcutInfo } from "../../types/common";
|
||||
import { getAbsolutePath, getFileIcon } from "../commons/utils";
|
||||
import { parsePath, getFileIcon } from "../commons/utils";
|
||||
|
||||
// AppxInfo
|
||||
export interface AppxInfo {
|
||||
packageFamilyName: string;
|
||||
installLocation: string;
|
||||
appId: string | null;
|
||||
id: string | null;
|
||||
icon: string | null;
|
||||
name: string | null;
|
||||
}
|
||||
@ -46,11 +43,6 @@ process.parentPort.once("message", async (event) => {
|
||||
res = await getStartMenuItemList(dataParam);
|
||||
} else if (params.name === "getAppxItemList") {
|
||||
res = await getAppxItemList();
|
||||
} else if (params.name === "getDropItemInfo") {
|
||||
res = await getDropItemInfo(
|
||||
dataParam.classificationId,
|
||||
dataParam.pathList
|
||||
);
|
||||
} else if (params.name === "refreshItemIcon") {
|
||||
res = await refreshItemIcon(dataParam);
|
||||
} else if (params.name === "getDirectoryItemList") {
|
||||
@ -168,7 +160,7 @@ async function getStartMenuItemList(cacheList: Array<CommonItem>) {
|
||||
name,
|
||||
data: newCommonItemData({
|
||||
target: filePath,
|
||||
icon: getFileIcon(filePath),
|
||||
icon: await getFileIcon(filePath),
|
||||
params,
|
||||
}),
|
||||
});
|
||||
@ -191,76 +183,15 @@ async function getAppxItemList() {
|
||||
// ID
|
||||
let id = 1;
|
||||
// 获取APPX信息
|
||||
let stdout = execSync(
|
||||
'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 appxList = global.addon.getAppxList();
|
||||
// 临时列表
|
||||
let tempList: Array<AppxInfo> = [];
|
||||
// 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,
|
||||
});
|
||||
}
|
||||
let tempList = [];
|
||||
// 读取XML获取图标路径和名称
|
||||
for (let temp of tempList) {
|
||||
let appxInfo = await getAppxInfo(temp.installLocation);
|
||||
temp.appId = appxInfo.appId;
|
||||
temp.icon = appxInfo.icon;
|
||||
temp.name = appxInfo.name;
|
||||
for (let appx of appxList) {
|
||||
tempList.push(...(await getAppxInfo(appx)));
|
||||
}
|
||||
// 过滤
|
||||
let filterList = tempList.filter((e) => e.icon && e.appId && e.name);
|
||||
// 图标转BASE64
|
||||
for (let appxInfo of filterList) {
|
||||
for (let appxInfo of tempList) {
|
||||
try {
|
||||
let buffer = readFileSync(appxInfo.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(
|
||||
newCommonItem({
|
||||
id: id++,
|
||||
name: appxInfo.name,
|
||||
data: newCommonItemData({
|
||||
icon: appxInfo.icon,
|
||||
target:
|
||||
"Shell:AppsFolder\\" +
|
||||
appxInfo.packageFamilyName +
|
||||
"!" +
|
||||
appxInfo.appId,
|
||||
target: "Shell:AppsFolder\\" + appxInfo.id,
|
||||
}),
|
||||
})
|
||||
);
|
||||
@ -301,52 +228,63 @@ async function getAppxItemList() {
|
||||
/**
|
||||
* 获取Appx信息
|
||||
*/
|
||||
async function getAppxInfo(installLocation: string) {
|
||||
// appx信息
|
||||
let appxInfo: AppxInfo = {
|
||||
packageFamilyName: null,
|
||||
installLocation: null,
|
||||
appId: null,
|
||||
icon: null,
|
||||
name: null,
|
||||
};
|
||||
async function getAppxInfo(appx: any) {
|
||||
// 结果列表
|
||||
let resultList = [];
|
||||
// buffer, 解析结果
|
||||
let buffer: Buffer, result: any;
|
||||
try {
|
||||
// 解析
|
||||
buffer = readFileSync(installLocation + "\\AppxManifest.xml");
|
||||
buffer = readFileSync(join(appx.path, "AppxManifest.xml"));
|
||||
result = await xml2jsSync(buffer);
|
||||
// 备用名称
|
||||
let executable = null;
|
||||
// 循环Application
|
||||
if (
|
||||
result.Package.Applications &&
|
||||
result.Package.Applications[0] &&
|
||||
result.Package.Applications[0].Application &&
|
||||
result.Package.Applications[0].Application.length > 0
|
||||
) {
|
||||
for (
|
||||
let i = 0;
|
||||
i < result.Package.Applications[0].Application.length;
|
||||
i++
|
||||
) {
|
||||
// appx信息
|
||||
let appxInfo: AppxInfo = {
|
||||
id: null,
|
||||
icon: null,
|
||||
name: null,
|
||||
};
|
||||
// Application
|
||||
const application = result.Package.Applications[0].Application[i];
|
||||
// 名称
|
||||
if (appx["appName" + i] && appx["appName" + i].trim() !== "") {
|
||||
appxInfo.name = appx["appName" + i];
|
||||
} else {
|
||||
appxInfo.name = appx.displayName;
|
||||
}
|
||||
// 获取ID
|
||||
let id = application.$.Id;
|
||||
if (!id || id.trim() === "") {
|
||||
continue;
|
||||
}
|
||||
appxInfo.id = appx.familyName + "!" + id;
|
||||
// 图标
|
||||
try {
|
||||
// targetsize图标
|
||||
let targetSizeIcon: string | null = null;
|
||||
let targetSizeIconMax: number | null = null;
|
||||
// scale图标
|
||||
let scaleIcon = null;
|
||||
let scaleIconMax = null;
|
||||
// 图标 APPID
|
||||
if (result.Package.Applications && result.Package.Applications[0]) {
|
||||
if (result.Package.Applications[0].Application[0]) {
|
||||
// APPID
|
||||
appxInfo.appId = result.Package.Applications[0].Application[0].$.Id;
|
||||
// Executable
|
||||
executable = result.Package.Applications[0].Application[0].$.Executable;
|
||||
// 获取图标
|
||||
if (
|
||||
result.Package.Applications[0].Application[0]["uap:VisualElements"] !=
|
||||
null
|
||||
) {
|
||||
// 图标
|
||||
if (application["uap:VisualElements"]) {
|
||||
// logo地址
|
||||
let logo =
|
||||
result.Package.Applications[0].Application[0][
|
||||
"uap:VisualElements"
|
||||
][0].$.Square44x44Logo;
|
||||
let logo = application["uap:VisualElements"][0].$.Square44x44Logo;
|
||||
// 解析路径
|
||||
let parsedPath = parse(logo);
|
||||
// 获取文件夹下所有文件
|
||||
let fileNameList = readdirSync(
|
||||
installLocation + "\\" + parsedPath.dir
|
||||
);
|
||||
let fileNameList = readdirSync(join(appx.path, parsedPath.dir));
|
||||
// 筛选出和包含logo名称的文件名
|
||||
let filterList = fileNameList.filter(
|
||||
(f) => f.indexOf(parsedPath.name) >= 0
|
||||
@ -377,7 +315,7 @@ async function getAppxInfo(installLocation: string) {
|
||||
);
|
||||
targetSizeIcon =
|
||||
defaultList.length > 0
|
||||
? installLocation +
|
||||
? appx.path +
|
||||
"\\" +
|
||||
parsedPath.dir +
|
||||
"\\" +
|
||||
@ -398,7 +336,7 @@ async function getAppxInfo(installLocation: string) {
|
||||
);
|
||||
if (defaultUnplatedList.length > 0) {
|
||||
targetSizeIcon =
|
||||
installLocation +
|
||||
appx.path +
|
||||
"\\" +
|
||||
parsedPath.dir +
|
||||
"\\" +
|
||||
@ -411,11 +349,14 @@ async function getAppxInfo(installLocation: string) {
|
||||
let defaultAltFormList = targetSizeList.filter(
|
||||
(f) =>
|
||||
f ===
|
||||
parsedPath.name + ".targetsize-" + max + "_altform.png"
|
||||
parsedPath.name +
|
||||
".targetsize-" +
|
||||
max +
|
||||
"_altform.png"
|
||||
);
|
||||
if (defaultAltFormList.length > 0) {
|
||||
targetSizeIcon =
|
||||
installLocation +
|
||||
appx.path +
|
||||
"\\" +
|
||||
parsedPath.dir +
|
||||
"\\" +
|
||||
@ -427,11 +368,12 @@ async function getAppxInfo(installLocation: string) {
|
||||
// 获取 名称.targetsize-{max}.png
|
||||
let defaultTargetSizeList = targetSizeList.filter(
|
||||
(f) =>
|
||||
f === parsedPath.name + ".targetsize-" + max + ".png"
|
||||
f ===
|
||||
parsedPath.name + ".targetsize-" + max + ".png"
|
||||
);
|
||||
if (defaultTargetSizeList.length > 0) {
|
||||
targetSizeIcon =
|
||||
installLocation +
|
||||
appx.path +
|
||||
"\\" +
|
||||
parsedPath.dir +
|
||||
"\\" +
|
||||
@ -458,11 +400,7 @@ async function getAppxInfo(installLocation: string) {
|
||||
);
|
||||
if (defaultList.length > 0) {
|
||||
scaleIcon =
|
||||
installLocation +
|
||||
"\\" +
|
||||
parsedPath.dir +
|
||||
"\\" +
|
||||
defaultList[0];
|
||||
appx.path + "\\" + parsedPath.dir + "\\" + defaultList[0];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -486,7 +424,7 @@ async function getAppxInfo(installLocation: string) {
|
||||
);
|
||||
if (defaultList.length > 0) {
|
||||
scaleIcon =
|
||||
installLocation +
|
||||
appx.path +
|
||||
"\\" +
|
||||
parsedPath.dir +
|
||||
"\\" +
|
||||
@ -499,9 +437,7 @@ async function getAppxInfo(installLocation: string) {
|
||||
if (filterList.length === 1) {
|
||||
// 只有一张图片
|
||||
appxInfo.icon =
|
||||
installLocation + "\\" + parsedPath.dir + "\\" + filterList[0];
|
||||
}
|
||||
}
|
||||
appx.path + "\\" + parsedPath.dir + "\\" + filterList[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -512,7 +448,10 @@ async function getAppxInfo(installLocation: string) {
|
||||
} else if (!targetSizeIcon && scaleIcon) {
|
||||
appxInfo.icon = scaleIcon;
|
||||
} else if (targetSizeIcon && scaleIcon) {
|
||||
if (targetSizeIconMax === 256 || targetSizeIconMax > scaleIconMax) {
|
||||
if (
|
||||
targetSizeIconMax === 256 ||
|
||||
targetSizeIconMax > scaleIconMax
|
||||
) {
|
||||
appxInfo.icon = targetSizeIcon;
|
||||
} else if (targetSizeIconMax < scaleIconMax) {
|
||||
appxInfo.icon = scaleIcon;
|
||||
@ -520,45 +459,41 @@ async function getAppxInfo(installLocation: string) {
|
||||
appxInfo.icon = targetSizeIcon;
|
||||
}
|
||||
} else if (!targetSizeIcon && !scaleIcon) {
|
||||
let propertiesIcon = getPropertiesIcon(installLocation, result);
|
||||
let propertiesIcon = getPropertiesIcon(appx.path, result);
|
||||
if (propertiesIcon) {
|
||||
appxInfo.icon = propertiesIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 名称
|
||||
if (result.Package.Properties) {
|
||||
if (result.Package.Properties[0].DisplayName) {
|
||||
appxInfo.name = result.Package.Properties[0].DisplayName[0];
|
||||
} catch (e) {
|
||||
if (result) {
|
||||
let propertiesIcon = getPropertiesIcon(appx.path, result);
|
||||
if (propertiesIcon) {
|
||||
appxInfo.icon = propertiesIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
!appxInfo.name ||
|
||||
(appxInfo.name && appxInfo.name.indexOf("ms-resource:") >= 0)
|
||||
(!appxInfo.icon || appxInfo.icon.trim() === "") &&
|
||||
appx.logo &&
|
||||
appx.logo.trim() !== ""
|
||||
) {
|
||||
if (executable && executable.indexOf("ms-resource:") < 0) {
|
||||
appxInfo.name = parse(executable).name;
|
||||
} else {
|
||||
appxInfo.name = null;
|
||||
appxInfo.icon = appx.logo;
|
||||
}
|
||||
}
|
||||
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;
|
||||
if (
|
||||
appxInfo.name &&
|
||||
appxInfo.name.trim() !== "" &&
|
||||
appxInfo.id &&
|
||||
appxInfo.id.trim() !== "" &&
|
||||
appxInfo.icon &&
|
||||
appxInfo.icon.trim() !== ""
|
||||
) {
|
||||
resultList.push(appxInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (ex) {
|
||||
if (result) {
|
||||
let propertiesIcon = getPropertiesIcon(installLocation, result);
|
||||
if (propertiesIcon) {
|
||||
appxInfo.icon = propertiesIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
return appxInfo;
|
||||
} catch (ex) {}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -618,60 +553,6 @@ function getPropertiesIcon(installLocation: string, result: any) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过路径获取项目信息
|
||||
* @param classificationId
|
||||
* @param pathList
|
||||
*/
|
||||
async function getDropItemInfo(
|
||||
classificationId: number,
|
||||
pathList: Array<string>
|
||||
) {
|
||||
// 项目列表
|
||||
let itemList: Array<Item> = [];
|
||||
// 解析文件信息并添加项目
|
||||
for (const path of pathList) {
|
||||
try {
|
||||
// item
|
||||
let item = newItem({ classificationId });
|
||||
// 目标
|
||||
item.data.target = path;
|
||||
// 名称
|
||||
item.name = getFileName(item.data.target);
|
||||
// 判断是否是快捷方式,如果是的话,需要获取真实路径
|
||||
if (mime.getType(path) === "application/x-ms-shortcut") {
|
||||
// 快捷方式
|
||||
// 获取真实文件路径和参数
|
||||
let shortcutInfo: ShortcutInfo | null =
|
||||
global.addon.getShortcutFileInfo(path);
|
||||
if (shortcutInfo) {
|
||||
// 路径
|
||||
if (shortcutInfo.target) {
|
||||
item.data.target = shortcutInfo.target;
|
||||
}
|
||||
// 参数
|
||||
if (shortcutInfo.arguments) {
|
||||
item.data.params = shortcutInfo.arguments;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 文件类型
|
||||
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
|
||||
@ -685,7 +566,7 @@ async function refreshItemIcon(itemList: Array<Item>) {
|
||||
// 刷新图标
|
||||
for (const item of itemList) {
|
||||
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) {
|
||||
resultList.push({
|
||||
id: item.id,
|
||||
@ -757,9 +638,10 @@ async function getDirectoryItemList(
|
||||
}
|
||||
if (!item) {
|
||||
item = newItem({ classificationId, type });
|
||||
item.name = deleteExtname(getFileName(path));
|
||||
item.name =
|
||||
type === 0 ? deleteExtname(getFileName(path)) : getFileName(path);
|
||||
item.data.target = path;
|
||||
item.data.icon = getFileIcon(path);
|
||||
item.data.icon = await getFileIcon(path);
|
||||
}
|
||||
// push
|
||||
resultList.push(item);
|
||||
@ -781,7 +663,7 @@ function checkInvalidItem(itemList: Array<Item>) {
|
||||
// 只校验文件和文件夹
|
||||
if (item.type === 0 || item.type === 1) {
|
||||
// 获取绝对路径
|
||||
let path = getAbsolutePath(item.data.target);
|
||||
let path = parsePath(item.data.target);
|
||||
try {
|
||||
statSync(path);
|
||||
} catch (e) {
|
||||
|
@ -105,12 +105,25 @@ contextBridge.exposeInMainWorld("api", {
|
||||
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", {
|
||||
// 显示窗口
|
||||
showWindow: (blurHide: boolean) => {
|
||||
ipcRenderer.send("showMainWindow", { blurHide });
|
||||
showWindow: (blurHide: boolean, autoHide: boolean) => {
|
||||
ipcRenderer.send("showMainWindow", { blurHide, autoHide });
|
||||
},
|
||||
// 隐藏窗口
|
||||
hideWindow: () => {
|
||||
@ -673,6 +686,10 @@ contextBridge.exposeInMainWorld("item", {
|
||||
updateOpenInfo: (type: string, id: number) => {
|
||||
ipcRenderer.send("updateItemOpenInfo", { type, id });
|
||||
},
|
||||
// 删除历史记录
|
||||
deleteQuickSearchHistory: (id: number) => {
|
||||
ipcRenderer.send("deleteQuickSearchHistory", id);
|
||||
},
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld("setting", {
|
||||
@ -717,6 +734,10 @@ contextBridge.exposeInMainWorld("setting", {
|
||||
setTray: (show: boolean) => {
|
||||
ipcRenderer.send("setTray", show);
|
||||
},
|
||||
// 隐藏任务栏
|
||||
setTaskbar: (show: boolean) => {
|
||||
ipcRenderer.send("setTaskbar", show);
|
||||
},
|
||||
// 设置快捷键
|
||||
setShortcutKey: (setting: Setting) => {
|
||||
ipcRenderer.send("setShortcutKey", setting);
|
||||
@ -809,6 +830,10 @@ contextBridge.exposeInMainWorld("quickSearch", {
|
||||
setWindowHeight: (height: number) => {
|
||||
ipcRenderer.send("setQuickSearchWindowHeight", height);
|
||||
},
|
||||
// 设置窗口宽度
|
||||
setWindowWidth: (width: number) => {
|
||||
ipcRenderer.send("setQuickSearchWindowWidth", width);
|
||||
},
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld("about", {
|
||||
|
4
electron/types/global.d.ts
vendored
4
electron/types/global.d.ts
vendored
@ -5,6 +5,8 @@ import { Setting } from "../../types/setting";
|
||||
declare global {
|
||||
// addon
|
||||
var addon: any;
|
||||
// 是否是首次打开软件
|
||||
var first: boolean;
|
||||
// 语言
|
||||
var language: any;
|
||||
// 主窗口
|
||||
@ -57,6 +59,8 @@ declare global {
|
||||
var classificationRightMenu: boolean | null;
|
||||
// 项目右键菜单显示
|
||||
var itemRightMenu: boolean | null;
|
||||
// 存储主窗口当前是否有弹出对话框
|
||||
var mainWindowShowDialog: boolean;
|
||||
}
|
||||
|
||||
export interface ChildProcessInfo {
|
||||
|
16
package.json
16
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "dawn-launcher",
|
||||
"productName": "Dawn Launcher",
|
||||
"version": "1.3.1",
|
||||
"version": "1.5.1",
|
||||
"main": "dist-electron/main/index.js",
|
||||
"description": "Windows 快捷启动工具,帮助您整理杂乱无章的桌面,分门别类管理您的桌面快捷方式,让您的桌面保持干净整洁。",
|
||||
"author": "FanChenIO",
|
||||
@ -29,22 +29,23 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "^2.16.3",
|
||||
"@vicons/ionicons5": "^0.12.0",
|
||||
"@vicons/material": "^0.12.0",
|
||||
"@vicons/utils": "^0.1.4",
|
||||
"@vitejs/plugin-vue": "^4.4.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"better-sqlite3-multiple-ciphers": "^9.0.0",
|
||||
"electron": "^26.4.2",
|
||||
"electron-builder": "^24.6.4",
|
||||
"better-sqlite3-multiple-ciphers": "^9.4.1",
|
||||
"electron": "^28.3.1",
|
||||
"electron-builder": "^24.6.5",
|
||||
"less": "^4.2.0",
|
||||
"less-loader": "^11.1.3",
|
||||
"naive-ui": "^2.35.0",
|
||||
"naive-ui": "^2.36.0",
|
||||
"postcss": "^8.4.31",
|
||||
"tailwindcss": "^3.3.5",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^4.4.11",
|
||||
"vite-plugin-electron": "^0.14.1",
|
||||
"vue": "^3.3.7",
|
||||
"vite-plugin-electron": "^0.15.4",
|
||||
"vue": "^3.4.13",
|
||||
"vue-tsc": "^1.8.22"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -59,6 +60,7 @@
|
||||
"dompurify": "^3.0.6",
|
||||
"electron-log": "^5.0.0",
|
||||
"electron-store": "^8.1.0",
|
||||
"icojs": "^0.19.3",
|
||||
"mime": "^3.0.0",
|
||||
"pinia": "^2.1.7",
|
||||
"pinyin-pro": "^3.17.0",
|
||||
|
82
rust/lib.rs
82
rust/lib.rs
@ -31,24 +31,6 @@ fn get_shortcut_file_info(path: String) -> Option<HashMap<String, String>> {
|
||||
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)]
|
||||
#[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()
|
||||
}
|
||||
|
||||
@ -135,7 +117,7 @@ pub fn get_cursor_pos_window_class_name() -> String {
|
||||
*/
|
||||
#[allow(dead_code)]
|
||||
#[napi]
|
||||
pub fn get_clipboard_file_list() -> Vec<String> {
|
||||
fn get_clipboard_file_list() -> Vec<String> {
|
||||
windows::get_clipboard_file_list()
|
||||
}
|
||||
|
||||
@ -144,7 +126,7 @@ pub fn get_clipboard_file_list() -> Vec<String> {
|
||||
*/
|
||||
#[allow(dead_code)]
|
||||
#[napi]
|
||||
pub fn clipboard_has_bitmap() -> bool {
|
||||
fn clipboard_has_bitmap() -> bool {
|
||||
windows::clipboard_has_bitmap()
|
||||
}
|
||||
|
||||
@ -153,7 +135,7 @@ pub fn clipboard_has_bitmap() -> bool {
|
||||
*/
|
||||
#[allow(dead_code)]
|
||||
#[napi]
|
||||
pub fn get_clipboard_bitmap_base64() -> Option<String> {
|
||||
fn get_clipboard_bitmap_base64() -> Option<String> {
|
||||
windows::get_clipboard_bitmap_base64()
|
||||
}
|
||||
|
||||
@ -162,6 +144,60 @@ pub fn get_clipboard_bitmap_base64() -> Option<String> {
|
||||
*/
|
||||
#[allow(dead_code)]
|
||||
#[napi]
|
||||
pub fn empty_recycle_bin(window: i32) {
|
||||
fn empty_recycle_bin(window: i32) {
|
||||
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())
|
||||
}
|
||||
|
307
rust/windows.rs
307
rust/windows.rs
@ -6,6 +6,7 @@ use napi::{
|
||||
JsFunction,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::thread;
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
io::Cursor,
|
||||
@ -14,14 +15,17 @@ use std::{
|
||||
sync::atomic::{AtomicBool, Ordering},
|
||||
};
|
||||
use windows::{
|
||||
core::{ComInterface, HSTRING, PCSTR, PCWSTR},
|
||||
core::{ComInterface, HSTRING, PCSTR, PCWSTR, PSTR},
|
||||
w,
|
||||
Win32::{
|
||||
Foundation::{HWND, LPARAM, LRESULT, MAX_PATH, POINT, RECT, SIZE, WPARAM},
|
||||
Graphics::Gdi::{
|
||||
Graphics::{
|
||||
Dwm::{DwmSetWindowAttribute, DWMWA_TRANSITIONS_FORCEDISABLED},
|
||||
Gdi::{
|
||||
GetMonitorInfoW, GetObjectW, MonitorFromWindow, BITMAP, MONITORINFO,
|
||||
MONITOR_DEFAULTTONEAREST,
|
||||
},
|
||||
},
|
||||
Storage::FileSystem::SearchPathW,
|
||||
System::{
|
||||
Com::{
|
||||
@ -29,7 +33,6 @@ use windows::{
|
||||
CLSCTX_INPROC_SERVER, COINIT_APARTMENTTHREADED, STGM_READ,
|
||||
},
|
||||
Environment::GetEnvironmentVariableW,
|
||||
SystemInformation::GetSystemDirectoryW,
|
||||
},
|
||||
UI::{
|
||||
Input::Ime::{
|
||||
@ -39,23 +42,29 @@ use windows::{
|
||||
Shell::{
|
||||
BHID_SFUIObject, IContextMenu, IShellItem, IShellItemImageFactory, IShellLinkW,
|
||||
SHCreateItemFromParsingName, SHEmptyRecycleBinW, SHQueryUserNotificationState,
|
||||
ShellExecuteW, ShellLink, CMF_NORMAL, CMINVOKECOMMANDINFO,
|
||||
QUNS_ACCEPTS_NOTIFICATIONS, QUNS_APP, QUNS_BUSY, QUNS_NOT_PRESENT,
|
||||
QUNS_PRESENTATION_MODE, QUNS_QUIET_TIME, QUNS_RUNNING_D3D_FULL_SCREEN,
|
||||
SHERB_NOSOUND, SIIGBF_ICONONLY, SLGP_UNCPRIORITY,
|
||||
ShellLink, CMF_NORMAL, CMINVOKECOMMANDINFO, QUNS_ACCEPTS_NOTIFICATIONS, QUNS_APP,
|
||||
QUNS_BUSY, QUNS_NOT_PRESENT, QUNS_PRESENTATION_MODE, QUNS_QUIET_TIME,
|
||||
QUNS_RUNNING_D3D_FULL_SCREEN, SHERB_NOSOUND, SIIGBF_ICONONLY, SLGP_UNCPRIORITY,
|
||||
},
|
||||
WindowsAndMessaging::{
|
||||
CallNextHookEx, CreatePopupMenu, DestroyMenu, FindWindowW, GetClassNameW,
|
||||
GetCursorPos, GetForegroundWindow, GetSystemMetrics, GetWindowRect, SendMessageW,
|
||||
SetForegroundWindow, SetWindowsHookExW, TrackPopupMenu, WindowFromPoint, HHOOK,
|
||||
MSLLHOOKSTRUCT, SC_MONITORPOWER, SM_CXSCREEN, SM_CYSCREEN, SW_NORMAL,
|
||||
SW_SHOWDEFAULT, TPM_NONOTIFY, TPM_RETURNCMD, WH_MOUSE_LL, WM_LBUTTONDOWN,
|
||||
WM_LBUTTONUP, WM_MBUTTONDOWN, WM_MBUTTONUP, WM_MOUSEHWHEEL, WM_MOUSEMOVE,
|
||||
WM_MOUSEWHEEL, WM_RBUTTONDOWN, WM_RBUTTONUP, WM_SYSCOMMAND,
|
||||
MSLLHOOKSTRUCT, SC_MONITORPOWER, SM_CXSCREEN, SM_CYSCREEN, SW_NORMAL, TPM_NONOTIFY,
|
||||
TPM_RETURNCMD, WH_MOUSE_LL, WM_LBUTTONDOWN, WM_LBUTTONUP, WM_MBUTTONDOWN,
|
||||
WM_MBUTTONUP, WM_MOUSEHWHEEL, WM_MOUSEMOVE, WM_MOUSEWHEEL, WM_RBUTTONDOWN,
|
||||
WM_RBUTTONUP, WM_SYSCOMMAND,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
use windows::{
|
||||
Management::Deployment::PackageManager,
|
||||
Win32::{
|
||||
System::SystemInformation::GetSystemDirectoryW,
|
||||
UI::{Shell::ShellExecuteW, WindowsAndMessaging::SW_SHOWDEFAULT},
|
||||
},
|
||||
};
|
||||
|
||||
// 获取图标并转为BASE64
|
||||
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
|
||||
}
|
||||
|
||||
/**
|
||||
* 运行命令
|
||||
*/
|
||||
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,
|
||||
button: i32,
|
||||
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 y = (*msll_struct).pt.y;
|
||||
let mouse_data = (*msll_struct).mouseData;
|
||||
// 类名
|
||||
let mut class_name = String::new();
|
||||
// 参数
|
||||
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 {
|
||||
event.push_str("mouseup");
|
||||
class_name.push_str(&get_foreground_window_class_name());
|
||||
} else if param == WM_LBUTTONDOWN || param == WM_RBUTTONDOWN || param == WM_MBUTTONDOWN
|
||||
{
|
||||
event.push_str("mousedown");
|
||||
class_name.push_str(&get_foreground_window_class_name());
|
||||
} else if param == WM_MOUSEWHEEL || param == WM_MOUSEHWHEEL {
|
||||
event.push_str("mousewheel");
|
||||
class_name.push_str(&get_foreground_window_class_name());
|
||||
}
|
||||
// 按键类型
|
||||
if param == WM_LBUTTONUP || param == WM_LBUTTONDOWN {
|
||||
@ -563,6 +502,7 @@ unsafe extern "system" fn mouse_proc(code: i32, wparam: WPARAM, lparam: LPARAM)
|
||||
y,
|
||||
mouse_data,
|
||||
button,
|
||||
class_name,
|
||||
};
|
||||
func.call(
|
||||
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);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 去掉窗口动画
|
||||
*/
|
||||
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,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
80
src/App.vue
80
src/App.vue
@ -91,10 +91,35 @@ function setTheme() {
|
||||
padding: "6px",
|
||||
},
|
||||
Checkbox: {
|
||||
color: store.setting.appearance.theme.mainBackgroundColor,
|
||||
textColor: store.setting.appearance.theme.mainFontColor,
|
||||
borderChecked: "1px solid " + store.setting.appearance.theme.borderColor,
|
||||
colorChecked: store.setting.appearance.theme.secondBackgroundColor,
|
||||
color: hexToRGBA(store.setting.appearance.theme.mainBackgroundColor, 1),
|
||||
textColor: hexToRGBA(store.setting.appearance.theme.mainFontColor, 1),
|
||||
border:
|
||||
"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: {
|
||||
labelTextColor: store.setting.appearance.theme.mainFontColor,
|
||||
@ -172,6 +197,26 @@ watch(
|
||||
}
|
||||
);
|
||||
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 标签
|
||||
let oldRangeStyleElement = document.getElementById("range-style");
|
||||
// 如果找到了 style 标签,则从其父节点中移除
|
||||
@ -251,12 +296,33 @@ function keydown(e: any) {
|
||||
e.preventDefault();
|
||||
}
|
||||
// 禁止关闭页面
|
||||
if (shortcutKey.toLowerCase() === "ctrl + w") {
|
||||
if (
|
||||
shortcutKey.toLowerCase() === "ctrl + w" ||
|
||||
shortcutKey.toLowerCase() === "alt + f4"
|
||||
) {
|
||||
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;
|
||||
// mounted
|
||||
@ -265,6 +331,8 @@ onMounted(() => {
|
||||
createStyle();
|
||||
// 监听键盘
|
||||
window.addEventListener("keydown", keydown, true);
|
||||
// 监听右键
|
||||
window.addEventListener("contextmenu", contextmenu, true);
|
||||
// 监听更新项目
|
||||
onUpdateSettingUnListen = window.setting.onUpdate((data) => {
|
||||
store.setting = data;
|
||||
@ -274,6 +342,8 @@ onMounted(() => {
|
||||
onUnmounted(() => {
|
||||
// 监听键盘
|
||||
window.removeEventListener("keydown", keydown, true);
|
||||
// 监听右键
|
||||
window.removeEventListener("contextmenu", contextmenu, true);
|
||||
// 删除监听
|
||||
if (onUpdateSettingUnListen) {
|
||||
onUpdateSettingUnListen();
|
||||
|
20
src/components/KeyText.vue
Normal file
20
src/components/KeyText.vue
Normal file
@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<span
|
||||
class="ml-auto text-[12px] py-[4px] px-[6px]"
|
||||
style="border-radius: 4px"
|
||||
:style="{
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
backgroundColor: store.setting.appearance.theme.secondBackgroundColor,
|
||||
}"
|
||||
>{{ text }}</span
|
||||
>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useMainStore } from "../store";
|
||||
// pinia
|
||||
const store = useMainStore();
|
||||
// props
|
||||
const props = defineProps<{
|
||||
text: string;
|
||||
}>();
|
||||
</script>
|
12
src/index.d.ts
vendored
12
src/index.d.ts
vendored
@ -31,9 +31,16 @@ declare global {
|
||||
openURL: (url: string) => void;
|
||||
getVersion: () => string;
|
||||
exit: () => void;
|
||||
run: (
|
||||
operation: string,
|
||||
target: string,
|
||||
params: string | null,
|
||||
startLocation: string | null
|
||||
) => void;
|
||||
textRightMenu: () => void;
|
||||
};
|
||||
main: {
|
||||
showWindow: (blurHide: boolean) => void;
|
||||
showWindow: (blurHide: boolean, autoHide: boolean) => void;
|
||||
hideWindow: () => void;
|
||||
initData: () => void;
|
||||
onShowWindowBefore: (callback: Callback) => Function;
|
||||
@ -138,6 +145,7 @@ declare global {
|
||||
onUpdateOpenInfo: (callback: Callback) => Function;
|
||||
onCheckInvalid: (callback: Callback) => Function;
|
||||
updateOpenInfo: (type: string, id: number) => void;
|
||||
deleteQuickSearchHistory: (id: number) => void;
|
||||
};
|
||||
setting: {
|
||||
createWindow: () => void;
|
||||
@ -149,6 +157,7 @@ declare global {
|
||||
onUpdate: (callback: Callback) => Function;
|
||||
setStartup: (value: boolean) => void;
|
||||
setTray: (show: boolean) => void;
|
||||
setTaskbar: (show: boolean) => void;
|
||||
setShortcutKey: (setting: Setting) => void;
|
||||
setAlwaysTop: (value: boolean) => void;
|
||||
setLockSize: (value: boolean) => void;
|
||||
@ -168,6 +177,7 @@ declare global {
|
||||
onShowWindowBefore: (callback: Callback) => Function;
|
||||
onClearData: (callback: Callback) => Function;
|
||||
setWindowHeight: (height: number) => void;
|
||||
setWindowWidth: (width: number) => void;
|
||||
};
|
||||
about: {
|
||||
createWindow: () => void;
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '8px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center px-2 app-region-drag">
|
||||
@ -29,7 +34,7 @@
|
||||
/>
|
||||
<p class="mt-4">Dawn Launcher {{ version }}</p>
|
||||
<p class="mt-2">
|
||||
Copyright © 2022-2023 Dawn Launcher. All Rights Reserved
|
||||
Copyright © 2022-2025 Dawn Launcher. All Rights Reserved
|
||||
</p>
|
||||
<p class="mt-2">
|
||||
{{ store.language.officialWebsite }}{{ store.language.colon
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '8px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center app-region-drag">
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '8px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center app-region-drag">
|
||||
@ -131,7 +136,7 @@ let sortOptions = ref([
|
||||
value: "initial",
|
||||
},
|
||||
{
|
||||
label: store.language.byOpenNumber,
|
||||
label: store.language.byOpenCount,
|
||||
value: "openNumber",
|
||||
},
|
||||
{
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '8px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center app-region-drag">
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -78,7 +78,7 @@
|
||||
@dragleave="clearMouseOverChangeClassificationSetTimeout"
|
||||
>
|
||||
<span
|
||||
class="overflow-hidden text-ellipsis whitespace-nowrap"
|
||||
class="overflow-hidden whitespace-nowrap"
|
||||
:style="{
|
||||
filter: store.setting.appearance.fontShadow
|
||||
? 'drop-shadow(1px 1px 1px ' +
|
||||
@ -130,20 +130,20 @@
|
||||
<KeyboardArrowDownRound></KeyboardArrowDownRound>
|
||||
</Icon>
|
||||
</div>
|
||||
<ul
|
||||
<div
|
||||
v-show="
|
||||
classification.childList &&
|
||||
classification.childList.length > 0 &&
|
||||
classificationChildShowHiddenMap.has(classification.id)
|
||||
"
|
||||
class="classification-child-list"
|
||||
:class="[
|
||||
`${
|
||||
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="{
|
||||
backgroundColor:
|
||||
store.setting.classification.layout === 'top'
|
||||
@ -156,7 +156,16 @@
|
||||
store.setting.classification.layout === 'top'
|
||||
? classificationWidth + 'px'
|
||||
: '',
|
||||
maxHeight:
|
||||
store.setting.classification.layout === 'top' ? '300px' : 'auto',
|
||||
'box-shadow':
|
||||
store.setting.classification.layout === 'top'
|
||||
? '0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05'
|
||||
: '',
|
||||
}"
|
||||
>
|
||||
<ul
|
||||
class="classification-child-list h-full"
|
||||
:classification-parent-id="classification.id"
|
||||
>
|
||||
<li
|
||||
@ -183,7 +192,9 @@
|
||||
`${
|
||||
store.setting.classification.layout !== 'top' ? 'rounded' : ''
|
||||
}`,
|
||||
`${store.setting.classification.mode === 'normal' ? 'px-2' : ''}`,
|
||||
`${
|
||||
store.setting.classification.mode === 'normal' ? 'px-2' : ''
|
||||
}`,
|
||||
]"
|
||||
:style="{
|
||||
color:
|
||||
@ -213,7 +224,7 @@
|
||||
@dragleave="clearMouseOverChangeClassificationSetTimeout"
|
||||
>
|
||||
<span
|
||||
class="overflow-hidden text-ellipsis whitespace-nowrap"
|
||||
class="overflow-hidden whitespace-nowrap"
|
||||
:style="{
|
||||
filter: store.setting.appearance.fontShadow
|
||||
? 'drop-shadow(1px 1px 1px ' +
|
||||
@ -237,6 +248,7 @@
|
||||
}"
|
||||
></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -299,10 +311,17 @@ watch(
|
||||
() => {
|
||||
// +1
|
||||
count.value = count.value + 1;
|
||||
classificationChildShowHiddenMap.value = new Map();
|
||||
// 刷新DOM完毕执行
|
||||
nextTick(() => {
|
||||
// 滚动条
|
||||
createSimpleBar();
|
||||
// 设置分类宽度
|
||||
setClassificationWidth();
|
||||
// 创建父级分类拖拽对象;
|
||||
createClassificationParentSortable();
|
||||
// 创建子级分类拖拽对象
|
||||
createClassificationChildSortable();
|
||||
});
|
||||
}
|
||||
);
|
||||
@ -787,6 +806,8 @@ function createClassificationParentSortable() {
|
||||
setClassificationWidth();
|
||||
// 页面高度 - 34(标题栏固定高度)
|
||||
height.value = document.documentElement.clientHeight - 34;
|
||||
// 创建子级分类拖拽对象
|
||||
createClassificationChildSortable();
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -862,6 +883,8 @@ function createClassificationChildSortable() {
|
||||
nextTick(() => {
|
||||
// 分类宽度
|
||||
setClassificationWidth();
|
||||
// 创建子级分类拖拽对象
|
||||
createClassificationChildSortable();
|
||||
});
|
||||
},
|
||||
})
|
||||
|
18475
src/pages/classification/js/emoji.ts
Normal file
18475
src/pages/classification/js/emoji.ts
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '8px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center px-2 app-region-drag">
|
||||
|
@ -17,7 +17,7 @@
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '2%'
|
||||
? '8px'
|
||||
: undefined,
|
||||
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,
|
||||
key: "Feedback",
|
||||
@ -371,7 +362,7 @@ function resize() {
|
||||
// 加载完dom后再显示页面
|
||||
nextTick(() => {
|
||||
if (!store.setting.general.startupTray) {
|
||||
window.main.showWindow(false);
|
||||
window.main.showWindow(false, false);
|
||||
}
|
||||
window.main.initData();
|
||||
});
|
||||
@ -418,6 +409,10 @@ function createBackgroundImageStyle() {
|
||||
"opacity: " +
|
||||
store.setting.appearance.backgroundImageTransparency +
|
||||
";" +
|
||||
(store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? "border-radius: 8px;"
|
||||
: "") +
|
||||
"}";
|
||||
// 将伪类样式规则添加到 head 元素中
|
||||
document.head.appendChild(backgroundImageStyle);
|
||||
@ -528,6 +523,8 @@ onMounted(() => {
|
||||
// 监听显示窗口之前
|
||||
listens.push(
|
||||
window.main.onShowWindowBefore((data) => {
|
||||
// 隐藏搜索
|
||||
store.search = false;
|
||||
if (classificationContentRef.value) {
|
||||
// 如果分类ID不为空的话选择分类ID
|
||||
let selectedClassificationId: number | null =
|
||||
@ -549,8 +546,8 @@ onMounted(() => {
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
// 显示窗口
|
||||
window.main.showWindow(data.blurHide);
|
||||
}, 100);
|
||||
window.main.showWindow(data.blurHide, data.autoHide);
|
||||
}, 10);
|
||||
});
|
||||
})
|
||||
);
|
||||
|
@ -5,6 +5,11 @@
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
height: height + 'px',
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '8px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center px-2 app-region-drag">
|
||||
@ -247,7 +252,9 @@
|
||||
(selectedMenuId === 4 && id)
|
||||
"
|
||||
>
|
||||
<span class="block">{{ store.language.target }}</span>
|
||||
<span class="block">{{
|
||||
selectedMenuId === 2 ? store.language.url : store.language.path
|
||||
}}</span>
|
||||
<NInput
|
||||
class="mt-1.5"
|
||||
type="textarea"
|
||||
@ -322,9 +329,7 @@
|
||||
v-if="
|
||||
selectedMenuId === 0 &&
|
||||
form.data.target &&
|
||||
form.data.target.trim() !== '' &&
|
||||
(getFileExtname(form.data.target) === 'exe' ||
|
||||
getFileExtname(form.data.target) === 'bat')
|
||||
form.data.target.trim() !== ''
|
||||
"
|
||||
v-model:checked="form.data.runAsAdmin"
|
||||
:focusable="false"
|
||||
@ -452,7 +457,6 @@ import {
|
||||
isAbsolutePath,
|
||||
deleteExtname,
|
||||
getFileName,
|
||||
getFileExtname,
|
||||
} from "../../../commons/utils/common";
|
||||
import SystemItemList from "./components/SystemItemList.vue";
|
||||
import StartMenuItemList from "./components/StartMenuItemList.vue";
|
||||
@ -628,10 +632,8 @@ let getURLInfoLoading = ref<boolean>(false);
|
||||
function getURLInfo() {
|
||||
if (form.data.target) {
|
||||
getURLInfoLoading.value = true;
|
||||
if (
|
||||
form.data.target.indexOf("http://") < 0 &&
|
||||
form.data.target.indexOf("https://") < 0
|
||||
) {
|
||||
const regex = /^.+:\/\/.*/;
|
||||
if (!regex.test(form.data.target)) {
|
||||
form.data.target = "http://" + form.data.target;
|
||||
}
|
||||
// 获取网址信息
|
||||
@ -651,12 +653,6 @@ async function confirm() {
|
||||
if (!success) {
|
||||
return;
|
||||
}
|
||||
// 后缀
|
||||
let ext = getFileExtname(form.data.target);
|
||||
// 如果选中按管理员运行,但是文件类型不是exe和bat就修改为false
|
||||
if (form.data.runAsAdmin && (!ext || (ext !== "exe" && ext !== "bat"))) {
|
||||
form.data.runAsAdmin = false;
|
||||
}
|
||||
if (!id) {
|
||||
// 添加
|
||||
await addItem();
|
||||
@ -833,8 +829,10 @@ onMounted(() => {
|
||||
getURLInfoLoading.value = false;
|
||||
let res: Result = data;
|
||||
if (res.status) {
|
||||
if (res.icon && res.icon.trim() !== "") {
|
||||
form.data.icon = res.icon;
|
||||
form.data.htmlIcon = null;
|
||||
}
|
||||
form.name = res.name ?? "";
|
||||
} else {
|
||||
window.api.showErrorMessageBox(
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '8px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center px-2 app-region-drag">
|
||||
|
@ -4,6 +4,11 @@
|
||||
:style="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '8px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center px-2 app-region-drag">
|
||||
|
@ -65,6 +65,19 @@
|
||||
: '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 }}
|
||||
</p>
|
||||
|
@ -41,6 +41,11 @@
|
||||
lineHeight:
|
||||
store.setting.subClassification.itemAreaNameFontLineHeight +
|
||||
'rem',
|
||||
textAlign: store.setting.subClassification.itemAreaNameAlign,
|
||||
marginRight:
|
||||
store.setting.subClassification.itemAreaNameAlign === 'right'
|
||||
? '4px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
{{ classification.name }}
|
||||
@ -125,6 +130,7 @@ import {
|
||||
setItemWidth,
|
||||
run,
|
||||
removeInvalidItem,
|
||||
showItemList,
|
||||
} from "../js";
|
||||
import ItemList from "./List.vue";
|
||||
import { Item } from "../../../../types/item";
|
||||
@ -149,6 +155,12 @@ watch(
|
||||
nextTick(() => {
|
||||
// 监听页面大小
|
||||
resize();
|
||||
// 设置项目宽度
|
||||
setItemWidth();
|
||||
// 创建项目拖拽对象
|
||||
createItemSortable();
|
||||
// 清除批量操作
|
||||
clearBatchOperation();
|
||||
// 滚动到顶部
|
||||
scrollToTop(itemContentSimpleBar);
|
||||
});
|
||||
@ -304,12 +316,21 @@ function createItemSortable() {
|
||||
let fromClassificationId = parseInt(
|
||||
event.from.getAttribute("classification-id")!
|
||||
);
|
||||
// 当前项目
|
||||
const currentItem =
|
||||
getItemListByClassificationId(fromClassificationId)[
|
||||
event.oldIndex
|
||||
];
|
||||
let fromClassification =
|
||||
getClassificationById(fromClassificationId);
|
||||
if (fromClassification) {
|
||||
let itemList =
|
||||
getItemListByClassificationId(fromClassificationId);
|
||||
if (itemList) {
|
||||
let copyItemList = JSON.parse(JSON.stringify(itemList));
|
||||
// 可能会存在自定义排序的情况,所以需要按照指定的排序方式获取项目
|
||||
const currentItem = showItemList(
|
||||
copyItemList,
|
||||
fromClassification
|
||||
)[event.oldIndex];
|
||||
fromIdList.push(currentItem.id);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 批量操作
|
||||
for (const value of store.itemBatchOperationDataArray) {
|
||||
@ -531,7 +552,7 @@ function drop(e: any, classificationId: number | null) {
|
||||
) {
|
||||
// 如果不是同一个项目就可以使用某个程序打开此文件
|
||||
if (item.id !== store.itemDragOutData.id) {
|
||||
let params = store.itemDragOutData.data.target;
|
||||
let params = '"' + store.itemDragOutData.data.target + '"';
|
||||
if (item.data.params) {
|
||||
params += " " + item.data.params;
|
||||
}
|
||||
@ -612,6 +633,14 @@ async function contextmenu(e: any) {
|
||||
// 记录右键选中的ID
|
||||
store.itemRightMenuItemId = id;
|
||||
}
|
||||
// 获取当前项目在页面的所属分类
|
||||
let pageClassificationId = null;
|
||||
let itemListElement = getClassElement(e, "item-list");
|
||||
if (itemListElement) {
|
||||
pageClassificationId = parseInt(
|
||||
itemListElement.getAttribute("classification-id")
|
||||
);
|
||||
}
|
||||
// 弹出菜单
|
||||
window.item.showRightMenu({
|
||||
classificationId: getSelectedClassificationId(),
|
||||
@ -622,6 +651,7 @@ async function contextmenu(e: any) {
|
||||
x: e.screenX,
|
||||
y: e.screenY,
|
||||
type: "main",
|
||||
pageClassificationId,
|
||||
});
|
||||
}
|
||||
// beforeMount
|
||||
@ -710,6 +740,8 @@ onMounted(() => {
|
||||
// 删除无效项目
|
||||
removeInvalidItem(id);
|
||||
}
|
||||
// 清空批量操作
|
||||
clearBatchOperation();
|
||||
// 刷新DOM完毕执行
|
||||
nextTick(() => {
|
||||
// 创建项目拖拽对象
|
||||
|
@ -37,7 +37,7 @@
|
||||
<p
|
||||
class="text-center mx-2"
|
||||
:class="[
|
||||
`${getLayout(classificationId) === 'tile' ? 'mt-2' : ''}`,
|
||||
`${getLayout(classificationId) === 'tile' ? 'mt-2 text-center' : ''}`,
|
||||
`${
|
||||
getLayout(classificationId) === 'list'
|
||||
? store.setting.item.hideEllipsis
|
||||
@ -60,6 +60,18 @@
|
||||
: undefined,
|
||||
fontWeight: store.setting.item.fontWeight,
|
||||
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"
|
||||
>
|
||||
@ -228,9 +240,9 @@ function runItem(e: any, dbclick: boolean) {
|
||||
let item = getItemById(itemId);
|
||||
if (item && item.data) {
|
||||
if (dbclick && store.setting.item.doubleClickOpen) {
|
||||
run("main", item.data.runAsAdmin ? "runas" : "open", item);
|
||||
run("main", "open", item);
|
||||
} else if (!dbclick && !store.setting.item.doubleClickOpen) {
|
||||
run("main", item.data.runAsAdmin ? "runas" : "open", item);
|
||||
run("main", "open", item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,19 @@
|
||||
: '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 }}
|
||||
</p>
|
||||
|
@ -66,6 +66,19 @@
|
||||
: '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 }}
|
||||
</p>
|
||||
|
@ -36,7 +36,7 @@ function setItemWidth() {
|
||||
// 获取项目数量
|
||||
let itemList = itemListElement.getElementsByClassName("item");
|
||||
// 每行数量
|
||||
let num = null;
|
||||
let num = 1;
|
||||
// 布局
|
||||
let layout = getLayout(
|
||||
classificationId ? parseInt(classificationId) : null
|
||||
@ -69,20 +69,10 @@ function setItemWidth() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
num !== null &&
|
||||
((layout === "tile" && itemList.length >= num) || layout === "list")
|
||||
) {
|
||||
for (let i = 0; i < itemList.length; i++) {
|
||||
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
|
||||
* @returns
|
||||
*/
|
||||
function getItemTitle(item: Item) {
|
||||
function getItemTitle(item: Item, quickSearch: boolean = false) {
|
||||
let name =
|
||||
store.language.name +
|
||||
store.language.colon +
|
||||
(item.name ? item.name.replace(/\\n/g, " ") : "");
|
||||
if (store.setting.item.openNumber) {
|
||||
if (
|
||||
quickSearch &&
|
||||
store.setting.quickSearch.showHistorySort === "openNumber"
|
||||
) {
|
||||
name +=
|
||||
"\n" +
|
||||
store.language.openNumber +
|
||||
store.language.openCount +
|
||||
store.language.colon +
|
||||
(item.data.quickSearchOpenNumber ?? 0);
|
||||
} else if (store.setting.item.openNumber) {
|
||||
name +=
|
||||
"\n" +
|
||||
store.language.openCount +
|
||||
store.language.colon +
|
||||
(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) {
|
||||
name +=
|
||||
"\n" + store.language.remark + store.language.colon + item.data.remark;
|
||||
|
@ -1,10 +1,14 @@
|
||||
<template>
|
||||
<div
|
||||
class="overflow-x-hidden max-h-[525px]"
|
||||
style="text-shadow: none"
|
||||
:style="{
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '8px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
<div
|
||||
@ -16,20 +20,16 @@
|
||||
resultList && resultList.length > 0 ? 'solid' : undefined,
|
||||
}"
|
||||
>
|
||||
<div class="mx-2 whitespace-nowrap flex items-center">
|
||||
<svg
|
||||
class="w-[24px] h-[24px] app-region-drag"
|
||||
viewBox="0 96 960 960"
|
||||
v-if="!webSearch"
|
||||
>
|
||||
<path
|
||||
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>
|
||||
<div class="mx-[10px] whitespace-nowrap flex items-center">
|
||||
<Icon class="app-region-drag" size="22" v-if="mode === 'search'">
|
||||
<SearchOutline></SearchOutline>
|
||||
</Icon>
|
||||
<Icon class="app-region-drag" size="22" v-if="mode === 'commandLine'">
|
||||
<TerminalOutline></TerminalOutline>
|
||||
</Icon>
|
||||
<span
|
||||
class="text-2xl block app-region-drag"
|
||||
v-else-if="webSearch && webSearchSource"
|
||||
class="text-xl block app-region-drag"
|
||||
v-if="mode === 'webSearch' && webSearchSource"
|
||||
>{{ webSearchSource.name }}</span
|
||||
>
|
||||
</div>
|
||||
@ -37,12 +37,12 @@
|
||||
ref="searchInput"
|
||||
type="text"
|
||||
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="{
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
}"
|
||||
placeholder="Dawn Launcher"
|
||||
:placeholder="getPlaceholder()"
|
||||
/>
|
||||
</div>
|
||||
<ul
|
||||
@ -59,7 +59,7 @@
|
||||
>
|
||||
<li
|
||||
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"
|
||||
:id="'item-' + index"
|
||||
:item-id="item.id"
|
||||
@ -73,35 +73,79 @@
|
||||
)
|
||||
: undefined,
|
||||
}"
|
||||
:title="getItemTitle(item as Item)"
|
||||
:title="getItemTitle(item as Item, true)"
|
||||
: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
|
||||
class="text-sm ml-2 overflow-hidden text-ellipsis whitespace-nowrap h-[20px] flex-1 pr-[10px]"
|
||||
>{{ getName(item.name)
|
||||
}}<span class="text-xs ml-2">{{
|
||||
class="text-sm ml-[10px] overflow-hidden text-ellipsis whitespace-nowrap h-[20px]"
|
||||
>{{ getName(item.name) }}</span
|
||||
>
|
||||
<span
|
||||
v-if="mode === 'search'"
|
||||
class="text-xs ml-2 max-w-[100px] flex-shrink-0 pr-[10px]"
|
||||
>{{
|
||||
getSearchItemClassificationName((item as Item).classificationId)
|
||||
}}</span></span
|
||||
}}</span
|
||||
>
|
||||
<span
|
||||
class="ml-auto text-[12px]"
|
||||
<!-- 快捷键 -->
|
||||
<div
|
||||
class="ml-auto max-w-[100px] flex-shrink-0"
|
||||
v-if="
|
||||
store.setting.quickSearch.openShortcutKey !== 'none' && index <= 9
|
||||
"
|
||||
:style="{
|
||||
color: hexToRGBA(store.setting.appearance.theme.mainFontColor, 0.7),
|
||||
}"
|
||||
>{{
|
||||
showHistory
|
||||
? "Alt + "
|
||||
: store.setting.quickSearch.openShortcutKey === "numberKey"
|
||||
? store.language.numberKey
|
||||
: store.setting.quickSearch.openShortcutKey === "ctrlNumberKey"
|
||||
? "Ctrl + "
|
||||
: "Alt + "
|
||||
}}{{ index + 1 === 10 ? 0 : index + 1 }}</span
|
||||
>
|
||||
<template
|
||||
v-if="
|
||||
showHistory ||
|
||||
store.setting.quickSearch.openShortcutKey === 'altNumberKey'
|
||||
"
|
||||
>
|
||||
<keyText text="Alt"></keyText>
|
||||
+
|
||||
<keyText
|
||||
:text="(index + 1 === 10 ? 0 : index + 1).toString()"
|
||||
></keyText>
|
||||
</template>
|
||||
<template
|
||||
v-else-if="
|
||||
store.setting.quickSearch.openShortcutKey === 'numberKey'
|
||||
"
|
||||
>
|
||||
<keyText
|
||||
:text="
|
||||
store.language.numberKey +
|
||||
(index + 1 === 10 ? 0 : index + 1).toString()
|
||||
"
|
||||
></keyText>
|
||||
</template>
|
||||
<template
|
||||
v-else-if="
|
||||
store.setting.quickSearch.openShortcutKey === 'ctrlNumberKey'
|
||||
"
|
||||
>
|
||||
<keyText text="Ctrl"></keyText>
|
||||
+
|
||||
<keyText
|
||||
:text="(index + 1 === 10 ? 0 : index + 1).toString()"
|
||||
></keyText>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 删除历史记录 -->
|
||||
<Icon
|
||||
v-if="showHistory"
|
||||
class="delete-history-icon text-[10px] p-[2px] ml-[10px] cursor-pointer"
|
||||
style="border-radius: 12px"
|
||||
:style="{
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
backgroundColor:
|
||||
store.setting.appearance.theme.secondBackgroundColor,
|
||||
}"
|
||||
:title="store.language.deleteHistory"
|
||||
>
|
||||
<CloseRound></CloseRound>
|
||||
</Icon>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -131,7 +175,16 @@ import "simplebar/dist/simplebar.css";
|
||||
import CustomItemIcon from "../../components/CustomItemIcon.vue";
|
||||
import { getClassElement, hexToRGBA } from "../../utils/style";
|
||||
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";
|
||||
// pinia
|
||||
const store = useMainStore();
|
||||
@ -142,7 +195,7 @@ let searchInput = ref<any>(null);
|
||||
// 搜索内容
|
||||
let value = ref<string | null>(null);
|
||||
// 搜索模式
|
||||
let webSearch = ref(false);
|
||||
let mode = ref<"search" | "webSearch" | "commandLine">("search");
|
||||
// 搜索模式对应的实体
|
||||
let webSearchSource = ref<WebSearchSource | null>(null);
|
||||
// 选中的项
|
||||
@ -160,7 +213,8 @@ watch(
|
||||
);
|
||||
// 搜索
|
||||
function search() {
|
||||
if (!webSearch.value) {
|
||||
if (mode.value === "search") {
|
||||
// 搜索模式
|
||||
if (value.value) {
|
||||
showHistory.value = false;
|
||||
resultList.value = searchItem(value.value, searchMap, 50);
|
||||
@ -178,6 +232,11 @@ function search() {
|
||||
// 获取历史记录
|
||||
getHistory();
|
||||
}
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
// 刷新
|
||||
function refresh() {
|
||||
// 重置滚动条
|
||||
resetScroll();
|
||||
// 刷新DOM完毕执行
|
||||
@ -191,7 +250,6 @@ function search() {
|
||||
: resultList.value.length * 48 + 1;
|
||||
window.quickSearch.setWindowHeight(height + 44);
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 重置滚动条
|
||||
@ -268,25 +326,24 @@ function getHistory() {
|
||||
resultList.value = [];
|
||||
showHistory.value = false;
|
||||
}
|
||||
// 重置滚动条
|
||||
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);
|
||||
});
|
||||
refresh();
|
||||
}
|
||||
// 父级运行项目
|
||||
function parentRunItem(e: any) {
|
||||
// 找到delete-history-icon
|
||||
let deleteHistoryElement = getClassElement(e, "delete-history-icon");
|
||||
if (deleteHistoryElement) {
|
||||
// 找到item
|
||||
let itemElement = getClassElement(e, "item");
|
||||
// 项目ID
|
||||
let itemId = parseInt(itemElement.getAttribute("item-id"));
|
||||
// 删除历史记录
|
||||
window.item.deleteQuickSearchHistory(itemId);
|
||||
} else {
|
||||
// 找到item
|
||||
let itemElement = getClassElement(e, "item");
|
||||
if (itemElement) {
|
||||
if (mode.value === "search") {
|
||||
// 项目ID
|
||||
let itemId = parseInt(itemElement.getAttribute("item-id"));
|
||||
// 查询项目
|
||||
@ -294,7 +351,19 @@ function parentRunItem(e: any) {
|
||||
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) {
|
||||
@ -303,6 +372,21 @@ function runItem(item: 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() {
|
||||
window.quickSearch.hideWindow();
|
||||
@ -311,6 +395,7 @@ function hide() {
|
||||
function contextmenu(e: any) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (mode.value === "search") {
|
||||
// 当前项目
|
||||
let item: Item | null = null;
|
||||
// 判断是在哪个区域右键
|
||||
@ -333,11 +418,12 @@ function contextmenu(e: any) {
|
||||
type: "quickSearch",
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// dragover
|
||||
function dragover(e: any) {
|
||||
// 从程序外拖动文件到项目图标上时用此项目打开文件
|
||||
if (store.setting.quickSearch.useItemOpen) {
|
||||
if (mode.value === "search" && store.setting.quickSearch.useItemOpen) {
|
||||
// 选中效果
|
||||
let target = findElement(e.target, "item");
|
||||
// 取消选中效果
|
||||
@ -363,6 +449,7 @@ function dragover(e: any) {
|
||||
}
|
||||
// drop
|
||||
function drop(e: any) {
|
||||
if (mode.value === "search") {
|
||||
// 尝试获取项目
|
||||
let item: Item | null = null;
|
||||
let itemElement = findElement(e.target, "item");
|
||||
@ -398,6 +485,7 @@ function drop(e: any) {
|
||||
// 运行
|
||||
runItem(copyItem);
|
||||
}
|
||||
}
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
@ -430,7 +518,7 @@ function keydown(e: any) {
|
||||
}
|
||||
// 空格
|
||||
if (e.keyCode === 32) {
|
||||
if (!webSearch.value) {
|
||||
if (mode.value !== "webSearch") {
|
||||
// 判断是否是搜索引擎
|
||||
if (value.value && value.value.trim() !== "") {
|
||||
let flag = false;
|
||||
@ -448,7 +536,7 @@ function keydown(e: any) {
|
||||
: value.value;
|
||||
for (let searchSource of store.setting.webSearch.searchSourceList) {
|
||||
if (keyword === searchSource.keyword) {
|
||||
webSearch.value = true;
|
||||
mode.value = "webSearch";
|
||||
webSearchSource.value = searchSource;
|
||||
value.value = null;
|
||||
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
|
||||
if (e.keyCode === 13) {
|
||||
if (webSearch.value && webSearchSource.value) {
|
||||
if (mode.value === "webSearch" && webSearchSource.value) {
|
||||
let url = webSearchSource.value.url.replace("{w}", value.value ?? "");
|
||||
window.api.openURL(url);
|
||||
if (store.setting.quickSearch.openAfterHideQuickSearchWindow) {
|
||||
hide();
|
||||
}
|
||||
} else if (
|
||||
!webSearch.value &&
|
||||
mode.value === "search" &&
|
||||
resultList.value.length - 1 >= selected.value
|
||||
) {
|
||||
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.preventDefault();
|
||||
}
|
||||
// 退格键
|
||||
if (e.keyCode === 8) {
|
||||
if (webSearch.value) {
|
||||
if (mode.value === "webSearch") {
|
||||
if (!value.value || value.value.trim() === "") {
|
||||
webSearch.value = false;
|
||||
mode.value = "search";
|
||||
webSearchSource.value = null;
|
||||
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) {
|
||||
@ -547,7 +660,11 @@ function keydown(e: any) {
|
||||
index = e.key - 1;
|
||||
}
|
||||
if (resultList.value && index < resultList.value.length) {
|
||||
if (mode.value === "search") {
|
||||
runItem(resultList.value[index] as Item);
|
||||
} else if (mode.value === "commandLine") {
|
||||
commandLineRun(resultList.value[index].data.target!);
|
||||
}
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
@ -591,12 +708,10 @@ onMounted(() => {
|
||||
// 聚焦文本框
|
||||
searchInput.value.focus();
|
||||
// 刷新DOM完毕执行
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
// 显示窗口
|
||||
window.quickSearch.showWindow();
|
||||
}, 100);
|
||||
});
|
||||
}, 10);
|
||||
})
|
||||
);
|
||||
// 清空数据
|
||||
@ -606,7 +721,7 @@ onMounted(() => {
|
||||
value.value = null;
|
||||
resultList.value = [];
|
||||
selected.value = 0;
|
||||
webSearch.value = false;
|
||||
mode.value = "search";
|
||||
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
|
||||
onUnmounted(() => {
|
||||
|
@ -18,20 +18,17 @@
|
||||
}"
|
||||
>
|
||||
<div class="mx-2 whitespace-nowrap flex items-center">
|
||||
<svg
|
||||
class="w-[18px] h-[18px]"
|
||||
:style="{ color: store.setting.appearance.theme.mainFontColor }"
|
||||
viewBox="0 0 24 24"
|
||||
v-if="!webSearch"
|
||||
<Icon size="18" v-if="mode === 'search'">
|
||||
<SearchOutline></SearchOutline>
|
||||
</Icon>
|
||||
<Icon size="18" v-if="mode === 'commandLine'">
|
||||
<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>
|
||||
<input
|
||||
ref="searchInput"
|
||||
@ -42,14 +39,7 @@
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
}"
|
||||
:placeholder="
|
||||
webSearch &&
|
||||
webSearchSource &&
|
||||
webSearchSource.description &&
|
||||
webSearchSource.description.trim() !== ''
|
||||
? webSearchSource.description
|
||||
: store.language.search
|
||||
"
|
||||
:placeholder="getPlaceholder()"
|
||||
/>
|
||||
<Icon
|
||||
size="18"
|
||||
@ -89,14 +79,19 @@
|
||||
:item-id="item.id"
|
||||
:title="getItemTitle(item as Item)"
|
||||
:index="index"
|
||||
:target="item.data.target"
|
||||
>
|
||||
<CustomItemIcon :item="(item as Item)" :icon-size="32"></CustomItemIcon>
|
||||
<span
|
||||
class="text-sm ml-2 overflow-hidden text-ellipsis whitespace-nowrap h-[20px]"
|
||||
>{{ getName(item.name)
|
||||
}}<span class="text-xs ml-2">{{
|
||||
>{{ getName(item.name) }}</span
|
||||
>
|
||||
<span
|
||||
v-if="mode === 'search'"
|
||||
class="text-xs ml-2 max-w-[100px] flex-shrink-0"
|
||||
>{{
|
||||
getSearchItemClassificationName((item as Item).classificationId)
|
||||
}}</span></span
|
||||
}}</span
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
@ -130,14 +125,20 @@ import { WebSearchSource } from "../../../../types/setting";
|
||||
import { convert } from "../../../../commons/utils/common";
|
||||
import "simplebar";
|
||||
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";
|
||||
// pinia
|
||||
const store = useMainStore();
|
||||
// 搜索框
|
||||
let searchInput = ref<any>(null);
|
||||
// 搜索模式
|
||||
let webSearch = ref(false);
|
||||
let mode = ref<"search" | "webSearch" | "commandLine">("search");
|
||||
// 搜索模式对应的实体
|
||||
let webSearchSource = ref<WebSearchSource | null>(null);
|
||||
// 搜索内容
|
||||
@ -162,7 +163,7 @@ watch(
|
||||
);
|
||||
// 搜索
|
||||
function search() {
|
||||
if (!webSearch.value) {
|
||||
if (mode.value === "search") {
|
||||
if (value.value) {
|
||||
resultList.value = searchItem(value.value, searchMap, 50);
|
||||
if (resultList.value && resultList.value.length > 0) {
|
||||
@ -190,6 +191,7 @@ function runItem(e: any) {
|
||||
// 找到item
|
||||
let itemElement = getClassElement(e, "search-result-item");
|
||||
if (itemElement) {
|
||||
if (mode.value === "search") {
|
||||
// 项目ID
|
||||
let itemId = parseInt(itemElement.getAttribute("item-id"));
|
||||
// 查询项目
|
||||
@ -198,7 +200,27 @@ function runItem(e: any) {
|
||||
run("search", "open", item);
|
||||
close();
|
||||
}
|
||||
} else if (mode.value === "commandLine") {
|
||||
// 目标
|
||||
commandLineRun(itemElement.getAttribute("target"), value.value);
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
// 获取placeholder
|
||||
function getPlaceholder() {
|
||||
let text = store.language.search;
|
||||
if (
|
||||
mode.value === "webSearch" &&
|
||||
webSearchSource.value &&
|
||||
webSearchSource.value.description &&
|
||||
webSearchSource.value.description.trim() !== ""
|
||||
) {
|
||||
text = webSearchSource.value.description.trim();
|
||||
} else if (mode.value === "commandLine") {
|
||||
text = "Command Line";
|
||||
}
|
||||
return text;
|
||||
}
|
||||
// 关闭
|
||||
function close() {
|
||||
@ -217,6 +239,7 @@ watch(
|
||||
function contextmenu(e: any) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (mode.value === "search") {
|
||||
// 当前项目
|
||||
let item: Item | null = null;
|
||||
// 判断是在哪个区域右键
|
||||
@ -239,6 +262,7 @@ function contextmenu(e: any) {
|
||||
type: "search",
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
function keydown(e: any) {
|
||||
// 提取快捷键
|
||||
@ -275,7 +299,7 @@ function keydown(e: any) {
|
||||
}
|
||||
// 空格
|
||||
if (e.keyCode === 32) {
|
||||
if (!webSearch.value) {
|
||||
if (mode.value === "search") {
|
||||
// 判断是否是搜索引擎
|
||||
if (value.value && value.value.trim() !== "") {
|
||||
let flag = false;
|
||||
@ -293,7 +317,7 @@ function keydown(e: any) {
|
||||
: value.value;
|
||||
for (let searchSource of store.setting.webSearch.searchSourceList) {
|
||||
if (keyword === searchSource.keyword) {
|
||||
webSearch.value = true;
|
||||
mode.value = "webSearch";
|
||||
webSearchSource.value = searchSource;
|
||||
value.value = null;
|
||||
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
|
||||
if (e.keyCode === 13) {
|
||||
if (webSearch.value && webSearchSource.value) {
|
||||
if (mode.value === "webSearch" && webSearchSource.value) {
|
||||
let url = webSearchSource.value.url.replace("{w}", value.value ?? "");
|
||||
window.api.openURL(url);
|
||||
close();
|
||||
} else if (
|
||||
!webSearch.value &&
|
||||
mode.value === "search" &&
|
||||
resultList.value.length - 1 >= selected.value
|
||||
) {
|
||||
run("search", "open", resultList.value[selected.value] as Item);
|
||||
close();
|
||||
} else if (
|
||||
mode.value === "commandLine" &&
|
||||
resultList.value.length - 1 >= selected.value
|
||||
) {
|
||||
commandLineRun(
|
||||
resultList.value[selected.value].data.target!,
|
||||
value.value
|
||||
);
|
||||
close();
|
||||
}
|
||||
e.preventDefault();
|
||||
}
|
||||
// 退格键
|
||||
if (e.keyCode === 8) {
|
||||
if (webSearch.value) {
|
||||
if (mode.value === "webSearch") {
|
||||
if (!value.value || value.value.trim() === "") {
|
||||
webSearch.value = false;
|
||||
mode.value = "search";
|
||||
webSearchSource.value = null;
|
||||
}
|
||||
} else if (mode.value === "commandLine") {
|
||||
if (!value.value || value.value.trim() === "") {
|
||||
mode.value = "search";
|
||||
resultList.value = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -5,6 +5,11 @@
|
||||
backgroundColor: store.setting.appearance.theme.mainBackgroundColor,
|
||||
color: store.setting.appearance.theme.mainFontColor,
|
||||
height: height + 'px',
|
||||
borderRadius:
|
||||
store.setting.appearance.transparency < 1 &&
|
||||
store.setting.appearance.windowRounded
|
||||
? '8px'
|
||||
: undefined,
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center px-2 app-region-drag">
|
||||
@ -63,7 +68,7 @@
|
||||
size="small"
|
||||
>
|
||||
<span class="block font-semibold">{{
|
||||
store.language.startup
|
||||
store.language.system
|
||||
}}</span>
|
||||
<NFormItem class="mt-1">
|
||||
<NCheckbox
|
||||
@ -88,6 +93,14 @@
|
||||
>{{ store.language.hideTray }}</NCheckbox
|
||||
></NFormItem
|
||||
>
|
||||
<NFormItem
|
||||
><NCheckbox
|
||||
v-model:checked="setting.general.hideTaskbar"
|
||||
:focusable="false"
|
||||
@update:checked="setTaskbar"
|
||||
>{{ store.language.hideTaskbar }}</NCheckbox
|
||||
></NFormItem
|
||||
>
|
||||
</NForm>
|
||||
<NForm
|
||||
label-placement="left"
|
||||
@ -393,47 +406,95 @@
|
||||
<span class="block font-semibold">{{
|
||||
store.language.color
|
||||
}}</span>
|
||||
<NFormItem class="mt-1" :label="store.language.mainColor">
|
||||
<div
|
||||
:class="[
|
||||
`${
|
||||
store.setting.general.language !== 'English'
|
||||
? 'flex items-center'
|
||||
: ''
|
||||
}`,
|
||||
]"
|
||||
>
|
||||
<NFormItem
|
||||
class="mt-1 flex-1"
|
||||
:label="store.language.mainColor"
|
||||
>
|
||||
<NColorPicker
|
||||
:modes="['hex']"
|
||||
v-model:value="mainBackgroundColor"
|
||||
@complete="changeMainBackgroundColor"
|
||||
:to="false"
|
||||
:show-alpha="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">
|
||||
<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"
|
||||
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">
|
||||
<NColorPicker
|
||||
:modes="['hex']"
|
||||
v-model:value="borderColor"
|
||||
@complete="changeBorderColor"
|
||||
:to="false"
|
||||
:show-alpha="false"
|
||||
></NColorPicker>
|
||||
</NFormItem>
|
||||
</NForm>
|
||||
@ -443,28 +504,39 @@
|
||||
size="small"
|
||||
class="mt-3"
|
||||
>
|
||||
<span class="block font-semibold"
|
||||
>{{ store.language.backgroundTransparent }}({{
|
||||
transparency
|
||||
}})</span
|
||||
<span class="block font-semibold">{{
|
||||
store.language.backgroundTransparent
|
||||
}}</span>
|
||||
<NFormItem class="mt-1">
|
||||
<NRadio
|
||||
:checked="setting.appearance.transparency === 1"
|
||||
:value="false"
|
||||
@change="changeTransparency"
|
||||
>{{ store.language.notTransparent }}</NRadio
|
||||
>
|
||||
<NRadio
|
||||
:checked="setting.appearance.transparency < 1"
|
||||
:value="true"
|
||||
@change="changeTransparency"
|
||||
>{{ store.language.transparent }}</NRadio
|
||||
>
|
||||
<NFormItem>
|
||||
<input
|
||||
type="range"
|
||||
v-model="transparency"
|
||||
min="0.1"
|
||||
max="1.0"
|
||||
step="0.01"
|
||||
class="mt-2 w-full range"
|
||||
@change="setTransparency"
|
||||
/>
|
||||
</NFormItem>
|
||||
<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
|
||||
label-placement="left"
|
||||
:show-feedback="false"
|
||||
size="small"
|
||||
class="mt-1"
|
||||
class="mt-3"
|
||||
>
|
||||
<span class="block font-semibold">{{
|
||||
store.language.backgroundImage
|
||||
@ -499,21 +571,18 @@
|
||||
class="mt-3"
|
||||
v-if="setting.appearance.backgroundImage && store.backgroundImage"
|
||||
>
|
||||
<span class="block font-semibold"
|
||||
>{{ store.language.backgroundImageTransparent }}({{
|
||||
setting.appearance.backgroundImageTransparency
|
||||
}})</span
|
||||
>
|
||||
<span class="block font-semibold">{{
|
||||
store.language.backgroundImageTransparent
|
||||
}}</span>
|
||||
<NFormItem>
|
||||
<input
|
||||
type="range"
|
||||
v-model="backgroundImageTransparency"
|
||||
min="0.1"
|
||||
max="1.0"
|
||||
step="0.01"
|
||||
class="mt-2 w-full range"
|
||||
@change="setBackgroundImageTransparency"
|
||||
/>
|
||||
<NSlider
|
||||
v-model:value="backgroundImageTransparency"
|
||||
:step="0.01"
|
||||
:min="0.1"
|
||||
:max="1.0"
|
||||
:on-dragend="setBackgroundImageTransparency"
|
||||
:keyboard="false"
|
||||
></NSlider>
|
||||
</NFormItem>
|
||||
</NForm>
|
||||
<NForm
|
||||
@ -542,7 +611,7 @@
|
||||
v-if="setting.appearance.backgroundImage && store.backgroundImage"
|
||||
>
|
||||
<span class="block font-semibold">{{
|
||||
store.language.backgroundImagePostion
|
||||
store.language.backgroundImagePosition
|
||||
}}</span>
|
||||
<NFormItem class="mt-2">
|
||||
<NSelect
|
||||
@ -771,6 +840,13 @@
|
||||
<div class="mx-2" v-if="selectedMenuId === 3">
|
||||
<NForm label-placement="left" :show-feedback="false" size="small">
|
||||
<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">
|
||||
<NInputNumber
|
||||
v-model:value="setting.subClassification.itemAreaNameFontSize"
|
||||
@ -857,21 +933,18 @@
|
||||
size="small"
|
||||
class="mt-3"
|
||||
>
|
||||
<span class="block font-semibold"
|
||||
>{{ store.language.columnNumber }}({{
|
||||
setting.item.columnNumber
|
||||
}})</span
|
||||
>
|
||||
<span class="block font-semibold">{{
|
||||
store.language.columnNumber
|
||||
}}</span>
|
||||
<NFormItem>
|
||||
<input
|
||||
type="range"
|
||||
v-model="columnNumber"
|
||||
min="1"
|
||||
max="20"
|
||||
step="1"
|
||||
class="mt-2 w-full range"
|
||||
@change="setColumnNumber"
|
||||
/>
|
||||
<NSlider
|
||||
v-model:value="columnNumber"
|
||||
:step="1"
|
||||
:min="1"
|
||||
:max="20"
|
||||
:on-dragend="setColumnNumber"
|
||||
:keyboard="false"
|
||||
></NSlider>
|
||||
</NFormItem>
|
||||
<Desc
|
||||
class="mt-1"
|
||||
@ -968,7 +1041,24 @@
|
||||
v-model:checked="setting.item.openNumber"
|
||||
:focusable="false"
|
||||
@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>
|
||||
</NForm>
|
||||
@ -1000,6 +1090,7 @@
|
||||
<NCheckbox
|
||||
v-model:checked="setting.quickSearch.enable"
|
||||
:focusable="false"
|
||||
@update:checked="setEnable"
|
||||
>{{ store.language.useQuickSearch }}</NCheckbox
|
||||
>
|
||||
</NFormItem>
|
||||
@ -1051,6 +1142,25 @@
|
||||
>
|
||||
</div>
|
||||
</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
|
||||
label-placement="left"
|
||||
:show-feedback="false"
|
||||
@ -1188,7 +1298,7 @@
|
||||
:style="{
|
||||
backgroundColor: hexToRGBA(
|
||||
setting.appearance.theme.secondBackgroundColor,
|
||||
0.8
|
||||
0.7
|
||||
),
|
||||
color: setting.appearance.theme.secondFontColor,
|
||||
}"
|
||||
@ -1231,7 +1341,7 @@
|
||||
searchSourceId === item.id
|
||||
? hexToRGBA(
|
||||
setting.appearance.theme.secondBackgroundColor,
|
||||
0.8
|
||||
0.7
|
||||
)
|
||||
: undefined,
|
||||
color:
|
||||
@ -1248,7 +1358,7 @@
|
||||
'background-color',
|
||||
hexToRGBA(
|
||||
setting.appearance.theme.secondBackgroundColor,
|
||||
0.8
|
||||
0.7
|
||||
),
|
||||
],
|
||||
['color', setting.appearance.theme.secondFontColor],
|
||||
@ -1386,6 +1496,24 @@
|
||||
</NForm>
|
||||
</div>
|
||||
<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">
|
||||
<span class="block font-semibold">{{
|
||||
store.language.proxy
|
||||
@ -1449,6 +1577,8 @@ import {
|
||||
NColorPicker,
|
||||
NInputNumber,
|
||||
NSelect,
|
||||
NRadio,
|
||||
NSlider,
|
||||
} from "naive-ui";
|
||||
import SimpleBar from "simplebar";
|
||||
import "simplebar/dist/simplebar.css";
|
||||
@ -1535,6 +1665,10 @@ let menuList = [
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
label: store.language.commandLine,
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
label: store.language.network,
|
||||
},
|
||||
];
|
||||
@ -1771,6 +1905,21 @@ let backgroundImagePositionOptions = ref([
|
||||
value: "right",
|
||||
},
|
||||
]);
|
||||
// 子分类项目区域名称对齐
|
||||
let itemAreaSubclassificationNameAlignOptions = ref([
|
||||
{
|
||||
label: store.language.left,
|
||||
value: "left",
|
||||
},
|
||||
{
|
||||
label: store.language.center,
|
||||
value: "center",
|
||||
},
|
||||
{
|
||||
label: store.language.right,
|
||||
value: "right",
|
||||
},
|
||||
]);
|
||||
// 监听
|
||||
watch(
|
||||
() => setting.value,
|
||||
@ -1812,6 +1961,10 @@ function setStartup(value: boolean) {
|
||||
function setTray(value: boolean) {
|
||||
window.setting.setTray(!value);
|
||||
}
|
||||
// 隐藏任务栏
|
||||
function setTaskbar(value: boolean) {
|
||||
window.setting.setTaskbar(value);
|
||||
}
|
||||
// 校验快捷键
|
||||
async function checkGeneralShowHideShortcutKey() {
|
||||
let success = true;
|
||||
@ -1971,6 +2124,14 @@ function changeFontShadowColor(value: string) {
|
||||
}
|
||||
// 修改背景色透明
|
||||
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() {
|
||||
setting.value.appearance.transparency = Number(transparency.value);
|
||||
}
|
||||
@ -2018,6 +2179,11 @@ function setCheckInvalidItem(value: boolean) {
|
||||
function setOpenNumber(value: boolean) {
|
||||
window.setting.setOpenNumber(value);
|
||||
}
|
||||
// 启用
|
||||
function setEnable() {
|
||||
// 设置快捷键
|
||||
window.setting.setShortcutKey(convert(setting.value));
|
||||
}
|
||||
// 快速搜索打开快捷键
|
||||
let quickSearchShortcutKeyOpenOptions = ref([
|
||||
{
|
||||
@ -2044,10 +2210,16 @@ let quickSearchHistorySortOptions = ref([
|
||||
value: "lastOpen",
|
||||
},
|
||||
{
|
||||
label: store.language.byOpenNumber,
|
||||
label: store.language.byOpenCount,
|
||||
value: "openNumber",
|
||||
},
|
||||
]);
|
||||
// 快速搜索宽度更新
|
||||
function updateQuickSearchWidth(value: number | null) {
|
||||
if (value) {
|
||||
window.quickSearch.setWindowWidth(value);
|
||||
}
|
||||
}
|
||||
// 网络搜索模式
|
||||
let webSearchModeOptions = ref([
|
||||
{
|
||||
@ -2179,6 +2351,17 @@ function closeSaveSearchSource() {
|
||||
searchSourceURL.value = null;
|
||||
searchSourceDescription.value = null;
|
||||
}
|
||||
// 命令行默认使用
|
||||
let commandLineDefultUseOptions = ref([
|
||||
{
|
||||
label: store.language.commandPrompt,
|
||||
value: "cmd",
|
||||
},
|
||||
{
|
||||
label: store.language.powerShell,
|
||||
value: "powershell",
|
||||
},
|
||||
]);
|
||||
// 页面高度
|
||||
let height = ref(0);
|
||||
// 初始化页面尺寸
|
||||
|
@ -75,7 +75,7 @@ input::-webkit-inner-spin-button {
|
||||
}
|
||||
|
||||
.item-name-tile-2 {
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
@ -85,8 +85,7 @@ input::-webkit-inner-spin-button {
|
||||
}
|
||||
|
||||
.item-name-tile-2-no-ellipsis {
|
||||
max-height: 40px;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@ -101,7 +100,6 @@ input::-webkit-inner-spin-button {
|
||||
}
|
||||
|
||||
.item-name-tile-1-no-ellipsis {
|
||||
max-height: 20px;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
}
|
||||
@ -117,7 +115,6 @@ input::-webkit-inner-spin-button {
|
||||
}
|
||||
|
||||
.item-name-list-no-ellipsis {
|
||||
max-height: 20px;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@ -105,6 +105,7 @@ function checkKeyCode(e: any) {
|
||||
// e.keyCode == 16 Shift
|
||||
// e.keyCode == 17 Control
|
||||
// e.keyCode == 18 Alt
|
||||
// e.keyCode == 91 Mate(Win)
|
||||
// e.keyCode == 20 Cape Lock 大小写
|
||||
// e.keyCode == 27 Esc
|
||||
// (e.keyCode >= 32 && e.keyCode <= 40) 控制键盘区
|
||||
@ -125,6 +126,7 @@ function checkKeyCode(e: any) {
|
||||
e.keyCode === 16 ||
|
||||
e.keyCode === 17 ||
|
||||
e.keyCode === 18 ||
|
||||
e.keyCode === 91 ||
|
||||
e.keyCode === 20 ||
|
||||
e.keyCode === 27 ||
|
||||
(e.keyCode >= 32 && e.keyCode <= 40) ||
|
||||
|
@ -26,6 +26,19 @@ async function checkShortcutKey(
|
||||
| "GeneralSearch"
|
||||
| "QuickSearch"
|
||||
): 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)) {
|
||||
window.api.showErrorMessageBox(
|
||||
|
16
types/setting.d.ts
vendored
16
types/setting.d.ts
vendored
@ -20,6 +20,8 @@ export interface General {
|
||||
hideLoseFocus: boolean;
|
||||
// 隐藏托盘图标
|
||||
hideTray: boolean;
|
||||
// 隐藏任务栏
|
||||
hideTaskbar: boolean;
|
||||
// 固定位置
|
||||
fixedPosition: boolean;
|
||||
// 永远居中
|
||||
@ -118,6 +120,8 @@ export interface SubClassification {
|
||||
itemAreaNameFontWeight: number;
|
||||
// 名称字体行高(项目区域)
|
||||
itemAreaNameFontLineHeight: number;
|
||||
// 名称对齐(项目区域)
|
||||
itemAreaNameAlign: "left" | "center" | "right";
|
||||
}
|
||||
|
||||
// 项目
|
||||
@ -152,6 +156,8 @@ export interface Item {
|
||||
fontWeight: number;
|
||||
// 字体行高
|
||||
fontLineHeight: number;
|
||||
// 提示:显示路径
|
||||
promptShowPath: boolean;
|
||||
}
|
||||
|
||||
// 快速搜索
|
||||
@ -176,6 +182,8 @@ export interface QuickSearch {
|
||||
openAfterHideQuickSearchWindow: boolean;
|
||||
// 匹配条件:备注
|
||||
matchConditionsRemark: boolean;
|
||||
// 宽度
|
||||
width: number;
|
||||
}
|
||||
|
||||
// 网络搜索
|
||||
@ -186,6 +194,12 @@ export interface WebSearch {
|
||||
searchSourceList: Array<WebSearchSource>;
|
||||
}
|
||||
|
||||
// 命令行
|
||||
export interface CommandLine {
|
||||
// 默认使用
|
||||
defaultUse: string;
|
||||
}
|
||||
|
||||
// 网络搜索源
|
||||
export interface WebSearchSource {
|
||||
// ID
|
||||
@ -234,6 +248,8 @@ export interface Setting {
|
||||
quickSearch: QuickSearch;
|
||||
// 网络搜索
|
||||
webSearch: WebSearch;
|
||||
// 命令行
|
||||
commandLine: CommandLine;
|
||||
// 网络
|
||||
network: Network;
|
||||
}
|
||||
|
467
yarn.lock
467
yarn.lock
@ -2,10 +2,10 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"7zip-bin@~5.1.1":
|
||||
version "5.1.1"
|
||||
resolved "https://registry.npmmirror.com/7zip-bin/-/7zip-bin-5.1.1.tgz#9274ec7460652f9c632c59addf24efb1684ef876"
|
||||
integrity sha512-sAP4LldeWNz0lNzmTird3uWfFDWWTeg6V/MsmyyLR9X1idwKBWIgt/ZvinqQldJm3LecKEs1emkbquO6PCiLVQ==
|
||||
"7zip-bin@~5.2.0":
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-5.2.0.tgz#7a03314684dd6572b7dfa89e68ce31d60286854d"
|
||||
integrity sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A==
|
||||
|
||||
"@alloc/quick-lru@^5.2.0":
|
||||
version "5.2.0"
|
||||
@ -17,6 +17,11 @@
|
||||
resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
|
||||
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":
|
||||
version "7.23.2"
|
||||
resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885"
|
||||
@ -24,6 +29,11 @@
|
||||
dependencies:
|
||||
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":
|
||||
version "0.15.12"
|
||||
resolved "https://registry.npmmirror.com/@css-render/plugin-bem/-/plugin-bem-0.15.12.tgz#cd88e46a388e4786436bd622414da0aa6019af3b"
|
||||
@ -66,10 +76,10 @@
|
||||
optionalDependencies:
|
||||
global-agent "^3.0.0"
|
||||
|
||||
"@electron/notarize@2.1.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.npmmirror.com/@electron/notarize/-/notarize-2.1.0.tgz#76aaec10c8687225e8d0a427cc9df67611c46ff3"
|
||||
integrity sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==
|
||||
"@electron/notarize@2.2.1":
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.2.1.tgz#d0aa6bc43cba830c41bfd840b85dbe0e273f59fe"
|
||||
integrity sha512-aL+bFMIkpR0cmmj5Zgy0LMKEpgy43/hw5zadEArgmAMWWlKc5buwFvFT9G/o/YJkvXAJm5q3iuTuLaiaXW39sg==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
fs-extra "^9.0.1"
|
||||
@ -87,10 +97,10 @@
|
||||
minimist "^1.2.6"
|
||||
plist "^3.0.5"
|
||||
|
||||
"@electron/universal@1.4.1":
|
||||
version "1.4.1"
|
||||
resolved "https://registry.npmmirror.com/@electron/universal/-/universal-1.4.1.tgz#3fbda2a5ed9ff9f3304c8e8316b94c1e3a7b3785"
|
||||
integrity sha512-lE/U3UNw1YHuowNbTmKNs9UlS3En3cPgwM5MI+agIgr/B1hSze9NdOP0qn7boZaI9Lph8IDv3/24g9IxnJP7aQ==
|
||||
"@electron/universal@1.5.1":
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/@electron/universal/-/universal-1.5.1.tgz#f338bc5bcefef88573cf0ab1d5920fac10d06ee5"
|
||||
integrity sha512-kbgXxyEauPJiQQUNG2VgUeyfQNFk6hBF11ISN2PNI6agUgPl55pv4eQmaqHzTAzchBvqZ2tQuRVaPStGf0mxGw==
|
||||
dependencies:
|
||||
"@electron/asar" "^3.2.1"
|
||||
"@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"
|
||||
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":
|
||||
version "0.3.3"
|
||||
resolved "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098"
|
||||
@ -307,6 +332,11 @@
|
||||
dependencies:
|
||||
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":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmmirror.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
|
||||
@ -475,6 +505,11 @@
|
||||
dependencies:
|
||||
"@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":
|
||||
version "0.12.0"
|
||||
resolved "https://registry.npmmirror.com/@vicons/material/-/material-0.12.0.tgz#068e72fa40bd7f780af5fc68011fb69010c8e0b5"
|
||||
@ -524,7 +559,26 @@
|
||||
estree-walker "^2.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"
|
||||
resolved "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.3.7.tgz#a245aa03f9bfcdb537a239bf02842072de0644c9"
|
||||
integrity sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw==
|
||||
@ -532,29 +586,28 @@
|
||||
"@vue/compiler-core" "3.3.7"
|
||||
"@vue/shared" "3.3.7"
|
||||
|
||||
"@vue/compiler-sfc@3.3.7":
|
||||
version "3.3.7"
|
||||
resolved "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.3.7.tgz#219d04b3013c7b15fbc536e2279e07810b731cc2"
|
||||
integrity sha512-7pfldWy/J75U/ZyYIXRVqvLRw3vmfxDo2YLMwVtWVNew8Sm8d6wodM+OYFq4ll/UxfqVr0XKiVwti32PCrruAw==
|
||||
"@vue/compiler-sfc@3.4.26":
|
||||
version "3.4.26"
|
||||
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.4.26.tgz#c679f206829954c3c078d8a9be76d0098b8377ae"
|
||||
integrity sha512-It1dp+FAOCgluYSVYlDn5DtZBxk1NCiJJfu2mlQqa/b+k8GL6NG/3/zRbJnHdhV2VhxFghaDq5L4K+1dakW6cw==
|
||||
dependencies:
|
||||
"@babel/parser" "^7.23.0"
|
||||
"@vue/compiler-core" "3.3.7"
|
||||
"@vue/compiler-dom" "3.3.7"
|
||||
"@vue/compiler-ssr" "3.3.7"
|
||||
"@vue/reactivity-transform" "3.3.7"
|
||||
"@vue/shared" "3.3.7"
|
||||
"@babel/parser" "^7.24.4"
|
||||
"@vue/compiler-core" "3.4.26"
|
||||
"@vue/compiler-dom" "3.4.26"
|
||||
"@vue/compiler-ssr" "3.4.26"
|
||||
"@vue/shared" "3.4.26"
|
||||
estree-walker "^2.0.2"
|
||||
magic-string "^0.30.5"
|
||||
postcss "^8.4.31"
|
||||
source-map-js "^1.0.2"
|
||||
magic-string "^0.30.10"
|
||||
postcss "^8.4.38"
|
||||
source-map-js "^1.2.0"
|
||||
|
||||
"@vue/compiler-ssr@3.3.7":
|
||||
version "3.3.7"
|
||||
resolved "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.3.7.tgz#eff4a70f7ceb800d60e68d208b96a030c0f1b636"
|
||||
integrity sha512-TxOfNVVeH3zgBc82kcUv+emNHo+vKnlRrkv8YvQU5+Y5LJGJwSNzcmLUoxD/dNzv0bhQ/F0s+InlgV0NrApJZg==
|
||||
"@vue/compiler-ssr@3.4.26":
|
||||
version "3.4.26"
|
||||
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.4.26.tgz#22842d8adfff972d87bb798b8d496111f7f814b5"
|
||||
integrity sha512-FNwLfk7LlEPRY/g+nw2VqiDKcnDTVdCfBREekF8X74cPLiWHUX6oldktf/Vx28yh4STNy7t+/yuLoMBBF7YDiQ==
|
||||
dependencies:
|
||||
"@vue/compiler-dom" "3.3.7"
|
||||
"@vue/shared" "3.3.7"
|
||||
"@vue/compiler-dom" "3.4.26"
|
||||
"@vue/shared" "3.4.26"
|
||||
|
||||
"@vue/devtools-api@^6.5.0":
|
||||
version "6.5.1"
|
||||
@ -575,54 +628,48 @@
|
||||
muggle-string "^0.3.1"
|
||||
vue-template-compiler "^2.7.14"
|
||||
|
||||
"@vue/reactivity-transform@3.3.7":
|
||||
version "3.3.7"
|
||||
resolved "https://registry.npmmirror.com/@vue/reactivity-transform/-/reactivity-transform-3.3.7.tgz#eb9f5110af5085079b851d162205394bc790d539"
|
||||
integrity sha512-APhRmLVbgE1VPGtoLQoWBJEaQk4V8JUsqrQihImVqKT+8U6Qi3t5ATcg4Y9wGAPb3kIhetpufyZ1RhwbZCIdDA==
|
||||
"@vue/reactivity@3.4.26":
|
||||
version "3.4.26"
|
||||
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.4.26.tgz#1191f543809d4c93e5b3e842ba83022350a3f205"
|
||||
integrity sha512-E/ynEAu/pw0yotJeLdvZEsp5Olmxt+9/WqzvKff0gE67tw73gmbx6tRkiagE/eH0UCubzSlGRebCbidB1CpqZQ==
|
||||
dependencies:
|
||||
"@babel/parser" "^7.23.0"
|
||||
"@vue/compiler-core" "3.3.7"
|
||||
"@vue/shared" "3.3.7"
|
||||
estree-walker "^2.0.2"
|
||||
magic-string "^0.30.5"
|
||||
"@vue/shared" "3.4.26"
|
||||
|
||||
"@vue/reactivity@3.3.7":
|
||||
version "3.3.7"
|
||||
resolved "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.3.7.tgz#48b6671a45ba33039da2c0eb25ae702f924486a9"
|
||||
integrity sha512-cZNVjWiw00708WqT0zRpyAgduG79dScKEPYJXq2xj/aMtk3SKvL3FBt2QKUlh6EHBJ1m8RhBY+ikBUzwc7/khg==
|
||||
"@vue/runtime-core@3.4.26":
|
||||
version "3.4.26"
|
||||
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.4.26.tgz#51ee971cb700370a67e5a510c4a84eff7491d658"
|
||||
integrity sha512-AFJDLpZvhT4ujUgZSIL9pdNcO23qVFh7zWCsNdGQBw8ecLNxOOnPcK9wTTIYCmBJnuPHpukOwo62a2PPivihqw==
|
||||
dependencies:
|
||||
"@vue/shared" "3.3.7"
|
||||
"@vue/reactivity" "3.4.26"
|
||||
"@vue/shared" "3.4.26"
|
||||
|
||||
"@vue/runtime-core@3.3.7":
|
||||
version "3.3.7"
|
||||
resolved "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.3.7.tgz#c1eece1c98f936dc69dd0667d11b464579b128fd"
|
||||
integrity sha512-LHq9du3ubLZFdK/BP0Ysy3zhHqRfBn80Uc+T5Hz3maFJBGhci1MafccnL3rpd5/3wVfRHAe6c+PnlO2PAavPTQ==
|
||||
"@vue/runtime-dom@3.4.26":
|
||||
version "3.4.26"
|
||||
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.4.26.tgz#179aa7c8dc964112e6d096bc8ec5f361111009a1"
|
||||
integrity sha512-UftYA2hUXR2UOZD/Fc3IndZuCOOJgFxJsWOxDkhfVcwLbsfh2CdXE2tG4jWxBZuDAs9J9PzRTUFt1PgydEtItw==
|
||||
dependencies:
|
||||
"@vue/reactivity" "3.3.7"
|
||||
"@vue/shared" "3.3.7"
|
||||
"@vue/runtime-core" "3.4.26"
|
||||
"@vue/shared" "3.4.26"
|
||||
csstype "^3.1.3"
|
||||
|
||||
"@vue/runtime-dom@3.3.7":
|
||||
version "3.3.7"
|
||||
resolved "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.3.7.tgz#e7cf88cc01591fdf6e3164825554fdadc3137ffc"
|
||||
integrity sha512-PFQU1oeJxikdDmrfoNQay5nD4tcPNYixUBruZzVX/l0eyZvFKElZUjW4KctCcs52nnpMGO6UDK+jF5oV4GT5Lw==
|
||||
"@vue/server-renderer@3.4.26":
|
||||
version "3.4.26"
|
||||
resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.4.26.tgz#6d0c6b0366bfe0232579aea00e3ff6784e5a1c60"
|
||||
integrity sha512-xoGAqSjYDPGAeRWxeoYwqJFD/gw7mpgzOvSxEmjWaFO2rE6qpbD1PC172YRpvKhrihkyHJkNDADFXTfCyVGhKw==
|
||||
dependencies:
|
||||
"@vue/runtime-core" "3.3.7"
|
||||
"@vue/shared" "3.3.7"
|
||||
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/compiler-ssr" "3.4.26"
|
||||
"@vue/shared" "3.4.26"
|
||||
|
||||
"@vue/shared@3.3.7", "@vue/shared@^3.3.0":
|
||||
version "3.3.7"
|
||||
resolved "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.7.tgz#0091852fe5cc4237c8440fe32f3ab6bc920ae6d9"
|
||||
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":
|
||||
version "0.1.4"
|
||||
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"
|
||||
integrity sha512-xwdG0FJPQMe0M0UA4Tz0zEB8rBJTRA5a476ZawAqiBkMv16GRK5xpXThOjMaEOFnZ6zabejjG4J3da0SXG63KA==
|
||||
|
||||
app-builder-lib@24.6.4:
|
||||
version "24.6.4"
|
||||
resolved "https://registry.npmmirror.com/app-builder-lib/-/app-builder-lib-24.6.4.tgz#5bf77dd89d3ee557bc615b9ddfaf383f3e51577b"
|
||||
integrity sha512-m9931WXb83teb32N0rKg+ulbn6+Hl8NV5SUpVDOVz9MWOXfhV6AQtTdftf51zJJvCQnQugGtSqoLvgw6mdF/Rg==
|
||||
app-builder-lib@24.13.3:
|
||||
version "24.13.3"
|
||||
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-24.13.3.tgz#36e47b65fecb8780bb73bff0fee4e0480c28274b"
|
||||
integrity sha512-FAzX6IBit2POXYGnTCT8YHFO/lr5AapAII6zzhQO3Rw4cEDOgK+t1xhLc5tNcKlicTHlo9zxIwnYCX9X2DLkig==
|
||||
dependencies:
|
||||
"7zip-bin" "~5.1.1"
|
||||
"@develar/schema-utils" "~2.6.5"
|
||||
"@electron/notarize" "2.1.0"
|
||||
"@electron/notarize" "2.2.1"
|
||||
"@electron/osx-sign" "1.0.5"
|
||||
"@electron/universal" "1.4.1"
|
||||
"@electron/universal" "1.5.1"
|
||||
"@malept/flatpak-bundler" "^0.4.0"
|
||||
"@types/fs-extra" "9.0.13"
|
||||
async-exit-hook "^2.0.1"
|
||||
bluebird-lst "^1.0.9"
|
||||
builder-util "24.5.0"
|
||||
builder-util-runtime "9.2.1"
|
||||
builder-util "24.13.1"
|
||||
builder-util-runtime "9.2.4"
|
||||
chromium-pickle-js "^0.2.0"
|
||||
debug "^4.3.4"
|
||||
ejs "^3.1.8"
|
||||
electron-publish "24.5.0"
|
||||
electron-publish "24.13.1"
|
||||
form-data "^4.0.0"
|
||||
fs-extra "^10.1.0"
|
||||
hosted-git-info "^4.1.0"
|
||||
@ -834,10 +880,10 @@ bcrypt-pbkdf@^1.0.0:
|
||||
dependencies:
|
||||
tweetnacl "^0.14.3"
|
||||
|
||||
better-sqlite3-multiple-ciphers@^9.0.0:
|
||||
version "9.0.0"
|
||||
resolved "https://registry.npmmirror.com/better-sqlite3-multiple-ciphers/-/better-sqlite3-multiple-ciphers-9.0.0.tgz#ce6f10dd5950a508c2bd1596e2863fd5faa3b0bc"
|
||||
integrity sha512-bM0gv20exF1X1Q8/Rz0PasxCYcgb8VIbQKOhYe3Js35uFAmrvnX8AUqW6c/eq+i8WRtAoRw4yAOBs5Nxx7qaXw==
|
||||
better-sqlite3-multiple-ciphers@^9.4.1:
|
||||
version "9.5.0"
|
||||
resolved "https://registry.yarnpkg.com/better-sqlite3-multiple-ciphers/-/better-sqlite3-multiple-ciphers-9.5.0.tgz#15948374ee42cf5c7deeb56d7c4693faa33f2d2e"
|
||||
integrity sha512-6A9xBRvssONJW07Lur6pmkaUwlCGz1bnjFmXrrAR3qXETUBk92OI4C/+LhMOatn5wQ8AQzLScFZC/CKUpxkTaw==
|
||||
dependencies:
|
||||
bindings "^1.5.0"
|
||||
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"
|
||||
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:
|
||||
version "1.0.0"
|
||||
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"
|
||||
ieee754 "^1.1.13"
|
||||
|
||||
builder-util-runtime@9.2.1:
|
||||
version "9.2.1"
|
||||
resolved "https://registry.npmmirror.com/builder-util-runtime/-/builder-util-runtime-9.2.1.tgz#3184dcdf7ed6c47afb8df733813224ced4f624fd"
|
||||
integrity sha512-2rLv/uQD2x+dJ0J3xtsmI12AlRyk7p45TEbE/6o/fbb633e/S3pPgm+ct+JHsoY7r39dKHnGEFk/AASRFdnXmA==
|
||||
builder-util-runtime@9.2.4:
|
||||
version "9.2.4"
|
||||
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-9.2.4.tgz#13cd1763da621e53458739a1e63f7fcba673c42a"
|
||||
integrity sha512-upp+biKpN/XZMLim7aguUyW8s0FUpDvOtK6sbanMFDAMBzpHDqdhgVYm6zc9HJ6nWo7u2Lxk60i2M6Jd3aiNrA==
|
||||
dependencies:
|
||||
debug "^4.3.4"
|
||||
sax "^1.2.4"
|
||||
|
||||
builder-util@24.5.0:
|
||||
version "24.5.0"
|
||||
resolved "https://registry.npmmirror.com/builder-util/-/builder-util-24.5.0.tgz#8683c9a7a1c5c9f9a4c4d2789ecca0e47dddd3f9"
|
||||
integrity sha512-STnBmZN/M5vGcv01u/K8l+H+kplTaq4PAIn3yeuufUKSpcdro0DhJWxPI81k5XcNfC//bjM3+n9nr8F9uV4uAQ==
|
||||
builder-util@24.13.1:
|
||||
version "24.13.1"
|
||||
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-24.13.1.tgz#4a4c4f9466b016b85c6990a0ea15aa14edec6816"
|
||||
integrity sha512-NhbCSIntruNDTOVI9fdXz0dihaqX2YuE1D6zZMrwiErzH4ELZHE6mdiB40wEgZNprDia+FghRFgKoAqMZRRjSA==
|
||||
dependencies:
|
||||
"7zip-bin" "~5.1.1"
|
||||
"7zip-bin" "~5.2.0"
|
||||
"@types/debug" "^4.1.6"
|
||||
app-builder-bin "4.0.0"
|
||||
bluebird-lst "^1.0.9"
|
||||
builder-util-runtime "9.2.1"
|
||||
builder-util-runtime "9.2.4"
|
||||
chalk "^4.1.2"
|
||||
cross-spawn "^7.0.3"
|
||||
debug "^4.3.4"
|
||||
@ -1234,10 +1285,10 @@ cssesc@^3.0.0:
|
||||
resolved "https://registry.npmmirror.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
|
||||
integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
|
||||
|
||||
csstype@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b"
|
||||
integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==
|
||||
csstype@^3.1.3:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
|
||||
integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==
|
||||
|
||||
csstype@~3.0.5:
|
||||
version "3.0.11"
|
||||
@ -1289,6 +1340,23 @@ debug@^3.2.6:
|
||||
dependencies:
|
||||
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:
|
||||
version "6.0.0"
|
||||
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"
|
||||
integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==
|
||||
|
||||
dmg-builder@24.6.4:
|
||||
version "24.6.4"
|
||||
resolved "https://registry.npmmirror.com/dmg-builder/-/dmg-builder-24.6.4.tgz#e19b8305f7e1ea0b4faaa30382c81b9d6de39863"
|
||||
integrity sha512-BNcHRc9CWEuI9qt0E655bUBU/j/3wUCYBVKGu1kVpbN5lcUdEJJJeiO0NHK3dgKmra6LUUZlo+mWqc+OCbi0zw==
|
||||
dmg-builder@24.13.3:
|
||||
version "24.13.3"
|
||||
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-24.13.3.tgz#95d5b99c587c592f90d168a616d7ec55907c7e55"
|
||||
integrity sha512-rcJUkMfnJpfCboZoOOPf4L29TRtEieHNOeAbYPWPxlaBw/Z1RKrRA86dOI9rwaI4tQSc/RD82zTNHprfUHXsoQ==
|
||||
dependencies:
|
||||
app-builder-lib "24.6.4"
|
||||
builder-util "24.5.0"
|
||||
builder-util-runtime "9.2.1"
|
||||
app-builder-lib "24.13.3"
|
||||
builder-util "24.13.1"
|
||||
builder-util-runtime "9.2.4"
|
||||
fs-extra "^10.1.0"
|
||||
iconv-lite "^0.6.2"
|
||||
js-yaml "^4.1.0"
|
||||
@ -1452,16 +1520,16 @@ ejs@^3.1.8:
|
||||
dependencies:
|
||||
jake "^10.8.5"
|
||||
|
||||
electron-builder@^24.6.4:
|
||||
version "24.6.4"
|
||||
resolved "https://registry.npmmirror.com/electron-builder/-/electron-builder-24.6.4.tgz#c51271e49b9a02c9a3ec444f866b6008c4d98a1d"
|
||||
integrity sha512-uNWQoU7pE7qOaIQ6CJHpBi44RJFVG8OHRBIadUxrsDJVwLLo8Nma3K/EEtx5/UyWAQYdcK4nVPYKoRqBb20hbA==
|
||||
electron-builder@^24.6.5:
|
||||
version "24.13.3"
|
||||
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-24.13.3.tgz#c506dfebd36d9a50a83ee8aa32d803d83dbe4616"
|
||||
integrity sha512-yZSgVHft5dNVlo31qmJAe4BVKQfFdwpRw7sFp1iQglDRCDD6r22zfRJuZlhtB5gp9FHUxCMEoWGq10SkCnMAIg==
|
||||
dependencies:
|
||||
app-builder-lib "24.6.4"
|
||||
builder-util "24.5.0"
|
||||
builder-util-runtime "9.2.1"
|
||||
app-builder-lib "24.13.3"
|
||||
builder-util "24.13.1"
|
||||
builder-util-runtime "9.2.4"
|
||||
chalk "^4.1.2"
|
||||
dmg-builder "24.6.4"
|
||||
dmg-builder "24.13.3"
|
||||
fs-extra "^10.1.0"
|
||||
is-ci "^3.0.0"
|
||||
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"
|
||||
integrity sha512-vB3akupmQvA8jAyNL9rULZtf6WoP8vsabjXsRtiqXS6/D37SwN/4LEyj4JD+9Bv6xoTcx/LrVnsIKEEWdq5ClQ==
|
||||
|
||||
electron-publish@24.5.0:
|
||||
version "24.5.0"
|
||||
resolved "https://registry.npmmirror.com/electron-publish/-/electron-publish-24.5.0.tgz#492a4d7caa232e88ee3c18f5c3b4dc637e5e1b3a"
|
||||
integrity sha512-zwo70suH15L15B4ZWNDoEg27HIYoPsGJUF7xevLJLSI7JUPC8l2yLBdLGwqueJ5XkDL7ucYyRZzxJVR8ElV9BA==
|
||||
electron-publish@24.13.1:
|
||||
version "24.13.1"
|
||||
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.13.1.tgz#57289b2f7af18737dc2ad134668cdd4a1b574a0c"
|
||||
integrity sha512-2ZgdEqJ8e9D17Hwp5LEq5mLQPjqU3lv/IALvgp+4W8VeNhryfGhYEQC/PgDPMrnWUp+l60Ou5SJLsu+k4mhQ8A==
|
||||
dependencies:
|
||||
"@types/fs-extra" "^9.0.11"
|
||||
builder-util "24.5.0"
|
||||
builder-util-runtime "9.2.1"
|
||||
builder-util "24.13.1"
|
||||
builder-util-runtime "9.2.4"
|
||||
chalk "^4.1.2"
|
||||
fs-extra "^10.1.0"
|
||||
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"
|
||||
integrity sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg==
|
||||
|
||||
electron@^26.4.2:
|
||||
version "26.4.2"
|
||||
resolved "https://registry.npmmirror.com/electron/-/electron-26.4.2.tgz#2f976a3c30558f09ced3f5876862b4c21172c02c"
|
||||
integrity sha512-BOfQUOIvsq5NnssWOMqcZnA5M0ull620wvQoJq3WhXN1wJAsWu+cdjHvREyxnHbArPkV+F+x3YAi5Dt+UKoqhw==
|
||||
electron@^28.3.1:
|
||||
version "28.3.3"
|
||||
resolved "https://registry.npmmirror.com/electron/-/electron-28.3.3.tgz#2df898f653c4f77b66b4cf3eeba79d8bea6d03c0"
|
||||
integrity sha512-ObKMLSPNhomtCOBAxFS8P2DW/4umkh72ouZUlUKzXGtYuPzgr1SYhskhFWgzAsPtUzhL2CzyV2sfbHcEW4CXqw==
|
||||
dependencies:
|
||||
"@electron/get" "^2.0.0"
|
||||
"@types/node" "^18.11.18"
|
||||
@ -1521,7 +1589,7 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1:
|
||||
dependencies:
|
||||
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"
|
||||
resolved "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48"
|
||||
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
|
||||
@ -1662,6 +1730,15 @@ fd-slicer@~1.1.0:
|
||||
dependencies:
|
||||
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:
|
||||
version "1.0.0"
|
||||
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"
|
||||
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:
|
||||
version "1.1.7"
|
||||
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:
|
||||
safer-buffer ">= 2.1.2 < 3.0.0"
|
||||
|
||||
ieee754@^1.1.13:
|
||||
ieee754@^1.1.13, ieee754@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
||||
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"
|
||||
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:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
|
||||
@ -2291,10 +2385,10 @@ lru-cache@^6.0.0:
|
||||
dependencies:
|
||||
yallist "^4.0.0"
|
||||
|
||||
magic-string@^0.30.5:
|
||||
version "0.30.5"
|
||||
resolved "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9"
|
||||
integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==
|
||||
magic-string@^0.30.10:
|
||||
version "0.30.10"
|
||||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.10.tgz#123d9c41a0cb5640c892b041d4cfb3bd0aa4b39e"
|
||||
integrity sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==
|
||||
dependencies:
|
||||
"@jridgewell/sourcemap-codec" "^1.4.15"
|
||||
|
||||
@ -2453,10 +2547,10 @@ mz@^2.7.0:
|
||||
object-assign "^4.0.1"
|
||||
thenify-all "^1.0.0"
|
||||
|
||||
naive-ui@^2.35.0:
|
||||
version "2.35.0"
|
||||
resolved "https://registry.npmmirror.com/naive-ui/-/naive-ui-2.35.0.tgz#fe1fc2404694b4114486fa31e609e35714e8ed25"
|
||||
integrity sha512-PdnLpOip1LQaKs5+rXLZoPDPQkTq26TnHWeABvUA2eOQjtHxE4+TQvj0Jq/W8clM2On/7jptoGmenLt48G3Bhg==
|
||||
naive-ui@^2.36.0:
|
||||
version "2.39.0"
|
||||
resolved "https://registry.npmmirror.com/naive-ui/-/naive-ui-2.39.0.tgz#f0d47d30ce86b178242ad5de9de4066eb8a3f0c9"
|
||||
integrity sha512-5oUJzRG+rtLSH8eRU+fJvVYiQids2BxF9jp+fwGoAqHOptEINrBlgBu9uy+95RHE5FLJ7Q/z41o+qkoGnUrKxQ==
|
||||
dependencies:
|
||||
"@css-render/plugin-bem" "^0.15.12"
|
||||
"@css-render/vue3-ssr" "^0.15.12"
|
||||
@ -2465,23 +2559,29 @@ naive-ui@^2.35.0:
|
||||
"@types/lodash-es" "^4.17.9"
|
||||
async-validator "^4.2.5"
|
||||
css-render "^0.15.12"
|
||||
csstype "^3.1.3"
|
||||
date-fns "^2.30.0"
|
||||
date-fns-tz "^2.0.0"
|
||||
evtd "^0.2.4"
|
||||
highlight.js "^11.8.0"
|
||||
lodash "^4.17.21"
|
||||
lodash-es "^4.17.21"
|
||||
seemly "^0.3.6"
|
||||
seemly "^0.3.8"
|
||||
treemate "^0.3.11"
|
||||
vdirs "^0.1.8"
|
||||
vooks "^0.2.12"
|
||||
vueuc "^0.4.51"
|
||||
vueuc "^0.4.58"
|
||||
|
||||
nanoid@^3.3.6:
|
||||
version "3.3.6"
|
||||
resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
|
||||
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:
|
||||
version "1.0.2"
|
||||
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"
|
||||
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:
|
||||
version "1.2.0"
|
||||
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"
|
||||
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:
|
||||
version "15.1.0"
|
||||
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"
|
||||
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:
|
||||
version "7.1.1"
|
||||
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"
|
||||
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"
|
||||
resolved "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
|
||||
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
|
||||
@ -2862,6 +2981,13 @@ readable-stream@^3.1.1, readable-stream@^3.4.0:
|
||||
string_decoder "^1.1.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:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
|
||||
@ -2869,6 +2995,11 @@ readdirp@~3.6.0:
|
||||
dependencies:
|
||||
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:
|
||||
version "0.14.0"
|
||||
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"
|
||||
integrity sha512-lEV5VB8BUKTo/AfktXJcy+JeXns26ylbMkIUco8CYREsQijuz4mrXres2Q+vMLdwkuLxJdIPQ8IlCIxLYm71Yw==
|
||||
|
||||
seemly@^0.3.8:
|
||||
version "0.3.8"
|
||||
resolved "https://registry.npmmirror.com/seemly/-/seemly-0.3.8.tgz#42879d8375d73126a04dc16b1bf92a773d2e5974"
|
||||
integrity sha512-MW8Qs6vbzo0pHmDpFSYPna+lwpZ6Zk1ancbajw/7E8TKtHdV+1DfZZD+kKJEhG/cAoB/i+LiT+5msZOqj0DwRA==
|
||||
|
||||
semver-compare@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmmirror.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
|
||||
@ -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"
|
||||
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:
|
||||
version "0.5.21"
|
||||
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"
|
||||
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:
|
||||
version "3.34.0"
|
||||
resolved "https://registry.npmmirror.com/sucrase/-/sucrase-3.34.0.tgz#1e0e2d8fcf07f8b9c3569067d92fbd8690fb576f"
|
||||
@ -3305,6 +3454,16 @@ tmp@^0.2.0:
|
||||
dependencies:
|
||||
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:
|
||||
version "5.0.1"
|
||||
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:
|
||||
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:
|
||||
version "2.5.0"
|
||||
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"
|
||||
extsprintf "^1.2.0"
|
||||
|
||||
vite-plugin-electron@^0.14.1:
|
||||
version "0.14.1"
|
||||
resolved "https://registry.npmmirror.com/vite-plugin-electron/-/vite-plugin-electron-0.14.1.tgz#faad1e26d853ea7960b812272c19521c7f180482"
|
||||
integrity sha512-QGQ2nJ4wjMf1FaDSkdoC/UskQGiYGcAToATJqJXvqrL4Jmt0CFaZqoDjh1xLicUWEo/X7urHYjhKTqwEeP7F7g==
|
||||
vite-plugin-electron@^0.15.4:
|
||||
version "0.15.4"
|
||||
resolved "https://registry.npmmirror.com/vite-plugin-electron/-/vite-plugin-electron-0.15.4.tgz#29552461940ed7ec398f59ee8b5ee63aa559a6c9"
|
||||
integrity sha512-aXGDjTXebJxNX+cf+KSZEsa9BcMrTbNhjZJaUhU5999/ATYZq4PlZpebfyeslyuYpjk6OdyA/pNC+fTeDYK5Kw==
|
||||
|
||||
vite@^4.4.11:
|
||||
version "4.5.0"
|
||||
@ -3501,21 +3668,21 @@ vue-tsc@^1.8.22:
|
||||
"@vue/language-core" "1.8.22"
|
||||
semver "^7.5.4"
|
||||
|
||||
vue@^3.3.7:
|
||||
version "3.3.7"
|
||||
resolved "https://registry.npmmirror.com/vue/-/vue-3.3.7.tgz#972a218682443a3819d121261b2bff914417f4f0"
|
||||
integrity sha512-YEMDia1ZTv1TeBbnu6VybatmSteGOS3A3YgfINOfraCbf85wdKHzscD6HSS/vB4GAtI7sa1XPX7HcQaJ1l24zA==
|
||||
vue@^3.4.13:
|
||||
version "3.4.26"
|
||||
resolved "https://registry.yarnpkg.com/vue/-/vue-3.4.26.tgz#936c97e37672c737705d7bdfa62c31af18742269"
|
||||
integrity sha512-bUIq/p+VB+0xrJubaemrfhk1/FiW9iX+pDV+62I/XJ6EkspAO9/DXEjbDFoe8pIfOZBqfk45i9BMc41ptP/uRg==
|
||||
dependencies:
|
||||
"@vue/compiler-dom" "3.3.7"
|
||||
"@vue/compiler-sfc" "3.3.7"
|
||||
"@vue/runtime-dom" "3.3.7"
|
||||
"@vue/server-renderer" "3.3.7"
|
||||
"@vue/shared" "3.3.7"
|
||||
"@vue/compiler-dom" "3.4.26"
|
||||
"@vue/compiler-sfc" "3.4.26"
|
||||
"@vue/runtime-dom" "3.4.26"
|
||||
"@vue/server-renderer" "3.4.26"
|
||||
"@vue/shared" "3.4.26"
|
||||
|
||||
vueuc@^0.4.51:
|
||||
version "0.4.51"
|
||||
resolved "https://registry.npmmirror.com/vueuc/-/vueuc-0.4.51.tgz#35cd5364db4b71fc791a9823748711b91d910d49"
|
||||
integrity sha512-pLiMChM4f+W8czlIClGvGBYo656lc2Y0/mXFSCydcSmnCR1izlKPGMgiYBGjbY9FDkFG8a2HEVz7t0DNzBWbDw==
|
||||
vueuc@^0.4.58:
|
||||
version "0.4.58"
|
||||
resolved "https://registry.npmmirror.com/vueuc/-/vueuc-0.4.58.tgz#03ee2ea6febf360ca9cbe490841fce91742eea12"
|
||||
integrity sha512-Wnj/N8WbPRSxSt+9ji1jtDHPzda5h2OH/0sFBhvdxDRuyCZbjGg3/cKMaKqEoe+dErTexG2R+i6Q8S/Toq1MYg==
|
||||
dependencies:
|
||||
"@css-render/vue3-ssr" "^0.15.10"
|
||||
"@juggle/resize-observer" "^3.3.1"
|
||||
|
Loading…
Reference in New Issue
Block a user