From e2e802b30fd2e75d677517dcf5eaf850824f34e7 Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Tue, 17 Dec 2024 16:11:45 +0800 Subject: [PATCH 1/6] :bug: Fix(custom): fix file delete bug --- src/main/apis/app/uploader/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/apis/app/uploader/index.ts b/src/main/apis/app/uploader/index.ts index 064f073..41c8d94 100644 --- a/src/main/apis/app/uploader/index.ts +++ b/src/main/apis/app/uploader/index.ts @@ -141,7 +141,7 @@ class Uploader { logger.error(e) return false } finally { - if (imgPath) { + if (imgPath && imgPath.startsWith(path.join(picgo.baseDir, CLIPBOARD_IMAGE_FOLDER))) { fs.remove(imgPath) } } @@ -157,7 +157,7 @@ class Uploader { logger.error(e) return false } finally { - if (imgPath) { + if (imgPath && imgPath.startsWith(path.join(picgo.baseDir, CLIPBOARD_IMAGE_FOLDER))) { fs.remove(imgPath) } } From 2bdd2d598236ff121206c0357ead99b7faf86791 Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Thu, 19 Dec 2024 14:36:18 +0800 Subject: [PATCH 2/6] :bug: Fix(custom): fix webdav rename bug ISSUES CLOSED: #278 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6c486d3..9736c99 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "multer": "^1.4.5-lts.1", "node-ssh-no-cpu-features": "^2.0.0", "nodejs-file-downloader": "^4.12.1", - "piclist": "^1.9.8", + "piclist": "^1.9.9", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", "proxy-agent": "^5.0.0", diff --git a/yarn.lock b/yarn.lock index ab22a3c..2996844 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11956,10 +11956,10 @@ performance-now@^2.1.0: resolved "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== -piclist@^1.9.8: - version "1.9.8" - resolved "https://registry.yarnpkg.com/piclist/-/piclist-1.9.8.tgz#09eaa51a2c71a0a1db0b2d48feed6c99caf796e2" - integrity sha512-tti3aMsv0/x/UjVCAwvJ+IAPwjH205qUmu4gK/IoSHHR7rV+CVn4dFFcGLSiBasyv0UYm2SlTTRgG4q9Ri2V2w== +piclist@^1.9.9: + version "1.9.9" + resolved "https://registry.yarnpkg.com/piclist/-/piclist-1.9.9.tgz#ad5f614afbb93ca9d4702f642050f87eba14ef40" + integrity sha512-HuhW9pSkslwKmqb4yB4KlNaX4D9uzkFLFvNnACQWgaRTI+dvpRpVP86/YNvw114fz/jetUB/zCcGk/3XxXfMbw== dependencies: "@aws-sdk/client-s3" "3.421.0" "@aws-sdk/lib-storage" "3.421.0" From 8815089c01bf6f30173e39d22717bca2ea0b7d36 Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Mon, 23 Dec 2024 11:36:15 +0800 Subject: [PATCH 3/6] :bug: Fix(custom): fix start mode in mac and win ISSUES CLOSED: #281 --- src/main/lifeCycle/index.ts | 7 +++++-- src/renderer/pages/PicGoSetting.vue | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/lifeCycle/index.ts b/src/main/lifeCycle/index.ts index 9f07975..37f1560 100644 --- a/src/main/lifeCycle/index.ts +++ b/src/main/lifeCycle/index.ts @@ -169,7 +169,10 @@ class LifeCycle { db.set(configPaths.settings.isListeningClipboard, false) } const isHideDock = db.get(configPaths.settings.isHideDock) || false - const startMode = db.get(configPaths.settings.startMode) || ISartMode.QUIET + let startMode = db.get(configPaths.settings.startMode) || ISartMode.QUIET + if (process.platform === 'darwin' && startMode === ISartMode.MINI) { + startMode = ISartMode.QUIET + } const currentPicBed = db.get(configPaths.picBed.uploader) || db.get(configPaths.picBed.current) || 'smms' const currentPicBedConfig = db.get(`picBed.${currentPicBed}`)?._configName || 'Default' const tooltip = `${currentPicBed} ${currentPicBedConfig}` @@ -201,7 +204,7 @@ class LifeCycle { } await remoteNoticeHandler.init() remoteNoticeHandler.triggerHook(IRemoteNoticeTriggerHook.APP_START) - if (startMode === ISartMode.MINI) { + if (startMode === ISartMode.MINI && process.platform !== 'darwin') { windowManager.create(IWindowList.MINI_WINDOW) const miniWindow = windowManager.get(IWindowList.MINI_WINDOW)! miniWindow.removeAllListeners() diff --git a/src/renderer/pages/PicGoSetting.vue b/src/renderer/pages/PicGoSetting.vue index 8ee1da5..56a2936 100644 --- a/src/renderer/pages/PicGoSetting.vue +++ b/src/renderer/pages/PicGoSetting.vue @@ -1258,6 +1258,10 @@ async function initData() { formOfSetting.value.autoImportPicBed = initArray(settings.autoImportPicBed || [], []) currentLanguage.value = valueToOptionItem(settings.language || 'zh-CN', languageList) currentStartMode.value = valueToOptionItem(settings.startMode || ISartMode.QUIET, startModeList) + if (osGlobal.value === 'darwin' && currentStartMode.value.value === ISartMode.MINI) { + currentStartMode.value = valueToOptionItem(ISartMode.QUIET, startModeList) + saveConfig(configPaths.settings.startMode, ISartMode.QUIET) + } currentManualPageOpen.value = valueToOptionItem(settings.manualPageOpen || 'window', manualPageOpenList) currentShortUrlServer.value = valueToOptionItem(settings.shortUrlServer || 'c1n', shortUrlServerList) customLink.value = settings.customLink || '![$fileName]($url)' From d50f99fa5c438d87fc8b91b586d11586d9f82e44 Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Fri, 27 Dec 2024 17:06:15 +0800 Subject: [PATCH 4/6] :arrow_up: Upgrade(custom): upgrade piclist core --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9736c99..6de9fb3 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "multer": "^1.4.5-lts.1", "node-ssh-no-cpu-features": "^2.0.0", "nodejs-file-downloader": "^4.12.1", - "piclist": "^1.9.9", + "piclist": "^1.9.10", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", "proxy-agent": "^5.0.0", diff --git a/yarn.lock b/yarn.lock index 2996844..4356b22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11956,10 +11956,10 @@ performance-now@^2.1.0: resolved "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== -piclist@^1.9.9: - version "1.9.9" - resolved "https://registry.yarnpkg.com/piclist/-/piclist-1.9.9.tgz#ad5f614afbb93ca9d4702f642050f87eba14ef40" - integrity sha512-HuhW9pSkslwKmqb4yB4KlNaX4D9uzkFLFvNnACQWgaRTI+dvpRpVP86/YNvw114fz/jetUB/zCcGk/3XxXfMbw== +piclist@^1.9.10: + version "1.9.10" + resolved "https://registry.yarnpkg.com/piclist/-/piclist-1.9.10.tgz#172311c754b5fd43623113c1af5e3044ad31ea16" + integrity sha512-mB0Tm7BYfIqWk/NEdhmD85K2TYwzkxPiXzne+BnJFzHivo53Yjo3B2f2+LanY3r8FDRFN5nDxsCwSJQw9HGKWQ== dependencies: "@aws-sdk/client-s3" "3.421.0" "@aws-sdk/lib-storage" "3.421.0" From 24d8b01f94be921f52399c05e4001f86f3053016 Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Mon, 30 Dec 2024 14:15:15 +0800 Subject: [PATCH 5/6] :pencil: Docs(custom): prepare for new version --- currentVersion.md | 9 +++++++-- currentVersion_en.md | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/currentVersion.md b/currentVersion.md index fef0487..4807886 100644 --- a/currentVersion.md +++ b/currentVersion.md @@ -1,4 +1,9 @@ +### ✨ Features + +- 优化了Mac和Win下启动模式配置的兼容性 + ### 🐛 Bug Fixes -- 修复了自动重命名和剪贴板文件命名缺失秒数的问题 -- 修复了插件查询失效的问题 +- 修复了使用内置剪贴板上传时会错误删除本地文件的问题 +- 修复了webdav与高级重命名同时使用时新建目录错误的问题 +- 修复了高级重命名的自定义前缀设置没有按预期工作的问题 \ No newline at end of file diff --git a/currentVersion_en.md b/currentVersion_en.md index ab63d46..9cb1767 100644 --- a/currentVersion_en.md +++ b/currentVersion_en.md @@ -1,4 +1,9 @@ +### ✨ Features + +- Optimize the compatibility of startup mode configuration under Mac and Win + ### 🐛 Bug Fixes -- Fix the problem of missing seconds in automatic renaming and clipboard file naming -- Fix the problem of invalid plugin query \ No newline at end of file +- Fix the problem of deleting local files incorrectly when uploading using the built-in clipboard +- Fix the problem of creating a new directory incorrectly when using webdav and advanced renaming at the same time +- Fix the problem that the custom prefix setting of advanced renaming does not work as expected \ No newline at end of file From 78bb08d800f96e5dbd0c2f03f71d71a224111a8b Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Mon, 30 Dec 2024 14:17:09 +0800 Subject: [PATCH 6/6] :tada: Release: v2.9.7 --- CHANGELOG.md | 16 ++++++++++++++++ package.json | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13576c3..9acf7a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +## :tada: 2.9.7 (2024-12-30) + + +### :bug: Bug Fixes + +* **custom:** fix file delete bug ([e2e802b](https://github.com/Kuingsmile/piclist/commit/e2e802b)) +* **custom:** fix start mode in mac and win ([8815089](https://github.com/Kuingsmile/piclist/commit/8815089)), closes [#281](https://github.com/Kuingsmile/piclist/issues/281) +* **custom:** fix webdav rename bug ([2bdd2d5](https://github.com/Kuingsmile/piclist/commit/2bdd2d5)), closes [#278](https://github.com/Kuingsmile/piclist/issues/278) + + +### :pencil: Documentation + +* **custom:** prepare for new version ([24d8b01](https://github.com/Kuingsmile/piclist/commit/24d8b01)) + + + ## :tada: 2.9.6 (2024-12-04) diff --git a/package.json b/package.json index 6de9fb3..d00d60c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "piclist", - "version": "2.9.6", + "version": "2.9.7", "author": { "name": "Kuingsmile", "email": "pkukuing@gmail.com"