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/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 diff --git a/package.json b/package.json index 6c486d3..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" @@ -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.10", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", "proxy-agent": "^5.0.0", 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) } } 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)' diff --git a/yarn.lock b/yarn.lock index ab22a3c..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.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.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"