mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-23 06:38:13 -05:00
Merge commit '2daae921ff97a0b5c4ffa8e0f686f359998a4eae' into release
This commit is contained in:
commit
ab36bd1743
24
CHANGELOG.md
24
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)
|
||||
|
||||
|
||||
|
@ -4,6 +4,9 @@
|
||||
<a href="https://github.com/Kuingsmile/PicList/actions">
|
||||
<img src="https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square" alt="">
|
||||
</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">
|
||||
<img src="https://github.com/Kuingsmile/PicList/actions/workflows/manually.yml/badge.svg" alt="">
|
||||
</a>
|
||||
|
@ -4,6 +4,9 @@
|
||||
<a href="https://github.com/Kuingsmile/PicList/actions">
|
||||
<img src="https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square" alt="">
|
||||
</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">
|
||||
<img src="https://github.com/Kuingsmile/PicList/actions/workflows/manually.yml/badge.svg" alt="">
|
||||
</a>
|
||||
|
68
package.json
68
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"
|
||||
},
|
||||
|
38
scripts/check-dep.js
Normal file
38
scripts/check-dep.js
Normal 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))
|
@ -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,
|
||||
|
@ -1,5 +1,3 @@
|
||||
// 忽略 TypeScript 错误
|
||||
// @ts-ignore
|
||||
import Upyun from 'upyun'
|
||||
|
||||
// 加密函数、获取文件 MIME 类型、新的下载器、got 上传函数、并发异步任务池、错误格式化函数
|
||||
|
@ -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
|
||||
|
@ -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<IConfig>()
|
||||
|
@ -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,
|
||||
|
@ -1,4 +1,3 @@
|
||||
// @ts-ignore
|
||||
import Upyun from 'upyun'
|
||||
|
||||
export default class UpyunApi {
|
||||
|
@ -25,10 +25,31 @@
|
||||
<el-form-item
|
||||
v-for="(item, index) in configList"
|
||||
:key="item.name + index"
|
||||
:label="item.alias || item.name"
|
||||
:required="item.required"
|
||||
: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
|
||||
v-if="item.type === 'input' || item.type === 'password'"
|
||||
v-model="ruleForm[item.name]"
|
||||
@ -64,8 +85,8 @@
|
||||
<el-switch
|
||||
v-else-if="item.type === 'confirm'"
|
||||
v-model="ruleForm[item.name]"
|
||||
active-text="yes"
|
||||
inactive-text="no"
|
||||
:active-text="item.confirmText || 'yes'"
|
||||
:inactive-text="item.cancelText || 'no'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<slot />
|
||||
@ -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<IStringKeyMap | false> {
|
||||
})
|
||||
}
|
||||
|
||||
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({
|
||||
})
|
||||
</script>
|
||||
<style lang='stylus'>
|
||||
.config-form-common-tips
|
||||
a
|
||||
color #409EFF
|
||||
text-decoration none
|
||||
#config-form
|
||||
.el-form
|
||||
label
|
||||
|
19
src/renderer/hooks/useATagClick.ts
Normal file
19
src/renderer/hooks/useATagClick.ts
Normal 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)
|
||||
})
|
||||
}
|
@ -124,7 +124,7 @@
|
||||
</el-icon>
|
||||
<span>{{ $T('PLUGIN_SETTINGS') }}</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="MANUAL">
|
||||
<el-menu-item :index="routerConfig.DocumentPage">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
@ -259,7 +259,7 @@ import {
|
||||
} from '@element-plus/icons-vue'
|
||||
|
||||
// Element Plus 消息框组件
|
||||
import { ElMessage as $message, ElMessageBox } from 'element-plus'
|
||||
import { ElMessage as $message } from 'element-plus'
|
||||
|
||||
// 国际化函数
|
||||
import { T as $T } from '@/i18n/index'
|
||||
@ -299,16 +299,12 @@ import {
|
||||
SHOW_MAIN_PAGE_MENU,
|
||||
SHOW_MAIN_PAGE_QRCODE,
|
||||
SHOW_MAIN_PAGE_DONATION,
|
||||
GET_PICBEDS,
|
||||
OPEN_URL
|
||||
GET_PICBEDS
|
||||
} from '~/universal/events/constants'
|
||||
|
||||
// 数据发送工具函数
|
||||
import { getConfig, sendToMain } from '@/utils/dataSender'
|
||||
|
||||
// Piclist 配置类型声明
|
||||
import { IConfig } from 'piclist'
|
||||
|
||||
const version = ref(process.env.NODE_ENV === 'production' ? pkg.version : 'Dev')
|
||||
const routerConfig = reactive(config)
|
||||
const defaultActive = ref(routerConfig.UPLOAD_PAGE)
|
||||
@ -357,27 +353,6 @@ const handleGetPicPeds = () => {
|
||||
}
|
||||
|
||||
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
|
||||
const type = index.match(routerConfig.UPLOADER_CONFIG_PAGE)
|
||||
if (type === null) {
|
||||
|
@ -1971,7 +1971,7 @@ async function handleClickFile (item: any) {
|
||||
const fileUrl = item.url
|
||||
const res = await axios.get(fileUrl, options)
|
||||
const content = res.data
|
||||
markDownContent.value = marked(content)
|
||||
markDownContent.value = marked.parse(content)
|
||||
isShowMarkDownDialog.value = true
|
||||
} catch (error) {
|
||||
ElMessage.error($T('MANAGE_BUCKET_END_LOADING_MESSAGE_FAIL'))
|
||||
@ -2094,13 +2094,18 @@ async function initCustomDomainList () {
|
||||
} else {
|
||||
if (manageStore.config.picBed[configMap.alias].endpoint) {
|
||||
const endpoint = manageStore.config.picBed[configMap.alias].endpoint
|
||||
const s3ForcePathStyle = manageStore.config.picBed[configMap.alias].s3ForcePathStyle
|
||||
let url
|
||||
if (/^https?:\/\//.test(endpoint)) {
|
||||
url = new URL(endpoint)
|
||||
} 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 {
|
||||
currentCustomDomain.value = `https://${configMap.bucketName}.s3.amazonaws.com`
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ export const supportedPicBedList: IStringKeyMap = {
|
||||
},
|
||||
explain: $T('MANAGE_CONSTANT_SMMS_EXPLAIN'),
|
||||
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')
|
||||
},
|
||||
qiniu: {
|
||||
@ -160,7 +160,7 @@ export const supportedPicBedList: IStringKeyMap = {
|
||||
},
|
||||
explain: $T('MANAGE_CONSTANT_QINIU_EXPLAIN'),
|
||||
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')
|
||||
},
|
||||
github: {
|
||||
@ -265,7 +265,7 @@ export const supportedPicBedList: IStringKeyMap = {
|
||||
},
|
||||
explain: $T('MANAGE_CONSTANT_GITHUB_EXPLAIN'),
|
||||
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')
|
||||
},
|
||||
aliyun: {
|
||||
@ -335,7 +335,7 @@ export const supportedPicBedList: IStringKeyMap = {
|
||||
},
|
||||
explain: $T('MANAGE_CONSTANT_ALIYUN_EXPLAIN'),
|
||||
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')
|
||||
},
|
||||
tcyun: {
|
||||
@ -413,7 +413,7 @@ export const supportedPicBedList: IStringKeyMap = {
|
||||
},
|
||||
explain: $T('MANAGE_CONSTANT_TENCENT_EXPLAIN'),
|
||||
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')
|
||||
},
|
||||
upyun: {
|
||||
@ -512,7 +512,7 @@ export const supportedPicBedList: IStringKeyMap = {
|
||||
},
|
||||
explain: $T('MANAGE_CONSTANT_UPYUN_EXPLAIN'),
|
||||
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')
|
||||
},
|
||||
imgur: {
|
||||
@ -552,7 +552,7 @@ export const supportedPicBedList: IStringKeyMap = {
|
||||
},
|
||||
explain: $T('MANAGE_CONSTANT_IMGUR_EXPLAIN'),
|
||||
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')
|
||||
},
|
||||
s3plist: {
|
||||
@ -667,7 +667,7 @@ export const supportedPicBedList: IStringKeyMap = {
|
||||
},
|
||||
explain: $T('MANAGE_CONSTANT_S3_EXPLAIN'),
|
||||
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')
|
||||
},
|
||||
webdavplist: {
|
||||
@ -769,7 +769,7 @@ export const supportedPicBedList: IStringKeyMap = {
|
||||
},
|
||||
explain: $T('MANAGE_CONSTANT_WEBDAV_EXPLAIN'),
|
||||
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')
|
||||
},
|
||||
local: {
|
||||
@ -846,7 +846,7 @@ export const supportedPicBedList: IStringKeyMap = {
|
||||
},
|
||||
explain: $T('MANAGE_CONSTANT_LOCAL_EXPLAIN'),
|
||||
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')
|
||||
},
|
||||
sftp: {
|
||||
@ -980,7 +980,7 @@ export const supportedPicBedList: IStringKeyMap = {
|
||||
},
|
||||
explain: $T('MANAGE_CONSTANT_SFTP_EXPLAIN'),
|
||||
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')
|
||||
}
|
||||
}
|
||||
|
16
src/renderer/pages/DocumentPage.vue
Normal file
16
src/renderer/pages/DocumentPage.vue
Normal 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>
|
@ -15,3 +15,4 @@ export const TOOLBOX_CONFIG_PAGE = 'ToolBoxPage'
|
||||
export const TRAY_PAGE = 'TrayPage'
|
||||
export const UPLOAD_PAGE = 'UploadPage'
|
||||
export const UPLOADER_CONFIG_PAGE = 'UploaderConfigPage'
|
||||
export const DocumentPage = 'DocumentPage'
|
||||
|
@ -79,6 +79,11 @@ export default createRouter({
|
||||
component: () => import(/* webpackChunkName: "Plugin" */ '@/pages/Plugin.vue'),
|
||||
name: config.PLUGIN_PAGE
|
||||
},
|
||||
{
|
||||
path: 'documents',
|
||||
component: () => import(/* webpackChunkName: "DocumentPage" */ '@/pages/DocumentPage.vue'),
|
||||
name: config.DocumentPage
|
||||
},
|
||||
{
|
||||
path: 'shortKey',
|
||||
component: () => import(/* webpackChunkName: "ShortkeyPage" */ '@/pages/ShortKey.vue'),
|
||||
|
@ -1,4 +1,6 @@
|
||||
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
|
||||
@ -16,3 +18,7 @@ export const getRawData = (args: any): any => {
|
||||
}
|
||||
return args
|
||||
}
|
||||
|
||||
export const openURL = (url: string) => {
|
||||
sendToMain(OPEN_URL, url)
|
||||
}
|
||||
|
2
src/universal/types/extra-vue.d.ts
vendored
2
src/universal/types/extra-vue.d.ts
vendored
@ -15,7 +15,7 @@ declare module 'vue/types/vue' {
|
||||
}
|
||||
}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
declare module 'vue' {
|
||||
interface ComponentCustomProperties {
|
||||
$http: typeof axios
|
||||
$builtInPicBed: string[]
|
||||
|
2
src/universal/types/types.d.ts
vendored
2
src/universal/types/types.d.ts
vendored
@ -164,6 +164,8 @@ interface IPicGoPluginConfig {
|
||||
name?: string
|
||||
value?: any
|
||||
}[]
|
||||
/** support markdown */
|
||||
tips?: string
|
||||
[propName: string]: any
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user