diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e8a5a0..31a6614 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +## :tada: 2.7.4 (2024-02-25) + + +### :sparkles: Features + +* **custom:** add new set item to open config file path ([4be82e0](https://github.com/Kuingsmile/piclist/commit/4be82e0)) + + +### :bug: Bug Fixes + +* **custom:** fix buildin s3 config item bug ([914ec15](https://github.com/Kuingsmile/piclist/commit/914ec15)) +* **custom:** fix config import name error ([4c70946](https://github.com/Kuingsmile/piclist/commit/4c70946)) +* **custom:** fix typo ([d3fdfca](https://github.com/Kuingsmile/piclist/commit/d3fdfca)) +* **custom:** optimize github remote delete ([0767fbc](https://github.com/Kuingsmile/piclist/commit/0767fbc)), closes [#158](https://github.com/Kuingsmile/piclist/issues/158) + + +### :pencil: Documentation + +* **custom:** update chagelog ([3fc3f92](https://github.com/Kuingsmile/piclist/commit/3fc3f92)) +* **custom:** update docs for docker usage ([21cc115](https://github.com/Kuingsmile/piclist/commit/21cc115)) +* **custom:** update wechat group info ([faeeed7](https://github.com/Kuingsmile/piclist/commit/faeeed7)) + + + ## :tada: 2.7.3 (2024-01-30) diff --git a/README.md b/README.md index e279ca9..52a7b44 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ In the community plugins, search for and install the Image auto upload Plugin. N #### docker run -Change the `./piclist` to your own path, and change the `piclist123456` to your own secret key. +Change the `./piclist` to your own path, this is the path where you put your `config.json` file, and change the `piclist123456` to your own secret key. ```bash docker run -d \ @@ -123,7 +123,7 @@ services: command: node /usr/local/bin/picgo-server -k piclist123456 ``` -You can change the `volumes` to your own path and change the `command` to your own secret key. +You can change the `./piclist` to your own path, this is the path where you put your `config.json` file, and change the `command` to your own secret key. Then run: @@ -231,9 +231,7 @@ If you need to build it yourself, you can start building with `yarn run build`. ## Communication group -If you have any questions, you can join the WeChat group for communication. - -![image](https://pichoro.msq.pub/wechat.png) +If you have any questions, you can join the WeChat group for communication. The group is currently full, please add WeChat `pku_sq_ma` and note `PicList`, and I will add you to the group. ## License diff --git a/README_cn.md b/README_cn.md index 05f4035..6eb0b16 100644 --- a/README_cn.md +++ b/README_cn.md @@ -92,7 +92,7 @@ MacOS: #### docker run -修改`./piclist`为你自己的路径,修改`piclist123456`为你自己的密钥。 +修改`./piclist`为你自己的配置文件`config.json`所在的路径,修改`piclist123456`为你自己的密钥。 ```bash docker run -d \ @@ -123,7 +123,7 @@ services: command: node /usr/local/bin/picgo-server -k piclist123456 ``` -你可以修改`volumes`为你自己的路径,修改`command`为你自己的密钥。 +你可以修改`./piclist`为你自己的配置文件`config.json`所在的路径,修改`command`为你自己的密钥。 然后运行 @@ -221,9 +221,7 @@ brew uninstall piclist ## 交流群 -如果有任何问题,可以加入微信群进行交流。 - -![image](https://pichoro.msq.pub/wechat.png) +如果有任何问题,可以加入微信群进行交流,目前群已满,请添加微信号`pku_sq_ma`,备注`PicList`,我会拉你入群。 ## License diff --git a/currentVersion.md b/currentVersion.md index 5b3b6c5..f2e0cc0 100644 --- a/currentVersion.md +++ b/currentVersion.md @@ -1,8 +1,10 @@ ✨ Features -- 现在配置页点击图床名会跳转至手册说明页 +- 设置界面添加了新的选项以快速进入配置文件和日志目录 +- 优化了github图床云端删除对特殊路径的处理 🐛 Bug Fixes -- 修复了设置精细转换格式时,配置没有起作用的问题 -- 修复了界面翻译错误 +- 修复了导入配置时,默认图床名没有跟随当前时间变化的问题 +- 修复了内置s3图床的禁用存储桶前缀设置项没有正确生效的问题 +- 修复了部分繁体中文翻译错误 diff --git a/currentVersion_en.md b/currentVersion_en.md index 1506760..0a883d3 100644 --- a/currentVersion_en.md +++ b/currentVersion_en.md @@ -1,8 +1,10 @@ ✨ Features -- Now clicking the image bed name on the configuration page will jump to the manual explanation page +- Add new options in the settings interface to quickly enter the configuration file and log directory +- Optimized the processing of special paths for cloud deletion of github image bed 🐛 Bug Fixes -- Fixed the problem that the configuration did not take effect when setting the fine conversion format -- Fixed interface translation error +- Fix the problem that the default image bed name does not change with the current time when importing the configuration +- Fix the problem that the disable storage bucket prefix setting of the built-in s3 image bed does not take effect correctly +- Fix some translation errors in traditional Chinese diff --git a/package.json b/package.json index 0eaedaf..36a1065 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "piclist", - "version": "2.7.3", + "version": "2.7.4", "author": { "name": "Kuingsmile", "email": "pkukuing@gmail.com" @@ -68,7 +68,7 @@ "multer": "^1.4.5-lts.1", "node-ssh-no-cpu-features": "^1.0.1", "nodejs-file-downloader": "^4.12.1", - "piclist": "^1.7.9", + "piclist": "^1.7.11", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.0", "proxy-agent": "^5.0.0", diff --git a/public/i18n/en.yml b/public/i18n/en.yml index eaaf774..a4b2e3a 100644 --- a/public/i18n/en.yml +++ b/public/i18n/en.yml @@ -195,6 +195,8 @@ SETTINGS_CURRENT_VERSION: Current Version SETTINGS_NEWEST_VERSION: Newest Version SETTINGS_GETING: Getting... SETTINGS_TIPS_HAS_NEW_VERSION: PicList has a new version, please click confirm to open download page +SETTINGS_LOG_FILE_PATH: Log File Path +SETTINGS_CONFIG_FILE_PATH: Config File Path SETTINGS_LOG_FILE: Log File SETTINGS_GUI_LOG_FILE: GUI Log File SETTINGS_MANAGE_LOG_FILE: Manage Log File diff --git a/public/i18n/zh-CN.yml b/public/i18n/zh-CN.yml index 7cb81eb..146f784 100644 --- a/public/i18n/zh-CN.yml +++ b/public/i18n/zh-CN.yml @@ -197,6 +197,8 @@ SETTINGS_CURRENT_VERSION: 当前版本 SETTINGS_NEWEST_VERSION: 最新版本 SETTINGS_GETING: 正在获取中 SETTINGS_TIPS_HAS_NEW_VERSION: PicList更新啦,请点击确定打开下载页面 +SETTINGS_LOG_FILE_PATH: 日志文件路径 +SETTINGS_CONFIG_FILE_PATH: 配置文件路径 SETTINGS_LOG_FILE: 常规日志文件 SETTINGS_GUI_LOG_FILE: GUI日志文件 SETTINGS_MANAGE_LOG_FILE: 管理日志文件 diff --git a/public/i18n/zh-TW.yml b/public/i18n/zh-TW.yml index 48c8efd..a7ec151 100644 --- a/public/i18n/zh-TW.yml +++ b/public/i18n/zh-TW.yml @@ -132,7 +132,7 @@ UPLOAD_PAGE_IMAGE_PROCESS_ISRESIZEBYPERCENT: 是否按比例調整尺寸,優 UPLOAD_PAGE_IMAGE_PROCESS_RESIZEPERCENT: 調整尺寸比例,輸入50表示50% UPLOAD_PAGE_IMAGE_PROCESS_ISROTATE: 是否旋轉 UPLOAD_PAGE_IMAGE_PROCESS_ROTATEDEGREE: 旋轉角度 -UPLOAD_PAGE_IMAGE_PROCESS_CONFIRM: 保存 +UPLOAD_PAGE_IMAGE_PROCESS_CONFIRM: 儲存 UPLOAD_PAGE_IMAGE_PROCESS_CANCEL: 取消 UPLOAD_PAGE_IMAGE_PROCESS_POSITION_TOP: 上 UPLOAD_PAGE_IMAGE_PROCESS_POSITION_BOTTOM: 下 @@ -143,8 +143,8 @@ UPLOAD_PAGE_IMAGE_PROCESS_POSITION_TOP_RIGHT: 右上 UPLOAD_PAGE_IMAGE_PROCESS_POSITION_BOTTOM_LEFT: 左下 UPLOAD_PAGE_IMAGE_PROCESS_POSITION_BOTTOM_RIGHT: 右下 UPLOAD_PAGE_IMAGE_PROCESS_POSITION_CENTER: 中 -UPLOAD_SHORT_URL: 短链接 -UPLOAD_NORMAL_URL: 长链接 +UPLOAD_SHORT_URL: 短連結 +UPLOAD_NORMAL_URL: 长連結 # settings SETTINGS: 設定 @@ -155,8 +155,8 @@ SETTINGS_MIGRATE_FROM_PICGO_CONTENT: 即將導入PicGo的設定文件和相冊, SETTINGS_MIGRATE_FROM_PICGO_SUCCESS: 導入成功, 請重啟應用 SETTINGS_MIGRATE_FROM_PICGO_FAILED: 導入失敗 SETTINGS_START_MODE: 啟動模式 -SETTINGS_START_MODE_MINI: mini窗口 -SETTINGS_START_MODE_MAIN: 主窗口 +SETTINGS_START_MODE_MINI: mini視窗 +SETTINGS_START_MODE_MAIN: 主視窗 SETTINGS_START_MODE_QUIET: 靜默啟動 SETTINGS_START_MODE_NO_TRAY: 隐藏托盘 SETTINGS_CLICK_TO_OPEN: 點擊打開 @@ -175,7 +175,7 @@ SETTINGS_CLOSE_MINI_WINDOW_SYNC: 開主窗口同步關閉mini窗口 SETTINGS_CLOSE_MAIN_WINDOW_SYNC: 關mini窗口同步關閉主窗口 SETTINGS_ACCEPT_BETA_UPDATE: 接受Beta版本更新 SETTINGS_LAUNCH_ON_BOOT: 開機時啟動 -SETTINGS_RENAME_BEFORE_UPLOAD: 手动重新命名 +SETTINGS_RENAME_BEFORE_UPLOAD: 手動重新命名 SETTINGS_TIMESTAMP_RENAME: 以時間戳命名 SETTINGS_ADVANCED_RENAME: 高級命名 SETTINGS_ADVANCED_RENAME_ENABLE: 啟用高級命名 @@ -195,6 +195,8 @@ SETTINGS_CURRENT_VERSION: 當前版本 SETTINGS_NEWEST_VERSION: 最新版本 SETTINGS_GETING: 正在取得中 SETTINGS_TIPS_HAS_NEW_VERSION: PicList更新啦,請點擊確定開啟下載頁面 +SETTINGS_LOG_FILE_PATH: 記錄檔案路徑 +SETTINGS_CONFIG_FILE_PATH: 設定檔案路徑 SETTINGS_LOG_FILE: 記錄檔案 SETTINGS_GUI_LOG_FILE: GUI記錄檔案 SETTINGS_MANAGE_LOG_FILE: 管理記錄檔案 @@ -232,7 +234,7 @@ SETTINGS_MAIN_WINDOW_WIDTH_HINT: '默認: 1200' SETTINGS_MAIN_WINDOW_WIDTH_RULE: 窗口寬度必須大於100 SETTINGS_MAIN_WINDOW_SIZE_HEIGHT: 默認主視窗高度 SETTINGS_MAIN_WINDOW_HEIGHT_HINT: '默認: 800' -SETTINGS_MAIN_WINDOW_HEIGHT_RULE: 窗口高度必須大於100 +SETTINGS_MAIN_WINDOW_HEIGHT_RULE: 視窗高度必須大於100 SETTINGS_RAW_PICGO_SIZE: 原PicGo大小 SETTINGS_CUSTOM_MINI_ICON_PATH: 自訂Mini視窗圖示路徑 SETTINGS_CUSTOM_MINI_ICON: 自訂Mini視窗圖示 diff --git a/src/main/events/picgoCoreIPC.ts b/src/main/events/picgoCoreIPC.ts index 1afb886..d3e894e 100644 --- a/src/main/events/picgoCoreIPC.ts +++ b/src/main/events/picgoCoreIPC.ts @@ -40,6 +40,7 @@ import { PICGO_GET_BY_ID_DB, PICGO_REMOVE_BY_ID_DB, PICGO_OPEN_FILE, + PICGO_OPEN_DIRECTORY, PASTE_TEXT, OPEN_WINDOW, GET_LANGUAGE_LIST, @@ -379,6 +380,18 @@ const handleOpenFile = () => { }) } +const handleOpenDirectory = () => { + ipcMain.on(PICGO_OPEN_DIRECTORY, (event: IpcMainEvent, dirPath?: string, inStorePath: boolean = true) => { + if (inStorePath) { + dirPath = path.join(STORE_PATH, dirPath || '') + } + if (!dirPath || !fs.existsSync(dirPath)) { + return + } + shell.openPath(dirPath) + }) +} + const handleOpenWindow = () => { ipcMain.on(OPEN_WINDOW, (event: IpcMainEvent, windowName: IWindowList) => { const window = windowManager.get(windowName) @@ -431,6 +444,7 @@ export default { handleImportLocalPlugin() handleUpdateAllPlugin() handleOpenFile() + handleOpenDirectory() handleOpenWindow() handleI18n() handleRPCActions() diff --git a/src/main/utils/sshClient.ts b/src/main/utils/sshClient.ts index 86580db..b783a20 100644 --- a/src/main/utils/sshClient.ts +++ b/src/main/utils/sshClient.ts @@ -53,8 +53,10 @@ class SSHClient { const promise = new Promise((resolve, reject) => { client.on('ready', () => { client.sftp((err, sftp) => { + // eslint-disable-next-line prefer-promise-reject-errors if (err) reject(false) sftp.unlink(remote, (err) => { + // eslint-disable-next-line prefer-promise-reject-errors if (err) reject(false) client.end() resolve(true) diff --git a/src/renderer/apis/github.ts b/src/renderer/apis/github.ts index 9bd753b..638dac4 100644 --- a/src/renderer/apis/github.ts +++ b/src/renderer/apis/github.ts @@ -19,9 +19,10 @@ export default class GithubApi { } private static createKey (path: string | undefined, fileName: string): string { + const formatedFileName = fileName.replace(/%2F/g, '/') return path && path !== '/' - ? `${path.replace(/^\/+|\/+$/, '')}/${fileName}` - : fileName + ? `${path.replace(/^\/+|\/+$/, '')}/${formatedFileName}` + : formatedFileName } static async delete (configMap: IConfigMap): Promise { diff --git a/src/renderer/pages/PicGoSetting.vue b/src/renderer/pages/PicGoSetting.vue index 2646bc1..ccabc9b 100644 --- a/src/renderer/pages/PicGoSetting.vue +++ b/src/renderer/pages/PicGoSetting.vue @@ -1,5 +1,5 @@