Skip to content

Commit

Permalink
Merge branch 'dev' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuingsmile committed Nov 17, 2023
2 parents 3a3103f + a5f16c0 commit 075ea0e
Show file tree
Hide file tree
Showing 11 changed files with 206 additions and 175 deletions.
9 changes: 7 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@
"stylusSupremacy.sortProperties": "grouped",
"stylusSupremacy.quoteChar": "\"",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"githubPullRequests.ignoredPullRequestBranches": [
"dev"
]
],
"[go]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}
}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## :tada: 2.6.7 (2023-11-17)


### :sparkles: Features

* **custom:** add new config field temp dir path ([e968a65](https://github.com/Kuingsmile/piclist/commit/e968a65)), closes [#112](https://github.com/Kuingsmile/piclist/issues/112)


### :bug: Bug Fixes

* **custom:** fix delete event error in server api ([5658ce6](https://github.com/Kuingsmile/piclist/commit/5658ce6))


### :pencil: Documentation

* **custom:** add docs for upload service using piclist due to a potential typora bug ([02dc71b](https://github.com/Kuingsmile/piclist/commit/02dc71b))
* **custom:** update docs ([c897c23](https://github.com/Kuingsmile/piclist/commit/c897c23))



## :tada: 2.6.6 (2023-10-31)


Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Please install my matching plugin [VS-PicList](https://marketplace.visualstudio.

**Typora 1.6.0-dev and above versions now support PicList natively**

Now you need to set the upload service PicList and PicGo (app) to the installation path of PicList at the same time, which may be due to a bug in Typora.

[download link](https://typora.io/releases/all)

#### **Version < 1.6.0-dev**
Expand Down
4 changes: 3 additions & 1 deletion README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ PicList的内核使用的是原版PicGo-Core基础上修改的[PicList-core](htt

#### **1.6.0版本及以上**

**Typora 1.6.0-dev以及以上版本现在已经原生支持PicList了**
**Typora 1.6.0-dev以及以上版本现在已经原生支持PicList了**

目前Typora中需要同时设置上传服务PicList和PicGo(app)的路径为PicList的安装路径,这可能源于Typora的bug。

[下载地址](https://typora.io/releases/all)

Expand Down
7 changes: 3 additions & 4 deletions currentVersion.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
✨ Features

- 现在配置同步支持使用Gitea
- 现在当图片转换后格式与原格式相同时,不会进行转换
- 优化了使用Cloudflare R2作为图床时的删除处理
- 核心库版本更新
- 现在默认缓存目录会在系统temp路径下新建

🐛 Bug Fixes

- 修复了使用gitee同步配置时,下载文件错误日志没有正确记录的问题
- 修复了使用内置服务器的删除接口时,相册删除事件不能正确触发的问题
7 changes: 3 additions & 4 deletions currentVersion_en.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
✨ Features

- Now the configuration synchronization supports the use of Gitea
- Now when the converted image format is the same as the original format, it will not be converted
- Optimized the deletion processing when using Cloudflare R2 as the image bed
- Update core library version
- Now the default cache directory will be created in the system temp path

🐛 Bug Fixes

- Fixed the issue where the error log was not correctly recorded when synchronizing configurations using Gitee and downloading files
- Fixed the problem that the album delete event cannot be triggered correctly when using the built-in server delete interface
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "piclist",
"version": "2.6.6",
"version": "2.6.7",
"author": {
"name": "Kuingsmile",
"email": "[email protected]"
Expand Down Expand Up @@ -46,13 +46,13 @@
"@smithy/node-http-handler": "^2.1.6",
"@videojs-player/vue": "^1.0.0",
"ali-oss": "^6.18.1",
"axios": "^1.6.0",
"axios": "^1.6.2",
"compare-versions": "^4.1.3",
"core-js": "^3.33.1",
"core-js": "^3.33.2",
"cos-nodejs-sdk-v5": "^2.12.5",
"dexie": "^3.2.4",
"electron-updater": "^6.1.4",
"element-plus": "2.4.1",
"element-plus": "2.4.2",
"epipebomb": "^1.0.0",
"fast-xml-parser": "^4.3.2",
"form-data": "^4.0.0",
Expand All @@ -62,13 +62,13 @@
"hpagent": "^1.2.0",
"keycode": "^2.2.0",
"lowdb": "^1.0.0",
"marked": "^9.1.4",
"marked": "^9.1.5",
"mime-types": "^2.1.35",
"mitt": "^3.0.1",
"multer": "^1.4.5-lts.1",
"node-ssh-no-cpu-features": "^1.0.1",
"nodejs-file-downloader": "^4.12.1",
"piclist": "^1.6.5",
"piclist": "^1.6.6",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.0",
"proxy-agent": "^5.0.0",
Expand All @@ -80,7 +80,7 @@
"upyun": "^3.4.6",
"uuid": "^9.0.1",
"video.js": "^8.5.2",
"vue": "^3.3.7",
"vue": "^3.3.8",
"vue-router": "^4.2.5",
"vue3-lazyload": "^0.3.8",
"vue3-photo-preview": "^0.3.0",
Expand All @@ -90,21 +90,21 @@
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@electron/notarize": "^2.1.0",
"@types/ali-oss": "^6.16.10",
"@types/electron-devtools-installer": "^2.2.4",
"@types/fs-extra": "^11.0.3",
"@types/ali-oss": "^6.16.11",
"@types/electron-devtools-installer": "^2.2.5",
"@types/fs-extra": "^11.0.4",
"@types/inquirer": "^6.5.0",
"@types/js-yaml": "^4.0.8",
"@types/lowdb": "^1.0.14",
"@types/mime-types": "^2.1.3",
"@types/js-yaml": "^4.0.9",
"@types/lowdb": "^1.0.15",
"@types/mime-types": "^2.1.4",
"@types/multer": "^1.4.9",
"@types/node": "^16.10.2",
"@types/request-promise-native": "^1.0.20",
"@types/semver": "^7.5.4",
"@types/tunnel": "^0.0.5",
"@types/upyun": "^3.4.2",
"@types/uuid": "^9.0.6",
"@types/write-file-atomic": "^4.0.2",
"@types/request-promise-native": "^1.0.21",
"@types/semver": "^7.5.5",
"@types/tunnel": "^0.0.6",
"@types/upyun": "^3.4.3",
"@types/uuid": "^9.0.7",
"@types/write-file-atomic": "^4.0.3",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@vue/cli-plugin-babel": "^5.0.8",
Expand All @@ -114,7 +114,7 @@
"@vue/cli-service": "^5.0.8",
"@vue/eslint-config-standard": "^8.0.1",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/runtime-dom": "^3.3.7",
"@vue/runtime-dom": "^3.3.8",
"conventional-changelog": "^5.1.0",
"cz-customizable": "^7.0.0",
"dotenv": "^16.3.1",
Expand Down
3 changes: 2 additions & 1 deletion src/main/apis/app/uploader/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ export const deleteChoosedFiles = async (list: ImgInfo[]): Promise<boolean[]> =>
if (item.id) {
try {
const dbStore = GalleryDB.getInstance()
const file = await dbStore.removeById(item.id)
const file = await dbStore.getById(item.id)
await dbStore.removeById(item.id)
if (await picgo.getConfig('settings.deleteCloudFile')) {
if (item.type !== undefined && picBedsCanbeDeleted.includes(item.type)) {
const noteFunc = (value: boolean) => {
Expand Down
13 changes: 8 additions & 5 deletions src/main/manage/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ export function isInputConfigValid (config: any): boolean {

export const getFileMimeType = (filePath: string): string => mime.lookup(filePath) || 'application/octet-stream'

const checkTempFolderExist = async () => {
const tempPath = path.join(app.getPath('downloads'), 'piclistTemp')
const getTempDirPath = () => {
return path.join(app.getPath('temp'), 'piclistTemp')
}

const checkTempFolderExist = async (tempPath: string) => {
try {
await fs.access(tempPath)
} catch (e) {
Expand All @@ -58,8 +61,8 @@ const checkTempFolderExist = async () => {
}

export const downloadFileFromUrl = async (urls: string[]) => {
const tempPath = path.join(app.getPath('downloads'), 'piclistTemp')
await checkTempFolderExist()
const tempPath = getTempDirPath()
await checkTempFolderExist(tempPath)
const result = [] as string[]
for (let i = 0; i < urls.length; i++) {
const finishDownload = promisify(Stream.finished)
Expand All @@ -78,7 +81,7 @@ export const downloadFileFromUrl = async (urls: string[]) => {
return result
}

export const clearTempFolder = () => fs.emptyDirSync(path.join(app.getPath('downloads'), 'piclistTemp'))
export const clearTempFolder = () => fs.emptyDirSync(getTempDirPath())

export const md5 = (str: string, code: 'hex' | 'base64'): string => crypto.createHash('md5').update(str).digest(code)

Expand Down
2 changes: 1 addition & 1 deletion src/universal/types/view.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface ISettingForm {
yourlsSignature: string,
deleteLocalFile: boolean,
serverKey: string,
aesPassword: string
aesPassword: string,
}

interface IShortKeyMap {
Expand Down
Loading

0 comments on commit 075ea0e

Please sign in to comment.