diff --git a/CHANGELOG.md b/CHANGELOG.md
index 111a0da..bc62db3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,27 @@
+## :tada: 2.5.1 (2023-08-29)
+
+
+### :sparkles: Features
+
+* add anti leech token for upyun ([4894f09](https://github.com/Kuingsmile/PicList/commit/4894f09))
+* add ts support for upyun ([95faa5b](https://github.com/Kuingsmile/PicList/commit/95faa5b))
+* update manage config page reflink ([636596a](https://github.com/Kuingsmile/PicList/commit/636596a))
+* using webview to show manual website ([bc7a446](https://github.com/Kuingsmile/PicList/commit/bc7a446))
+
+
+### :bug: Bug Fixes
+
+* fix an issue where files uploaded to minio using s3 plugin can't be deleted remotely ([80db40b](https://github.com/Kuingsmile/PicList/commit/80db40b))
+* fix custom domain error of minio ([0c8ea83](https://github.com/Kuingsmile/PicList/commit/0c8ea83))
+* fix ImgurApi.baseUrl is undefined ([7ada948](https://github.com/Kuingsmile/PicList/commit/7ada948))
+
+
+### :pencil: Documentation
+
+* add download counts for docs ([3085385](https://github.com/Kuingsmile/PicList/commit/3085385))
+
+
+
# :tada: 2.5.0 (2023-08-23)
diff --git a/README.md b/README.md
index aeaf4f8..13842c3 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,9 @@
+
+
+
diff --git a/README_en.md b/README_en.md
index 50e7c22..3ba28a3 100644
--- a/README_en.md
+++ b/README_en.md
@@ -4,6 +4,9 @@
+
+
+
diff --git a/package.json b/package.json
index 80c23d1..f8a9d45 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "piclist",
- "version": "2.5.0",
+ "version": "2.5.1",
"author": {
"name": "Kuingsmile",
"email": "pkukuing@gmail.com"
@@ -29,7 +29,8 @@
"upload-dist": "node ./scripts/upload-dist-to-r2.js",
"upload-beta": "node ./scripts/upload-beta.js",
"link": "node ./scripts/link.js",
- "sha256": "node ./scripts/gen-sha256.js"
+ "sha256": "node ./scripts/gen-sha256.js",
+ "ncu": "node ./scripts/check-dep.js"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.388.0",
@@ -41,91 +42,92 @@
"@octokit/rest": "^19.0.7",
"@picgo/i18n": "^1.0.0",
"@picgo/store": "^2.0.4",
- "@smithy/node-http-handler": "^2.0.2",
- "@types/marked": "^4.0.8",
+ "@smithy/node-http-handler": "^2.0.5",
"@types/mime-types": "^2.1.1",
"@videojs-player/vue": "^1.0.0",
"ali-oss": "^6.18.0",
- "axios": "^1.4.0",
+ "axios": "^1.5.0",
"compare-versions": "^4.1.3",
- "core-js": "^3.27.1",
+ "core-js": "^3.32.1",
"cos-nodejs-sdk-v5": "^2.12.4",
"dexie": "^3.2.4",
"electron-updater": "^6.1.1",
"element-plus": "^2.3.9",
"epipebomb": "^1.0.0",
- "fast-xml-parser": "^4.2.5",
+ "fast-xml-parser": "^4.2.7",
"form-data": "^4.0.0",
"fs-extra": "^11.1.1",
"got": "^12.6.0",
- "highlight.js": "^11.7.0",
+ "highlight.js": "^11.8.0",
"hpagent": "^1.2.0",
"keycode": "^2.2.0",
"lodash-id": "^0.14.0",
"lowdb": "^1.0.0",
- "marked": "^4.3.0",
+ "marked": "^7.0.5",
"mime-types": "^2.1.35",
- "mitt": "^3.0.0",
+ "mitt": "^3.0.1",
"node-ssh-no-cpu-features": "^1.0.1",
"nodejs-file-downloader": "^4.12.1",
- "piclist": "^0.8.12",
- "pinia": "^2.1.4",
- "pinia-plugin-persistedstate": "^3.1.0",
+ "piclist": "^0.9.1",
+ "pinia": "^2.1.6",
+ "pinia-plugin-persistedstate": "^3.2.0",
"qiniu": "^7.9.0",
- "qrcode.vue": "^3.4.0",
+ "qrcode.vue": "^3.4.1",
"querystring": "^0.2.1",
"shell-path": "2.1.0",
"upyun": "^3.4.6",
"uuid": "^9.0.0",
- "video.js": "^8.3.0",
+ "video.js": "^8.5.2",
"vue": "^3.3.4",
"vue-router": "^4.2.4",
- "vue3-lazyload": "^0.3.6",
+ "vue3-lazyload": "^0.3.8",
"vue3-photo-preview": "^0.3.0",
"webdav": "^5.2.3",
"write-file-atomic": "^4.0.1"
},
"devDependencies": {
- "@babel/plugin-proposal-optional-chaining": "^7.16.7",
- "@electron/notarize": "^2.0.0",
+ "@babel/plugin-proposal-optional-chaining": "^7.21.0",
+ "@electron/notarize": "^2.1.0",
"@picgo/bump-version": "^1.1.2",
"@types/ali-oss": "^6.16.8",
"@types/electron-devtools-installer": "^2.2.2",
"@types/fs-extra": "^11.0.1",
"@types/inquirer": "^6.5.0",
"@types/js-yaml": "^4.0.5",
- "@types/lowdb": "^1.0.9",
+ "@types/lowdb": "^1.0.11",
"@types/node": "^16.10.2",
- "@types/request-promise-native": "^1.0.17",
+ "@types/request-promise-native": "^1.0.18",
"@types/semver": "^7.5.0",
"@types/tunnel": "^0.0.3",
- "@types/uuid": "^9.0.0",
+ "@types/upyun": "^3.4.0",
+ "@types/uuid": "^9.0.2",
"@types/write-file-atomic": "^4.0.0",
- "@typescript-eslint/eslint-plugin": "^5.48.0",
- "@typescript-eslint/parser": "^5.48.0",
+ "@typescript-eslint/eslint-plugin": "^6.4.1",
+ "@typescript-eslint/parser": "^6.4.1",
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/cli-plugin-router": "^5.0.8",
"@vue/cli-plugin-typescript": "^5.0.8",
"@vue/cli-service": "^5.0.8",
"@vue/eslint-config-standard": "^8.0.1",
- "@vue/eslint-config-typescript": "^11.0.2",
- "@vue/runtime-dom": "^3.2.45",
- "conventional-changelog": "^3.1.18",
- "cz-customizable": "^6.2.0",
+ "@vue/eslint-config-typescript": "^11.0.3",
+ "@vue/runtime-dom": "^3.3.4",
+ "conventional-changelog": "^5.0.0",
+ "cz-customizable": "^7.0.0",
"dotenv": "^16.3.1",
"electron": "^22.0.2",
"electron-devtools-installer": "^3.2.0",
- "eslint": "^8.34.0",
+ "eslint": "^8.48.0",
"eslint-config-standard": ">=16.0.0",
- "eslint-plugin-import": "^2.24.2",
+ "eslint-plugin-import": "^2.28.1",
"eslint-plugin-node": "^11.1.0",
- "eslint-plugin-promise": "^5.1.0",
- "eslint-plugin-vue": "^9.9.0",
+ "eslint-plugin-promise": "^6.1.1",
+ "eslint-plugin-vue": "^9.17.0",
"husky": "^3.1.0",
"node-loader": "^2.0.0",
- "stylus": "^0.54.7",
- "stylus-loader": "^3.0.2",
+ "npm-check-updates": "^16.13.1",
+ "stylus": "^0.59.0",
+ "stylus-loader": "^7.1.3",
"typescript": "^4.9.5",
"vue-cli-plugin-electron-builder": "^3.0.0-alpha.4"
},
diff --git a/scripts/check-dep.js b/scripts/check-dep.js
new file mode 100644
index 0000000..a855d20
--- /dev/null
+++ b/scripts/check-dep.js
@@ -0,0 +1,38 @@
+const ncu = require('npm-check-updates')
+const axios = require('axios')
+
+async function getRepositoryInfo (packageName) {
+ try {
+ const { data } = await axios.get(`https://registry.npmjs.org/${packageName}`)
+ const repository = data.repository
+ if (repository && repository.url) {
+ const gitUrl = repository.url.replace('git+', '').replace('.git', '')
+ const isGitHub = gitUrl.includes('github.com')
+
+ return isGitHub ? `${gitUrl}/releases` : gitUrl
+ }
+ } catch (error) {
+ console.error(`Error fetching repository info for ${packageName}: ${error.message}`)
+ }
+ return null
+}
+
+async function checkUpdates () {
+ const updated = await ncu.run({
+ packageFile: './package.json',
+ upgrade: false
+ })
+
+ if (!Object.keys(updated).length) {
+ console.log('All dependencies are up-to-date!')
+ return
+ }
+
+ console.log('Dependencies that need to be updated:')
+ for (const [key] of Object.entries(updated)) {
+ const repoUrl = await getRepositoryInfo(key)
+ console.log(`${key}: ${updated[key]} ${repoUrl ? `- [GitHub/Repo](${repoUrl})` : ''}`)
+ }
+}
+
+checkUpdates().catch(err => console.error(err))
diff --git a/src/main/apis/app/window/windowList.ts b/src/main/apis/app/window/windowList.ts
index 1491ffd..9d9ce64 100644
--- a/src/main/apis/app/window/windowList.ts
+++ b/src/main/apis/app/window/windowList.ts
@@ -71,6 +71,7 @@ const settingWindowOptions = {
transparent: true,
titleBarStyle: 'hidden',
webPreferences: {
+ webviewTag: true,
backgroundThrottling: false,
nodeIntegration: !!process.env.ELECTRON_NODE_INTEGRATION,
contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION,
diff --git a/src/main/manage/apis/upyun.ts b/src/main/manage/apis/upyun.ts
index 1d1ee37..8763efc 100644
--- a/src/main/manage/apis/upyun.ts
+++ b/src/main/manage/apis/upyun.ts
@@ -1,5 +1,3 @@
-// 忽略 TypeScript 错误
-// @ts-ignore
import Upyun from 'upyun'
// 加密函数、获取文件 MIME 类型、新的下载器、got 上传函数、并发异步任务池、错误格式化函数
diff --git a/src/main/utils/deleteFunc.ts b/src/main/utils/deleteFunc.ts
index 34e2e55..53f4ef2 100644
--- a/src/main/utils/deleteFunc.ts
+++ b/src/main/utils/deleteFunc.ts
@@ -75,7 +75,10 @@ export async function removeFileFromS3InMain (configMap: IStringKeyMap, dogeMode
try {
const { imgUrl, config: { accessKeyID, secretAccessKey, bucketName, region, endpoint, pathStyleAccess, rejectUnauthorized, proxy } } = configMap
const url = new URL(!/^https?:\/\//.test(imgUrl) ? `http://${imgUrl}` : imgUrl)
- const fileKey = url.pathname.replace(/^\/+/, '')
+ let fileKey = url.pathname.replace(/^\/+/, '')
+ if (pathStyleAccess) {
+ fileKey = fileKey.replace(/^[^/]+\//, '')
+ }
const endpointUrl: string | undefined = endpoint
? /^https?:\/\//.test(endpoint)
? endpoint
diff --git a/src/renderer/App.vue b/src/renderer/App.vue
index d9336f5..6ea7ee1 100644
--- a/src/renderer/App.vue
+++ b/src/renderer/App.vue
@@ -20,7 +20,9 @@ import type { IConfig } from 'piclist'
// 其他工具
import bus from './utils/bus'
import { FORCE_UPDATE } from '~/universal/events/constants'
+import { useATagClick } from './hooks/useATagClick'
+useATagClick()
const store = useStore()
onBeforeMount(async () => {
const config = await getConfig()
diff --git a/src/renderer/apis/imgur.ts b/src/renderer/apis/imgur.ts
index c184abb..bf97df0 100644
--- a/src/renderer/apis/imgur.ts
+++ b/src/renderer/apis/imgur.ts
@@ -17,8 +17,7 @@ interface IConfig {
}
export default class ImgurApi {
- static baseUrl: 'https://api.imgur.com/3'
-
+ static baseUrl = 'https://api.imgur.com/3'
private static async makeRequest (
method: 'delete',
url: string,
diff --git a/src/renderer/apis/upyun.ts b/src/renderer/apis/upyun.ts
index 61144a0..0decb37 100644
--- a/src/renderer/apis/upyun.ts
+++ b/src/renderer/apis/upyun.ts
@@ -1,4 +1,3 @@
-// @ts-ignore
import Upyun from 'upyun'
export default class UpyunApi {
diff --git a/src/renderer/components/ConfigForm.vue b/src/renderer/components/ConfigForm.vue
index 7a24949..6fccb74 100644
--- a/src/renderer/components/ConfigForm.vue
+++ b/src/renderer/components/ConfigForm.vue
@@ -25,10 +25,31 @@
+
+
+ {{ item.alias || item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
@@ -79,6 +100,8 @@ import { getConfig } from '@/utils/dataSender'
import { useRoute } from 'vue-router'
import type { FormInstance } from 'element-plus'
import { T as $T } from '@/i18n'
+import { QuestionFilled } from '@element-plus/icons-vue'
+import { marked } from 'marked'
interface IProps {
config: any[]
@@ -118,6 +141,14 @@ async function validate (): Promise {
})
}
+function transformMarkdownToHTML (markdown: string) {
+ try {
+ return marked.parse(markdown)
+ } catch (e) {
+ return markdown
+ }
+}
+
function getConfigType () {
switch (props.type) {
case 'plugin': {
@@ -182,6 +213,10 @@ defineExpose({
})