Merge commit '2daae921ff97a0b5c4ffa8e0f686f359998a4eae' into release

This commit is contained in:
萌萌哒赫萝 2023-08-29 03:11:24 -07:00
commit ab36bd1743
23 changed files with 2619 additions and 534 deletions

View File

@ -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) # :tada: 2.5.0 (2023-08-23)

View File

@ -4,6 +4,9 @@
<a href="https://github.com/Kuingsmile/PicList/actions"> <a href="https://github.com/Kuingsmile/PicList/actions">
<img src="https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square" alt=""> <img src="https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square" alt="">
</a> </a>
<a href="https://github.com/Kuingsmile/PicList/releases">
<img src="https://img.shields.io/github/downloads/Kuingsmile/PicList/total.svg?style=flat-square" alt="">
</a>
<a href="https://github.com/Kuingsmile/PicList/actions"> <a href="https://github.com/Kuingsmile/PicList/actions">
<img src="https://github.com/Kuingsmile/PicList/actions/workflows/manually.yml/badge.svg" alt=""> <img src="https://github.com/Kuingsmile/PicList/actions/workflows/manually.yml/badge.svg" alt="">
</a> </a>

View File

@ -4,6 +4,9 @@
<a href="https://github.com/Kuingsmile/PicList/actions"> <a href="https://github.com/Kuingsmile/PicList/actions">
<img src="https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square" alt=""> <img src="https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square" alt="">
</a> </a>
<a href="https://github.com/Kuingsmile/PicList/releases">
<img src="https://img.shields.io/github/downloads/Kuingsmile/PicList/total.svg?style=flat-square" alt="">
</a>
<a href="https://github.com/Kuingsmile/PicList/actions"> <a href="https://github.com/Kuingsmile/PicList/actions">
<img src="https://github.com/Kuingsmile/PicList/actions/workflows/manually.yml/badge.svg" alt=""> <img src="https://github.com/Kuingsmile/PicList/actions/workflows/manually.yml/badge.svg" alt="">
</a> </a>

View File

@ -1,6 +1,6 @@
{ {
"name": "piclist", "name": "piclist",
"version": "2.5.0", "version": "2.5.1",
"author": { "author": {
"name": "Kuingsmile", "name": "Kuingsmile",
"email": "pkukuing@gmail.com" "email": "pkukuing@gmail.com"
@ -29,7 +29,8 @@
"upload-dist": "node ./scripts/upload-dist-to-r2.js", "upload-dist": "node ./scripts/upload-dist-to-r2.js",
"upload-beta": "node ./scripts/upload-beta.js", "upload-beta": "node ./scripts/upload-beta.js",
"link": "node ./scripts/link.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": { "dependencies": {
"@aws-sdk/client-s3": "^3.388.0", "@aws-sdk/client-s3": "^3.388.0",
@ -41,91 +42,92 @@
"@octokit/rest": "^19.0.7", "@octokit/rest": "^19.0.7",
"@picgo/i18n": "^1.0.0", "@picgo/i18n": "^1.0.0",
"@picgo/store": "^2.0.4", "@picgo/store": "^2.0.4",
"@smithy/node-http-handler": "^2.0.2", "@smithy/node-http-handler": "^2.0.5",
"@types/marked": "^4.0.8",
"@types/mime-types": "^2.1.1", "@types/mime-types": "^2.1.1",
"@videojs-player/vue": "^1.0.0", "@videojs-player/vue": "^1.0.0",
"ali-oss": "^6.18.0", "ali-oss": "^6.18.0",
"axios": "^1.4.0", "axios": "^1.5.0",
"compare-versions": "^4.1.3", "compare-versions": "^4.1.3",
"core-js": "^3.27.1", "core-js": "^3.32.1",
"cos-nodejs-sdk-v5": "^2.12.4", "cos-nodejs-sdk-v5": "^2.12.4",
"dexie": "^3.2.4", "dexie": "^3.2.4",
"electron-updater": "^6.1.1", "electron-updater": "^6.1.1",
"element-plus": "^2.3.9", "element-plus": "^2.3.9",
"epipebomb": "^1.0.0", "epipebomb": "^1.0.0",
"fast-xml-parser": "^4.2.5", "fast-xml-parser": "^4.2.7",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"fs-extra": "^11.1.1", "fs-extra": "^11.1.1",
"got": "^12.6.0", "got": "^12.6.0",
"highlight.js": "^11.7.0", "highlight.js": "^11.8.0",
"hpagent": "^1.2.0", "hpagent": "^1.2.0",
"keycode": "^2.2.0", "keycode": "^2.2.0",
"lodash-id": "^0.14.0", "lodash-id": "^0.14.0",
"lowdb": "^1.0.0", "lowdb": "^1.0.0",
"marked": "^4.3.0", "marked": "^7.0.5",
"mime-types": "^2.1.35", "mime-types": "^2.1.35",
"mitt": "^3.0.0", "mitt": "^3.0.1",
"node-ssh-no-cpu-features": "^1.0.1", "node-ssh-no-cpu-features": "^1.0.1",
"nodejs-file-downloader": "^4.12.1", "nodejs-file-downloader": "^4.12.1",
"piclist": "^0.8.12", "piclist": "^0.9.1",
"pinia": "^2.1.4", "pinia": "^2.1.6",
"pinia-plugin-persistedstate": "^3.1.0", "pinia-plugin-persistedstate": "^3.2.0",
"qiniu": "^7.9.0", "qiniu": "^7.9.0",
"qrcode.vue": "^3.4.0", "qrcode.vue": "^3.4.1",
"querystring": "^0.2.1", "querystring": "^0.2.1",
"shell-path": "2.1.0", "shell-path": "2.1.0",
"upyun": "^3.4.6", "upyun": "^3.4.6",
"uuid": "^9.0.0", "uuid": "^9.0.0",
"video.js": "^8.3.0", "video.js": "^8.5.2",
"vue": "^3.3.4", "vue": "^3.3.4",
"vue-router": "^4.2.4", "vue-router": "^4.2.4",
"vue3-lazyload": "^0.3.6", "vue3-lazyload": "^0.3.8",
"vue3-photo-preview": "^0.3.0", "vue3-photo-preview": "^0.3.0",
"webdav": "^5.2.3", "webdav": "^5.2.3",
"write-file-atomic": "^4.0.1" "write-file-atomic": "^4.0.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.16.7", "@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@electron/notarize": "^2.0.0", "@electron/notarize": "^2.1.0",
"@picgo/bump-version": "^1.1.2", "@picgo/bump-version": "^1.1.2",
"@types/ali-oss": "^6.16.8", "@types/ali-oss": "^6.16.8",
"@types/electron-devtools-installer": "^2.2.2", "@types/electron-devtools-installer": "^2.2.2",
"@types/fs-extra": "^11.0.1", "@types/fs-extra": "^11.0.1",
"@types/inquirer": "^6.5.0", "@types/inquirer": "^6.5.0",
"@types/js-yaml": "^4.0.5", "@types/js-yaml": "^4.0.5",
"@types/lowdb": "^1.0.9", "@types/lowdb": "^1.0.11",
"@types/node": "^16.10.2", "@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/semver": "^7.5.0",
"@types/tunnel": "^0.0.3", "@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", "@types/write-file-atomic": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^5.48.0", "@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^5.48.0", "@typescript-eslint/parser": "^6.4.1",
"@vue/cli-plugin-babel": "^5.0.8", "@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-eslint": "^5.0.8", "@vue/cli-plugin-eslint": "^5.0.8",
"@vue/cli-plugin-router": "^5.0.8", "@vue/cli-plugin-router": "^5.0.8",
"@vue/cli-plugin-typescript": "^5.0.8", "@vue/cli-plugin-typescript": "^5.0.8",
"@vue/cli-service": "^5.0.8", "@vue/cli-service": "^5.0.8",
"@vue/eslint-config-standard": "^8.0.1", "@vue/eslint-config-standard": "^8.0.1",
"@vue/eslint-config-typescript": "^11.0.2", "@vue/eslint-config-typescript": "^11.0.3",
"@vue/runtime-dom": "^3.2.45", "@vue/runtime-dom": "^3.3.4",
"conventional-changelog": "^3.1.18", "conventional-changelog": "^5.0.0",
"cz-customizable": "^6.2.0", "cz-customizable": "^7.0.0",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",
"electron": "^22.0.2", "electron": "^22.0.2",
"electron-devtools-installer": "^3.2.0", "electron-devtools-installer": "^3.2.0",
"eslint": "^8.34.0", "eslint": "^8.48.0",
"eslint-config-standard": ">=16.0.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-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0", "eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vue": "^9.9.0", "eslint-plugin-vue": "^9.17.0",
"husky": "^3.1.0", "husky": "^3.1.0",
"node-loader": "^2.0.0", "node-loader": "^2.0.0",
"stylus": "^0.54.7", "npm-check-updates": "^16.13.1",
"stylus-loader": "^3.0.2", "stylus": "^0.59.0",
"stylus-loader": "^7.1.3",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"vue-cli-plugin-electron-builder": "^3.0.0-alpha.4" "vue-cli-plugin-electron-builder": "^3.0.0-alpha.4"
}, },

38
scripts/check-dep.js Normal file
View File

@ -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))

View File

@ -71,6 +71,7 @@ const settingWindowOptions = {
transparent: true, transparent: true,
titleBarStyle: 'hidden', titleBarStyle: 'hidden',
webPreferences: { webPreferences: {
webviewTag: true,
backgroundThrottling: false, backgroundThrottling: false,
nodeIntegration: !!process.env.ELECTRON_NODE_INTEGRATION, nodeIntegration: !!process.env.ELECTRON_NODE_INTEGRATION,
contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION, contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION,

View File

@ -1,5 +1,3 @@
// 忽略 TypeScript 错误
// @ts-ignore
import Upyun from 'upyun' import Upyun from 'upyun'
// 加密函数、获取文件 MIME 类型、新的下载器、got 上传函数、并发异步任务池、错误格式化函数 // 加密函数、获取文件 MIME 类型、新的下载器、got 上传函数、并发异步任务池、错误格式化函数

View File

@ -75,7 +75,10 @@ export async function removeFileFromS3InMain (configMap: IStringKeyMap, dogeMode
try { try {
const { imgUrl, config: { accessKeyID, secretAccessKey, bucketName, region, endpoint, pathStyleAccess, rejectUnauthorized, proxy } } = configMap const { imgUrl, config: { accessKeyID, secretAccessKey, bucketName, region, endpoint, pathStyleAccess, rejectUnauthorized, proxy } } = configMap
const url = new URL(!/^https?:\/\//.test(imgUrl) ? `http://${imgUrl}` : imgUrl) 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 const endpointUrl: string | undefined = endpoint
? /^https?:\/\//.test(endpoint) ? /^https?:\/\//.test(endpoint)
? endpoint ? endpoint

View File

@ -20,7 +20,9 @@ import type { IConfig } from 'piclist'
// //
import bus from './utils/bus' import bus from './utils/bus'
import { FORCE_UPDATE } from '~/universal/events/constants' import { FORCE_UPDATE } from '~/universal/events/constants'
import { useATagClick } from './hooks/useATagClick'
useATagClick()
const store = useStore() const store = useStore()
onBeforeMount(async () => { onBeforeMount(async () => {
const config = await getConfig<IConfig>() const config = await getConfig<IConfig>()

View File

@ -17,8 +17,7 @@ interface IConfig {
} }
export default class ImgurApi { export default class ImgurApi {
static baseUrl: 'https://api.imgur.com/3' static baseUrl = 'https://api.imgur.com/3'
private static async makeRequest ( private static async makeRequest (
method: 'delete', method: 'delete',
url: string, url: string,

View File

@ -1,4 +1,3 @@
// @ts-ignore
import Upyun from 'upyun' import Upyun from 'upyun'
export default class UpyunApi { export default class UpyunApi {

View File

@ -25,10 +25,31 @@
<el-form-item <el-form-item
v-for="(item, index) in configList" v-for="(item, index) in configList"
:key="item.name + index" :key="item.name + index"
:label="item.alias || item.name"
:required="item.required" :required="item.required"
:prop="item.name" :prop="item.name"
> >
<template #label>
<el-row align="middle">
{{ item.alias || item.name }}
<template v-if="item.tips">
<el-tooltip
class="item"
effect="dark"
placement="right"
>
<template #content>
<span
class="config-form-common-tips"
v-html="transformMarkdownToHTML(item.tips)"
/>
</template>
<el-icon class="ml-[4px] cursor-pointer hover:text-blue">
<QuestionFilled />
</el-icon>
</el-tooltip>
</template>
</el-row>
</template>
<el-input <el-input
v-if="item.type === 'input' || item.type === 'password'" v-if="item.type === 'input' || item.type === 'password'"
v-model="ruleForm[item.name]" v-model="ruleForm[item.name]"
@ -64,8 +85,8 @@
<el-switch <el-switch
v-else-if="item.type === 'confirm'" v-else-if="item.type === 'confirm'"
v-model="ruleForm[item.name]" v-model="ruleForm[item.name]"
active-text="yes" :active-text="item.confirmText || 'yes'"
inactive-text="no" :inactive-text="item.cancelText || 'no'"
/> />
</el-form-item> </el-form-item>
<slot /> <slot />
@ -79,6 +100,8 @@ import { getConfig } from '@/utils/dataSender'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import type { FormInstance } from 'element-plus' import type { FormInstance } from 'element-plus'
import { T as $T } from '@/i18n' import { T as $T } from '@/i18n'
import { QuestionFilled } from '@element-plus/icons-vue'
import { marked } from 'marked'
interface IProps { interface IProps {
config: any[] config: any[]
@ -118,6 +141,14 @@ async function validate (): Promise<IStringKeyMap | false> {
}) })
} }
function transformMarkdownToHTML (markdown: string) {
try {
return marked.parse(markdown)
} catch (e) {
return markdown
}
}
function getConfigType () { function getConfigType () {
switch (props.type) { switch (props.type) {
case 'plugin': { case 'plugin': {
@ -182,6 +213,10 @@ defineExpose({
}) })
</script> </script>
<style lang='stylus'> <style lang='stylus'>
.config-form-common-tips
a
color #409EFF
text-decoration none
#config-form #config-form
.el-form .el-form
label label

View File

@ -0,0 +1,19 @@
import { openURL } from '@/utils/common'
import { onMounted, onUnmounted } from 'vue'
export function useATagClick () {
const handleATagClick = (e: MouseEvent) => {
if (e.target instanceof HTMLAnchorElement) {
if (e.target.href) {
e.preventDefault()
openURL(e.target.href)
}
}
}
onMounted(() => {
document.addEventListener('click', handleATagClick)
})
onUnmounted(() => {
document.removeEventListener('click', handleATagClick)
})
}

View File

@ -124,7 +124,7 @@
</el-icon> </el-icon>
<span>{{ $T('PLUGIN_SETTINGS') }}</span> <span>{{ $T('PLUGIN_SETTINGS') }}</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="MANUAL"> <el-menu-item :index="routerConfig.DocumentPage">
<el-icon> <el-icon>
<Link /> <Link />
</el-icon> </el-icon>
@ -259,7 +259,7 @@ import {
} from '@element-plus/icons-vue' } from '@element-plus/icons-vue'
// Element Plus // Element Plus
import { ElMessage as $message, ElMessageBox } from 'element-plus' import { ElMessage as $message } from 'element-plus'
// //
import { T as $T } from '@/i18n/index' import { T as $T } from '@/i18n/index'
@ -299,16 +299,12 @@ import {
SHOW_MAIN_PAGE_MENU, SHOW_MAIN_PAGE_MENU,
SHOW_MAIN_PAGE_QRCODE, SHOW_MAIN_PAGE_QRCODE,
SHOW_MAIN_PAGE_DONATION, SHOW_MAIN_PAGE_DONATION,
GET_PICBEDS, GET_PICBEDS
OPEN_URL
} from '~/universal/events/constants' } from '~/universal/events/constants'
// //
import { getConfig, sendToMain } from '@/utils/dataSender' import { getConfig, sendToMain } from '@/utils/dataSender'
// Piclist
import { IConfig } from 'piclist'
const version = ref(process.env.NODE_ENV === 'production' ? pkg.version : 'Dev') const version = ref(process.env.NODE_ENV === 'production' ? pkg.version : 'Dev')
const routerConfig = reactive(config) const routerConfig = reactive(config)
const defaultActive = ref(routerConfig.UPLOAD_PAGE) const defaultActive = ref(routerConfig.UPLOAD_PAGE)
@ -357,27 +353,6 @@ const handleGetPicPeds = () => {
} }
const handleSelect = (index: string) => { const handleSelect = (index: string) => {
if (index === 'MANUAL') {
ElMessageBox.confirm($T('OPEN_MANUAL_LINK_HINT'), $T('OPEN_MANUAL_LINK'), {
confirmButtonText: $T('CONFIRM'),
cancelButtonText: $T('CANCEL'),
type: 'warning',
center: true
}).then(async () => {
let language = 'zh-CN'
const config = (await getConfig<IConfig>())!
if (config !== undefined) {
const settings = config.settings || {}
language = settings.language ?? 'zh-CN'
}
if (language === 'zh-CN' || language === 'zh-TW') {
sendToMain(OPEN_URL, 'https://piclist.cn/configure.html')
} else {
sendToMain(OPEN_URL, 'https://piclist.cn/en/configure.html')
}
}).catch(() => {})
return
}
defaultActive.value = index defaultActive.value = index
const type = index.match(routerConfig.UPLOADER_CONFIG_PAGE) const type = index.match(routerConfig.UPLOADER_CONFIG_PAGE)
if (type === null) { if (type === null) {

View File

@ -1971,7 +1971,7 @@ async function handleClickFile (item: any) {
const fileUrl = item.url const fileUrl = item.url
const res = await axios.get(fileUrl, options) const res = await axios.get(fileUrl, options)
const content = res.data const content = res.data
markDownContent.value = marked(content) markDownContent.value = marked.parse(content)
isShowMarkDownDialog.value = true isShowMarkDownDialog.value = true
} catch (error) { } catch (error) {
ElMessage.error($T('MANAGE_BUCKET_END_LOADING_MESSAGE_FAIL')) ElMessage.error($T('MANAGE_BUCKET_END_LOADING_MESSAGE_FAIL'))
@ -2094,13 +2094,18 @@ async function initCustomDomainList () {
} else { } else {
if (manageStore.config.picBed[configMap.alias].endpoint) { if (manageStore.config.picBed[configMap.alias].endpoint) {
const endpoint = manageStore.config.picBed[configMap.alias].endpoint const endpoint = manageStore.config.picBed[configMap.alias].endpoint
const s3ForcePathStyle = manageStore.config.picBed[configMap.alias].s3ForcePathStyle
let url let url
if (/^https?:\/\//.test(endpoint)) { if (/^https?:\/\//.test(endpoint)) {
url = new URL(endpoint) url = new URL(endpoint)
} else { } else {
url = new URL(manageStore.config.picBed[configMap.alias].sslEnabled ? 'https://' + endpoint : 'http://' + endpoint) url = new URL(manageStore.config.picBed[configMap.alias].sslEnabled ? `https://${endpoint}` : `http://${endpoint}`)
}
if (s3ForcePathStyle) {
currentCustomDomain.value = `${url.protocol}//${url.hostname}${url.port ? ':' + url.port : ''}/${configMap.bucketName}`
} else {
currentCustomDomain.value = `${url.protocol}//${configMap.bucketName}.${url.hostname}${url.port ? ':' + url.port : ''}`
} }
currentCustomDomain.value = `${url.protocol}//${configMap.bucketName}.${url.hostname}`
} else { } else {
currentCustomDomain.value = `https://${configMap.bucketName}.s3.amazonaws.com` currentCustomDomain.value = `https://${configMap.bucketName}.s3.amazonaws.com`
} }

View File

@ -90,7 +90,7 @@ export const supportedPicBedList: IStringKeyMap = {
}, },
explain: $T('MANAGE_CONSTANT_SMMS_EXPLAIN'), explain: $T('MANAGE_CONSTANT_SMMS_EXPLAIN'),
options: ['alias', 'token', 'paging'], options: ['alias', 'token', 'paging'],
refLink: 'https://pichoro.horosama.com/#/PicHoroDocs/configure?id=%e5%8f%82%e6%95%b0%e8%af%b4%e6%98%8e-6', refLink: 'https://piclist.cn/manage.html#smms',
referenceText: $T('MANAGE_CONSTANT_SMMS_REFER_TEXT') referenceText: $T('MANAGE_CONSTANT_SMMS_REFER_TEXT')
}, },
qiniu: { qiniu: {
@ -160,7 +160,7 @@ export const supportedPicBedList: IStringKeyMap = {
}, },
explain: $T('MANAGE_CONSTANT_QINIU_EXPLAIN'), explain: $T('MANAGE_CONSTANT_QINIU_EXPLAIN'),
options: ['alias', 'accessKey', 'secretKey', 'bucketName', 'baseDir', 'isAutoCustomUrl', 'paging', 'itemsPerPage'], options: ['alias', 'accessKey', 'secretKey', 'bucketName', 'baseDir', 'isAutoCustomUrl', 'paging', 'itemsPerPage'],
refLink: 'https://pichoro.horosama.com/#/PicHoroDocs/configure?id=%e5%8f%82%e6%95%b0%e8%af%b4%e6%98%8e-3', refLink: 'https://piclist.cn/manage.html#%E4%B8%83%E7%89%9B%E4%BA%91',
referenceText: $T('MANAGE_CONSTANT_QINIU_REFER_TEXT') referenceText: $T('MANAGE_CONSTANT_QINIU_REFER_TEXT')
}, },
github: { github: {
@ -265,7 +265,7 @@ export const supportedPicBedList: IStringKeyMap = {
}, },
explain: $T('MANAGE_CONSTANT_GITHUB_EXPLAIN'), explain: $T('MANAGE_CONSTANT_GITHUB_EXPLAIN'),
options: ['alias', 'token', 'githubUsername', 'proxy', 'customUrl'], options: ['alias', 'token', 'githubUsername', 'proxy', 'customUrl'],
refLink: 'https://pichoro.horosama.com/#/PicHoroDocs/configure?id=%e5%8f%82%e6%95%b0%e8%af%b4%e6%98%8e-9', refLink: 'https://piclist.cn/manage.html#github',
referenceText: $T('MANAGE_CONSTANT_GITHUB_REFER_TEXT') referenceText: $T('MANAGE_CONSTANT_GITHUB_REFER_TEXT')
}, },
aliyun: { aliyun: {
@ -335,7 +335,7 @@ export const supportedPicBedList: IStringKeyMap = {
}, },
explain: $T('MANAGE_CONSTANT_ALIYUN_EXPLAIN'), explain: $T('MANAGE_CONSTANT_ALIYUN_EXPLAIN'),
options: ['alias', 'accessKeyId', 'accessKeySecret', 'bucketName', 'baseDir', 'isAutoCustomUrl', 'paging', 'itemsPerPage'], options: ['alias', 'accessKeyId', 'accessKeySecret', 'bucketName', 'baseDir', 'isAutoCustomUrl', 'paging', 'itemsPerPage'],
refLink: 'https://pichoro.horosama.com/#/PicHoroDocs/configure?id=%e5%8f%82%e6%95%b0%e8%af%b4%e6%98%8e-1', refLink: 'https://piclist.cn/manage.html#%E9%98%BF%E9%87%8C%E4%BA%91oss',
referenceText: $T('MANAGE_CONSTANT_ALIYUN_REFER_TEXT') referenceText: $T('MANAGE_CONSTANT_ALIYUN_REFER_TEXT')
}, },
tcyun: { tcyun: {
@ -413,7 +413,7 @@ export const supportedPicBedList: IStringKeyMap = {
}, },
explain: $T('MANAGE_CONSTANT_TENCENT_EXPLAIN'), explain: $T('MANAGE_CONSTANT_TENCENT_EXPLAIN'),
options: ['alias', 'secretId', 'secretKey', 'appId', 'bucketName', 'baseDir', 'isAutoCustomUrl', 'paging', 'itemsPerPage'], options: ['alias', 'secretId', 'secretKey', 'appId', 'bucketName', 'baseDir', 'isAutoCustomUrl', 'paging', 'itemsPerPage'],
refLink: 'https://pichoro.horosama.com/#/PicHoroDocs/configure?id=%e5%8f%82%e6%95%b0%e8%af%b4%e6%98%8e-2', refLink: 'https://piclist.cn/manage.html#%E8%85%BE%E8%AE%AF%E4%BA%91',
referenceText: $T('MANAGE_CONSTANT_TENCENT_REFER_TEXT') referenceText: $T('MANAGE_CONSTANT_TENCENT_REFER_TEXT')
}, },
upyun: { upyun: {
@ -512,7 +512,7 @@ export const supportedPicBedList: IStringKeyMap = {
}, },
explain: $T('MANAGE_CONSTANT_UPYUN_EXPLAIN'), explain: $T('MANAGE_CONSTANT_UPYUN_EXPLAIN'),
options: ['alias', 'bucketName', 'operator', 'password', 'baseDir', 'customUrl', 'paging', 'itemsPerPage'], options: ['alias', 'bucketName', 'operator', 'password', 'baseDir', 'customUrl', 'paging', 'itemsPerPage'],
refLink: 'https://pichoro.horosama.com/#/PicHoroDocs/configure?id=%e5%8f%82%e6%95%b0%e8%af%b4%e6%98%8e-4', refLink: 'https://piclist.cn/manage.html#%E5%8F%88%E6%8B%8D%E4%BA%91',
referenceText: $T('MANAGE_CONSTANT_UPYUN_REFER_TEXT') referenceText: $T('MANAGE_CONSTANT_UPYUN_REFER_TEXT')
}, },
imgur: { imgur: {
@ -552,7 +552,7 @@ export const supportedPicBedList: IStringKeyMap = {
}, },
explain: $T('MANAGE_CONSTANT_IMGUR_EXPLAIN'), explain: $T('MANAGE_CONSTANT_IMGUR_EXPLAIN'),
options: ['alias', 'imgurUserName', 'accessToken', 'proxy'], options: ['alias', 'imgurUserName', 'accessToken', 'proxy'],
refLink: 'https://pichoro.horosama.com/#/PicHoroDocs/configure?id=imgur%e5%9b%be%e5%ba%8a-1', refLink: 'https://piclist.cn/manage.html#imgur',
referenceText: $T('MANAGE_CONSTANT_IMGUR_REFER_TEXT') referenceText: $T('MANAGE_CONSTANT_IMGUR_REFER_TEXT')
}, },
s3plist: { s3plist: {
@ -667,7 +667,7 @@ export const supportedPicBedList: IStringKeyMap = {
}, },
explain: $T('MANAGE_CONSTANT_S3_EXPLAIN'), explain: $T('MANAGE_CONSTANT_S3_EXPLAIN'),
options: ['alias', 'accessKeyId', 'secretAccessKey', 'endpoint', 'sslEnabled', 's3ForcePathStyle', 'proxy', 'aclForUpload', 'bucketName', 'baseDir', 'dogeCloudSupport', 'paging', 'itemsPerPage'], options: ['alias', 'accessKeyId', 'secretAccessKey', 'endpoint', 'sslEnabled', 's3ForcePathStyle', 'proxy', 'aclForUpload', 'bucketName', 'baseDir', 'dogeCloudSupport', 'paging', 'itemsPerPage'],
refLink: 'https://github.com/wayjam/picgo-plugin-s3', refLink: 'https://piclist.cn/manage.html#s3',
referenceText: $T('MANAGE_CONSTANT_S3_REFER_TEXT') referenceText: $T('MANAGE_CONSTANT_S3_REFER_TEXT')
}, },
webdavplist: { webdavplist: {
@ -769,7 +769,7 @@ export const supportedPicBedList: IStringKeyMap = {
}, },
explain: $T('MANAGE_CONSTANT_WEBDAV_EXPLAIN'), explain: $T('MANAGE_CONSTANT_WEBDAV_EXPLAIN'),
options: ['alias', 'endpoint', 'username', 'password', 'bucketName', 'baseDir', 'customUrl', 'webPath', 'proxy', 'sslEnabled'], options: ['alias', 'endpoint', 'username', 'password', 'bucketName', 'baseDir', 'customUrl', 'webPath', 'proxy', 'sslEnabled'],
refLink: 'https://pichoro.horosama.com/#/PicHoroDocs/configure?id=webdav', refLink: 'https://piclist.cn/manage.html#webdav',
referenceText: $T('MANAGE_CONSTANT_WEBDAV_REFER_TEXT') referenceText: $T('MANAGE_CONSTANT_WEBDAV_REFER_TEXT')
}, },
local: { local: {
@ -846,7 +846,7 @@ export const supportedPicBedList: IStringKeyMap = {
}, },
explain: $T('MANAGE_CONSTANT_LOCAL_EXPLAIN'), explain: $T('MANAGE_CONSTANT_LOCAL_EXPLAIN'),
options: ['alias', 'baseDir', 'customUrl', 'bucketName', 'webPath'], options: ['alias', 'baseDir', 'customUrl', 'bucketName', 'webPath'],
refLink: 'https://piclist.cn', refLink: 'https://piclist.cn/manage.html#%E6%9C%AC%E5%9C%B0%E5%AD%98%E5%82%A8',
referenceText: $T('MANAGE_CONSTANT_LOCAL_REFER_TEXT') referenceText: $T('MANAGE_CONSTANT_LOCAL_REFER_TEXT')
}, },
sftp: { sftp: {
@ -980,7 +980,7 @@ export const supportedPicBedList: IStringKeyMap = {
}, },
explain: $T('MANAGE_CONSTANT_SFTP_EXPLAIN'), explain: $T('MANAGE_CONSTANT_SFTP_EXPLAIN'),
options: ['alias', 'host', 'port', 'username', 'password', 'privateKey', 'passphrase', 'fileMode', 'dirMode', 'baseDir', 'customUrl', 'bucketName', 'webPath'], options: ['alias', 'host', 'port', 'username', 'password', 'privateKey', 'passphrase', 'fileMode', 'dirMode', 'baseDir', 'customUrl', 'bucketName', 'webPath'],
refLink: 'https://github.com/imba97/picgo-plugin-sftp-uploader', refLink: 'https://piclist.cn/manage.html#sftp',
referenceText: $T('MANAGE_CONSTANT_SFTP_REFER_TEXT') referenceText: $T('MANAGE_CONSTANT_SFTP_REFER_TEXT')
} }
} }

View File

@ -0,0 +1,16 @@
<template>
<webview
src="https://piclist.cn/app.html"
disablewebsecurity
allowpopups
autosize="on"
scrollbars="none"
style="width: 100%; height: 100%;"
/>
</template>
<script lang="ts">
export default {
name: 'DocumentPage'
}
</script>

View File

@ -15,3 +15,4 @@ export const TOOLBOX_CONFIG_PAGE = 'ToolBoxPage'
export const TRAY_PAGE = 'TrayPage' export const TRAY_PAGE = 'TrayPage'
export const UPLOAD_PAGE = 'UploadPage' export const UPLOAD_PAGE = 'UploadPage'
export const UPLOADER_CONFIG_PAGE = 'UploaderConfigPage' export const UPLOADER_CONFIG_PAGE = 'UploaderConfigPage'
export const DocumentPage = 'DocumentPage'

View File

@ -79,6 +79,11 @@ export default createRouter({
component: () => import(/* webpackChunkName: "Plugin" */ '@/pages/Plugin.vue'), component: () => import(/* webpackChunkName: "Plugin" */ '@/pages/Plugin.vue'),
name: config.PLUGIN_PAGE name: config.PLUGIN_PAGE
}, },
{
path: 'documents',
component: () => import(/* webpackChunkName: "DocumentPage" */ '@/pages/DocumentPage.vue'),
name: config.DocumentPage
},
{ {
path: 'shortKey', path: 'shortKey',
component: () => import(/* webpackChunkName: "ShortkeyPage" */ '@/pages/ShortKey.vue'), component: () => import(/* webpackChunkName: "ShortkeyPage" */ '@/pages/ShortKey.vue'),

View File

@ -1,4 +1,6 @@
import { isReactive, isRef, toRaw, unref } from 'vue' import { isReactive, isRef, toRaw, unref } from 'vue'
import { sendToMain } from './dataSender'
import { OPEN_URL } from '~/universal/events/constants'
/** /**
* get raw data from reactive or ref * get raw data from reactive or ref
@ -16,3 +18,7 @@ export const getRawData = (args: any): any => {
} }
return args return args
} }
export const openURL = (url: string) => {
sendToMain(OPEN_URL, url)
}

View File

@ -15,7 +15,7 @@ declare module 'vue/types/vue' {
} }
} }
declare module '@vue/runtime-core' { declare module 'vue' {
interface ComponentCustomProperties { interface ComponentCustomProperties {
$http: typeof axios $http: typeof axios
$builtInPicBed: string[] $builtInPicBed: string[]

View File

@ -164,6 +164,8 @@ interface IPicGoPluginConfig {
name?: string name?: string
value?: any value?: any
}[] }[]
/** support markdown */
tips?: string
[propName: string]: any [propName: string]: any
} }

2847
yarn.lock

File diff suppressed because it is too large Load Diff