├── .editorconfig ├── .eslintignore ├── .eslintrc.cjs ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc.yaml ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── LICENSE.txt ├── README-ZH.md ├── README.md ├── build ├── entitlements.mac.plist ├── icon.ico ├── icon.png ├── icon_1024x1024.icns ├── icon_128x128.icns ├── icon_16x16.icns ├── icon_32x32.icns ├── icon_512x512.icns └── icon_64x64.icns ├── dev-app-update.yml ├── electron-builder.yml ├── electron.vite.config.ts ├── package-lock.json ├── package.json ├── resources ├── Project Structure.jpeg ├── demo-en.gif ├── demo-zh.gif ├── icon.png ├── love.png └── wechat.jpg ├── src ├── main │ └── index.ts ├── preload │ ├── index.d.ts │ └── index.ts └── renderer │ ├── auto-imports.d.ts │ ├── components.d.ts │ ├── index.html │ └── src │ ├── App.vue │ ├── assets │ ├── base.css │ ├── images │ │ ├── icon-128.png │ │ ├── icon-96.png │ │ └── noData.png │ └── main.css │ ├── components │ └── MainPage.vue │ ├── constants │ ├── constants.js │ ├── fileIconMap.js │ ├── folderIconMap.js │ └── storageConst.js │ ├── env.d.ts │ ├── locales │ ├── de.json │ ├── en.json │ ├── es.json │ ├── fr.json │ ├── i18n.js │ ├── it.json │ ├── ja.json │ ├── ko.json │ ├── pt.json │ ├── ru.json │ └── zh.json │ ├── main.ts │ ├── store │ ├── index.ts │ └── modules │ │ ├── configGlobal-store.js │ │ └── configPreview-store.js │ └── utils │ ├── copyImg.js │ ├── copyTree.js │ ├── exportImg.js │ ├── quickBurstConfetti.js │ ├── replace.element.js │ ├── replace.fileName.js │ ├── replace.note.js │ ├── replace.util.day.js │ ├── scan.js │ ├── sortFilePaths.js │ └── translate.flat.js ├── tsconfig.json ├── tsconfig.node.json └── tsconfig.web.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | out 4 | .gitignore 5 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-07-06 11:28 5 | * @LastAuthor : itchaox 6 | * @LastTime : 2024-07-06 15:07 7 | * @desc : 8 | */ 9 | /* eslint-env node */ 10 | require('@rushstack/eslint-patch/modern-module-resolution') 11 | 12 | module.exports = { 13 | extends: [ 14 | 'eslint:recommended', 15 | 'plugin:vue/vue3-recommended', 16 | '@electron-toolkit', 17 | '@electron-toolkit/eslint-config-ts/eslint-recommended', 18 | '@vue/eslint-config-typescript/recommended', 19 | '@vue/eslint-config-prettier' 20 | ], 21 | rules: { 22 | 'vue/require-default-prop': 'off', 23 | 'vue/multi-word-component-names': 'off', 24 | '@typescript-eslint/ban-ts-comment': [ 25 | 'error', 26 | { 27 | 'ts-ignore': 'allow-with-description', 28 | 'ts-nocheck': 'allow-with-description' 29 | } 30 | ], 31 | '@typescript-eslint/no-unused-vars': 'off' 32 | '@typescript-eslint/no-explicit-any': 'off' 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | out/ 4 | .DS_Store 5 | *.log* 6 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | electron_mirror=https://npmmirror.com/mirrors/electron/ 2 | electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/ 3 | shamefully-hoist=true 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | out 2 | dist 3 | pnpm-lock.yaml 4 | LICENSE.md 5 | tsconfig.json 6 | tsconfig.*.json 7 | -------------------------------------------------------------------------------- /.prettierrc.yaml: -------------------------------------------------------------------------------- 1 | singleQuote: true 2 | semi: false 3 | printWidth: 100 4 | trailingComma: none 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["dbaeumer.vscode-eslint"] 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Debug Main Process", 6 | "type": "node", 7 | "request": "launch", 8 | "cwd": "${workspaceRoot}", 9 | "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite", 10 | "windows": { 11 | "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd" 12 | }, 13 | "runtimeArgs": ["--sourcemap"], 14 | "env": { 15 | "REMOTE_DEBUGGING_PORT": "9222" 16 | } 17 | }, 18 | { 19 | "name": "Debug Renderer Process", 20 | "port": 9222, 21 | "request": "attach", 22 | "type": "chrome", 23 | "webRoot": "${workspaceFolder}/src/renderer", 24 | "timeout": 60000, 25 | "presentation": { 26 | "hidden": true 27 | } 28 | } 29 | ], 30 | "compounds": [ 31 | { 32 | "name": "Debug All", 33 | "configurations": ["Debug Main Process", "Debug Renderer Process"], 34 | "presentation": { 35 | "order": 1 36 | } 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[typescript]": { 3 | "editor.defaultFormatter": "esbenp.prettier-vscode" 4 | }, 5 | "[javascript]": { 6 | "editor.defaultFormatter": "esbenp.prettier-vscode" 7 | }, 8 | "[json]": { 9 | "editor.defaultFormatter": "esbenp.prettier-vscode" 10 | }, 11 | "i18n-ally.localesPaths": ["locales", "src/renderer/src/locales"], 12 | "i18n-ally.keystyle": "nested", 13 | "i18n-ally.extract.ignoredByFiles": { 14 | "src/renderer/src/components/MainPage.vue": [ 15 | "\n 开源\n\n " 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2024-present, Wang Chao 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README-ZH.md: -------------------------------------------------------------------------------- 1 |

2 | Annotree 3 |

4 | 5 |
6 |

7 | Annotree 注释树 8 |

9 |
10 | 11 |

生成文件夹目录注释树,让技术文档编写变得轻松高效!

12 | 13 |

14 | version 15 | license 16 |

17 | 18 |

19 | 中文 | 20 | English 21 |

22 | 23 | ## 项目介绍 24 | 25 | ### 基本情况 📗 26 | 27 | > 本项目基于 [folder-explorer](https://github.com/d2-projects/folder-explorer) 进行二次开发,🙏🏻 非常感谢 [FairyEver](https://github.com/FairyEver) 的创意和贡献! 28 | 29 | Annotree(Annotate + Tree)是一款专为生成文件夹目录注释树而设计的桌面软件,旨在简化技术文档的编写过程。通过直观的可视化操作界面,你可以轻松创建文件夹目录注释树。 30 | 31 | 系统支持: Mac、Windows 和 Linux。 32 | 33 | > 如果你需要生成文件夹目录注释树,一定要试试 Annotree 🌲,它绝对不会让你失望 🥳。 34 | 35 | 这是我的首个正式开源项目,如果它对你有帮助, 请给我一个 Star ⭐️ 并分享给你的朋友们,这对我意义重大,谢谢 💖!
36 | 你的反馈和支持 💯,是我不断改进和积极更新软件的最大动力~ 37 | 38 | - 官方文档:https://annotree.com
39 | - **软件最新版本下载地址,请访问 [Github Release](https://github.com/itchaox/annotree/releases)** 40 | 41 | ### 视频教程 📽️ 42 | 43 | > 我在 B 站发布了一些介绍 Annotree 功能的视频,欢迎大家前往观看。
44 | > 第 1 期视频:https://www.bilibili.com/video/BV1fS421R7UM
45 | > 第 2 期视频:https://www.bilibili.com/video/BV1Tz421B7AY
46 | > 第 3 期视频:https://www.bilibili.com/video/BV1bXvoe4EUT
47 | > 第 4 期视频:https://www.bilibili.com/video/BV1fGHjesENs
48 | > 我还是 B 站的一位小 up,欢迎大家多多支持!如果这些视频对你有帮助,感谢你的一键三连和关注~ 🤩 49 | 50 | ## 效果预览 🎉 51 | 52 | ![demo](/resources/demo-zh.gif) 53 | 54 | ## 项目结构 📇 55 | 56 | ![](/resources//Project%20Structure.jpeg) 57 | 58 | ## 功能特性 59 | 60 | 1. ✨ 实时预览:修改配置后,实时预览文件夹目录树的效果。 61 | 2. 🖊️ 便捷注释:通过简单切换输入框来编写注释,显著提升使用效率。 62 | 3. 🚫 文件和文件夹忽略:轻松忽略不需要的文件和文件夹,确保目录树只展示你关心的内容。 63 | 4. 📂 自动打开导出文件:导出文件后自动打开,节省时间,让工作流程更加流畅。 64 | 65 | ## 功能介绍 66 | 67 | - 扫描:点击扫描按钮后打开文件选择器,选择需要扫描的文件夹,即可开始扫描。 68 | 69 | ### 全局配置 70 | 71 | - 自动打开文件:导出文件后自动打开。 72 | - 忽略文件夹:忽略不需要扫描的文件夹,避免性能损失甚至程序失去响应,比如:node_modules 文件夹,程序内部已自动忽略 node_modules 文件夹。 73 | - 忽略以 "." 开头的文件夹:这类文件夹在 MacOS 和 Linux 上是默认隐藏的文件夹。 74 | - 只扫描文件夹:忽略所有文件,只扫描文件夹。 75 | - 忽略以 "." 开头的文件:这类文件在 MacOS 和 Linux 上是默认隐藏的文件。 76 | - 忽略文件类型:可以选择忽略不需要的文件类型,以提高扫描效率。 77 | - 扫描深度:设置扫描目录的深度,0 为所有深度,每递增一个数字则代表扫描深度 +1。 78 | - 默认名称:导出文本的默认名称配置。 79 | 80 | ### 预览区配置 81 | 82 | - 注释格式化:填充注释的格式 83 | - 桥梁最短字符数:路径最长的地方,显示的桥梁字符数 84 | - 桥梁填充字符:输入一个单字节填充字符,比如:\*,\#,\$,\-,\@,\_ 等。 85 | - 始终显示桥梁:配置没有注释的地方是否显示桥梁。 86 | - 导出:设置好相关配置,编写好注释后,导出注释文件树形结构。 87 | 88 | ## 反馈渠道 89 | 90 | 如果你有任何意见或建议,欢迎通过以下方式与我联系: 91 | 92 | - 提交 [GitHub Issue](https://github.com/itchaox/annotree/issues) 93 | - Annotree 微信交流群 94 | 95 | > 欢迎添加微信群进行沟通~ 💗,在微信群中能够更加实时高效的沟通 96 | 97 | ![](/resources//wechat.jpg) 98 | 99 | ## 为何二次开发 100 | 101 | 1. folder-explorer 的某些功能对我来说不必要,显得有些冗余,且不符合我的使用习惯。 102 | 2. folder-explorer 需要导出后才能看到配置后的效果,我希望能够实现实时预览功能。 103 | 3. folder-explorer 中编辑备注时,每次都需右键打开编辑菜单,这种操作方式不够方便。 104 | 105 | ## 💗 赞助我 106 | 107 | - 如果 Annotree 对你有所帮助,欢迎赞助支持!☕️ 108 | - 你的每一份支持都将激励我不断改进 Annotree,为大家提供更好的 Annotree。非常感谢!🙏🏻 109 | - 如果暂时无法赞助,给个 Star ⭐ 也是对我莫大的支持! 110 | 111 |

赞助方式 🎉

112 | 爱发电 113 | 114 | ## Star 历史图表 ⭐️ 115 | 116 | [![Star History Chart](https://api.star-history.com/svg?repos=itchaox/annotree&type=Date)](https://star-history.com/#itchaox/annotree&Date) 117 | 118 | ## 致谢 119 | 120 | 1. 感谢 [electron-vite](https://github.com/alex8088/electron-vite) 提供的 electron 框架,大大提升我的开发效率。 121 | 2. 感谢 [md](https://github.com/doocs/md) 提供给我的 README.md 文档思路。 122 | 123 | ## 谁在使用 124 | 125 | > 如果你使用了本 Annotree 工具生成带注释的项目文件树形结构,并且希望在本项目 README 中展示你的项目,请到 [Discussions #2](https://github.com/itchaox/annotree/discussions/2) 留言。 126 | 127 | - [Annotree](https://github.com/itchaox/annotree) 128 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Annotree 3 |

4 |
5 |

6 | Annotree 7 |

8 |
9 |

A tool for generating annotated directory trees, greatly facilitating the writing of technical documentation

10 |

11 | version 12 | license 13 |

14 |

15 | 中文 | 16 | English 17 |

18 | 19 | ## Project Introduction 20 | 21 | > This project is based on [folder-explorer](https://github.com/d2-projects/folder-explorer) and has been further developed. Thanks to [FairyEver](https://github.com/FairyEver) for the creativity and contribution! 22 | 23 | This is my first official open-source project. If it helps you, please Star ⭐️ and share it with your friends. It means a lot to me, thank you 💗! 24 | 25 | Official documentation: https://annotree.com 26 | 27 | **For the latest version download, please visit [Github Release](https://github.com/itchaox/annotree/releases)** 28 | 29 | ## Preview 🎉 30 | 31 | ![demo](/resources/demo-en.gif) 32 | 33 | ## Project Structure 📇 34 | 35 | ![](/resources//Project%20Structure.jpeg) 36 | 37 | ## Feedback Channels 38 | 39 | The project is currently in the MVP (Minimum Viable Product) stage. If you have any opinions or suggestions, please feel free to contact me through the following ways: 40 | 41 | - Submit a [GitHub Issue](https://github.com/itchaox/annotree/issues) 42 | 43 | ## Why Further Development 44 | 45 | 1. Some features of folder-explorer were redundant for me and didn't fit my usage habits. 46 | 2. In folder-explorer, you need to export to see the configuration effect each time, which I found inconvenient. I wanted real-time preview. 47 | 3. When editing notes in folder-explorer, you need to right-click to open the edit note menu each time, which I personally found not very convenient. 48 | 49 | ## Features 50 | 51 | 1. ✨ Real-time preview: View the annotated file tree effect in real-time without exporting text, making document writing more intuitive and efficient. 52 | 2. 🖊 Convenient annotation: Easily write annotations by switching input boxes, avoiding cumbersome right-click menu operations and improving efficiency. 53 | 3. 🚫 File and folder ignoring: Support ignoring specific folders and file types, ensuring only the file structure you need is displayed, keeping the file tree concise. 54 | 4. 📂 Automatic opening of exported files: Automatically open files after exporting, no need to manually search for files, saving time and making the workflow smoother. 55 | 56 | ## Feature Introduction 57 | 58 | - After clicking the scan button, open the file selector, choose the folder you want to scan, and start scanning. 59 | 60 | ### Global Configuration 61 | 62 | - Automatically open files: automatically open files after exporting. 63 | - Ignore folders: ignore folders that do not need to be scanned to avoid performance loss or even program unresponsiveness, such as the node_modules folder, which is automatically ignored by the program. 64 | - Ignore folders starting with ".": These folders are hidden by default on MacOS and Linux. 65 | - Scan only folders: ignore all files and only scan folders. 66 | - Ignore files starting with ".": These files are hidden by default on MacOS and Linux. 67 | - Ignore file types: you can choose to ignore unnecessary file types to improve scanning efficiency. 68 | - Scan depth: set the depth of the scan directory, 0 means all depths, and each increment represents a scan depth +1. 69 | - Default name: the default name configuration for exported text. 70 | 71 | ### Preview area configuration 72 | 73 | - Annotation formatting: the format of the fill annotation 74 | - Minimum number of bridge characters: the number of bridge characters displayed at the longest path 75 | - Bridge fill character: enter a single-byte fill character, such as: \*, \#, \$, \-, \@, \_, etc. 76 | - Always show bridges: configure whether to show bridges where there are no comments. 77 | - Export: set the relevant configuration, write the comments, and export the annotation file tree structure. 78 | 79 | ## 💗 Sponsor 80 | 81 | - If Annotree is helpful to you, welcome to support us! ☕️ 82 | - Every bit of your support will motivate me to continuously improve Annotree and provide you with a better Annotree. Thank you very much! 🙏🏻 83 | - If you are unable to support us for the time being, giving a Star ⭐ is also a great support to me! 84 | 85 |

Sponsorship 🎉

86 | afdian qrcode 87 | 88 | ## Star History Chart ⭐️ 89 | 90 | [![Star History Chart](https://api.star-history.com/svg?repos=itchaox/annotree&type=Date)](https://star-history.com/#itchaox/annotree&Date) 91 | 92 | ## Acknowledgements 93 | 94 | 1. Thanks to [electron-vite](https://github.com/alex8088/electron-vite) for providing the electron framework, which greatly improved my development efficiency. 95 | 2. Thanks to [md](https://github.com/doocs/md) for providing me with README.md document ideas. 96 | 97 | ## Who's Using It 98 | 99 | If you've used the Annotree tool to generate an annotated project file tree structure and would like to showcase your project in this README, please leave a message at [Discussions #2](https://github.com/itchaox/annotree/discussions/2). 100 | 101 | - [Annotree](https://github.com/itchaox/annotree) 102 | -------------------------------------------------------------------------------- /build/entitlements.mac.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.cs.allow-jit 6 | 7 | com.apple.security.cs.allow-unsigned-executable-memory 8 | 9 | com.apple.security.cs.allow-dyld-environment-variables 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /build/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/build/icon.ico -------------------------------------------------------------------------------- /build/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/build/icon.png -------------------------------------------------------------------------------- /build/icon_1024x1024.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/build/icon_1024x1024.icns -------------------------------------------------------------------------------- /build/icon_128x128.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/build/icon_128x128.icns -------------------------------------------------------------------------------- /build/icon_16x16.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/build/icon_16x16.icns -------------------------------------------------------------------------------- /build/icon_32x32.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/build/icon_32x32.icns -------------------------------------------------------------------------------- /build/icon_512x512.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/build/icon_512x512.icns -------------------------------------------------------------------------------- /build/icon_64x64.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/build/icon_64x64.icns -------------------------------------------------------------------------------- /dev-app-update.yml: -------------------------------------------------------------------------------- 1 | provider: generic 2 | url: https://example.com/auto-updates 3 | updaterCacheDirName: electron-app-updater 4 | -------------------------------------------------------------------------------- /electron-builder.yml: -------------------------------------------------------------------------------- 1 | appId: com.electron.app 2 | productName: Annotree 3 | directories: 4 | buildResources: build 5 | files: 6 | - '!**/.vscode/*' 7 | - '!src/*' 8 | - '!electron.vite.config.{js,ts,mjs,cjs}' 9 | - '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}' 10 | - '!{.env,.env.*,.npmrc,pnpm-lock.yaml}' 11 | - '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}' 12 | asarUnpack: 13 | - resources/** 14 | win: 15 | icon: build/icon.ico 16 | executableName: Annotree 17 | target: 18 | - target: nsis 19 | arch: 20 | - x64 21 | nsis: 22 | artifactName: ${name}-${version}-setup.${ext} 23 | shortcutName: ${productName} 24 | uninstallDisplayName: ${productName} 25 | createDesktopShortcut: always 26 | oneClick: false # 允许用户选择安装路径 27 | allowToChangeInstallationDirectory: true # 允许用户更改安装路径 28 | mac: 29 | icon: build/icon.icns 30 | entitlementsInherit: build/entitlements.mac.plist 31 | extendInfo: 32 | - NSCameraUsageDescription: Application requests access to the device's camera. 33 | - NSMicrophoneUsageDescription: Application requests access to the device's microphone. 34 | - NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. 35 | - NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. 36 | notarize: false 37 | target: 38 | - target: dmg 39 | arch: 40 | - x64 # Intel 芯片 41 | - target: dmg 42 | arch: 43 | - arm64 # Apple Silicon (M1/M2) 芯片 44 | dmg: 45 | artifactName: ${name}-${version}-${arch}.${ext} 46 | linux: 47 | target: 48 | - AppImage 49 | # - snap 50 | # - deb 51 | maintainer: Wang Chao 52 | category: Utility 53 | appImage: 54 | artifactName: ${name}-${version}.${ext} 55 | npmRebuild: false 56 | publish: 57 | provider: generic 58 | url: https://example.com/auto-updates 59 | electronDownload: 60 | mirror: https://npmmirror.com/mirrors/electron/ 61 | -------------------------------------------------------------------------------- /electron.vite.config.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-07-06 11:28 5 | * @LastAuthor : itchaox 6 | * @LastTime : 2024-08-14 22:14 7 | * @desc : 8 | */ 9 | import { resolve } from 'path' 10 | import { defineConfig, externalizeDepsPlugin } from 'electron-vite' 11 | import vue from '@vitejs/plugin-vue' 12 | import AutoImport from 'unplugin-auto-import/vite' 13 | import Components from 'unplugin-vue-components/vite' 14 | import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' 15 | 16 | export default defineConfig({ 17 | main: { 18 | plugins: [externalizeDepsPlugin()] 19 | }, 20 | preload: { 21 | plugins: [externalizeDepsPlugin()], 22 | build: { 23 | outDir: 'out/preload' 24 | } 25 | }, 26 | renderer: { 27 | server: { 28 | port: 4396 29 | }, 30 | resolve: { 31 | alias: { 32 | '@renderer': resolve('src/renderer/src'), 33 | '@': resolve('./') 34 | } 35 | }, 36 | plugins: [ 37 | vue(), 38 | AutoImport({ 39 | resolvers: [ElementPlusResolver()] 40 | }), 41 | Components({ 42 | resolvers: [ElementPlusResolver()] 43 | }) 44 | ] 45 | } 46 | }) 47 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Annotree", 3 | "version": "0.2.4", 4 | "description": "A tool designed to assist in generating annotated folder trees", 5 | "main": "./out/main/index.js", 6 | "author": "Wang Chao", 7 | "homepage": "https://github.com/itchaox/annotree", 8 | "scripts": { 9 | "format": "prettier --write .", 10 | "lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.vue --fix", 11 | "typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false", 12 | "typecheck:web": "vue-tsc --noEmit -p tsconfig.web.json --composite false", 13 | "typecheck": "npm run typecheck:node && npm run typecheck:web", 14 | "start": "electron-vite preview", 15 | "dev": "electron-vite dev -w", 16 | "build": "electron-vite build", 17 | "postinstall": "electron-builder install-app-deps", 18 | "build:unpack": "npm run build && electron-builder --dir", 19 | "build:win": "npm run build && electron-builder --win --config", 20 | "build:mac": "npm run build && electron-builder --mac --config", 21 | "build:linux": "npm run build && electron-builder --linux", 22 | "build:all": "npm run build && npm run build:mac && npm run build:win && npm run build:linux" 23 | }, 24 | "dependencies": { 25 | "@electron-toolkit/preload": "^3.0.0", 26 | "@electron-toolkit/utils": "^3.0.0" 27 | }, 28 | "devDependencies": { 29 | "@electron-toolkit/eslint-config": "^1.0.2", 30 | "@electron-toolkit/eslint-config-ts": "^2.0.0", 31 | "@electron-toolkit/tsconfig": "^1.0.1", 32 | "electron": "^31.0.2", 33 | "electron-builder": "^24.13.3", 34 | "@element-plus/icons-vue": "^2.3.1", 35 | "@iconify/vue": "^4.1.2", 36 | "@rushstack/eslint-patch": "^1.10.3", 37 | "@types/node": "^20.14.8", 38 | "@vitejs/plugin-vue": "^5.0.5", 39 | "@vue/eslint-config-prettier": "^9.0.0", 40 | "@vue/eslint-config-typescript": "^13.0.0", 41 | "canvas-confetti": "^1.9.3", 42 | "dayjs": "^1.11.11", 43 | "electron-updater": "^6.1.7", 44 | "electron-vite": "^2.3.0", 45 | "element-plus": "^2.7.6", 46 | "emoji-mart-vue-fast": "^15.0.2", 47 | "eslint": "^8.57.0", 48 | "eslint-plugin-vue": "^9.26.0", 49 | "html2canvas": "^1.4.1", 50 | "ignore": "^5.3.1", 51 | "lodash": "^4.17.21", 52 | "normalize.css": "^8.0.1", 53 | "pinia": "^2.1.7", 54 | "pinia-plugin-persistedstate": "^3.2.1", 55 | "prettier": "^3.3.2", 56 | "sass": "^1.77.6", 57 | "string-width": "^4.2.3", 58 | "typescript": "^5.5.2", 59 | "unplugin-auto-import": "^0.17.6", 60 | "unplugin-vue-components": "^0.27.2", 61 | "vite": "^5.3.1", 62 | "vue": "^3.4.30", 63 | "vue-clipboard3": "^2.0.0", 64 | "vue-i18n": "^9.13.1", 65 | "vue-tsc": "^2.0.22", 66 | "vue-virtual-scroller": "2.0.0-beta.8" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /resources/Project Structure.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/resources/Project Structure.jpeg -------------------------------------------------------------------------------- /resources/demo-en.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/resources/demo-en.gif -------------------------------------------------------------------------------- /resources/demo-zh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/resources/demo-zh.gif -------------------------------------------------------------------------------- /resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/resources/icon.png -------------------------------------------------------------------------------- /resources/love.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/resources/love.png -------------------------------------------------------------------------------- /resources/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/resources/wechat.jpg -------------------------------------------------------------------------------- /src/main/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-07-06 11:28 5 | * @LastAuthor : itchaox 6 | * @LastTime : 2024-08-03 00:59 7 | * @desc : 8 | */ 9 | import { app, shell, BrowserWindow, ipcMain, dialog } from 'electron' 10 | import { join } from 'path' 11 | import { electronApp, optimizer, is } from '@electron-toolkit/utils' 12 | import icon from '../../resources/icon.png?asset' 13 | import fs from 'fs' 14 | 15 | function createWindow(): void { 16 | // FIXME 创建窗口 17 | const mainWindow = new BrowserWindow({ 18 | width: 900, 19 | height: 670, 20 | minWidth: 700, // Set the minimum width 21 | minHeight: 600, // Set the minimum height 22 | show: false, 23 | autoHideMenuBar: true, 24 | ...(process.platform === 'linux' ? { icon } : {}), 25 | webPreferences: { 26 | preload: join(__dirname, '../preload/index.js'), 27 | sandbox: false 28 | } 29 | }) 30 | 31 | mainWindow.on('ready-to-show', () => { 32 | mainWindow.show() 33 | }) 34 | 35 | mainWindow.webContents.setWindowOpenHandler((details) => { 36 | shell.openExternal(details.url) 37 | return { action: 'deny' } 38 | }) 39 | 40 | // 根据 electron-vite cli 进行渲染器的 HMR。 41 | // 在开发模式下加载远程 URL,生产模式下加载本地 HTML 文件。 42 | if (is.dev && process.env['ELECTRON_RENDERER_URL']) { 43 | mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL']) 44 | } else { 45 | mainWindow.loadFile(join(__dirname, '../renderer/index.html')) 46 | } 47 | 48 | // 仅在开发环境下默认打开控制台 49 | if (process.env.NODE_ENV === 'development') { 50 | mainWindow.webContents.openDevTools() 51 | } 52 | } 53 | 54 | // 当 Electron 初始化完成并准备好创建浏览器窗口时将调用此方法。 55 | // 某些 API 只能在此事件发生后使用。 56 | app.whenReady().then(() => { 57 | // 为 Windows 设置应用程序用户模型 ID 58 | electronApp.setAppUserModelId('com.electron') 59 | 60 | // 在开发环境下默认通过 F12 打开或关闭开发者工具, 61 | // 在生产环境下忽略 CommandOrControl + R 的刷新命令。 62 | // 参见 https://github.com/alex8088/electron-toolkit/tree/master/packages/utils 63 | app.on('browser-window-created', (_, window) => { 64 | optimizer.watchWindowShortcuts(window) 65 | }) 66 | 67 | // FIXME 主进程,所以在终端打印信息 68 | // 渲染进程请求选择扫描的文件夹 69 | ipcMain.on('IPC_FOLDER_SELECT', async (event) => { 70 | const window = BrowserWindow.getFocusedWindow() 71 | const result = await dialog.showOpenDialog(window as any, { 72 | // 'openDirectory':允许用户选择文件夹 73 | // 'createDirectory':允许用户在对话框中创建新文件夹 74 | 75 | properties: ['openDirectory', 'createDirectory'] 76 | }) 77 | 78 | // 检查用户是否点击了确认按钮 79 | const isDialogConfirmed = !result.canceled 80 | 81 | // 如果用户点击了确认按钮,发送选中的文件夹路径 82 | if (isDialogConfirmed) { 83 | const selectedFolderPath = result.filePaths[0] 84 | event.reply('IPC_FOLDER_SELECT_REPLY', selectedFolderPath) 85 | } 86 | }) 87 | 88 | /** 89 | * 渲染进程请求选择保存结果的目录 90 | */ 91 | ipcMain.on('IPC_EXPORT', async (event, { name, value, openAfterExport, isEggshell }) => { 92 | const window = BrowserWindow.getFocusedWindow() 93 | const result = await dialog.showSaveDialog(window as any, { 94 | defaultPath: name 95 | }) 96 | 97 | // 点击确定按钮 98 | if (result.canceled === false) { 99 | await fs.writeFileSync(result.filePath, new Uint8Array(Buffer.from(value))) 100 | if (openAfterExport) { 101 | // 导出后直接打开文件 102 | shell.openPath(result.filePath).then((result) => { 103 | if (result) { 104 | console.error('Error opening URL:', result) 105 | } 106 | }) 107 | } 108 | 109 | event.reply('IPC_EXPORT_REPLY', { 110 | isEggshell 111 | }) 112 | } 113 | }) 114 | 115 | ipcMain.handle('get-system-language', () => { 116 | return app.getLocale() 117 | }) 118 | 119 | createWindow() 120 | 121 | app.on('activate', function () { 122 | // 在 macOS 上,当单击 dock 图标并且没有其他窗口打开时, 123 | // 重新创建一个窗口是常见的行为。 124 | if (BrowserWindow.getAllWindows().length === 0) createWindow() 125 | }) 126 | }) 127 | 128 | // 当所有窗口关闭时退出应用程序,但在 macOS 上除外。 129 | // 在 macOS 上,应用程序及其菜单栏通常会保持活动状态,直到用户使用 Cmd + Q 显式退出。 130 | app.on('window-all-closed', () => { 131 | if (process.platform !== 'darwin') { 132 | app.quit() 133 | } 134 | }) 135 | 136 | // 在这个文件中,您可以包含其余应用程序特定主进程代码。 137 | // 您也可以将它们放在单独的文件中,并在此处引入它们。 138 | -------------------------------------------------------------------------------- /src/preload/index.d.ts: -------------------------------------------------------------------------------- 1 | import { ElectronAPI } from '@electron-toolkit/preload' 2 | 3 | declare global { 4 | interface Window { 5 | electron: ElectronAPI 6 | api: unknown 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/preload/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-07-06 11:28 5 | * @LastAuthor : Wang Chao 6 | * @LastTime : 2024-11-12 17:14 7 | * @desc : 8 | */ 9 | 10 | // @ts-nocheck 全局属性 11 | 12 | import { contextBridge, ipcRenderer } from 'electron' 13 | import { electronAPI } from '@electron-toolkit/preload' 14 | import path from 'path' 15 | import width from 'string-width' 16 | 17 | import scan from '../renderer/src/utils/scan.js' 18 | import translateFlat from '../renderer/src/utils/translate.flat.js' 19 | 20 | import { replace as elementReplace } from '../renderer/src/utils/replace.element.js' 21 | import { replace as noteReplace } from '../renderer/src/utils/replace.note.js' 22 | import { replace as nameReplace } from '../renderer/src/utils/replace.fileName.js' 23 | 24 | import { quickBurstConfetti } from '../renderer/src/utils/quickBurstConfetti.js' 25 | 26 | /** 27 | * 根据 isShow 和 isShowElements 过滤数据 28 | * @param {Array} elements 需要过滤的原数组 29 | */ 30 | function showFilter(els) { 31 | return els 32 | .filter((el) => el.isShow) 33 | .map((el) => ({ 34 | ...el, 35 | elements: el.isShowElements ? showFilter(el.elements) : [] 36 | })) 37 | } 38 | 39 | const TREE_TEXT = { 40 | // 文件名 41 | FILE_NAME: 'Annotree [ {YYYY}-{MM}-{DD} {HH}:{mm}:{ss} ]', 42 | // 元素格式化 43 | ELEMENT_FORMAT: '{tree}{name}{ext}', 44 | // 备注格式化 45 | NOTE_FORMAT: '// {note}', 46 | // 桥梁最短 47 | BRIDGE_MIN: 4, 48 | // 桥梁填充 49 | BRIDGE_CELL: '-', 50 | // 始终显示桥梁 51 | BRIDGE_ALWAYS: false, 52 | // 右侧对齐 53 | FLOAT_RIGHT: false 54 | } 55 | 56 | // 自定义 api 用于渲染 57 | const api = { 58 | localStorage: { 59 | setItem: (key, value) => window.localStorage.setItem(key, value), 60 | getItem: (key) => window.localStorage.getItem(key), 61 | removeItem: (key) => window.localStorage.removeItem(key), 62 | clear: () => window.localStorage.clear() 63 | }, 64 | // 获取系统语言 65 | getSystemLanguage: () => ipcRenderer.invoke('get-system-language'), 66 | // 扫描函数 67 | IPC_FOLDER_SELECT: (params) => { 68 | const _params = JSON.parse(params) 69 | 70 | return new Promise((resolve) => { 71 | ipcRenderer.send('IPC_FOLDER_SELECT') 72 | 73 | ipcRenderer.once('IPC_FOLDER_SELECT_REPLY', async (event, arg) => { 74 | // FIXME 此处配置扫描相关的参数 75 | const res = await scan({ 76 | folderPath: arg, 77 | // 默认自动忽略 node_modules 文件夹 78 | ignorePath: [ 79 | ...['node_modules', '.git'].map((e) => path.sep + e), 80 | ..._params.ignoreFolderList 81 | ], 82 | ignoreExt: _params.ignoreFileList, 83 | ignoreFile: _params.onlyScanFolder, 84 | ignoreDotStartFile: _params.ignoreDotFile, 85 | ignoreDotStartFolder: _params.ignoreDotFolder, 86 | deep: _params.scanDeep 87 | }) 88 | 89 | // 为扫描结果的每一项增加固定索引 90 | function addIndex(elements) { 91 | return elements.map((e, index) => ({ 92 | index, 93 | ...e, 94 | elements: addIndex(e.elements) 95 | })) 96 | } 97 | 98 | const data = addIndex(res) 99 | 100 | const flatData = translateFlat({ 101 | data: showFilter(data), 102 | notes: [] 103 | }) 104 | 105 | resolve({ 106 | noFlatData: data, 107 | flatData, 108 | folderPath: arg 109 | }) 110 | }) 111 | }) 112 | }, 113 | 114 | // 导出文本 115 | EXPORT_TREE_TEXT: (data, params) => { 116 | EXPORT_TREE_TEXT(JSON.parse(data), JSON.parse(params)) 117 | } 118 | 119 | // 扫描结果回调 120 | } 121 | 122 | /** 123 | * 导出 [ 树形文本 ] 124 | */ 125 | function EXPORT_TREE_TEXT(data, params) { 126 | // 设置 127 | const setting = TREE_TEXT 128 | // 开始处理 129 | let result = data 130 | 131 | // 获取最大宽度 132 | function getMaxWidth(result) { 133 | // 右边对齐 134 | if (params?.isRight) { 135 | // 计算result中每个对象的element属性的最大宽度 136 | const elementLengthMax = result.reduce( 137 | (max, { element }) => (width(element) > max ? width(element) : max), 138 | 0 139 | ) 140 | 141 | // 计算result中每个对象的note属性的最大宽度 142 | const noteLengthMax = result.reduce( 143 | (max, { note }) => (width(note) > max ? width(note) : max), 144 | 0 145 | ) 146 | 147 | // 返回element和note最大宽度之和 148 | return elementLengthMax + noteLengthMax 149 | } else { 150 | // 左对齐 151 | // 计算result中每个对象的element属性的最大宽度 152 | return result.reduce((max, { element }) => { 153 | const length = width(element) 154 | return length > max ? length : max 155 | }, 0) 156 | } 157 | } 158 | 159 | // 生成合适的桥梁 160 | function bridgeAuto({ element, note }, max) { 161 | if (note !== '' || params?.showBridge) { 162 | let length = params?.minBridge 163 | if (params?.isRight) { 164 | length += max - width(`${element}${note}`) 165 | } else { 166 | length += max - width(element) 167 | } 168 | 169 | return params?.bridgeChar.repeat(length) 170 | } 171 | 172 | return '' 173 | } 174 | 175 | // 第一步 转换 element 和 note 176 | result = result.map((item) => { 177 | const element = elementReplace('{tree}{name}{ext}', { 178 | data: item 179 | }) 180 | const bridge = '' 181 | 182 | const note = item.note 183 | ? noteReplace(params.noteFormat, { 184 | data: item 185 | }) 186 | : '' 187 | return { element, bridge, note } 188 | }) 189 | 190 | // 计算最大宽度 191 | const max = getMaxWidth(result) 192 | 193 | // 补齐桥梁 194 | result = result.map((item) => ({ ...item, bridge: bridgeAuto(item, max) })) 195 | 196 | // 转换为字符串 197 | result = result.map((e) => `${e.element}${e.bridge}${e.note}`) 198 | 199 | let value = result.join('\n') 200 | // FIXME 是否显示代码块 201 | if (params?.showCodeBlock) { 202 | value = '```\n' + value + '\n```' 203 | } 204 | 205 | // 导出 206 | ipcRenderer.send('IPC_EXPORT', { 207 | name: `${nameReplace(params.defaultFileName)}.txt`, 208 | value, 209 | openAfterExport: params.autoOpenFile, 210 | isEggshell: params?.isEggshell 211 | // openFolderAfterExport: params.autoOpenFolder 212 | }) 213 | } 214 | 215 | // 导出后回调 216 | ipcRenderer.on('IPC_EXPORT_REPLY', (event, response) => { 217 | if (response?.isEggshell) { 218 | // 导出后彩带 219 | quickBurstConfetti() 220 | } 221 | }) 222 | 223 | // 仅当启用上下文隔离时使用 `contextBridge` API 将 Electron API 暴露给渲染进程,否则直接添加到 DOM 全局对象。 224 | if (process.contextIsolated) { 225 | // FIXME 现在走这里 226 | try { 227 | contextBridge.exposeInMainWorld('electron', electronAPI) 228 | contextBridge.exposeInMainWorld('api', api) 229 | } catch (error) { 230 | console.error(error) 231 | } 232 | } else { 233 | window.electron = electronAPI 234 | window.api = api 235 | } 236 | -------------------------------------------------------------------------------- /src/renderer/auto-imports.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | /* prettier-ignore */ 3 | // @ts-nocheck 4 | // noinspection JSUnusedGlobalSymbols 5 | // Generated by unplugin-auto-import 6 | export {} 7 | declare global { 8 | const ElMessage: typeof import('element-plus/es')['ElMessage'] 9 | } 10 | -------------------------------------------------------------------------------- /src/renderer/components.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // @ts-nocheck 3 | // Generated by unplugin-vue-components 4 | // Read more: https://github.com/vuejs/core/pull/3399 5 | export {} 6 | 7 | /* prettier-ignore */ 8 | declare module 'vue' { 9 | export interface GlobalComponents { 10 | ElButton: typeof import('element-plus/es')['ElButton'] 11 | ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] 12 | ElDialog: typeof import('element-plus/es')['ElDialog'] 13 | ElDrawer: typeof import('element-plus/es')['ElDrawer'] 14 | ElIcon: typeof import('element-plus/es')['ElIcon'] 15 | ElInput: typeof import('element-plus/es')['ElInput'] 16 | ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] 17 | ElLink: typeof import('element-plus/es')['ElLink'] 18 | ElOption: typeof import('element-plus/es')['ElOption'] 19 | ElOptionGroup: typeof import('element-plus/es')['ElOptionGroup'] 20 | ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] 21 | ElSelect: typeof import('element-plus/es')['ElSelect'] 22 | ElSwitch: typeof import('element-plus/es')['ElSwitch'] 23 | ElTabPane: typeof import('element-plus/es')['ElTabPane'] 24 | ElTabs: typeof import('element-plus/es')['ElTabs'] 25 | ElTooltip: typeof import('element-plus/es')['ElTooltip'] 26 | MainPage: typeof import('./src/components/MainPage.vue')['default'] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/renderer/index.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | Annotree 14 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/renderer/src/App.vue: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | 18 | -------------------------------------------------------------------------------- /src/renderer/src/assets/base.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | -------------------------------------------------------------------------------- /src/renderer/src/assets/images/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/src/renderer/src/assets/images/icon-128.png -------------------------------------------------------------------------------- /src/renderer/src/assets/images/icon-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/src/renderer/src/assets/images/icon-96.png -------------------------------------------------------------------------------- /src/renderer/src/assets/images/noData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itchaox/annotree/5d3988e22080e194ea474b889f685fa2f27bde82/src/renderer/src/assets/images/noData.png -------------------------------------------------------------------------------- /src/renderer/src/assets/main.css: -------------------------------------------------------------------------------- 1 | @import './base.css'; 2 | 3 | body { 4 | width: 100%; 5 | height: 100%; 6 | } 7 | 8 | #app { 9 | width: 100%; 10 | height: 100%; 11 | } 12 | -------------------------------------------------------------------------------- /src/renderer/src/components/MainPage.vue: -------------------------------------------------------------------------------- 1 | 9 | 17 | 988 | 989 | 1814 | 1815 | 2064 | -------------------------------------------------------------------------------- /src/renderer/src/constants/constants.js: -------------------------------------------------------------------------------- 1 | // 忽略文件类型列表 2 | export const extList = [ 3 | { 4 | // 常见编程语言和web开发文件 5 | label: '编程语言', 6 | options: [ 7 | '.js', 8 | '.ts', 9 | '.py', 10 | '.html', 11 | '.css', 12 | '.java', 13 | '.php', 14 | '.jsx', 15 | '.tsx', 16 | '.json', 17 | '.xml', 18 | '.c', 19 | '.cpp', 20 | '.cs', 21 | '.go', 22 | '.rb', 23 | '.sql', 24 | '.vue', 25 | '.scss', 26 | '.less', 27 | '.sass' 28 | ] 29 | }, 30 | 31 | { 32 | label: '文档和数据', 33 | options: [ 34 | // 常见文档和数据文件 35 | '.txt', 36 | '.pdf', 37 | '.doc', 38 | '.docx', 39 | '.xls', 40 | '.xlsx', 41 | '.csv', 42 | '.md' 43 | ] 44 | }, 45 | 46 | { 47 | label: '图像', 48 | options: [ 49 | // 常见图像文件 50 | '.jpg', 51 | '.jpeg', 52 | '.png', 53 | '.gif', 54 | '.svg', 55 | '.webp', 56 | '.bmp', 57 | '.ico' 58 | ] 59 | }, 60 | 61 | { 62 | label: '音视频', 63 | options: [ 64 | // 音频和视频文件 65 | '.mp3', 66 | '.mp4', 67 | '.wav', 68 | '.avi', 69 | '.mov', 70 | '.mkv', 71 | '.flv', 72 | '.webm' 73 | ] 74 | }, 75 | 76 | { 77 | label: '压缩和打包', 78 | options: [ 79 | // 压缩和打包文件 80 | '.zip', 81 | '.rar', 82 | '.7z', 83 | '.tar', 84 | '.gz' 85 | ] 86 | }, 87 | 88 | { 89 | label: '可执行文件和应用程序', 90 | options: [ 91 | // 可执行文件和应用程序 92 | '.exe', 93 | '.apk', 94 | '.app', 95 | '.msi', 96 | '.dmg' 97 | ] 98 | }, 99 | 100 | { 101 | label: '配置和系统文件', 102 | options: [ 103 | // 配置和系统文件 104 | '.ini', 105 | '.config', 106 | '.yml', 107 | '.yaml', 108 | '.env', 109 | '.bat', 110 | '.sh' 111 | ] 112 | }, 113 | 114 | { 115 | label: '字体', 116 | options: [ 117 | // 字体文件 118 | '.ttf', 119 | '.otf', 120 | '.woff', 121 | '.woff2' 122 | ] 123 | }, 124 | 125 | { 126 | label: '3D和设计', 127 | options: [ 128 | // 3D和设计文件 129 | '.psd', 130 | '.ai', 131 | '.eps', 132 | '.indd' 133 | ] 134 | }, 135 | 136 | { 137 | label: '其它', 138 | options: [ 139 | // 其他文件类型(按字母顺序) 140 | '.3dm', 141 | '.3ds', 142 | '.3g2', 143 | '.3gp', 144 | '.aac', 145 | '.aep', 146 | '.aif', 147 | '.asf', 148 | '.asm', 149 | '.asp', 150 | '.aspx', 151 | '.bak', 152 | '.bin', 153 | '.bz2', 154 | '.cab', 155 | '.cbr', 156 | '.cc', 157 | '.cdr', 158 | '.cgi', 159 | '.class', 160 | '.coffee', 161 | '.com', 162 | '.cxx', 163 | '.dart', 164 | '.db', 165 | '.deb', 166 | '.dll', 167 | '.dng', 168 | '.dot', 169 | '.dotx', 170 | '.dwg', 171 | '.dxf', 172 | '.ejs', 173 | '.elf', 174 | '.emacs', 175 | '.epub', 176 | '.f4v', 177 | '.fbx', 178 | '.fla', 179 | '.flac', 180 | '.fnt', 181 | '.fon', 182 | '.fs', 183 | '.gadget', 184 | '.gam', 185 | '.groovy', 186 | '.h', 187 | '.h264', 188 | '.hpp', 189 | '.hxx', 190 | '.ics', 191 | '.img', 192 | '.inf', 193 | '.iso', 194 | '.jar', 195 | '.key', 196 | '.kml', 197 | '.kt', 198 | '.log', 199 | '.lua', 200 | '.m', 201 | '.m3u', 202 | '.m4a', 203 | '.m4v', 204 | '.matlab', 205 | '.mpeg', 206 | '.mpg', 207 | '.nfo', 208 | '.numbers', 209 | '.odt', 210 | '.ogg', 211 | '.p12', 212 | '.p7b', 213 | '.p7c', 214 | '.pages', 215 | '.pem', 216 | '.pfx', 217 | '.pl', 218 | '.pkg', 219 | '.pm', 220 | '.ppt', 221 | '.pptx', 222 | '.ps1', 223 | '.r', 224 | '.reg', 225 | '.rm', 226 | '.rpm', 227 | '.rss', 228 | '.rtf', 229 | '.sav', 230 | '.scala', 231 | '.shtml', 232 | '.swift', 233 | '.swf', 234 | '.swp', 235 | '.sys', 236 | '.t', 237 | '.tbz2', 238 | '.tcl', 239 | '.tgz', 240 | '.tif', 241 | '.tiff', 242 | '.tmp', 243 | '.torrent', 244 | '.vb', 245 | '.vbs', 246 | '.vcd', 247 | '.vcf', 248 | '.vim', 249 | '.vob', 250 | '.wma', 251 | '.wmv', 252 | '.xhtml', 253 | '.xpi', 254 | '.xvid' 255 | ] 256 | } 257 | ] 258 | 259 | // 日语: ja 260 | // 西班牙语: es 261 | // 法语: fr 262 | // 德语: de 263 | // 韩语: ko 264 | // 俄语: ru 265 | // 葡萄牙语: pt 266 | // 意大利语: it 267 | // 中文: zh 268 | // 英文: en 269 | 270 | // 语言列表 271 | export const languageList = [ 272 | // { 273 | // id: 'system', 274 | // name: t('gen-sui-xi-tong') 275 | // }, 276 | { 277 | id: 'en', 278 | name: 'English' 279 | }, 280 | { 281 | id: 'zh', 282 | name: '简体中文' 283 | } 284 | 285 | // FIXME 暂时只支持中文和英文,后续项目稳定,再支持其他语言 286 | // { 287 | // id: 'es', 288 | // name: 'Español' 289 | // }, 290 | // { 291 | // id: 'fr', 292 | // name: 'Français' 293 | // }, 294 | // { 295 | // id: 'de', 296 | // name: 'Deutsch' 297 | // }, 298 | // { 299 | // id: 'ko', 300 | // name: '한국인' 301 | // }, 302 | // { 303 | // id: 'ru', 304 | // name: 'Русский' 305 | // }, 306 | // { 307 | // id: 'pt', 308 | // name: 'Português' 309 | // }, 310 | // { 311 | // id: 'it', 312 | // name: 'Italiano' 313 | // }, 314 | // { 315 | // id: 'ja', 316 | // name: '日本語' 317 | // } 318 | ] 319 | -------------------------------------------------------------------------------- /src/renderer/src/constants/fileIconMap.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : Wang Chao 4 | * @Date : 2024-08-23 18:24 5 | * @LastAuthor : Wang Chao 6 | * @LastTime : 2024-08-24 09:28 7 | * @desc : 8 | */ 9 | 10 | export const fileIconMap = { 11 | js: 'vscode-icons:file-type-js-official', 12 | mjs: 'vscode-icons:file-type-js-official', 13 | cjs: 'vscode-icons:file-type-js-official', 14 | ts: 'vscode-icons:file-type-typescript-official', 15 | vue: 'vscode-icons:file-type-vue', 16 | md: 'catppuccin:markdown', 17 | txt: 'icon-park:file-txt', 18 | 19 | png: 'flat-color-icons:image-file', 20 | gif: 'flat-color-icons:image-file', 21 | jpeg: 'flat-color-icons:image-file', 22 | jpg: 'flat-color-icons:image-file', 23 | tiff: 'flat-color-icons:image-file', 24 | tif: 'flat-color-icons:image-file', 25 | webp: 'flat-color-icons:image-file', 26 | svg: 'logos:svg', 27 | 28 | mp4: 'catppuccin:video', 29 | mp3: 'emojione-v1:music-ascend', 30 | 31 | jsx: 'vscode-icons:file-type-reactjs', 32 | tsx: 'vscode-icons:file-type-reactts', 33 | html: 'vscode-icons:file-type-html', 34 | css: 'vscode-icons:file-type-css', 35 | py: 'vscode-icons:file-type-python', 36 | java: 'vscode-icons:file-type-jar', 37 | cs: 'vscode-icons:file-type-csharp', 38 | cpp: 'vscode-icons:file-type-cpp2', 39 | h: 'vscode-icons:file-type-cpp2', 40 | rb: 'vscode-icons:file-type-ruby', 41 | php: 'vscode-icons:file-type-php', 42 | go: 'vscode-icons:file-type-go-lightblue', 43 | rs: 'vscode-icons:file-type-rust', 44 | kt: 'vscode-icons:file-type-kotlin', 45 | swift: 'vscode-icons:file-type-swift', 46 | dart: 'vscode-icons: file-type-dartlang', 47 | json: 'vscode-icons:file-type-light-json', 48 | yml: 'catppuccin:yaml', 49 | yaml: 'catppuccin:yaml' 50 | } 51 | -------------------------------------------------------------------------------- /src/renderer/src/constants/folderIconMap.js: -------------------------------------------------------------------------------- 1 | export const folderIconMap = { 2 | src: 'vscode-icons:folder-type-src-opened', 3 | view: 'vscode-icons:folder-type-view-opened', 4 | views: 'vscode-icons:folder-type-view-opened', 5 | util: 'catppuccin:folder-utils-open', 6 | utils: 'catppuccin:folder-utils-open', 7 | store: 'emojione-v1:department-store', 8 | stores: 'emojione-v1:department-store', 9 | public: 'vscode-icons:folder-type-public-opened', 10 | publics: 'vscode-icons:folder-type-public-opened', 11 | config: 'vscode-icons:folder-type-config-opened', 12 | configs: 'vscode-icons:folder-type-config-opened', 13 | test: 'vscode-icons:folder-type-test-opened', 14 | tests: 'vscode-icons:folder-type-test-opened', 15 | 16 | dist: 'vscode-icons:folder-type-dist-opened', 17 | build: 'vscode-icons:folder-type-dist-opened', 18 | out: 'vscode-icons:folder-type-dist-opened', 19 | 20 | docs: 'catppuccin:folder-docs-open', 21 | locales: 'vscode-icons:folder-type-locale-opened', 22 | locale: 'vscode-icons:folder-type-locale-opened', 23 | image: 'vscode-icons:folder-type-images-opened', 24 | images: 'vscode-icons:folder-type-images-opened', 25 | api: 'vscode-icons:folder-type-api-opened', 26 | serves: 'vscode-icons:folder-type-api-opened', 27 | serve: 'vscode-icons:folder-type-api-opened', 28 | asset: 'vscode-icons:folder-type-asset-opened', 29 | assets: 'vscode-icons:folder-type-asset-opened', 30 | style: 'vscode-icons:folder-type-style-opened', 31 | styles: 'vscode-icons:folder-type-style-opened', 32 | mock: 'vscode-icons:folder-type-mock-opened', 33 | mocks: 'vscode-icons:folder-type-mock-opened', 34 | router: 'vscode-icons:folder-type-route-opened', 35 | route: 'vscode-icons:folder-type-route-opened', 36 | routers: 'vscode-icons:folder-type-route-opened', 37 | routes: 'vscode-icons:folder-type-route-opened', 38 | component: 'vscode-icons:folder-type-component-opened', 39 | components: 'vscode-icons:folder-type-component-opened', 40 | constant: 'catppuccin:folder-constant-open', 41 | constants: 'catppuccin:folder-constant-open', 42 | module: 'vscode-icons:folder-type-module-opened', 43 | modules: 'vscode-icons:folder-type-module-opened' 44 | } 45 | -------------------------------------------------------------------------------- /src/renderer/src/constants/storageConst.js: -------------------------------------------------------------------------------- 1 | export const ANNOTREE_COMMON = 'annotree-common' 2 | export const ANNOTREE_SCAN = 'annotree-scan' 3 | export const ANNOTREE_EXPORT_CONFIG = 'annotree-exportConfig' 4 | export const ANNOTREE_EXPORT_PREVIEW = 'annotree-preview' 5 | export const ANNOTREE_NOTES = 'annotree-notes' 6 | -------------------------------------------------------------------------------- /src/renderer/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import type { DefineComponent } from 'vue' 5 | // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /src/renderer/src/locales/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "sao-miao": "Scannen", 3 | "quan-ju-pei-zhi": "Globale Konfiguration", 4 | "bian-ji-qu": "Bearbeitungsbereich", 5 | "zhong-zhi-shu-ju": "Daten zurücksetzen", 6 | "zhong-zhi-zhu-shi": "Kommentare zurücksetzen", 7 | "xuan-ze-biao-qing": "Emoji auswählen", 8 | "tong-yong": "Allgemein", 9 | "yu-yan": "Sprache", 10 | "zi-dong-da-kai-wen-jian": "Datei automatisch öffnen", 11 | "dao-chu-hou-zhan-shi-cai-dai": "Nach Export Konfetti anzeigen", 12 | "tong-bu-gun-dong": "Synchrones Scrollen", 13 | "xian-shi-tu-biao": "Icons anzeigen", 14 | "hu-lve-wen-jian-jia": "Ordner ignorieren", 15 | "hu-lve-yi-kai-tou-de-wen-jian-jia": "Ordner ignorieren, die mit \".\" beginnen", 16 | "zhi-sao-miao-wen-jian-jia": "Nur Ordner scannen", 17 | "hu-lve-yi-kai-tou-de-wen-jian": "Dateien ignorieren, die mit \".\" beginnen", 18 | "hu-lve-wen-jian-lei-xing": "Dateitypen ignorieren", 19 | "sao-miao-shen-du": "Scan-Tiefe", 20 | "dao-chu-wen-ben": "Text exportieren", 21 | "mo-ren-ming-cheng": "Standardname", 22 | "guan-yu": "Über", 23 | "dang-qian-ban-ben": "Aktuelle Version", 24 | "kai-fa-zhe": "Entwickler", 25 | "qi-ta-xin-xi": "Weitere Informationen", 26 | "kai-yuan": "Open Source", 27 | "github-di-zhi": "GitHub-Adresse", 28 | "guan-fang-wen-dang": "Offizielle Dokumentation", 29 | "gan-xie-star": ", danke für den Stern ⭐️", 30 | "dian-wo-cha-kan": "⚡️ Klicken Sie hier zum Anzeigen", 31 | "zong-ji-treedatalength": "Insgesamt {0}", 32 | "wen-jian-jia-foldernumber": "Ordner {0}", 33 | "wen-jian-filenumber": "Dateien {0}", 34 | "yu-lan-qu": "Vorschaubereich", 35 | "fu-zhi": "Kopieren", 36 | "dao-chu": "Exportieren", 37 | "yu-lan-pei-zhi": "Vorschau-Konfiguration", 38 | "zhu-shi-ge-shi-hua": "Kommentarformatierung", 39 | "qiao-liang-zui-duan-zi-fu-shu": "Minimale Zeichenanzahl für Brücke", 40 | "qiao-liang-tian-chong-zi-fu": "Füllzeichen für Brücke", 41 | "shi-zhong-xian-shi-qiao-liang": "Brücke immer anzeigen", 42 | "qing-shu-ru-mo-ren-ming-cheng": "Bitte Standardnamen eingeben", 43 | "qing-shu-ru-sao-miao-shen-du": "Bitte Scan-Tiefe eingeben", 44 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-jia": "Bitte zu ignorierende Ordner auswählen", 45 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-lei-xing": "Bitte zu ignorierende Dateitypen auswählen", 46 | "qing-xuan-ze-yu-yan": "Bitte Sprache auswählen", 47 | "qing-shu-ru-dan-zi-jie-tian-chong-zi-fu": "Bitte Ein-Byte-Füllzeichen eingeben", 48 | "qing-shu-ru-qiao-liang-zui-duan-zi-fu-shu": "Bitte minimale Zeichenanzahl für Brücke eingeben", 49 | "qing-shu-ru-ge-shi-hua-zi-fu-chuan": "Bitte Formatierungszeichenkette eingeben", 50 | "qing-shu-ru-zhu-shi": "Bitte Kommentar eingeben", 51 | "zhong-zhi-zhu-shi-cheng-gong": "Kommentare erfolgreich zurückgesetzt!", 52 | "zhong-zhi-shu-ju-cheng-gong": "Daten erfolgreich zurückgesetzt!", 53 | "yu-lan-qu-pei-zhi": "Konfiguration des Vorschaubereichs", 54 | "copySuccess": "Erfolgreich kopiert!", 55 | "sco-miao-mu-lu": "Verzeichnis scannen", 56 | "pei-zhi-ruan-jian-xian-shi-yu-yan": "Anzeigesprache der Software konfigurieren", 57 | "dao-chu-wen-jian-hou-zi-dong-da-kai": "Nach Export automatisch öffnen", 58 | "dao-chu-cheng-gong-hou-zi-dong-zhan-shi-cai-dan": "Nach erfolgreichem Export automatisch Konfetti anzeigen", 59 | "bian-ji-qu-he-yu-lan-qu-shi-fou-tong-bu-gun-dong": "Synchrones Scrollen zwischen Bearbeitungs- und Vorschaubereich", 60 | "shi-fou-xian-shi-wen-jian-jia-he-wen-jian-de-tu-biao": "Icons für Ordner und Dateien anzeigen", 61 | "hu-lve-bu-xu-yao-sao-miao-de-wen-jian-jia-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-jia-li-ru-macos-xia-wei-builddistwindows-xia-wei-builddist": "Ignorieren Sie nicht zu scannende Ordner, um die Scan-Effizienz zu erhöhen. Sie können zusätzliche zu filternde Ordner hinzufügen, z.B.: unter macOS /build, /dist, unter Windows \\build, \\dist.", 62 | "zhe-lei-wen-jian-jia-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian-jia": "Diese Art von Ordnern sind standardmäßig auf MacOS und Linux versteckt", 63 | "hu-lve-suo-you-wen-jian-zhi-sao-miao-wen-jian-jia": "Alle Dateien ignorieren, nur Ordner scannen", 64 | "zhe-lei-wen-jian-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian": "Diese Art von Dateien sind standardmäßig auf MacOS und Linux versteckt", 65 | "xuan-ze-hu-lve-bu-xu-yao-de-wen-jian-lei-xing-yi-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-lei-xing": "Wählen Sie zu ignorierende Dateitypen aus, um die Scan-Effizienz zu erhöhen. Sie können zusätzliche zu filternde Dateitypen hinzufügen.", 66 | "she-zhi-sao-miao-mu-lu-de-shen-du-0-wei-suo-you-shen-du-mei-di-zeng-yi-ge-shu-zi-ze-dai-biao-sao-miao-shen-du-1": "Legen Sie die Scan-Tiefe für das Verzeichnis fest. 0 für alle Tiefen, jede Erhöhung um eine Zahl repräsentiert eine Erhöhung der Scan-Tiefe um +1", 67 | "p1": "Suchen (unterstützt nur Englisch, z.B.: Baum tree)", 68 | "p2": "Keine Emojis gefunden", 69 | "p3": "Suchergebnisse", 70 | "p4": "Häufig verwendet", 71 | "p5": "Lächelnde Gesichter und Emotionen", 72 | "p6": "Menschen und Körper", 73 | "p7": "Tiere und Natur", 74 | "p8": "Essen und Trinken", 75 | "p9": "Aktivitäten", 76 | "p10": "Reisen und Orte", 77 | "p11": "Objekte", 78 | "p12": "Symbole", 79 | "p13": "Flaggen", 80 | "p14": "Benutzerdefiniert", 81 | "gen-sui-xi-tong": "System folgen", 82 | "tu-pian-yi-fu-zhi-dao-jian-tie-ban": "Bild in die Zwischenablage kopiert", 83 | "fu-zhi-wen-ben": "Text kopieren", 84 | "fu-zhi-tu-pian": "Bild kopieren", 85 | "dao-chu-tu-pian": "Bild exportieren", 86 | "wen-jian-jia-jie-wei-xian-shi": "Ordner-Ende anzeigen /", 87 | "zhong-zhi-fan-wei": "Bereich zurücksetzen", 88 | "huan-cun": "Cache", 89 | "qing": "Bitte", 90 | "wen-jian-jia-lu-ru-shu-ju": "Ordnerdaten eingeben", 91 | "she-zhi": "Einstellungen", 92 | "que-ren-zhong-zhi-suo-you-shu-ju-ma": "Möchten Sie wirklich alle Daten zurücksetzen?", 93 | "zhong-zhi": "Zurücksetzen", 94 | "zhong-zhi-cheng-gong": "Erfolgreich zurückgesetzt", 95 | "que-ding": "Bestätigen", 96 | "qu-xiao": "Abbrechen" 97 | } 98 | -------------------------------------------------------------------------------- /src/renderer/src/locales/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "sao-miao": "Scan", 3 | "quan-ju-pei-zhi": "Global Configuration", 4 | "bian-ji-qu": "Edit Area", 5 | "zhong-zhi-shu-ju": "Reset Data", 6 | "zhong-zhi-zhu-shi": "Reset Comments", 7 | "xuan-ze-biao-qing": "Choose Emoji", 8 | "tong-yong": "General", 9 | "yu-yan": "Language", 10 | "zi-dong-da-kai-wen-jian": "Auto Open File", 11 | "dao-chu-hou-zhan-shi-cai-dai": "Show Ribbon After Export", 12 | "tong-bu-gun-dong": "Sync Scroll", 13 | "xian-shi-tu-biao": "Show Icons", 14 | "hu-lve-wen-jian-jia": "Ignore Folders", 15 | "hu-lve-yi-kai-tou-de-wen-jian-jia": "Ignore Folders Starting With \".\"", 16 | "zhi-sao-miao-wen-jian-jia": "Scan Folders Only", 17 | "hu-lve-yi-kai-tou-de-wen-jian": "Ignore Files Starting With \".\"", 18 | "hu-lve-wen-jian-lei-xing": "Ignore File Types", 19 | "sao-miao-shen-du": "Scan Depth", 20 | "dao-chu-wen-ben": "Export Text", 21 | "mo-ren-ming-cheng": "Default Name", 22 | "guan-yu": "About", 23 | "dang-qian-ban-ben": "Current Version", 24 | "kai-fa-zhe": "Developer", 25 | "qi-ta-xin-xi": "Other Information", 26 | "kai-yuan": "Open Source", 27 | "github-di-zhi": "Github Address", 28 | "guan-fang-wen-dang": "Official Documentation", 29 | "gan-xie-star": ", Thanks For Star ⭐️", 30 | "dian-wo-cha-kan": "⚡️ Click To View", 31 | "zong-ji-treedatalength": "Total {0}", 32 | "wen-jian-jia-foldernumber": "Folders {0}", 33 | "wen-jian-filenumber": "Files {0}", 34 | "yu-lan-qu": "Preview Area", 35 | "fu-zhi": "Copy", 36 | "dao-chu": "Export", 37 | "yu-lan-pei-zhi": "Preview Configuration", 38 | "zhu-shi-ge-shi-hua": "Comment Formatting", 39 | "qiao-liang-zui-duan-zi-fu-shu": "Minimum Bridge Characters", 40 | "qiao-liang-tian-chong-zi-fu": "Bridge Fill Character", 41 | "shi-zhong-xian-shi-qiao-liang": "Always Show Bridge", 42 | "qing-shu-ru-mo-ren-ming-cheng": "Please Enter Default Name", 43 | "qing-shu-ru-sao-miao-shen-du": "Please Enter Scan Depth", 44 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-jia": "Please Select Folders To Ignore", 45 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-lei-xing": "Please Select File Types To Ignore", 46 | "qing-xuan-ze-yu-yan": "Please Select Language", 47 | "qing-shu-ru-dan-zi-jie-tian-chong-zi-fu": "Please Enter Single-byte Fill Character", 48 | "qing-shu-ru-qiao-liang-zui-duan-zi-fu-shu": "Please Enter Minimum Bridge Characters", 49 | "qing-shu-ru-ge-shi-hua-zi-fu-chuan": "Please Enter Formatting String", 50 | "qing-shu-ru-zhu-shi": "Please Enter Comment", 51 | "zhong-zhi-zhu-shi-cheng-gong": "Comments Reset Successfully!", 52 | "zhong-zhi-shu-ju-cheng-gong": "Data Reset Successfully!", 53 | "yu-lan-qu-pei-zhi": "Preview Area Configuration", 54 | "copySuccess": "Copied Successfully!", 55 | "sco-miao-mu-lu": "Scan Directory", 56 | "pei-zhi-ruan-jian-xian-shi-yu-yan": "Configure Software Display Language", 57 | "dao-chu-wen-jian-hou-zi-dong-da-kai": "Auto Open After File Export", 58 | "dao-chu-cheng-gong-hou-zi-dong-zhan-shi-cai-dan": "Auto Display Ribbon After Successful Export", 59 | "bian-ji-qu-he-yu-lan-qu-shi-fou-tong-bu-gun-dong": "Sync Scroll Between Edit And Preview Areas", 60 | "shi-fou-xian-shi-wen-jian-jia-he-wen-jian-de-tu-biao": "Show Icons For Folders And Files", 61 | "hu-lve-bu-xu-yao-sao-miao-de-wen-jian-jia-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-jia-li-ru-macos-xia-wei-builddistwindows-xia-wei-builddist": "Ignore Unnecessary Folders To Improve Scan Efficiency. Add Folders To Filter, E.g. /build, /dist For Macos, \\build, \\dist For Windows.", 62 | "zhe-lei-wen-jian-jia-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian-jia": "These Folders Are Hidden By Default On Macos And Linux", 63 | "hu-lve-suo-you-wen-jian-zhi-sao-miao-wen-jian-jia": "Ignore All Files, Scan Folders Only", 64 | "zhe-lei-wen-jian-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian": "These Files Are Hidden By Default On Macos And Linux", 65 | "xuan-ze-hu-lve-bu-xu-yao-de-wen-jian-lei-xing-yi-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-lei-xing": "Select Unnecessary File Types To Ignore For Improved Scan Efficiency. Add File Types To Filter.", 66 | "she-zhi-sao-miao-mu-lu-de-shen-du-0-wei-suo-you-shen-du-mei-di-zeng-yi-ge-shu-zi-ze-dai-biao-sao-miao-shen-du-1": "Set Scan Depth For Directories. 0 For All Depths, Each Increment Represents +1 Depth", 67 | "p1": "Search", 68 | "p2": "No Emoji Found", 69 | "p3": "Search Results", 70 | "p4": "Frequently Used", 71 | "p5": "Smileys And Emotions", 72 | "p6": "People And Body", 73 | "p7": "Animals And Nature", 74 | "p8": "Food And Drink", 75 | "p9": "Activities", 76 | "p10": "Travel And Places", 77 | "p11": "Objects", 78 | "p12": "Symbols", 79 | "p13": "Flags", 80 | "p14": "Custom", 81 | "gen-sui-xi-tong": "Follow the system", 82 | "tu-pian-yi-fu-zhi-dao-jian-tie-ban": "Image copied to clipboard", 83 | "fu-zhi-wen-ben": "Copy text", 84 | "fu-zhi-tu-pian": "Copy image", 85 | "dao-chu-tu-pian": "Export image", 86 | "wen-jian-jia-jie-wei-xian-shi": "Show folder end /", 87 | "zhong-zhi-fan-wei": "Reset range", 88 | "huan-cun": "Cache", 89 | "qing": "Please", 90 | "wen-jian-jia-lu-ru-shu-ju": "Enter folder data", 91 | "she-zhi": "Settings", 92 | "que-ren-zhong-zhi-suo-you-shu-ju-ma": "Are you sure you want to reset all data?", 93 | "zhong-zhi": "Reset", 94 | "zhong-zhi-cheng-gong": "Reset successful", 95 | "que-ding": "Confirm", 96 | "qu-xiao": "Cancel", 97 | "tong-yong-tu-biao": "Universal Icons", 98 | "bian-cheng-tu-biao": "Programming Icons", 99 | "hui-fu-mo-ren": "Restore Defaults", 100 | "jin-bian-ji-qu": "Edit area only", 101 | "jin-yu-lan-qu": "Preview area only", 102 | "xian-shi-dai-ma-kuai": "Show Code Block", 103 | "fu-zhi-he-dao-chu-wen-ben-shi-fou-xian-shi-dai-ma-kuai": "Whether to display code blocks when copying and exporting text" 104 | } 105 | -------------------------------------------------------------------------------- /src/renderer/src/locales/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "sao-miao": "Escanear", 3 | "quan-ju-pei-zhi": "Configuración global", 4 | "bian-ji-qu": "Área de edición", 5 | "zhong-zhi-shu-ju": "Restablecer datos", 6 | "zhong-zhi-zhu-shi": "Restablecer comentarios", 7 | "xuan-ze-biao-qing": "Seleccionar emoji", 8 | "tong-yong": "General", 9 | "yu-yan": "Idioma", 10 | "zi-dong-da-kai-wen-jian": "Abrir archivo automáticamente", 11 | "dao-chu-hou-zhan-shi-cai-dai": "Mostrar confeti después de exportar", 12 | "tong-bu-gun-dong": "Desplazamiento sincronizado", 13 | "xian-shi-tu-biao": "Mostrar iconos", 14 | "hu-lve-wen-jian-jia": "Ignorar carpetas", 15 | "hu-lve-yi-kai-tou-de-wen-jian-jia": "Ignorar carpetas que comienzan con \".\"", 16 | "zhi-sao-miao-wen-jian-jia": "Escanear solo carpetas", 17 | "hu-lve-yi-kai-tou-de-wen-jian": "Ignorar archivos que comienzan con \".\"", 18 | "hu-lve-wen-jian-lei-xing": "Ignorar tipos de archivo", 19 | "sao-miao-shen-du": "Profundidad de escaneo", 20 | "dao-chu-wen-ben": "Exportar texto", 21 | "mo-ren-ming-cheng": "Nombre predeterminado", 22 | "guan-yu": "Acerca de", 23 | "dang-qian-ban-ben": "Versión actual", 24 | "kai-fa-zhe": "Desarrollador", 25 | "qi-ta-xin-xi": "Otra información", 26 | "kai-yuan": "Código abierto", 27 | "github-di-zhi": "Dirección de GitHub", 28 | "guan-fang-wen-dang": "Documentación oficial", 29 | "gan-xie-star": ", gracias por la estrella ⭐️", 30 | "dian-wo-cha-kan": "⚡️ Haz clic para ver", 31 | "zong-ji-treedatalength": "Total {0}", 32 | "wen-jian-jia-foldernumber": "Carpetas {0}", 33 | "wen-jian-filenumber": "Archivos {0}", 34 | "yu-lan-qu": "Área de vista previa", 35 | "fu-zhi": "Copiar", 36 | "dao-chu": "Exportar", 37 | "yu-lan-pei-zhi": "Configuración de vista previa", 38 | "zhu-shi-ge-shi-hua": "Formato de comentarios", 39 | "qiao-liang-zui-duan-zi-fu-shu": "Número mínimo de caracteres para puente", 40 | "qiao-liang-tian-chong-zi-fu": "Carácter de relleno para puente", 41 | "shi-zhong-xian-shi-qiao-liang": "Mostrar siempre el puente", 42 | "qing-shu-ru-mo-ren-ming-cheng": "Por favor, ingrese el nombre predeterminado", 43 | "qing-shu-ru-sao-miao-shen-du": "Por favor, ingrese la profundidad de escaneo", 44 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-jia": "Por favor, seleccione las carpetas a ignorar", 45 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-lei-xing": "Por favor, seleccione los tipos de archivo a ignorar", 46 | "qing-xuan-ze-yu-yan": "Por favor, seleccione el idioma", 47 | "qing-shu-ru-dan-zi-jie-tian-chong-zi-fu": "Por favor, ingrese el carácter de relleno de un byte", 48 | "qing-shu-ru-qiao-liang-zui-duan-zi-fu-shu": "Por favor, ingrese el número mínimo de caracteres para el puente", 49 | "qing-shu-ru-ge-shi-hua-zi-fu-chuan": "Por favor, ingrese la cadena de formato", 50 | "qing-shu-ru-zhu-shi": "Por favor, ingrese el comentario", 51 | "zhong-zhi-zhu-shi-cheng-gong": "¡Comentarios restablecidos con éxito!", 52 | "zhong-zhi-shu-ju-cheng-gong": "¡Datos restablecidos con éxito!", 53 | "yu-lan-qu-pei-zhi": "Configuración del área de vista previa", 54 | "copySuccess": "¡Copiado con éxito!", 55 | "sco-miao-mu-lu": "Escanear directorio", 56 | "pei-zhi-ruan-jian-xian-shi-yu-yan": "Configurar idioma de visualización del software", 57 | "dao-chu-wen-jian-hou-zi-dong-da-kai": "Abrir automáticamente después de exportar el archivo", 58 | "dao-chu-cheng-gong-hou-zi-dong-zhan-shi-cai-dan": "Mostrar confeti automáticamente después de una exportación exitosa", 59 | "bian-ji-qu-he-yu-lan-qu-shi-fou-tong-bu-gun-dong": "¿Desplazamiento sincronizado entre el área de edición y vista previa?", 60 | "shi-fou-xian-shi-wen-jian-jia-he-wen-jian-de-tu-biao": "¿Mostrar iconos para carpetas y archivos?", 61 | "hu-lve-bu-xu-yao-sao-miao-de-wen-jian-jia-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-jia-li-ru-macos-xia-wei-builddistwindows-xia-wei-builddist": "Ignorar carpetas que no necesitan ser escaneadas para mejorar la eficiencia. Se pueden agregar carpetas adicionales para filtrar, por ejemplo: en macOS /build, /dist, en Windows \\build, \\dist.", 62 | "zhe-lei-wen-jian-jia-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian-jia": "Este tipo de carpetas están ocultas por defecto en MacOS y Linux", 63 | "hu-lve-suo-you-wen-jian-zhi-sao-miao-wen-jian-jia": "Ignorar todos los archivos, escanear solo carpetas", 64 | "zhe-lei-wen-jian-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian": "Este tipo de archivos están ocultos por defecto en MacOS y Linux", 65 | "xuan-ze-hu-lve-bu-xu-yao-de-wen-jian-lei-xing-yi-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-lei-xing": "Seleccionar tipos de archivo a ignorar para mejorar la eficiencia del escaneo. Se pueden agregar tipos de archivo adicionales para filtrar.", 66 | "she-zhi-sao-miao-mu-lu-de-shen-du-0-wei-suo-you-shen-du-mei-di-zeng-yi-ge-shu-zi-ze-dai-biao-sao-miao-shen-du-1": "Establecer la profundidad de escaneo del directorio, 0 para todas las profundidades, cada incremento de un número representa un aumento de +1 en la profundidad de escaneo", 67 | "p1": "Buscar (solo admite inglés, por ejemplo: árbol tree)", 68 | "p2": "No se encontraron emojis", 69 | "p3": "Resultados de búsqueda", 70 | "p4": "Comúnmente usados", 71 | "p5": "Caras sonrientes y emociones", 72 | "p6": "Personas y cuerpo", 73 | "p7": "Animales y naturaleza", 74 | "p8": "Comida y bebida", 75 | "p9": "Actividades", 76 | "p10": "Viajes y lugares", 77 | "p11": "Objetos", 78 | "p12": "Símbolos", 79 | "p13": "Banderas", 80 | "p14": "Personalizado", 81 | "gen-sui-xi-tong": "Seguir el sistema", 82 | "tu-pian-yi-fu-zhi-dao-jian-tie-ban": "Imagen copiada al portapapeles", 83 | "fu-zhi-wen-ben": "Copiar texto", 84 | "fu-zhi-tu-pian": "Copiar imagen", 85 | "dao-chu-tu-pian": "Exportar imagen", 86 | "wen-jian-jia-jie-wei-xian-shi": "Mostrar fin de carpeta /", 87 | "zhong-zhi-fan-wei": "Restablecer rango", 88 | "huan-cun": "Caché", 89 | "qing": "Por favor", 90 | "wen-jian-jia-lu-ru-shu-ju": "Ingresar datos de la carpeta", 91 | "she-zhi": "Configuración", 92 | "que-ren-zhong-zhi-suo-you-shu-ju-ma": "¿Estás seguro de que deseas restablecer todos los datos?", 93 | "zhong-zhi": "Restablecer", 94 | "zhong-zhi-cheng-gong": "Restablecimiento exitoso", 95 | "que-ding": "Confirmar", 96 | "qu-xiao": "Cancelar" 97 | } 98 | -------------------------------------------------------------------------------- /src/renderer/src/locales/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "sao-miao": "Scanner", 3 | "quan-ju-pei-zhi": "Configuration globale", 4 | "bian-ji-qu": "Zone d'édition", 5 | "zhong-zhi-shu-ju": "Réinitialiser les données", 6 | "zhong-zhi-zhu-shi": "Réinitialiser les commentaires", 7 | "xuan-ze-biao-qing": "Choisir un emoji", 8 | "tong-yong": "Général", 9 | "yu-yan": "Langue", 10 | "zi-dong-da-kai-wen-jian": "Ouvrir automatiquement le fichier", 11 | "dao-chu-hou-zhan-shi-cai-dai": "Afficher des confettis après l'exportation", 12 | "tong-bu-gun-dong": "Défilement synchronisé", 13 | "xian-shi-tu-biao": "Afficher les icônes", 14 | "hu-lve-wen-jian-jia": "Ignorer les dossiers", 15 | "hu-lve-yi-kai-tou-de-wen-jian-jia": "Ignorer les dossiers commençant par \".\"", 16 | "zhi-sao-miao-wen-jian-jia": "Scanner uniquement les dossiers", 17 | "hu-lve-yi-kai-tou-de-wen-jian": "Ignorer les fichiers commençant par \".\"", 18 | "hu-lve-wen-jian-lei-xing": "Ignorer les types de fichiers", 19 | "sao-miao-shen-du": "Profondeur de scan", 20 | "dao-chu-wen-ben": "Exporter le texte", 21 | "mo-ren-ming-cheng": "Nom par défaut", 22 | "guan-yu": "À propos", 23 | "dang-qian-ban-ben": "Version actuelle", 24 | "kai-fa-zhe": "Développeur", 25 | "qi-ta-xin-xi": "Autres informations", 26 | "kai-yuan": "Open source", 27 | "github-di-zhi": "Adresse GitHub", 28 | "guan-fang-wen-dang": "Documentation officielle", 29 | "gan-xie-star": ", merci pour l'étoile ⭐️", 30 | "dian-wo-cha-kan": "⚡️ Cliquez pour voir", 31 | "zong-ji-treedatalength": "Total {0}", 32 | "wen-jian-jia-foldernumber": "Dossiers {0}", 33 | "wen-jian-filenumber": "Fichiers {0}", 34 | "yu-lan-qu": "Zone de prévisualisation", 35 | "fu-zhi": "Copier", 36 | "dao-chu": "Exporter", 37 | "yu-lan-pei-zhi": "Configuration de prévisualisation", 38 | "zhu-shi-ge-shi-hua": "Formatage des commentaires", 39 | "qiao-liang-zui-duan-zi-fu-shu": "Nombre minimum de caractères pour le pont", 40 | "qiao-liang-tian-chong-zi-fu": "Caractère de remplissage du pont", 41 | "shi-zhong-xian-shi-qiao-liang": "Toujours afficher le pont", 42 | "qing-shu-ru-mo-ren-ming-cheng": "Veuillez saisir le nom par défaut", 43 | "qing-shu-ru-sao-miao-shen-du": "Veuillez saisir la profondeur de scan", 44 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-jia": "Veuillez sélectionner les dossiers à ignorer", 45 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-lei-xing": "Veuillez sélectionner les types de fichiers à ignorer", 46 | "qing-xuan-ze-yu-yan": "Veuillez sélectionner la langue", 47 | "qing-shu-ru-dan-zi-jie-tian-chong-zi-fu": "Veuillez saisir le caractère de remplissage d'un octet", 48 | "qing-shu-ru-qiao-liang-zui-duan-zi-fu-shu": "Veuillez saisir le nombre minimum de caractères pour le pont", 49 | "qing-shu-ru-ge-shi-hua-zi-fu-chuan": "Veuillez saisir la chaîne de formatage", 50 | "qing-shu-ru-zhu-shi": "Veuillez saisir le commentaire", 51 | "zhong-zhi-zhu-shi-cheng-gong": "Commentaires réinitialisés avec succès !", 52 | "zhong-zhi-shu-ju-cheng-gong": "Données réinitialisées avec succès !", 53 | "yu-lan-qu-pei-zhi": "Configuration de la zone de prévisualisation", 54 | "copySuccess": "Copié avec succès !", 55 | "sco-miao-mu-lu": "Scanner le répertoire", 56 | "pei-zhi-ruan-jian-xian-shi-yu-yan": "Configurer la langue d'affichage du logiciel", 57 | "dao-chu-wen-jian-hou-zi-dong-da-kai": "Ouvrir automatiquement après l'exportation du fichier", 58 | "dao-chu-cheng-gong-hou-zi-dong-zhan-shi-cai-dan": "Afficher automatiquement des confettis après une exportation réussie", 59 | "bian-ji-qu-he-yu-lan-qu-shi-fou-tong-bu-gun-dong": "Défilement synchronisé entre la zone d'édition et de prévisualisation", 60 | "shi-fou-xian-shi-wen-jian-jia-he-wen-jian-de-tu-biao": "Afficher les icônes pour les dossiers et les fichiers", 61 | "hu-lve-bu-xu-yao-sao-miao-de-wen-jian-jia-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-jia-li-ru-macos-xia-wei-builddistwindows-xia-wei-builddist": "Ignorer les dossiers qui n'ont pas besoin d'être scannés pour améliorer l'efficacité. Vous pouvez ajouter des dossiers à filtrer, par exemple : sous macOS /build, /dist, sous Windows \\build, \\dist.", 62 | "zhe-lei-wen-jian-jia-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian-jia": "Ce type de dossiers est caché par défaut sur MacOS et Linux", 63 | "hu-lve-suo-you-wen-jian-zhi-sao-miao-wen-jian-jia": "Ignorer tous les fichiers, scanner uniquement les dossiers", 64 | "zhe-lei-wen-jian-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian": "Ce type de fichiers est caché par défaut sur MacOS et Linux", 65 | "xuan-ze-hu-lve-bu-xu-yao-de-wen-jian-lei-xing-yi-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-lei-xing": "Sélectionner les types de fichiers à ignorer pour améliorer l'efficacité du scan. Vous pouvez ajouter des types de fichiers à filtrer.", 66 | "she-zhi-sao-miao-mu-lu-de-shen-du-0-wei-suo-you-shen-du-mei-di-zeng-yi-ge-shu-zi-ze-dai-biao-sao-miao-shen-du-1": "Définir la profondeur de scan du répertoire, 0 pour toutes les profondeurs, chaque incrément d'un nombre représente une augmentation de +1 dans la profondeur de scan", 67 | "p1": "Rechercher (supporte uniquement l'anglais, ex : arbre tree)", 68 | "p2": "Aucun emoji trouvé", 69 | "p3": "Résultats de recherche", 70 | "p4": "Fréquemment utilisés", 71 | "p5": "Visages souriants et émotions", 72 | "p6": "Personnes et corps", 73 | "p7": "Animaux et nature", 74 | "p8": "Nourriture et boissons", 75 | "p9": "Activités", 76 | "p10": "Voyages et lieux", 77 | "p11": "Objets", 78 | "p12": "Symboles", 79 | "p13": "Drapeaux", 80 | "p14": "Personnalisé", 81 | "gen-sui-xi-tong": "Suivre le système", 82 | "tu-pian-yi-fu-zhi-dao-jian-tie-ban": "Image copiée dans le presse-papiers", 83 | "fu-zhi-wen-ben": "Copier le texte", 84 | "fu-zhi-tu-pian": "Copier l'image", 85 | "dao-chu-tu-pian": "Exporter l'image", 86 | "wen-jian-jia-jie-wei-xian-shi": "Afficher la fin du dossier /", 87 | "zhong-zhi-fan-wei": "Réinitialiser la plage", 88 | "huan-cun": "Cache", 89 | "qing": "Veuillez", 90 | "wen-jian-jia-lu-ru-shu-ju": "Saisir les données du dossier", 91 | "she-zhi": "Paramètres", 92 | "que-ren-zhong-zhi-suo-you-shu-ju-ma": "Êtes-vous sûr de vouloir réinitialiser toutes les données ?", 93 | "zhong-zhi": "Réinitialiser", 94 | "zhong-zhi-cheng-gong": "Réinitialisation réussie", 95 | "que-ding": "Confirmer", 96 | "qu-xiao": "Annuler" 97 | } 98 | -------------------------------------------------------------------------------- /src/renderer/src/locales/i18n.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-07-27 13:20 5 | * @LastAuthor : Wang Chao 6 | * @LastTime : 2024-11-13 14:38 7 | * @desc : 8 | */ 9 | import { createI18n } from 'vue-i18n' 10 | import en from './en.json' 11 | import zh from './zh.json' 12 | import es from './es.json' 13 | import fr from './fr.json' 14 | import de from './de.json' 15 | import ko from './ko.json' 16 | import ru from './ru.json' 17 | import pt from './pt.json' 18 | import it from './it.json' 19 | import ja from './ja.json' 20 | 21 | export const i18n = createI18n({ 22 | locale: 'en', 23 | allowComposition: true, // 占位符支持 24 | messages: { 25 | en: en, 26 | zh: zh, 27 | es: es, 28 | fr: fr, 29 | de: de, 30 | ko: ko, 31 | ru: ru, 32 | pt: pt, 33 | it: it, 34 | ja: ja 35 | } 36 | }) 37 | 38 | // 获取缓存的语言配置 39 | // let lang = 'en' 40 | // // 根据缓存语言,修改语言环境 41 | // const common = JSON.parse(localStorage.getItem('annotree-common')) 42 | // if (common) { 43 | // lang = common.languageId ?? 'en' 44 | // } 45 | 46 | // i18n.global.locale = lang 47 | -------------------------------------------------------------------------------- /src/renderer/src/locales/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "sao-miao": "Scansiona", 3 | "quan-ju-pei-zhi": "Configurazione globale", 4 | "bian-ji-qu": "Area di modifica", 5 | "zhong-zhi-shu-ju": "Reimposta dati", 6 | "zhong-zhi-zhu-shi": "Reimposta annotazioni", 7 | "xuan-ze-biao-qing": "Seleziona emoji", 8 | "tong-yong": "Generale", 9 | "yu-yan": "Lingua", 10 | "zi-dong-da-kai-wen-jian": "Apri file automaticamente", 11 | "dao-chu-hou-zhan-shi-cai-dai": "Mostra nastro dopo l'esportazione", 12 | "tong-bu-gun-dong": "Scorrimento sincronizzato", 13 | "xian-shi-tu-biao": "Mostra icone", 14 | "hu-lve-wen-jian-jia": "Ignora cartelle", 15 | "hu-lve-yi-kai-tou-de-wen-jian-jia": "Ignora cartelle che iniziano con \".\"", 16 | "zhi-sao-miao-wen-jian-jia": "Scansiona solo cartelle", 17 | "hu-lve-yi-kai-tou-de-wen-jian": "Ignora file che iniziano con \".\"", 18 | "hu-lve-wen-jian-lei-xing": "Ignora tipi di file", 19 | "sao-miao-shen-du": "Profondità di scansione", 20 | "dao-chu-wen-ben": "Esporta testo", 21 | "mo-ren-ming-cheng": "Nome predefinito", 22 | "guan-yu": "Informazioni", 23 | "dang-qian-ban-ben": "Versione corrente", 24 | "kai-fa-zhe": "Sviluppatore", 25 | "qi-ta-xin-xi": "Altre informazioni", 26 | "kai-yuan": "Open source", 27 | "github-di-zhi": "Indirizzo GitHub", 28 | "guan-fang-wen-dang": "Documentazione ufficiale", 29 | "gan-xie-star": ",grazie per la stella ⭐️", 30 | "dian-wo-cha-kan": "⚡️ Clicca per vedere", 31 | "zong-ji-treedatalength": "Totale {0}", 32 | "wen-jian-jia-foldernumber": "Cartella {0}", 33 | "wen-jian-filenumber": "File {0}", 34 | "yu-lan-qu": "Area di anteprima", 35 | "fu-zhi": "Copia", 36 | "dao-chu": "Esporta", 37 | "yu-lan-pei-zhi": "Configurazione anteprima", 38 | "zhu-shi-ge-shi-hua": "Formattazione annotazioni", 39 | "qiao-liang-zui-duan-zi-fu-shu": "Numero minimo di caratteri del ponte", 40 | "qiao-liang-tian-chong-zi-fu": "Carattere di riempimento del ponte", 41 | "shi-zhong-xian-shi-qiao-liang": "Mostra sempre il ponte", 42 | "qing-shu-ru-mo-ren-ming-cheng": "Inserisci il nome predefinito", 43 | "qing-shu-ru-sao-miao-shen-du": "Inserisci la profondità di scansione", 44 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-jia": "Seleziona le cartelle da ignorare", 45 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-lei-xing": "Seleziona i tipi di file da ignorare", 46 | "qing-xuan-ze-yu-yan": "Seleziona la lingua", 47 | "qing-shu-ru-dan-zi-jie-tian-chong-zi-fu": "Inserisci il carattere di riempimento a byte singolo", 48 | "qing-shu-ru-qiao-liang-zui-duan-zi-fu-shu": "Inserisci il numero minimo di caratteri del ponte", 49 | "qing-shu-ru-ge-shi-hua-zi-fu-chuan": "Inserisci la stringa di formattazione", 50 | "qing-shu-ru-zhu-shi": "Inserisci annotazione", 51 | "zhong-zhi-zhu-shi-cheng-gong": "Annotazioni reimpostate con successo!", 52 | "zhong-zhi-shu-ju-cheng-gong": "Dati reimpostati con successo!", 53 | "yu-lan-qu-pei-zhi": "Configurazione area di anteprima", 54 | "copySuccess": "Copia riuscita!", 55 | "sco-miao-mu-lu": "Scansiona directory", 56 | "pei-zhi-ruan-jian-xian-shi-yu-yan": "Configura la lingua di visualizzazione del software", 57 | "dao-chu-wen-jian-hou-zi-dong-da-kai": "Apri automaticamente il file dopo l'esportazione", 58 | "dao-chu-cheng-gong-hou-zi-dong-zhan-shi-cai-dan": "Mostra automaticamente il nastro dopo l'esportazione", 59 | "bian-ji-qu-he-yu-lan-qu-shi-fou-tong-bu-gun-dong": "Scorrimento sincronizzato tra area di modifica e area di anteprima", 60 | "shi-fou-xian-shi-wen-jian-jia-he-wen-jian-de-tu-biao": "Mostra icone per cartelle e file", 61 | "hu-lve-bu-xu-yao-sao-miao-de-wen-jian-jia-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-jia-li-ru-macos-xia-wei-builddistwindows-xia-wei-builddist": "Ignora cartelle non necessarie per la scansione, migliorando l'efficienza della scansione. È possibile aggiungere cartelle da filtrare, ad esempio: /build, /dist su macOS e \\build, \\dist su Windows.", 62 | "zhe-lei-wen-jian-jia-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian-jia": "Questi tipi di cartelle sono nascosti per impostazione predefinita su macOS e Linux", 63 | "hu-lve-suo-you-wen-jian-zhi-sao-miao-wen-jian-jia": "Ignora tutti i file, scansiona solo le cartelle", 64 | "zhe-lei-wen-jian-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian": "Questi tipi di file sono nascosti per impostazione predefinita su macOS e Linux", 65 | "xuan-ze-hu-lve-bu-xu-yao-de-wen-jian-lei-xing-yi-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-lei-xing": "Seleziona i tipi di file da ignorare per migliorare l'efficienza della scansione. È possibile aggiungere nuovi tipi di file da filtrare.", 66 | "she-zhi-sao-miao-mu-lu-de-shen-du-0-wei-suo-you-shen-du-mei-di-zeng-yi-ge-shu-zi-ze-dai-biao-sao-miao-shen-du-1": "Imposta la profondità della scansione della directory, 0 per tutte le profondità, ogni incremento di un numero rappresenta un incremento della profondità di scansione +1", 67 | "p1": "Ricerca (supporta solo l'inglese, ad es: tree)", 68 | "p2": "Emoji non trovata", 69 | "p3": "Risultati della ricerca", 70 | "p4": "Usati di frequente", 71 | "p5": "Faccine e emoji", 72 | "p6": "Persone e corpi", 73 | "p7": "Animali e natura", 74 | "p8": "Cibo e bevande", 75 | "p9": "Eventi", 76 | "p10": "Viaggi e luoghi", 77 | "p11": "Oggetti", 78 | "p12": "Simboli", 79 | "p13": "Bandiere", 80 | "p14": "Personalizzati", 81 | "gen-sui-xi-tong": "Segui il sistema", 82 | "tu-pian-yi-fu-zhi-dao-jian-tie-ban": "Immagine copiata negli appunti", 83 | "fu-zhi-wen-ben": "Copia testo", 84 | "fu-zhi-tu-pian": "Copia immagine", 85 | "dao-chu-tu-pian": "Esporta immagine", 86 | "wen-jian-jia-jie-wei-xian-shi": "Mostra fine della cartella /", 87 | "zhong-zhi-fan-wei": "Ripristina intervallo", 88 | "huan-cun": "Cache", 89 | "qing": "Per favore", 90 | "wen-jian-jia-lu-ru-shu-ju": "Inserisci dati della cartella", 91 | "she-zhi": "Impostazioni", 92 | "que-ren-zhong-zhi-suo-you-shu-ju-ma": "Sei sicuro di voler ripristinare tutti i dati?", 93 | "zhong-zhi": "Ripristina", 94 | "zhong-zhi-cheng-gong": "Ripristino riuscito", 95 | "que-ding": "Confermare", 96 | "qu-xiao": "Annulla" 97 | } 98 | -------------------------------------------------------------------------------- /src/renderer/src/locales/ja.json: -------------------------------------------------------------------------------- 1 | { 2 | "sao-miao": "スキャン", 3 | "quan-ju-pei-zhi": "グローバル設定", 4 | "bian-ji-qu": "編集エリア", 5 | "zhong-zhi-shu-ju": "データをリセット", 6 | "zhong-zhi-zhu-shi": "コメントをリセット", 7 | "xuan-ze-biao-qing": "絵文字を選択", 8 | "tong-yong": "一般", 9 | "yu-yan": "言語", 10 | "zi-dong-da-kai-wen-jian": "ファイルを自動的に開く", 11 | "dao-chu-hou-zhan-shi-cai-dai": "エクスポート後にリボンを表示", 12 | "tong-bu-gun-dong": "同期スクロール", 13 | "xian-shi-tu-biao": "アイコンを表示", 14 | "hu-lve-wen-jian-jia": "フォルダーを無視", 15 | "hu-lve-yi-kai-tou-de-wen-jian-jia": "「.」で始まるフォルダーを無視", 16 | "zhi-sao-miao-wen-jian-jia": "フォルダーのみスキャン", 17 | "hu-lve-yi-kai-tou-de-wen-jian": "「.」で始まるファイルを無視", 18 | "hu-lve-wen-jian-lei-xing": "ファイルタイプを無視", 19 | "sao-miao-shen-du": "スキャンの深さ", 20 | "dao-chu-wen-ben": "テキストをエクスポート", 21 | "mo-ren-ming-cheng": "デフォルト名", 22 | "guan-yu": "について", 23 | "dang-qian-ban-ben": "現在のバージョン", 24 | "kai-fa-zhe": "開発者", 25 | "qi-ta-xin-xi": "その他の情報", 26 | "kai-yuan": "オープンソース", 27 | "github-di-zhi": "GitHub アドレス", 28 | "guan-fang-wen-dang": "公式ドキュメント", 29 | "gan-xie-star": "、スター ⭐️ ありがとうございます", 30 | "dian-wo-cha-kan": "⚡️ クリックして確認", 31 | "zong-ji-treedatalength": "合計 {0}", 32 | "wen-jian-jia-foldernumber": "フォルダー {0}", 33 | "wen-jian-filenumber": "ファイル {0}", 34 | "yu-lan-qu": "プレビューエリア", 35 | "fu-zhi": "コピー", 36 | "dao-chu": "エクスポート", 37 | "yu-lan-pei-zhi": "プレビュー設定", 38 | "zhu-shi-ge-shi-hua": "コメントのフォーマット", 39 | "qiao-liang-zui-duan-zi-fu-shu": "橋の最短文字数", 40 | "qiao-liang-tian-chong-zi-fu": "橋の埋め込み文字", 41 | "shi-zhong-xian-shi-qiao-liang": "常に橋を表示", 42 | "qing-shu-ru-mo-ren-ming-cheng": "デフォルト名を入力してください", 43 | "qing-shu-ru-sao-miao-shen-du": "スキャンの深さを入力してください", 44 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-jia": "無視するフォルダーを選択してください", 45 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-lei-xing": "無視するファイルタイプを選択してください", 46 | "qing-xuan-ze-yu-yan": "言語を選択してください", 47 | "qing-shu-ru-dan-zi-jie-tian-chong-zi-fu": "単一バイトの埋め込み文字を入力してください", 48 | "qing-shu-ru-qiao-liang-zui-duan-zi-fu-shu": "橋の最短文字数を入力してください", 49 | "qing-shu-ru-ge-shi-hua-zi-fu-chuan": "フォーマット文字列を入力してください", 50 | "qing-shu-ru-zhu-shi": "コメントを入力してください", 51 | "zhong-zhi-zhu-shi-cheng-gong": "コメントのリセットが成功しました!", 52 | "zhong-zhi-shu-ju-cheng-gong": "データのリセットが成功しました!", 53 | "yu-lan-qu-pei-zhi": "プレビューエリア設定", 54 | "copySuccess": "コピー成功!", 55 | "sco-miao-mu-lu": "スキャンディレクトリ", 56 | "pei-zhi-ruan-jian-xian-shi-yu-yan": "ソフトウェアの表示言語を設定", 57 | "dao-chu-wen-jian-hou-zi-dong-da-kai": "ファイルをエクスポート後、自動的に開く", 58 | "dao-chu-cheng-gong-hou-zi-dong-zhan-shi-cai-dan": "エクスポート成功後、自動的にリボンを表示", 59 | "bian-ji-qu-he-yu-lan-qu-shi-fou-tong-bu-gun-dong": "編集エリアとプレビューエリアの同期スクロール", 60 | "shi-fou-xian-shi-wen-jian-jia-he-wen-jian-de-tu-biao": "フォルダーとファイルのアイコンを表示するかどうか", 61 | "hu-lve-bu-xu-yao-sao-miao-de-wen-jian-jia-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-jia-li-ru-macos-xia-wei-builddistwindows-xia-wei-builddist": "スキャンが不要なフォルダーを無視し、スキャン効率を向上させます。フィルタリングするフォルダーを追加できます。例えば、macOS では /build、/dist、Windows では \\build、\\dist。", 62 | "zhe-lei-wen-jian-jia-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian-jia": "この種のフォルダーは macOS と Linux でデフォルトで隠されています", 63 | "hu-lve-suo-you-wen-jian-zhi-sao-miao-wen-jian-jia": "すべてのファイルを無視し、フォルダーのみスキャン", 64 | "zhe-lei-wen-jian-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian": "この種のファイルは macOS と Linux でデフォルトで隠されています", 65 | "xuan-ze-hu-lve-bu-xu-yao-de-wen-jian-lei-xing-yi-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-lei-xing": "スキャン効率を向上させるために、無視するファイルタイプを選択します。フィルタリングするファイルタイプを追加できます。", 66 | "she-zhi-sao-miao-mu-lu-de-shen-du-0-wei-suo-you-shen-du-mei-di-zeng-yi-ge-shu-zi-ze-dai-biao-sao-miao-shen-du-1": "スキャンディレクトリの深さを設定します。0 はすべての深さを意味し、1 ずつ増やすごとにスキャンの深さ +1 を意味します。", 67 | "p1": "検索(英語のみ対応、例: 树 tree)", 68 | "p2": "絵文字が見つかりません", 69 | "p3": "検索結果", 70 | "p4": "よく使う", 71 | "p5": "笑顔と感情", 72 | "p6": "人物と体", 73 | "p7": "動物と自然", 74 | "p8": "食べ物と飲み物", 75 | "p9": "アクティビティ", 76 | "p10": "旅行と場所", 77 | "p11": "物", 78 | "p12": "記号", 79 | "p13": "旗", 80 | "p14": "カスタム", 81 | "gen-sui-xi-tong": "システムに従う", 82 | "tu-pian-yi-fu-zhi-dao-jian-tie-ban": "画像がクリップボードにコピーされました", 83 | "fu-zhi-wen-ben": "テキストをコピー", 84 | "fu-zhi-tu-pian": "画像をコピー", 85 | "dao-chu-tu-pian": "画像をエクスポート", 86 | "wen-jian-jia-jie-wei-xian-shi": "フォルダーの末尾に表示 /", 87 | "zhong-zhi-fan-wei": "範囲をリセット", 88 | "huan-cun": "キャッシュ", 89 | "qing": "お願いします", 90 | "wen-jian-jia-lu-ru-shu-ju": "フォルダーのデータを入力", 91 | "she-zhi": "設定", 92 | "que-ren-zhong-zhi-suo-you-shu-ju-ma": "すべてのデータをリセットしてもよろしいですか?", 93 | "zhong-zhi": "リセット", 94 | "zhong-zhi-cheng-gong": "リセット成功", 95 | "que-ding": "確認", 96 | "qu-xiao": "キャンセル" 97 | } 98 | -------------------------------------------------------------------------------- /src/renderer/src/locales/ko.json: -------------------------------------------------------------------------------- 1 | { 2 | "sao-miao": "스캔", 3 | "quan-ju-pei-zhi": "전체 설정", 4 | "bian-ji-qu": "편집 영역", 5 | "zhong-zhi-shu-ju": "데이터 초기화", 6 | "zhong-zhi-zhu-shi": "주석 초기화", 7 | "xuan-ze-biao-qing": "이모지 선택", 8 | "tong-yong": "일반", 9 | "yu-yan": "언어", 10 | "zi-dong-da-kai-wen-jian": "파일 자동 열기", 11 | "dao-chu-hou-zhan-shi-cai-dai": "내보낸 후 배너 표시", 12 | "tong-bu-gun-dong": "동기화 스크롤", 13 | "xian-shi-tu-biao": "아이콘 표시", 14 | "hu-lve-wen-jian-jia": "폴더 무시", 15 | "hu-lve-yi-kai-tou-de-wen-jian-jia": "'.'로 시작하는 폴더 무시", 16 | "zhi-sao-miao-wen-jian-jia": "폴더만 스캔", 17 | "hu-lve-yi-kai-tou-de-wen-jian": "'.'로 시작하는 파일 무시", 18 | "hu-lve-wen-jian-lei-xing": "파일 형식 무시", 19 | "sao-miao-shen-du": "스캔 깊이", 20 | "dao-chu-wen-ben": "텍스트 내보내기", 21 | "mo-ren-ming-cheng": "기본 이름", 22 | "guan-yu": "정보", 23 | "dang-qian-ban-ben": "현재 버전", 24 | "kai-fa-zhe": "개발자", 25 | "qi-ta-xin-xi": "기타 정보", 26 | "kai-yuan": "오픈 소스", 27 | "github-di-zhi": "GitHub 주소", 28 | "guan-fang-wen-dang": "공식 문서", 29 | "gan-xie-star": ", 스타 ⭐️ 감사합니다", 30 | "dian-wo-cha-kan": "⚡️ 클릭해서 보기", 31 | "zong-ji-treedatalength": "총계 {0}", 32 | "wen-jian-jia-foldernumber": "폴더 {0}", 33 | "wen-jian-filenumber": "파일 {0}", 34 | "yu-lan-qu": "미리보기 영역", 35 | "fu-zhi": "복사", 36 | "dao-chu": "내보내기", 37 | "yu-lan-pei-zhi": "미리보기 설정", 38 | "zhu-shi-ge-shi-hua": "주석 포맷", 39 | "qiao-liang-zui-duan-zi-fu-shu": "최소 다리 문자 수", 40 | "qiao-liang-tian-chong-zi-fu": "다리 채우기 문자", 41 | "shi-zhong-xian-shi-qiao-liang": "항상 다리 표시", 42 | "qing-shu-ru-mo-ren-ming-cheng": "기본 이름을 입력하세요", 43 | "qing-shu-ru-sao-miao-shen-du": "스캔 깊이를 입력하세요", 44 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-jia": "무시할 폴더를 선택하세요", 45 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-lei-xing": "무시할 파일 형식을 선택하세요", 46 | "qing-xuan-ze-yu-yan": "언어를 선택하세요", 47 | "qing-shu-ru-dan-zi-jie-tian-chong-zi-fu": "단일 바이트 채우기 문자를 입력하세요", 48 | "qing-shu-ru-qiao-liang-zui-duan-zi-fu-shu": "최소 다리 문자 수를 입력하세요", 49 | "qing-shu-ru-ge-shi-hua-zi-fu-chuan": "포맷 문자열을 입력하세요", 50 | "qing-shu-ru-zhu-shi": "주석을 입력하세요", 51 | "zhong-zhi-zhu-shi-cheng-gong": "주석이 성공적으로 초기화되었습니다!", 52 | "zhong-zhi-shu-ju-cheng-gong": "데이터가 성공적으로 초기화되었습니다!", 53 | "yu-lan-qu-pei-zhi": "미리보기 설정", 54 | "copySuccess": "복사 성공!", 55 | "sco-miao-mu-lu": "스캔 디렉토리", 56 | "pei-zhi-ruan-jian-xian-shi-yu-yan": "소프트웨어 언어 설정", 57 | "dao-chu-wen-jian-hou-zi-dong-da-kai": "파일 내보낸 후 자동으로 열기", 58 | "dao-chu-cheng-gong-hou-zi-dong-zhan-shi-cai-dan": "내보내기 성공 후 자동으로 배너 표시", 59 | "bian-ji-qu-he-yu-lan-qu-shi-fou-tong-bu-gun-dong": "편집 영역과 미리보기 영역 동기화 스크롤 여부", 60 | "shi-fou-xian-shi-wen-jian-jia-he-wen-jian-de-tu-biao": "폴더와 파일 아이콘 표시 여부", 61 | "hu-lve-bu-xu-yao-sao-miao-de-wen-jian-jia-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-jia-li-ru-macos-xia-wei-builddistwindows-xia-wei-builddist": "스캔할 필요 없는 폴더를 무시하여 스캔 효율을 높이세요. 필터링할 폴더를 추가할 수 있습니다. 예: macOS에서는 /build, /dist, Windows에서는 \\build, \\dist.", 62 | "zhe-lei-wen-jian-jia-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian-jia": "이런 폴더는 macOS와 Linux에서 기본적으로 숨겨진 폴더입니다.", 63 | "hu-lve-suo-you-wen-jian-zhi-sao-miao-wen-jian-jia": "모든 파일을 무시하고 폴더만 스캔", 64 | "zhe-lei-wen-jian-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian": "이런 파일은 macOS와 Linux에서 기본적으로 숨겨진 파일입니다.", 65 | "xuan-ze-hu-lve-bu-xu-yao-de-wen-jian-lei-xing-yi-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-lei-xing": "스캔 효율을 높이기 위해 필요 없는 파일 형식을 선택하여 무시할 수 있습니다. 필터링할 파일 형식을 추가할 수 있습니다.", 66 | "she-zhi-sao-miao-mu-lu-de-shen-du-0-wei-suo-you-shen-du-mei-di-zeng-yi-ge-shu-zi-ze-dai-biao-sao-miao-shen-du-1": "스캔 디렉토리의 깊이를 설정합니다. 0은 모든 깊이, 각 숫자 증가마다 스캔 깊이가 +1을 의미합니다.", 67 | "p1": "검색 (영어만 지원, 예: tree)", 68 | "p2": "이모지를 찾을 수 없습니다", 69 | "p3": "검색 결과", 70 | "p4": "자주 사용하는", 71 | "p5": "웃는 얼굴과 이모지", 72 | "p6": "사람과 신체", 73 | "p7": "동물과 자연", 74 | "p8": "음식과 음료", 75 | "p9": "활동", 76 | "p10": "여행과 장소", 77 | "p11": "물건", 78 | "p12": "기호", 79 | "p13": "깃발", 80 | "p14": "사용자 정의", 81 | "gen-sui-xi-tong": "시스템 따르기", 82 | "tu-pian-yi-fu-zhi-dao-jian-tie-ban": "이미지가 클립보드에 복사되었습니다", 83 | "fu-zhi-wen-ben": "텍스트 복사", 84 | "fu-zhi-tu-pian": "이미지 복사", 85 | "dao-chu-tu-pian": "이미지 내보내기", 86 | "wen-jian-jia-jie-wei-xian-shi": "폴더 끝에 표시 /", 87 | "zhong-zhi-fan-wei": "범위 재설정", 88 | "huan-cun": "캐시", 89 | "qing": "부탁드립니다", 90 | "wen-jian-jia-lu-ru-shu-ju": "폴더 데이터 입력", 91 | "she-zhi": "설정", 92 | "que-ren-zhong-zhi-suo-you-shu-ju-ma": "모든 데이터를 재설정하시겠습니까?", 93 | "zhong-zhi": "재설정", 94 | "zhong-zhi-cheng-gong": "재설정 성공", 95 | "que-ding": "확인", 96 | "qu-xiao": "취소" 97 | } 98 | -------------------------------------------------------------------------------- /src/renderer/src/locales/pt.json: -------------------------------------------------------------------------------- 1 | { 2 | "sao-miao": "Escanear", 3 | "quan-ju-pei-zhi": "Configuração global", 4 | "bian-ji-qu": "Área de edição", 5 | "zhong-zhi-shu-ju": "Redefinir dados", 6 | "zhong-zhi-zhu-shi": "Redefinir anotações", 7 | "xuan-ze-biao-qing": "Escolher emoji", 8 | "tong-yong": "Geral", 9 | "yu-yan": "Idioma", 10 | "zi-dong-da-kai-wen-jian": "Abrir arquivos automaticamente", 11 | "dao-chu-hou-zhan-shi-cai-dai": "Mostrar fita após exportar", 12 | "tong-bu-gun-dong": "Rolagem sincronizada", 13 | "xian-shi-tu-biao": "Mostrar ícones", 14 | "hu-lve-wen-jian-jia": "Ignorar pastas", 15 | "hu-lve-yi-kai-tou-de-wen-jian-jia": "Ignorar pastas que começam com \".\"", 16 | "zhi-sao-miao-wen-jian-jia": "Escanear apenas pastas", 17 | "hu-lve-yi-kai-tou-de-wen-jian": "Ignorar arquivos que começam com \".\"", 18 | "hu-lve-wen-jian-lei-xing": "Ignorar tipos de arquivos", 19 | "sao-miao-shen-du": "Profundidade de escaneamento", 20 | "dao-chu-wen-ben": "Exportar texto", 21 | "mo-ren-ming-cheng": "Nome padrão", 22 | "guan-yu": "Sobre", 23 | "dang-qian-ban-ben": "Versão atual", 24 | "kai-fa-zhe": "Desenvolvedor", 25 | "qi-ta-xin-xi": "Outras informações", 26 | "kai-yuan": "Código aberto", 27 | "github-di-zhi": "Endereço do GitHub", 28 | "guan-fang-wen-dang": "Documentação oficial", 29 | "gan-xie-star": ",Obrigado pela estrela ⭐️", 30 | "dian-wo-cha-kan": "⚡️ Clique para ver", 31 | "zong-ji-treedatalength": "Total {0}", 32 | "wen-jian-jia-foldernumber": "Pasta {0}", 33 | "wen-jian-filenumber": "Arquivo {0}", 34 | "yu-lan-qu": "Área de visualização", 35 | "fu-zhi": "Copiar", 36 | "dao-chu": "Exportar", 37 | "yu-lan-pei-zhi": "Configuração de visualização", 38 | "zhu-shi-ge-shi-hua": "Formatação de anotações", 39 | "qiao-liang-zui-duan-zi-fu-shu": "Número mínimo de caracteres da ponte", 40 | "qiao-liang-tian-chong-zi-fu": "Caractere de preenchimento da ponte", 41 | "shi-zhong-xian-shi-qiao-liang": "Mostrar sempre a ponte", 42 | "qing-shu-ru-mo-ren-ming-cheng": "Digite o nome padrão", 43 | "qing-shu-ru-sao-miao-shen-du": "Digite a profundidade de escaneamento", 44 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-jia": "Selecione as pastas a serem ignoradas", 45 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-lei-xing": "Selecione os tipos de arquivos a serem ignorados", 46 | "qing-xuan-ze-yu-yan": "Selecione o idioma", 47 | "qing-shu-ru-dan-zi-jie-tian-chong-zi-fu": "Digite o caractere de preenchimento de byte único", 48 | "qing-shu-ru-qiao-liang-zui-duan-zi-fu-shu": "Digite o número mínimo de caracteres da ponte", 49 | "qing-shu-ru-ge-shi-hua-zi-fu-chuan": "Digite a string de formatação", 50 | "qing-shu-ru-zhu-shi": "Digite a anotação", 51 | "zhong-zhi-zhu-shi-cheng-gong": "Redefinir anotações com sucesso!", 52 | "zhong-zhi-shu-ju-cheng-gong": "Redefinir dados com sucesso!", 53 | "yu-lan-qu-pei-zhi": "Configuração da área de visualização", 54 | "copySuccess": "Copiado com sucesso!", 55 | "sco-miao-mu-lu": "Escanear diretório", 56 | "pei-zhi-ruan-jian-xian-shi-yu-yan": "Configurar o idioma de exibição do software", 57 | "dao-chu-wen-jian-hou-zi-dong-da-kai": "Abrir arquivos automaticamente após exportar", 58 | "dao-chu-cheng-gong-hou-zi-dong-zhan-shi-cai-dan": "Mostrar fita automaticamente após exportar com sucesso", 59 | "bian-ji-qu-he-yu-lan-qu-shi-fou-tong-bu-gun-dong": "Se a área de edição e a área de visualização devem rolar sincronizadamente", 60 | "shi-fou-xian-shi-wen-jian-jia-he-wen-jian-de-tu-biao": "Se deve exibir ícones de pastas e arquivos", 61 | "hu-lve-bu-xu-yao-sao-miao-de-wen-jian-jia-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-jia-li-ru-macos-xia-wei-builddistwindows-xia-wei-builddist": "Ignorar pastas desnecessárias para escaneamento, melhorar a eficiência de escaneamento. Pastas a serem ignoradas podem ser adicionadas, por exemplo: /build e /dist no macOS, \\build e \\dist no Windows.", 62 | "zhe-lei-wen-jian-jia-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian-jia": "Essas pastas são pastas ocultas por padrão no macOS e Linux", 63 | "hu-lve-suo-you-wen-jian-zhi-sao-miao-wen-jian-jia": "Ignorar todos os arquivos, escanear apenas pastas", 64 | "zhe-lei-wen-jian-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian": "Esses arquivos são arquivos ocultos por padrão no macOS e Linux", 65 | "xuan-ze-hu-lve-bu-xu-yao-de-wen-jian-lei-xing-yi-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-lei-xing": "Escolha os tipos de arquivos a serem ignorados para melhorar a eficiência de escaneamento. Tipos de arquivos a serem ignorados podem ser adicionados.", 66 | "she-zhi-sao-miao-mu-lu-de-shen-du-0-wei-suo-you-shen-du-mei-di-zeng-yi-ge-shu-zi-ze-dai-biao-sao-miao-shen-du-1": "Configurar a profundidade do diretório de escaneamento, 0 para todas as profundidades, cada incremento de número representa +1 de profundidade de escaneamento", 67 | "p1": "Pesquisar (apenas suporta inglês, por exemplo: tree)", 68 | "p2": "Emoji não encontrado", 69 | "p3": "Resultados da pesquisa", 70 | "p4": "Usados com frequência", 71 | "p5": "Rostos e emojis", 72 | "p6": "Pessoas e corpo", 73 | "p7": "Animais e natureza", 74 | "p8": "Comida e bebida", 75 | "p9": "Atividades", 76 | "p10": "Viagens e lugares", 77 | "p11": "Itens", 78 | "p12": "Símbolos", 79 | "p13": "Bandeiras", 80 | "p14": "Personalizado", 81 | "gen-sui-xi-tong": "Seguir sistema", 82 | "tu-pian-yi-fu-zhi-dao-jian-tie-ban": "Imagem copiada para a área de transferência", 83 | "fu-zhi-wen-ben": "Copiar texto", 84 | "fu-zhi-tu-pian": "Copiar imagem", 85 | "dao-chu-tu-pian": "Exportar imagem", 86 | "wen-jian-jia-jie-wei-xian-shi": "Mostrar final da pasta /", 87 | "zhong-zhi-fan-wei": "Redefinir intervalo", 88 | "huan-cun": "Cache", 89 | "qing": "Por favor", 90 | "wen-jian-jia-lu-ru-shu-ju": "Inserir dados da pasta", 91 | "she-zhi": "Configurações", 92 | "que-ren-zhong-zhi-suo-you-shu-ju-ma": "Tem certeza de que deseja redefinir todos os dados?", 93 | "zhong-zhi": "Redefinir", 94 | "zhong-zhi-cheng-gong": "Redefinição bem-sucedida", 95 | "que-ding": "Confirmar", 96 | "qu-xiao": "Cancelar" 97 | } 98 | -------------------------------------------------------------------------------- /src/renderer/src/locales/ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "sao-miao": "Сканировать", 3 | "quan-ju-pei-zhi": "Глобальная настройка", 4 | "bian-ji-qu": "Область редактирования", 5 | "zhong-zhi-shu-ju": "Сброс данных", 6 | "zhong-zhi-zhu-shi": "Сброс комментариев", 7 | "xuan-ze-biao-qing": "Выбрать эмодзи", 8 | "tong-yong": "Общее", 9 | "yu-yan": "Язык", 10 | "zi-dong-da-kai-wen-jian": "Автоматически открывать файл", 11 | "dao-chu-hou-zhan-shi-cai-dai": "Показать ленты после экспорта", 12 | "tong-bu-gun-dong": "Синхронная прокрутка", 13 | "xian-shi-tu-biao": "Показать значки", 14 | "hu-lve-wen-jian-jia": "Игнорировать папки", 15 | "hu-lve-yi-kai-tou-de-wen-jian-jia": "Игнорировать папки, начинающиеся с \".\"", 16 | "zhi-sao-miao-wen-jian-jia": "Сканировать только папки", 17 | "hu-lve-yi-kai-tou-de-wen-jian": "Игнорировать файлы, начинающиеся с \".\"", 18 | "hu-lve-wen-jian-lei-xing": "Игнорировать типы файлов", 19 | "sao-miao-shen-du": "Глубина сканирования", 20 | "dao-chu-wen-ben": "Экспортировать текст", 21 | "mo-ren-ming-cheng": "Имя по умолчанию", 22 | "guan-yu": "О программе", 23 | "dang-qian-ban-ben": "Текущая версия", 24 | "kai-fa-zhe": "Разработчик", 25 | "qi-ta-xin-xi": "Дополнительная информация", 26 | "kai-yuan": "Открытый исходный код", 27 | "github-di-zhi": "Адрес GitHub", 28 | "guan-fang-wen-dang": "Официальная документация", 29 | "gan-xie-star": ",Спасибо за Star ⭐️", 30 | "dian-wo-cha-kan": "⚡️ Нажмите здесь, чтобы посмотреть", 31 | "zong-ji-treedatalength": "Итого {0}", 32 | "wen-jian-jia-foldernumber": "Папка {0}", 33 | "wen-jian-filenumber": "Файл {0}", 34 | "yu-lan-qu": "Область предварительного просмотра", 35 | "fu-zhi": "Копировать", 36 | "dao-chu": "Экспортировать", 37 | "yu-lan-pei-zhi": "Настройка предварительного просмотра", 38 | "zhu-shi-ge-shi-hua": "Форматирование комментариев", 39 | "qiao-liang-zui-duan-zi-fu-shu": "Минимальная длина моста", 40 | "qiao-liang-tian-chong-zi-fu": "Заполнитель моста", 41 | "shi-zhong-xian-shi-qiao-liang": "Всегда показывать мост", 42 | "qing-shu-ru-mo-ren-ming-cheng": "Введите имя по умолчанию", 43 | "qing-shu-ru-sao-miao-shen-du": "Введите глубину сканирования", 44 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-jia": "Выберите папки, которые нужно игнорировать", 45 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-lei-xing": "Выберите типы файлов, которые нужно игнорировать", 46 | "qing-xuan-ze-yu-yan": "Выберите язык", 47 | "qing-shu-ru-dan-zi-jie-tian-chong-zi-fu": "Введите одиночный байт заполнитель", 48 | "qing-shu-ru-qiao-liang-zui-duan-zi-fu-shu": "Введите минимальную длину моста", 49 | "qing-shu-ru-ge-shi-hua-zi-fu-chuan": "Введите форматированную строку", 50 | "qing-shu-ru-zhu-shi": "Введите комментарий", 51 | "zhong-zhi-zhu-shi-cheng-gong": "Успешный сброс комментариев!", 52 | "zhong-zhi-shu-ju-cheng-gong": "Успешный сброс данных!", 53 | "yu-lan-qu-pei-zhi": "Настройка области предварительного просмотра", 54 | "copySuccess": "Копирование успешно!", 55 | "sco-miao-mu-lu": "Сканировать каталог", 56 | "pei-zhi-ruan-jian-xian-shi-yu-yan": "Настройка языка отображения программы", 57 | "dao-chu-wen-jian-hou-zi-dong-da-kai": "Автоматически открывать файлы после экспорта", 58 | "dao-chu-cheng-gong-hou-zi-dong-zhan-shi-cai-dan": "Автоматически показывать ленты после успешного экспорта", 59 | "bian-ji-qu-he-yu-lan-qu-shi-fou-tong-bu-gun-dong": "Синхронизировать прокрутку области редактирования и области предварительного просмотра", 60 | "shi-fou-xian-shi-wen-jian-jia-he-wen-jian-de-tu-biao": "Показывать ли значки папок и файлов", 61 | "hu-lve-bu-xu-yao-sao-miao-de-wen-jian-jia-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-jia-li-ru-macos-xia-wei-builddistwindows-xia-wei-builddist": "Игнорировать ненужные папки для сканирования, чтобы повысить эффективность сканирования. Можно добавить папки, которые нужно игнорировать, например: /build, /dist для macOS и \\build, \\dist для Windows.", 62 | "zhe-lei-wen-jian-jia-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian-jia": "Эти папки по умолчанию скрыты на MacOS и Linux", 63 | "hu-lve-suo-you-wen-jian-zhi-sao-miao-wen-jian-jia": "Игнорировать все файлы, сканировать только папки", 64 | "zhe-lei-wen-jian-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian": "Эти файлы по умолчанию скрыты на MacOS и Linux", 65 | "xuan-ze-hu-lve-bu-xu-yao-de-wen-jian-lei-xing-yi-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-lei-xing": "Выберите типы файлов, которые нужно игнорировать, чтобы повысить эффективность сканирования. Можно добавить типы файлов, которые нужно игнорировать.", 66 | "she-zhi-sao-miao-mu-lu-de-shen-du-0-wei-suo-you-shen-du-mei-di-zeng-yi-ge-shu-zi-ze-dai-biao-sao-miao-shen-du-1": "Настройте глубину сканирования каталога, 0 означает все глубины, каждое увеличение числа на 1 означает увеличение глубины сканирования на 1", 67 | "p1": "Поиск (только на английском, например: tree)", 68 | "p2": "Эмодзи не найдено", 69 | "p3": "Результаты поиска", 70 | "p4": "Популярные", 71 | "p5": "Смайлы и эмодзи", 72 | "p6": "Персонажи и тела", 73 | "p7": "Животные и природа", 74 | "p8": "Еда и напитки", 75 | "p9": "Мероприятия", 76 | "p10": "Путешествия и места", 77 | "p11": "Предметы", 78 | "p12": "Символы", 79 | "p13": "Флаги", 80 | "p14": "Настроить", 81 | "gen-sui-xi-tong": "Следовать за системой", 82 | "tu-pian-yi-fu-zhi-dao-jian-tie-ban": "Изображение скопировано в буфер обмена", 83 | "fu-zhi-wen-ben": "Копировать текст", 84 | "fu-zhi-tu-pian": "Копировать изображение", 85 | "dao-chu-tu-pian": "Экспортировать изображение", 86 | "wen-jian-jia-jie-wei-xian-shi": "Показать конец папки /", 87 | "zhong-zhi-fan-wei": "Сбросить диапазон", 88 | "huan-cun": "Кэш", 89 | "qing": "Пожалуйста", 90 | "wen-jian-jia-lu-ru-shu-ju": "Ввести данные папки", 91 | "she-zhi": "Настройки", 92 | "que-ren-zhong-zhi-suo-you-shu-ju-ma": "Вы уверены, что хотите сбросить все данные?", 93 | "zhong-zhi": "Сброс", 94 | "zhong-zhi-cheng-gong": "Сброс выполнен успешно", 95 | "que-ding": "Подтвердить", 96 | "qu-xiao": "Отменить" 97 | } 98 | -------------------------------------------------------------------------------- /src/renderer/src/locales/zh.json: -------------------------------------------------------------------------------- 1 | { 2 | "sao-miao": "扫描", 3 | "quan-ju-pei-zhi": "全局配置", 4 | "bian-ji-qu": "编辑区", 5 | "zhong-zhi-shu-ju": "重置数据", 6 | "zhong-zhi-zhu-shi": "重置注释", 7 | "xuan-ze-biao-qing": "选择表情", 8 | "tong-yong": "通用", 9 | "yu-yan": "语言", 10 | "zi-dong-da-kai-wen-jian": "自动打开文件", 11 | "dao-chu-hou-zhan-shi-cai-dai": "导出后展示彩带", 12 | "tong-bu-gun-dong": "同步滚动", 13 | "xian-shi-tu-biao": "显示图标", 14 | "hu-lve-wen-jian-jia": "忽略文件夹", 15 | "hu-lve-yi-kai-tou-de-wen-jian-jia": "忽略以 \".\" 开头的文件夹", 16 | "zhi-sao-miao-wen-jian-jia": "只扫描文件夹", 17 | "hu-lve-yi-kai-tou-de-wen-jian": "忽略以 \".\" 开头的文件", 18 | "hu-lve-wen-jian-lei-xing": "忽略文件类型", 19 | "sao-miao-shen-du": "扫描深度", 20 | "dao-chu-wen-ben": "导出文本", 21 | "mo-ren-ming-cheng": "默认名称", 22 | "guan-yu": "关于", 23 | "dang-qian-ban-ben": "当前版本", 24 | "kai-fa-zhe": "开发者", 25 | "qi-ta-xin-xi": "其他信息", 26 | "kai-yuan": "开源", 27 | "github-di-zhi": "GitHub 地址", 28 | "guan-fang-wen-dang": "官方文档", 29 | "gan-xie-star": ",非常感谢 Star ⭐️", 30 | "dian-wo-cha-kan": "⚡️ 点我查看", 31 | "zong-ji-treedatalength": "总计 {0}", 32 | "wen-jian-jia-foldernumber": "文件夹 {0}", 33 | "wen-jian-filenumber": "文件 {0}", 34 | "yu-lan-qu": "预览区", 35 | "fu-zhi": "复制", 36 | "dao-chu": "导出", 37 | "yu-lan-pei-zhi": "预览配置", 38 | "zhu-shi-ge-shi-hua": "注释格式化", 39 | "qiao-liang-zui-duan-zi-fu-shu": "桥梁最短字符数", 40 | "qiao-liang-tian-chong-zi-fu": "桥梁填充字符", 41 | "shi-zhong-xian-shi-qiao-liang": "始终显示桥梁", 42 | "qing-shu-ru-mo-ren-ming-cheng": "请输入默认名称", 43 | "qing-shu-ru-sao-miao-shen-du": "请输入扫描深度", 44 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-jia": "请选择需要忽略的文件夹", 45 | "qing-xuan-ze-xu-yao-hu-lve-de-wen-jian-lei-xing": "请选择需要忽略的文件类型", 46 | "qing-xuan-ze-yu-yan": "请选择语言", 47 | "qing-shu-ru-dan-zi-jie-tian-chong-zi-fu": "请输入单字节填充字符", 48 | "qing-shu-ru-qiao-liang-zui-duan-zi-fu-shu": "请输入桥梁最短字符数", 49 | "qing-shu-ru-ge-shi-hua-zi-fu-chuan": "请输入格式化字符串", 50 | "qing-shu-ru-zhu-shi": "请输入注释", 51 | "zhong-zhi-zhu-shi-cheng-gong": "重置注释成功!", 52 | "zhong-zhi-shu-ju-cheng-gong": "重置数据成功!", 53 | "yu-lan-qu-pei-zhi": "预览区配置", 54 | "copySuccess": "复制成功!", 55 | "sco-miao-mu-lu": "扫描目录", 56 | "pei-zhi-ruan-jian-xian-shi-yu-yan": "配置软件显示语言", 57 | "dao-chu-wen-jian-hou-zi-dong-da-kai": "导出文件后自动打开", 58 | "dao-chu-cheng-gong-hou-zi-dong-zhan-shi-cai-dan": "导出成功后自动展示彩带", 59 | "bian-ji-qu-he-yu-lan-qu-shi-fou-tong-bu-gun-dong": "编辑区和预览区是否同步滚动", 60 | "shi-fou-xian-shi-wen-jian-jia-he-wen-jian-de-tu-biao": "是否显示文件夹和文件的图标", 61 | "hu-lve-bu-xu-yao-sao-miao-de-wen-jian-jia-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-jia-li-ru-macos-xia-wei-builddistwindows-xia-wei-builddist": "忽略不需要扫描的文件夹,提高扫描效率。可新增需要过滤的文件夹,例如:macOS 下为 /build、/dist,Windows 下为 \\build、\\dist。", 62 | "zhe-lei-wen-jian-jia-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian-jia": "这类文件夹在 MacOS 和 Linux 上是默认隐藏的文件夹", 63 | "hu-lve-suo-you-wen-jian-zhi-sao-miao-wen-jian-jia": "忽略所有文件,只扫描文件夹", 64 | "zhe-lei-wen-jian-zai-macos-he-linux-shang-shi-mo-ren-yin-cang-de-wen-jian": "这类文件在 MacOS 和 Linux 上是默认隐藏的文件", 65 | "xuan-ze-hu-lve-bu-xu-yao-de-wen-jian-lei-xing-yi-ti-gao-sao-miao-xiao-shuai-ke-xin-zeng-xu-yao-guo-lv-de-wen-jian-lei-xing": "选择忽略不需要的文件类型,以提高扫描效率。可新增需要过滤的文件类型。", 66 | "she-zhi-sao-miao-mu-lu-de-shen-du-0-wei-suo-you-shen-du-mei-di-zeng-yi-ge-shu-zi-ze-dai-biao-sao-miao-shen-du-1": "设置扫描目录的深度,0 为所有深度,每递增一个数字则代表扫描深度 +1", 67 | "p1": "搜索(仅支持英文,如: 树 tree)", 68 | "p2": "未找到表情符号", 69 | "p3": "搜索结果", 70 | "p4": "常用", 71 | "p5": "笑脸和表情", 72 | "p6": "人物和身体", 73 | "p7": "动物和自然", 74 | "p8": "食物和饮料", 75 | "p9": "活动", 76 | "p10": "旅行和地点", 77 | "p11": "物品", 78 | "p12": "符号", 79 | "p13": "旗帜", 80 | "p14": "自定义", 81 | "gen-sui-xi-tong": "跟随系统", 82 | "tu-pian-yi-fu-zhi-dao-jian-tie-ban": "图片已复制到剪贴板", 83 | "fu-zhi-wen-ben": "复制文本", 84 | "fu-zhi-tu-pian": "复制图片", 85 | "dao-chu-tu-pian": "导出图片", 86 | "wen-jian-jia-jie-wei-xian-shi": "文件夹结尾显示 /", 87 | "zhong-zhi-fan-wei": "重置范围", 88 | "huan-cun": "缓存", 89 | "qing": "请", 90 | "wen-jian-jia-lu-ru-shu-ju": "文件夹录入数据", 91 | "she-zhi": "设置", 92 | "que-ren-zhong-zhi-suo-you-shu-ju-ma": "确认重置所有数据吗?", 93 | "zhong-zhi": "重置", 94 | "zhong-zhi-cheng-gong": "重置成功", 95 | "que-ding": "确定", 96 | "qu-xiao": "取消", 97 | "tong-yong-tu-biao": "通用图标", 98 | "bian-cheng-tu-biao": "编程图标", 99 | "hui-fu-mo-ren": "恢复默认", 100 | "jin-bian-ji-qu": "仅编辑区", 101 | "jin-yu-lan-qu": "仅预览区", 102 | "xian-shi-dai-ma-kuai": "显示代码块", 103 | "fu-zhi-he-dao-chu-wen-ben-shi-fou-xian-shi-dai-ma-kuai": "复制和导出文本是否显示代码块" 104 | } 105 | -------------------------------------------------------------------------------- /src/renderer/src/main.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-07-06 11:28 5 | * @LastAuthor : itchaox 6 | * @LastTime : 2024-08-10 00:19 7 | * @desc : 8 | */ 9 | //全局初始化样式 10 | import 'normalize.css' 11 | import './assets/main.css' 12 | 13 | import { i18n } from './locales/i18n.js' 14 | import VueVirtualScroller from 'vue-virtual-scroller' 15 | import 'vue-virtual-scroller/dist/vue-virtual-scroller.css' 16 | import zhCn from 'element-plus/dist/locale/zh-cn.mjs' 17 | import en from 'element-plus/dist/locale/en.mjs' 18 | import ElementPlus from 'element-plus' 19 | import { createApp } from 'vue' 20 | 21 | import 'element-plus/dist/index.css' 22 | import * as ElementPlusIconsVue from '@element-plus/icons-vue' 23 | 24 | import App from './App.vue' 25 | import { store } from './store' 26 | 27 | const app = createApp(App) 28 | 29 | for (const [key, component] of Object.entries(ElementPlusIconsVue)) { 30 | app.component(key, component) 31 | } 32 | 33 | let lang = 'en' 34 | // 根据缓存语言,修改语言环境 35 | const common = 36 | localStorage.getItem('annotree-common') && JSON.parse(localStorage.getItem('annotree-common')) 37 | if (common) { 38 | lang = common.languageId ?? 'en' 39 | } 40 | 41 | // i18n.global.locale = lang 42 | const _isZh = lang === 'zh' 43 | 44 | app.use(ElementPlus, { 45 | locale: _isZh ? zhCn : en 46 | }) 47 | 48 | app.use(i18n) 49 | // 将 i18n 实例暴露到全局对象 50 | window.i18n = i18n 51 | 52 | app.use(store) 53 | app.use(VueVirtualScroller) 54 | app.mount('#app') 55 | -------------------------------------------------------------------------------- /src/renderer/src/store/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-07-08 23:36 5 | * @LastAuthor : itchaox 6 | * @LastTime : 2024-07-08 23:36 7 | * @desc : 8 | */ 9 | import { createPinia } from 'pinia' 10 | import { createPersistedState } from 'pinia-plugin-persistedstate' 11 | 12 | const store = createPinia() 13 | store.use( 14 | createPersistedState({ 15 | storage: sessionStorage, 16 | auto: true 17 | }) 18 | ) 19 | 20 | export { store } 21 | -------------------------------------------------------------------------------- /src/renderer/src/store/modules/configGlobal-store.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : yanglong 4 | * @Date : 2023-05-17 13:55 5 | * @LastAuthor : itchaox 6 | * @LastTime : 2024-08-10 09:57 7 | * @desc : 全局配置 store 8 | */ 9 | 10 | import { store } from '../index' 11 | import { defineStore } from 'pinia' 12 | 13 | export const useConfigGlobalStore = defineStore({ 14 | id: 'ConfigGlobal', 15 | state: (): any => ({ 16 | // 通用 17 | COMMON: { 18 | // 语言 19 | languageId: 'en', 20 | 21 | // 导出后自动打开文件 22 | autoOpenFile: true, 23 | 24 | // 导出后展示彩蛋 25 | isEggshell: true, 26 | 27 | // 同步滚动 28 | syncScroll: true, 29 | 30 | // 是否显示文件和文件夹的图标 31 | showIcon: true, 32 | 33 | // 文件夹显示 / 34 | folderSuffix: true 35 | }, 36 | 37 | // 扫描 38 | SCAN: { 39 | // 忽略以 . 开头的文件 40 | ignoreDotFile: false, 41 | 42 | // 忽略以 . 开头的文件夹 43 | ignoreDotFolder: false, 44 | 45 | // 只扫描文件夹 46 | onlyScanFolder: false, 47 | 48 | // 扫描深度 49 | scanDeep: 0, 50 | 51 | // 忽略文件夹 52 | ignoreFolderList: [], 53 | 54 | // 忽略文件 55 | ignoreFileList: [] 56 | }, 57 | 58 | // 结果 59 | RESULT: { 60 | // 默认名称 61 | defaultFileName: 'Annotree_{YYYY}-{MM}-{DD}_{HH}-{mm}-{ss}' 62 | } 63 | }), 64 | actions: { 65 | setData(data) { 66 | this.data = data 67 | } 68 | } 69 | }) 70 | 71 | export function useConfigGlobalStoreHook() { 72 | return useConfigGlobalStore(store) 73 | } 74 | -------------------------------------------------------------------------------- /src/renderer/src/store/modules/configPreview-store.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : yanglong 4 | * @Date : 2023-05-17 13:55 5 | * @LastAuthor : itchaox 6 | * @LastTime : 2024-08-10 11:33 7 | * @desc : 预览配置 store 8 | */ 9 | 10 | import { defineStore } from 'pinia' 11 | 12 | export const useConfigPreviewStore = defineStore({ 13 | id: 'ConfigPreview', 14 | state: () => ({ 15 | // 预览 16 | PREVIEW: { 17 | // 桥梁字符 18 | bridgeChar: '-', 19 | 20 | // 桥梁最短字符数 21 | minBridge: 4, 22 | 23 | // 注释格式化 24 | noteFormat: ' # {note}', 25 | 26 | // 始终显示桥梁 27 | showBridge: false 28 | } 29 | }), 30 | actions: {} 31 | }) 32 | -------------------------------------------------------------------------------- /src/renderer/src/utils/copyImg.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-08-10 00:10 5 | * @LastAuthor : Wang Chao 6 | * @LastTime : 2024-09-19 16:21 7 | * @desc : 8 | */ 9 | 10 | import html2canvas from 'html2canvas' 11 | 12 | export function copyImg(id) { 13 | const i18n = window.i18n 14 | const { t } = i18n.global 15 | 16 | html2canvas(document.querySelector(id), { 17 | backgroundColor: '#f8f9fa', 18 | useCORS: true, //支持图片跨域 19 | scale: 1 //设置放大的倍数 20 | }).then((canvas) => { 21 | canvas.toBlob(async (blob) => { 22 | try { 23 | await navigator.clipboard.write([new ClipboardItem({ 'image/png': blob })]) 24 | ElMessage({ 25 | message: t('tu-pian-yi-fu-zhi-dao-jian-tie-ban'), 26 | type: 'success', 27 | duration: 1500, 28 | showClose: true 29 | }) 30 | } catch (err) { 31 | console.error('无法复制图片到剪贴板!', err) 32 | } 33 | }, 'image/png') 34 | }) 35 | } 36 | -------------------------------------------------------------------------------- /src/renderer/src/utils/copyTree.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-08-10 00:22 5 | * @LastAuthor : itchaox 6 | * @LastTime : 2024-08-10 00:25 7 | * @desc : 8 | */ 9 | 10 | // 复制树 11 | export async function copyTree(list, toClipboard) { 12 | // 直接拿到处理后的tree 13 | const i18n = window.i18n 14 | const { t } = i18n.global 15 | 16 | // 显示图标 17 | const result = list.map((item) => item?.value) 18 | 19 | // 换行分割数组至字符串 20 | const data = result.join('\n') 21 | 22 | try { 23 | // 复制 24 | await toClipboard(data) 25 | ElMessage({ 26 | message: t('copySuccess'), 27 | type: 'success', 28 | duration: 1500, 29 | showClose: true 30 | }) 31 | // 复制成功 32 | } catch (e) { 33 | // 复制失败 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/renderer/src/utils/exportImg.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-08-10 00:07 5 | * @LastAuthor : itchaox 6 | * @LastTime : 2024-08-10 00:09 7 | * @desc : 8 | */ 9 | 10 | import html2canvas from 'html2canvas' 11 | 12 | // 导出图片 13 | export function exportImg(id) { 14 | html2canvas(document.querySelector(id), { 15 | backgroundColor: '#f8f9fa', 16 | useCORS: true, //支持图片跨域 17 | scale: 1 //设置放大的倍数 18 | }).then((canvas) => { 19 | // 获取当前时间 20 | const now = new Date() 21 | const year = now.getFullYear() 22 | const month = String(now.getMonth() + 1).padStart(2, '0') // 月份从0开始,所以加1,并确保格式为两位数 23 | const day = String(now.getDate()).padStart(2, '0') 24 | const hours = String(now.getHours()).padStart(2, '0') 25 | const minutes = String(now.getMinutes()).padStart(2, '0') 26 | const seconds = String(now.getSeconds()).padStart(2, '0') 27 | 28 | // 格式化时间字符串 29 | const formattedDate = `${year}-${month}-${day} ${hours}-${minutes}-${seconds}` 30 | 31 | // 设置下载文件名 32 | const filename = `Annotree ${formattedDate}.png` 33 | 34 | const img = canvas.toDataURL('image/png') 35 | const link = document.createElement('a') 36 | link.href = img 37 | link.download = filename 38 | link.click() 39 | }) 40 | } 41 | -------------------------------------------------------------------------------- /src/renderer/src/utils/quickBurstConfetti.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-07-16 01:02 5 | * @LastAuthor : itchaox 6 | * @LastTime : 2024-07-16 08:04 7 | * @desc : 8 | */ 9 | import confetti from 'canvas-confetti' 10 | 11 | // 彩带 12 | export function quickBurstConfetti() { 13 | // 左侧 14 | confetti({ 15 | particleCount: 300, 16 | angle: 60, 17 | spread: 40, 18 | origin: { x: 0, y: 0.85 }, 19 | startVelocity: 70, 20 | gravity: 0.8, 21 | scalar: 1.2, 22 | drift: 0.5 23 | }) 24 | 25 | // 右侧 26 | confetti({ 27 | particleCount: 300, 28 | angle: 120, 29 | spread: 40, 30 | origin: { x: 1, y: 0.85 }, 31 | startVelocity: 70, 32 | gravity: 0.8, 33 | scalar: 1.2, 34 | drift: -0.5 35 | }) 36 | } 37 | -------------------------------------------------------------------------------- /src/renderer/src/utils/replace.element.js: -------------------------------------------------------------------------------- 1 | export function placeholders ({ data } = {}) { 2 | return [ 3 | { 4 | name: 'tree', 5 | description: '树形结构', 6 | function () { 7 | return data.tree 8 | } 9 | }, 10 | { 11 | name: 'name', 12 | description: '文件名', 13 | function () { 14 | return data.name 15 | } 16 | }, 17 | { 18 | name: 'ext', 19 | description: '扩展名', 20 | function () { 21 | return data.ext 22 | } 23 | } 24 | ] 25 | } 26 | 27 | export function replace(userString, { data }) { 28 | let result = userString 29 | placeholders({ data }).forEach(placeholder => { 30 | result = result.replace(RegExp('{' + placeholder.name + '}', 'g'), placeholder.function()) 31 | }) 32 | return result 33 | } 34 | -------------------------------------------------------------------------------- /src/renderer/src/utils/replace.fileName.js: -------------------------------------------------------------------------------- 1 | import dayjs from 'dayjs' 2 | import { placeholdersUtilDay } from './replace.util.day' 3 | 4 | export function placeholders ({ now } = {}) { 5 | return [ 6 | ...placeholdersUtilDay({ now }) 7 | ] 8 | } 9 | 10 | export function replace (userString) { 11 | let result = userString 12 | placeholders({ now: dayjs() }).forEach(placeholder => { 13 | result = result.replace(RegExp('{' + placeholder.name + '}', 'g'), placeholder.function()) 14 | }) 15 | return result 16 | } 17 | -------------------------------------------------------------------------------- /src/renderer/src/utils/replace.note.js: -------------------------------------------------------------------------------- 1 | export function placeholders ({ data } = {}) { 2 | return [ 3 | { 4 | name: 'note', 5 | description: '备注内容', 6 | function () { 7 | return data.note 8 | } 9 | } 10 | ] 11 | } 12 | 13 | export function replace(userString, { data }) { 14 | let result = userString 15 | placeholders({ data }).forEach(placeholder => { 16 | result = result.replace(RegExp('{' + placeholder.name + '}', 'g'), placeholder.function()) 17 | }) 18 | return result 19 | } 20 | -------------------------------------------------------------------------------- /src/renderer/src/utils/replace.util.day.js: -------------------------------------------------------------------------------- 1 | export function placeholdersUtilDay ({ now } = {}) { 2 | return [ 3 | { 4 | name: 'time', 5 | description: '时间戳', 6 | function () { 7 | return now.unix() 8 | } 9 | }, 10 | { name: 'YY', description: '两位数的年份', function () { return now.format('YY') } }, 11 | { name: 'YYYY', description: '四位数的年份', function () { return now.format('YYYY') } }, 12 | { name: 'M', description: '月份,从 1 开始', function () { return now.format('M') } }, 13 | { name: 'MM', description: '月份,两位数', function () { return now.format('MM') } }, 14 | { name: 'MMM', description: '简写的月份名称', function () { return now.format('MMM') } }, 15 | { name: 'MMMM', description: '完整的月份名称', function () { return now.format('MMMM') } }, 16 | { name: 'D', description: '月份里的一天', function () { return now.format('D') } }, 17 | { name: 'DD', description: '月份里的一天,两位数', function () { return now.format('DD') } }, 18 | { name: 'd', description: '一周中的一天,星期天是 0', function () { return now.format('d') } }, 19 | { name: 'dd', description: '最简写的一周中一天的名称', function () { return now.format('dd') } }, 20 | { name: 'ddd', description: '简写的一周中一天的名称', function () { return now.format('ddd') } }, 21 | { name: 'dddd', description: '一周中一天的名称', function () { return now.format('dddd') } }, 22 | { name: 'H', description: '小时', function () { return now.format('H') } }, 23 | { name: 'HH', description: '小时,两位数', function () { return now.format('HH') } }, 24 | { name: 'h', description: '小时, 12 小时制', function () { return now.format('h') } }, 25 | { name: 'hh', description: '小时, 12 小时制, 两位数', function () { return now.format('hh') } }, 26 | { name: 'm', description: '分钟', function () { return now.format('m') } }, 27 | { name: 'mm', description: '分钟,两位数', function () { return now.format('mm') } }, 28 | { name: 's', description: '秒', function () { return now.format('s') } }, 29 | { name: 'ss', description: '秒 两位数', function () { return now.format('ss') } }, 30 | { name: 'SSS', description: '毫秒 三位数', function () { return now.format('SSS') } }, 31 | { name: 'Z', description: 'UTC 的偏移量', function () { return now.format('Z') } }, 32 | { name: 'ZZ', description: 'UTC 的偏移量,数字前面加上 0', function () { return now.format('ZZ') } }, 33 | { name: 'A', description: 'AM PM', function () { return now.format('A') } }, 34 | { name: 'a', description: 'am pm', function () { return now.format('a') } } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /src/renderer/src/utils/scan.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : itchaox 4 | * @Date : 2024-04-03 15:45 5 | * @LastAuthor : itchaox 6 | * @LastTime : 2024-08-01 10:27 7 | * @desc : 8 | */ 9 | import fs from 'fs' 10 | import path from 'path' 11 | import ignore from 'ignore' 12 | 13 | /** 14 | * 返回传入目录的子文件数据 15 | * @param {Object} param0 {String} folderPath 文件夹路径 16 | * @param {Object} param0 {Boolean} needCheckIsFolder 判断传入的是否为文件夹 17 | */ 18 | async function scan({ 19 | // 文件夹目录 20 | folderPath, 21 | // 忽略文件路径 22 | ignorePath, 23 | // 忽略的文件类型 24 | ignoreExt, 25 | // 忽略文件 26 | ignoreFile, 27 | // 忽略点开头的文件 28 | ignoreDotStartFile, 29 | // 忽略点开头的文件夹 30 | ignoreDotStartFolder, 31 | // 扫描深度 0 为没有限制 32 | deep, 33 | // 当前层级 34 | levelCurrent = 1, 35 | // 判断传入的是否为文件夹 36 | needCheckIsFolder = false, 37 | // 默认根目录 38 | rootFolderPath = folderPath 39 | }) { 40 | let result = [] 41 | // 层级检测 42 | if (deep !== 0 && levelCurrent > deep) return result 43 | // 防止拖拽导入的路径不是文件夹,这个判断只在递归的第一次触发 44 | if (needCheckIsFolder && !(await fs.statSync(folderPath).isDirectory())) return result 45 | // 检查该路径是否忽略 46 | function isIgnoreByPath(fileOrFolderPath) { 47 | let result = false 48 | for (const rule of ignorePath) { 49 | if (rule === fileOrFolderPath) result = true 50 | } 51 | return result 52 | } 53 | 54 | // FIXME 这里获取了文件夹的内容信息 55 | 56 | // 读取 .gitignore 文件 57 | const gitignorePath = path.join(rootFolderPath, '.gitignore') 58 | 59 | const isGitIgnorePath = fs.existsSync(gitignorePath) 60 | 61 | let ig 62 | // 路径存在才处理 63 | if (isGitIgnorePath) { 64 | const ignoreRules = fs.readFileSync(gitignorePath, 'utf8') 65 | 66 | // 处理 ignoreRules 67 | const processedRules = ignoreRules 68 | .split('\n') // 按行分割 69 | .map((rule) => rule.trim()) // 去除每行的前后空白 70 | .filter((rule) => rule && !rule.startsWith('#')) // 过滤掉空行和注释行 71 | .flatMap((rule) => { 72 | // 如果规则以 '/' 结尾,则添加规则本身去掉 '/' 后的字符串,并换行 73 | if (rule.endsWith('/')) { 74 | const baseRule = rule.slice(0, -1) // 去掉末尾的 '/' 75 | return [`${baseRule}`, rule] // 保持原规则和添加的新规则 76 | } 77 | // 否则保持原样,并换行 78 | return [rule] 79 | }) 80 | .join('\n') // 将处理后的规则重新组合为字符串,并换行 81 | 82 | // 创建 ignore 实例 83 | ig = ignore().add(processedRules) 84 | } 85 | 86 | // 获得文件夹的内容 87 | const files = await fs.readdirSync(folderPath) 88 | 89 | for (const filename of files) { 90 | // FIXME 处理过滤的情况,如果需要过滤则 continue 91 | 92 | // path 93 | const filePathFull = path.join(folderPath, filename) 94 | const filePath = filePathFull.replace(rootFolderPath, '') 95 | 96 | if (isGitIgnorePath) { 97 | const relativePath = path.relative(rootFolderPath, filePathFull) 98 | // FIXME 先根据 ignore 来判断, 直接默认忽略就行了 99 | if (ig.ignores(relativePath)) continue 100 | } 101 | 102 | // 是否为文件或者文件夹 103 | const stat = await fs.statSync(filePathFull) 104 | const isFile = stat.isFile() 105 | const isDirectory = stat.isDirectory() 106 | 107 | // 是文件的话 如果设置不扫描文件 跳过这个文件 108 | if (isFile && ignoreFile) continue 109 | 110 | // 判断是否根据路径忽略 111 | if (isIgnoreByPath(filePath)) continue 112 | 113 | // 解析路径 114 | const filePathParsed = path.parse(filePath) 115 | 116 | // 忽略点开头的文件 117 | if (isFile && ignoreDotStartFile && filePathParsed.name[0] === '.') continue 118 | 119 | // 忽略点开头的文件夹 120 | if (isDirectory && ignoreDotStartFolder && filePathParsed.name[0] === '.') continue 121 | 122 | // 是文件的话 判断是否根文件类型忽略 123 | if (isFile && ignoreExt.indexOf(filePathParsed.ext) >= 0) continue 124 | 125 | result.push({ 126 | isShow: true, 127 | isShowElements: true, 128 | ...stat, 129 | isFile, 130 | isDirectory, 131 | filePath, 132 | filePathFull, 133 | ...filePathParsed, 134 | // 如果是文件夹,其子文件或者子文件夹 135 | elements: isDirectory 136 | ? await scan({ 137 | folderPath: filePathFull, 138 | ignorePath, 139 | ignoreExt, 140 | ignoreFile, 141 | ignoreDotStartFile, 142 | ignoreDotStartFolder, 143 | deep, 144 | levelCurrent: levelCurrent + 1, 145 | rootFolderPath 146 | }) 147 | : [] 148 | }) 149 | } 150 | return result 151 | } 152 | 153 | export default scan 154 | -------------------------------------------------------------------------------- /src/renderer/src/utils/sortFilePaths.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : Wang Chao 4 | * @Date : 2024-08-25 18:45 5 | * @LastAuthor : Wang Chao 6 | * @LastTime : 2024-08-25 18:45 7 | * @desc : 排序文件路径 8 | */ 9 | 10 | export function sortFilePaths(arr) { 11 | return arr.sort((a, b) => { 12 | // 如果两个路径在同一个层级,先判断是否是文件夹 13 | const aIsDir = a.isDirectory 14 | const bIsDir = b.isDirectory 15 | 16 | // 文件夹在前,文件在后 17 | if (aIsDir && !bIsDir) { 18 | return -1 // a 是文件夹,排在前 19 | } 20 | if (!aIsDir && bIsDir) { 21 | return 1 // b 是文件夹,排在前 22 | } 23 | 24 | // 如果两者都是文件夹或文件,则按字母顺序排序 25 | // return a.filePath.localeCompare(b.filePath) 26 | 27 | // 提取数字和字母部分 28 | const aParts = a.filePath.match(/(\d+|\D+)/g) || [] 29 | const bParts = b.filePath.match(/(\d+|\D+)/g) || [] 30 | 31 | for (let i = 0; i < Math.max(aParts.length, bParts.length); i++) { 32 | const aPart = aParts[i] || '' 33 | const bPart = bParts[i] || '' 34 | 35 | // 如果都是数字部分,则按数字比较 36 | if (!isNaN(aPart) && !isNaN(bPart)) { 37 | const diff = parseInt(aPart) - parseInt(bPart) 38 | if (diff !== 0) return diff 39 | } else { 40 | // 如果不是数字部分,则按字母比较 41 | const diff = aPart.localeCompare(bPart) 42 | if (diff !== 0) return diff 43 | } 44 | } 45 | 46 | // 如果所有部分都相等,则返回 0 47 | return 0 48 | }) 49 | } 50 | -------------------------------------------------------------------------------- /src/renderer/src/utils/translate.flat.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Version : v1.00 3 | * @Author : Wang Chao 4 | * @Date : 2024-07-27 10:51 5 | * @LastAuthor : Wang Chao 6 | * @LastTime : 2024-08-25 18:47 7 | * @desc : 8 | */ 9 | 10 | import { sortFilePaths } from './sortFilePaths' 11 | 12 | /** 13 | * 将扫描结果转换成展示需要的数据 14 | * @param {Object} param0 {Object} data 扫描结果 15 | * @param {Object} param0 {Array} notes 备注数据库 16 | */ 17 | export default function ({ data, notes }) { 18 | function treeRowMaker({ isFirst, isLast, parentTree }) { 19 | let body = '' 20 | let end = '├─' 21 | // 判断 end 22 | if (isFirst) end = '├─' 23 | if (isLast) end = '└─' 24 | // 判断 body 25 | body = parentTree.map((cell) => { 26 | if (cell === '│ ' || cell === ' ') { 27 | return cell 28 | } else if (cell === '├─') { 29 | return '│ ' 30 | } else { 31 | return ' ' 32 | } 33 | }) 34 | return [...body, end] 35 | } 36 | 37 | function maker({ dataArray, level, parentTree = [], parentDataPath = '' }) { 38 | dataArray = sortFilePaths(dataArray) 39 | 40 | dataArray.forEach((item, index) => { 41 | // 文字前面的树枝 42 | const treeBody = treeRowMaker({ 43 | isFirst: index === 0, 44 | isLast: index === dataArray.length - 1, 45 | parentTree 46 | }) 47 | // 添加一行 48 | result.push({ 49 | id: item.filePathFull, 50 | tree: treeBody.join(''), 51 | note: notes[item.filePathFull] || '', 52 | dataPath: `${parentDataPath}[${item.index}]`, // like "[13].elements[5].elements[2]" 53 | ...item 54 | }) 55 | // 如果是文件夹的话,遍历文件夹内容 56 | if (item.isDirectory) { 57 | maker({ 58 | dataArray: item.elements, 59 | level: level + 1, 60 | parentTree: treeBody, 61 | parentDataPath: `${parentDataPath}[${item.index}].elements` 62 | }) 63 | } 64 | }) 65 | } 66 | 67 | let result = [] 68 | maker({ 69 | dataArray: data, 70 | level: 1 71 | }) 72 | 73 | return result 74 | } 75 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.web.json" }], 4 | "compilerOptions": { 5 | "target": "es6", 6 | "lib": ["es6", "dom", "esnext"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@electron-toolkit/tsconfig/tsconfig.node.json", 3 | "include": ["electron.vite.config.*", "src/main/**/*", "src/preload/**/*"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "types": ["electron-vite/node"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tsconfig.web.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@electron-toolkit/tsconfig/tsconfig.web.json", 3 | "include": [ 4 | "src/renderer/src/env.d.ts", 5 | "src/renderer/src/**/*", 6 | "src/renderer/src/**/*.vue", 7 | "src/preload/*.d.ts" 8 | ], 9 | "compilerOptions": { 10 | "composite": true, 11 | "baseUrl": ".", 12 | "paths": { 13 | "@renderer/*": [ 14 | "src/renderer/src/*" 15 | ] 16 | } 17 | } 18 | } 19 | --------------------------------------------------------------------------------