Merge branch 'dev' into release

This commit is contained in:
萌萌哒赫萝 2023-09-11 07:32:07 -07:00
commit c24d6b9b0a
23 changed files with 924 additions and 761 deletions

View File

@ -1,3 +1,20 @@
# :tada: 2.6.0 (2023-09-11)
### :sparkles: Features
* batch rename in gallery will not modify un-matched files ([079b034](https://github.com/Kuingsmile/PicList/commit/079b034))
* optimize memory use and loading and searching speed of manage page for 30 fold ([fb070e7](https://github.com/Kuingsmile/PicList/commit/fb070e7))
* optimize title text jump action of upload page ([dfb6f76](https://github.com/Kuingsmile/PicList/commit/dfb6f76))
### :zap: Performance Improvements
* fix memory leak of main page ([5392d9e](https://github.com/Kuingsmile/PicList/commit/5392d9e))
* fix memory leak of uoload and setting page ([219cbbb](https://github.com/Kuingsmile/PicList/commit/219cbbb))
## :tada: 2.5.3 (2023-09-07)

View File

@ -1,6 +1,6 @@
{
"name": "piclist",
"version": "2.5.3",
"version": "2.6.0",
"author": {
"name": "Kuingsmile",
"email": "pkukuing@gmail.com"
@ -34,26 +34,26 @@
"lint:dpdm": "dpdm -T --tsconfig ./tsconfig.json --no-tree --no-warning --exit-code circular:1 src/background.ts"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.405.0",
"@aws-sdk/lib-storage": "^3.405.0",
"@aws-sdk/s3-request-presigner": "^3.405.0",
"@aws-sdk/client-s3": "^3.409.0",
"@aws-sdk/lib-storage": "^3.409.0",
"@aws-sdk/s3-request-presigner": "^3.409.0",
"@element-plus/icons-vue": "^2.1.0",
"@highlightjs/vue-plugin": "^2.1.0",
"@nodelib/fs.walk": "^2.0.0",
"@octokit/rest": "^19.0.7",
"@picgo/i18n": "^1.0.0",
"@picgo/store": "^2.0.4",
"@smithy/node-http-handler": "^2.0.5",
"@picgo/store": "^2.1.0",
"@smithy/node-http-handler": "^2.1.2",
"@types/mime-types": "^2.1.1",
"@videojs-player/vue": "^1.0.0",
"ali-oss": "^6.18.0",
"ali-oss": "^6.18.1",
"axios": "^1.5.0",
"compare-versions": "^4.1.3",
"core-js": "^3.32.1",
"core-js": "^3.32.2",
"cos-nodejs-sdk-v5": "^2.12.4",
"dexie": "^3.2.4",
"electron-updater": "^6.1.4",
"element-plus": "^2.3.9",
"element-plus": "2.3.12",
"epipebomb": "^1.0.0",
"fast-xml-parser": "^4.2.7",
"form-data": "^4.0.0",
@ -68,7 +68,7 @@
"mitt": "^3.0.1",
"node-ssh-no-cpu-features": "^1.0.1",
"nodejs-file-downloader": "^4.12.1",
"piclist": "^1.0.3",
"piclist": "^1.0.4",
"pinia": "^2.1.6",
"pinia-plugin-persistedstate": "^3.2.0",
"qiniu": "^7.9.0",
@ -97,13 +97,13 @@
"@types/lowdb": "^1.0.12",
"@types/node": "^16.10.2",
"@types/request-promise-native": "^1.0.18",
"@types/semver": "^7.5.0",
"@types/semver": "^7.5.1",
"@types/tunnel": "^0.0.3",
"@types/upyun": "^3.4.1",
"@types/uuid": "^9.0.3",
"@types/write-file-atomic": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/cli-plugin-router": "^5.0.8",
@ -112,13 +112,13 @@
"@vue/eslint-config-standard": "^8.0.1",
"@vue/eslint-config-typescript": "^11.0.3",
"@vue/runtime-dom": "^3.3.4",
"conventional-changelog": "^5.0.0",
"conventional-changelog": "^5.1.0",
"cz-customizable": "^7.0.0",
"dotenv": "^16.3.1",
"dpdm": "^3.13.1",
"electron": "^22.0.2",
"electron-devtools-installer": "^3.2.0",
"eslint": "^8.48.0",
"eslint": "^8.49.0",
"eslint-config-standard": ">=16.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-node": "^11.1.0",
@ -126,7 +126,7 @@
"eslint-plugin-vue": "^9.17.0",
"husky": "^3.1.0",
"node-loader": "^2.0.0",
"npm-check-updates": "^16.13.2",
"npm-check-updates": "^16.13.3",
"stylus": "^0.59.0",
"stylus-loader": "^7.1.3",
"typescript": "^4.9.5",

View File

@ -249,7 +249,7 @@ SETTINGS_SYNC_CONFIG_SELECT_BOTH: Both configuration and gallery files
SETTINGS_SYNC_CONFIG_GITHUB_USERNAME: username
SETTINGS_SYNC_CONFIG_GITEE_USERNAME: username
SETTINGS_SYNC_CONFIG_GITHUB_REPO: repository (private)
SETTINGS_SYNC_CONFIG_GITEE_REPO: repository (private)
SETTINGS_SYNC_CONFIG_GITEE_REPO: repository path
SETTINGS_SYNC_CONFIG_GITHUB_BRANCH: branch
SETTINGS_SYNC_CONFIG_GITEE_BRANCH: branch
SETTINGS_SYNC_CONFIG_GITHUB_TOKEN: Token
@ -676,7 +676,7 @@ MANAGE_CONSTANT_SFTP_BUCKET_PLACEHOLDER: 'e.g. bucket1'
MANAGE_CONSTANT_SFTP_BUCKET_TOOLTIP: This cannot be modified, only for software compatibility consideration
MANAGE_LOGIN_PAGE_PANE_NAME: Saved Config
MANAGE_LOGIN_PAGE_PANE_DESC: Click on the icon or alias to view details, Enter to view the file page, Delete to remove the configuration
MANAGE_LOGIN_PAGE_PANE_DESC: Click on the icon or alias to view details
MANAGE_LOGIN_PAGE_PANE_LOADING: Importing...
MANAGE_LOGIN_PAGE_PANE_KEY_NAME: Configuration
MANAGE_LOGIN_PAGE_PANE_KEY_VALUE: Value
@ -725,6 +725,7 @@ MANAGE_BUCKET_SORT_SIZE: Size
MANAGE_BUCKET_SORT_TYPE: Type
MANAGE_BUCKET_SORT_TIME: Time
MANAGE_BUCKET_SORT_SELECTED: Selected status
MANAGE_BUCKET_INIT: Init
MANAGE_BUCKET_URL_UPLOAD_DIALOG_TITLE: Please enter URL(s), support multiple URLs separated by line breaks
MANAGE_BUCKET_URL_UPLOAD_DIALOG_CONFIRM: Confirm
MANAGE_BUCKET_URL_UPLOAD_DIALOG_CANCEL: Cancel

View File

@ -252,7 +252,7 @@ SETTINGS_SYNC_CONFIG_SELECT_BOTH: 配置文件和相册文件
SETTINGS_SYNC_CONFIG_GITHUB_USERNAME: GitHub用户名
SETTINGS_SYNC_CONFIG_GITEE_USERNAME: Gitee用户名
SETTINGS_SYNC_CONFIG_GITHUB_REPO: 仓库(私有)
SETTINGS_SYNC_CONFIG_GITEE_REPO: 仓库(私有)
SETTINGS_SYNC_CONFIG_GITEE_REPO: 仓库路径名
SETTINGS_SYNC_CONFIG_GITHUB_BRANCH: GitHub分支
SETTINGS_SYNC_CONFIG_GITEE_BRANCH: Gitee分支
SETTINGS_SYNC_CONFIG_GITHUB_TOKEN: GitHub Token
@ -680,7 +680,7 @@ MANAGE_CONSTANT_SFTP_BUCKET_TOOLTIP: 此处不可修改,仅为软件兼容性
MANAGE_LOGIN_PAGE_PANE_NAME: 已保存配置
MANAGE_LOGIN_PAGE_PANE_DESC: 点击图标和别名可查看详情,点击进入可查看文件页面,点击删除可删除配置
MANAGE_LOGIN_PAGE_PANE_DESC: 点击图标和别名可查看详情
MANAGE_LOGIN_PAGE_PANE_LOADING: 导入配置...
MANAGE_LOGIN_PAGE_PANE_KEY_NAME: 配置项
MANAGE_LOGIN_PAGE_PANE_KEY_VALUE:
@ -729,6 +729,7 @@ MANAGE_BUCKET_SORT_SIZE: 大小
MANAGE_BUCKET_SORT_TYPE: 类型
MANAGE_BUCKET_SORT_TIME: 时间
MANAGE_BUCKET_SORT_SELECTED: 选中状态
MANAGE_BUCKET_INIT: 初始化
MANAGE_BUCKET_URL_UPLOAD_DIALOG_TITLE: 请输入URL支持多个URL以换行分隔
MANAGE_BUCKET_URL_UPLOAD_DIALOG_CONFIRM: 确定
MANAGE_BUCKET_URL_UPLOAD_DIALOG_CANCEL: 取消

View File

@ -250,7 +250,7 @@ SETTINGS_SYNC_CONFIG_SELECT_BOTH: 配置檔案和相簿檔案
SETTINGS_SYNC_CONFIG_GITHUB_USERNAME: 用戶名
SETTINGS_SYNC_CONFIG_GITEE_USERNAME: 用戶名
SETTINGS_SYNC_CONFIG_GITHUB_REPO: 儲存庫(私有)
SETTINGS_SYNC_CONFIG_GITEE_REPO: 儲存庫(私有)
SETTINGS_SYNC_CONFIG_GITEE_REPO: 儲存庫路径
SETTINGS_SYNC_CONFIG_GITHUB_BRANCH: GitHub 分支
SETTINGS_SYNC_CONFIG_GITEE_BRANCH: Gitee 分支
SETTINGS_SYNC_CONFIG_GITHUB_TOKEN: GitHub Token
@ -676,7 +676,7 @@ MANAGE_CONSTANT_SFTP_BUCKET_PLACEHOLDER: '例如bucket1'
MANAGE_CONSTANT_SFTP_BUCKET_TOOLTIP: 此處不可修改,僅為軟體相容性考量
MANAGE_LOGIN_PAGE_PANE_NAME: 已保存配置
MANAGE_LOGIN_PAGE_PANE_DESC: 點擊圖標和別名可查看詳情,點擊進入可查看檔案頁面,點擊刪除可刪除配置
MANAGE_LOGIN_PAGE_PANE_DESC: 點擊圖標和別名可查看詳情
MANAGE_LOGIN_PAGE_PANE_LOADING: 導入配置...
MANAGE_LOGIN_PAGE_PANE_KEY_NAME: 配置項
MANAGE_LOGIN_PAGE_PANE_KEY_VALUE:
@ -725,6 +725,7 @@ MANAGE_BUCKET_SORT_SIZE: 大小
MANAGE_BUCKET_SORT_TYPE: 類型
MANAGE_BUCKET_SORT_TIME: 時間
MANAGE_BUCKET_SORT_SELECTED: 選取狀態
MANAGE_BUCKET_INIT: 初始化
MANAGE_BUCKET_URL_UPLOAD_DIALOG_TITLE: 請輸入 URL支援多個 URL以換行分隔
MANAGE_BUCKET_URL_UPLOAD_DIALOG_CONFIRM: 確定
MANAGE_BUCKET_URL_UPLOAD_DIALOG_CANCEL: 取消

View File

@ -10,6 +10,7 @@ import {
import {
createProtocol
} from 'vue-cli-plugin-electron-builder/lib'
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
import beforeOpen from '~/main/utils/beforeOpen'
import ipcList from '~/main/events/ipcList'
import busEventList from '~/main/events/busEventList'
@ -137,6 +138,13 @@ class LifeCycle {
const readyFunction = async () => {
console.log('on ready')
createProtocol('picgo')
if (isDevelopment && !process.env.IS_TEST) {
try {
await installExtension(VUEJS_DEVTOOLS)
} catch (e: any) {
console.error('Vue Devtools failed to install:', e.toString())
}
}
windowManager.create(IWindowList.TRAY_WINDOW)
windowManager.create(IWindowList.SETTING_WINDOW)
const isAutoListenClipboard = db.get('settings.isAutoListenClipboard') || false

View File

@ -36,6 +36,8 @@
class="item"
effect="dark"
placement="right"
:persistent="false"
teleported
>
<template #content>
<span
@ -60,6 +62,8 @@
v-else-if="item.type === 'list' && item.choices"
v-model="ruleForm[item.name]"
:placeholder="item.message || item.name"
:persistent="false"
teleported
>
<el-option
v-for="choice in item.choices"
@ -74,6 +78,8 @@
:placeholder="item.message || item.name"
multiple
collapse-tags
:persistent="false"
teleported
>
<el-option
v-for="choice in item.choices"

View File

@ -39,6 +39,8 @@
v-else-if="item.type === 'list' && item.choices"
v-model="ruleForm[item.name]"
:placeholder="item.message || item.name"
:persistent="false"
teleported
>
<el-option
v-for="choice in item.choices"
@ -53,6 +55,8 @@
:placeholder="item.message || item.name"
multiple
collapse-tags
:persistent="false"
teleported
>
<el-option
v-for="choice in item.choices"

View File

@ -3,6 +3,7 @@
v-model="showInputBoxVisible"
:title="inputBoxOptions.title || $T('INPUT')"
:modal-append-to-body="false"
append-to-body
>
<el-input
v-model="inputBoxValue"

View File

@ -9,6 +9,8 @@
effect="dark"
:content="props.tooltips"
placement="right"
:persistent="false"
teleported
>
<el-icon style="margin-left: 4px">
<QuestionFilled />

View File

@ -165,6 +165,7 @@
:title="$T('SPONSOR_PICLIST')"
width="70%"
top="10vh"
append-to-body
>
{{ $T('PICLIST_SPONSOR_TEXT') }}
<el-row class="support">
@ -198,6 +199,7 @@
:title="$T('PICBED_QRCODE')"
:modal-append-to-body="false"
lock-scroll
append-to-body
>
<el-form
label-position="left"
@ -211,6 +213,8 @@
v-model="choosedPicBedForQRCode"
multiple
collapse-tags
:persistent="false"
teleported
>
<el-option
v-for="item in picBed"

File diff suppressed because it is too large Load Diff

View File

@ -6,15 +6,16 @@
stretch
style="height: calc(100vh - 50px);width: 100%;overflow-x: hidden;"
tab-position="left"
lazy
@tab-change="getExistingConfig(activeName)"
>
<el-tab-pane
name="login"
:label="$T('MANAGE_LOGIN_PAGE_PANE_NAME')"
style="width: 100%;overflow-y: scroll;height: calc(100vh - 50px);"
lazy
>
<el-alert
v-loading="isLoading"
:title="$T('MANAGE_LOGIN_PAGE_PANE_DESC')"
type="success"
show-icon
@ -42,6 +43,8 @@
placement="top"
:width="300"
trigger="click"
:persistent="false"
teleported
>
<el-table
:data="formObjToTableData(item.config)"
@ -75,6 +78,8 @@
:content="item.alias"
placement="top"
:disabled="isNeedToShorten(item.alias)"
:persistent="false"
teleported
>
{{ isNeedToShorten(item.alias) ? safeSliceF(item.alias, 17) + '...' : item.alias }}
</el-tooltip>
@ -152,6 +157,8 @@
effect="dark"
:content="supportedPicBedList[item.icon].configOptions[option].tooltip"
placement="right"
:persistent="false"
teleported
>
<el-icon
color="#409EFF"
@ -169,8 +176,7 @@
<el-switch
v-else-if="supportedPicBedList[item.icon].configOptions[option].type === 'boolean'"
v-model="configResult[item.icon + '.' + option]"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
/>
<el-input
v-else-if="supportedPicBedList[item.icon].configOptions[option].type === 'number'"
@ -181,6 +187,8 @@
v-else-if="supportedPicBedList[item.icon].configOptions[option].type === 'select'"
v-model="configResult[item.icon + '.' + option]"
:placeholder="$T('MANAGE_LOGIN_PAGE_PANE_SELECT_PLACEHOLDER')"
:persistent="false"
teleported
>
<el-option
v-for="i in Object.entries(supportedPicBedList[item.icon].configOptions[option].selectOptions)"
@ -198,6 +206,7 @@
style="margin-left: 10vw"
placement="top"
:disabled="currentAliasList.length === 0"
teleported
>
{{ $T('MANAGE_LOGIN_PAGE_PANE_IMPORT') }}
<template #dropdown>
@ -298,7 +307,6 @@ import { T as $T } from '@/i18n'
const manageStore = useManageStore()
const router = useRouter()
const isLoading = ref(false)
const activeName = ref('login')
const configResult:IStringKeyMap = reactive({})
@ -820,9 +828,8 @@ async function transUpToManage (config: IUploaderConfigListItem, picBedName: str
importedNewConfig[alias] = resultMap
}
onMounted(async () => {
await getCurrentConfigList()
getAllConfigAliasArray()
onMounted(() => {
getCurrentConfigList()
})
</script>

View File

@ -27,6 +27,8 @@
effect="dark"
:content="$T('MANAGE_MAIN_PAGE_NEW_BUCKET')"
placement="right"
:persistent="false"
teleported
popper-class="layout__menu__button__divider__tooltip"
>
<el-icon
@ -143,6 +145,7 @@
<el-dialog
v-model="picBedSwitchDialogVisible"
top="30vh"
append-to-body
>
<div
class="choice-cos"
@ -195,6 +198,7 @@
<el-drawer
v-model="nweBucketDrawerVisible"
class="layout__addNewBucket"
append-to-body
>
<el-form
label-position="top"
@ -240,6 +244,8 @@
v-if="newBucketConfig[currentPicBedName].configOptions[option].component === 'select'"
v-model="newBucketConfigResult[currentPicBedName+'.'+option]"
size="large"
:persistent="false"
teleported
>
<el-option
v-for="item in Object.keys(newBucketConfig[currentPicBedName].configOptions[option].options)"

View File

@ -34,6 +34,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_AUTO_FRESH_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -43,9 +45,7 @@
</template>
<el-switch
v-model="form.isAutoRefresh"
style="position:absolute;right: 0;"
active-color="#13ce66"
inactive-color="#ff4949"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
@change="handleIsAutoRefreshChange"
/>
</el-form-item>
@ -66,6 +66,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_CLEAR_CACHE_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -78,6 +80,8 @@
:confirm-button-text="$T('CONFIRM')"
:cancel-button-text="$T('CANCEL')"
hide-icon
:persistent="false"
teleported
@confirm="handleClearDb"
>
<template #reference>
@ -101,9 +105,7 @@
</template>
<el-switch
v-model="form.isShowThumbnail"
style="position:absolute;right: 0;"
active-color="#13ce66"
inactive-color="#ff4949"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
@change="handleIsShowThumbnailChange"
/>
</el-form-item>
@ -117,11 +119,9 @@
</template>
<el-switch
v-model="form.isShowList"
style="position:absolute;right: 0;"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
:active-text="$T('MANAGE_SETTING_SHOW_FILE_LIST_TYPE_LIST')"
:inactive-text="$T('MANAGE_SETTING_SHOW_FILE_LIST_TYPE_CARD')"
active-color="#13ce66"
inactive-color="orange"
@change="handleIsShowListChange"
/>
</el-form-item>
@ -135,6 +135,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_FORCE_CUSTOM_URL_HTTPS_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -144,9 +146,7 @@
</template>
<el-switch
v-model="form.isForceCustomUrlHttps"
style="position:absolute;right: 0;"
active-color="#13ce66"
inactive-color="#ff4949"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
@change="handleIsForceCustomUrlHttpsChange"
/>
</el-form-item>
@ -160,6 +160,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_ENCODE_URL_WHEN_COPY_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -169,9 +171,7 @@
</template>
<el-switch
v-model="form.isEncodeUrl"
style="position:absolute;right: 0;"
active-color="#13ce66"
inactive-color="#ff4949"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
@change="handleIsEncodeUrlChange"
/>
</el-form-item>
@ -185,6 +185,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_UPLOAD_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -194,9 +196,7 @@
</template>
<el-switch
v-model="form.isUploadKeepDirStructure"
style="position:absolute;right: 0;"
active-color="#13ce66"
inactive-color="#ff4949"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
@change="handleIsUploadKeepDirStructureChange"
/>
</el-form-item>
@ -212,6 +212,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_FILE_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -221,9 +223,7 @@
</template>
<el-switch
v-model="form.isDownloadFileKeepDirStructure"
style="position:absolute;right: 0;"
active-color="#13ce66"
inactive-color="#ff4949"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
@change="handleIsDownloadFileKeepDirStructureChange"
/>
</el-form-item>
@ -239,6 +239,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_FILE_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -248,9 +250,7 @@
</template>
<el-switch
v-model="form.isDownloadFolderKeepDirStructure"
style="position:absolute;right: 0;"
active-color="#13ce66"
inactive-color="#ff4949"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
@change="handleIsDownloadFolderKeepDirStructureChange"
/>
</el-form-item>
@ -264,6 +264,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -290,6 +292,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_SEARCH_IGNORE_CASE_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -299,9 +303,7 @@
</template>
<el-switch
v-model="form.isIgnoreCase"
style="position:absolute;right: 0;"
active-color="#13ce66"
inactive-color="#ff4949"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
@change="handleisIgnoreCaseChange"
/>
</el-form-item>
@ -315,6 +317,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_TIMESTAMP_RENAME_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -324,9 +328,7 @@
</template>
<el-switch
v-model="form.timestampRename"
style="position:absolute;right: 0;"
active-color="#13ce66"
inactive-color="#ff4949"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
@change="handleTimestampRenameChange"
/>
</el-form-item>
@ -340,6 +342,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_RANDOM_STRING_RENAME_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -349,9 +353,7 @@
</template>
<el-switch
v-model="form.randomStringRename"
style="position:absolute;right: 0;"
active-color="#13ce66"
inactive-color="#ff4949"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
@change="handleRandomStringRenameChange"
/>
</el-form-item>
@ -365,6 +367,8 @@
effect="dark"
:content="$T('MANAGE_SETTING_CUSTOM_RENAME_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon>
<InfoFilled />
@ -374,9 +378,7 @@
</template>
<el-switch
v-model="form.customRename"
style="position:absolute;right: 0;"
active-color="#13ce66"
inactive-color="#ff4949"
style="position:absolute;right: 0;--el-switch-on-color: #13ce66;--el-switch-off-color: #ff4949;"
@change="handleCustomRenameChange"
/>
</el-form-item>

View File

@ -42,6 +42,8 @@
size="small"
style="width: 100%"
:placeholder="$T('CHOOSE_SHOWED_PICBED')"
:persistent="false"
teleported
>
<el-option
v-for="item in picBed"
@ -60,6 +62,7 @@
start-placeholder="Start date"
end-placeholder="End date"
size="small"
teleported
/>
</el-col>
<el-col :span="1">
@ -75,6 +78,8 @@
size="small"
style="width: 100%"
:placeholder="$T('CHOOSE_PASTE_FORMAT')"
:persistent="false"
teleported
@change="handlePasteStyleChange"
>
<el-option
@ -91,6 +96,8 @@
size="small"
style="width: 100%"
placeholder="Choose"
:persistent="false"
teleported
@change="handleUseShortUrlChange"
>
<el-option
@ -102,7 +109,9 @@
</el-select>
</el-col>
<el-col :span="2">
<el-dropdown>
<el-dropdown
teleported
>
<el-button
size="small"
type="primary"
@ -294,6 +303,7 @@
:title="$T('CHANGE_IMAGE_URL')"
width="500px"
:modal-append-to-body="false"
append-to-body
>
<el-input v-model="imgInfo.imgUrl" />
<template #footer>
@ -315,6 +325,7 @@
align-center
draggable
destroy-on-close
append-to-body
>
<el-link
:underline="false"
@ -326,6 +337,8 @@
effect="dark"
:content="$T('MANAGE_BUCKET_RENAME_FILE_INPUT_A_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon
color="#409EFF"
@ -350,6 +363,8 @@
effect="light"
placement="right"
width="280"
:persistent="false"
teleported
>
<template #reference>
<el-icon
@ -502,11 +517,8 @@ const isShowBatchRenameDialog = ref(false)
const batchRenameMatch = ref('')
const batchRenameReplace = ref('')
const mathcedCount = computed(() => {
const matchedFiles = [] as any[]
images.value.forEach((item: any) => {
if (customStrMatch(item.imgUrl, batchRenameMatch.value)) {
matchedFiles.push(item)
}
const matchedFiles = filterList.value.filter((item: any) => {
return customStrMatch(item.imgUrl, batchRenameMatch.value)
})
return matchedFiles.length
})
@ -939,7 +951,7 @@ function handleBatchRename () {
return
}
let matchedFiles = [] as any[]
images.value.forEach((item: any) => {
filterList.value.forEach((item: any) => {
if (customStrMatch(item.imgUrl, batchRenameMatch.value)) {
matchedFiles.push(item)
}

View File

@ -18,6 +18,7 @@
stretch
style="height: calc(100vh - 50px);width: 100%;overflow-x: hidden;top: 50px;position: absolute;"
tab-position="left"
lazy
>
<el-tab-pane
name="system"
@ -43,6 +44,8 @@
size="small"
style="width: 50%"
:placeholder="$T('SETTINGS_CHOOSE_LANGUAGE')"
:persistent="false"
teleported
@change="handleLanguageChange"
>
<el-option
@ -61,6 +64,8 @@
size="small"
style="width: 50%"
:placeholder="$T('SETTINGS_START_MODE')"
:persistent="false"
teleported
@change="handleStartModeChange"
>
<el-option
@ -299,6 +304,8 @@
size="small"
style="width: 50%"
:placeholder="$T('SETTINGS_AUTO_IMPORT_SELECT_PICBED')"
:persistent="false"
teleported
@change="handleAutoImportPicBedChange"
>
<el-option
@ -434,6 +441,8 @@
size="small"
style="width: 50%"
:placeholder="$T('SETTINGS_SHORT_URL_SERVER')"
:persistent="false"
teleported
@change="handleShortUrlServerChange"
>
<el-option
@ -487,6 +496,8 @@
effect="dark"
:content="$T('BUILTIN_CLIPBOARD_TIPS')"
placement="right"
:persistent="false"
teleported
>
<el-icon style="margin-left: 4px">
<QuestionFilled />
@ -641,6 +652,7 @@
:title="$T('SETTINGS_CUSTOM_LINK_FORMAT')"
:modal-append-to-body="false"
center
append-to-body
>
<el-form
ref="$customLink"
@ -691,6 +703,7 @@
:modal-append-to-body="false"
width="70%"
center
append-to-body
>
<el-form
label-position="right"
@ -747,6 +760,7 @@
:modal-append-to-body="false"
width="70%"
center
append-to-body
>
<el-form
label-position="right"
@ -802,6 +816,7 @@
:title="$T('SETTINGS_CHECK_UPDATE')"
:modal-append-to-body="false"
center
append-to-body
>
<div>
{{ $T('SETTINGS_CURRENT_VERSION') }}: {{ version }}
@ -835,6 +850,7 @@
align-center
draggable
destroy-on-close
append-to-body
>
<el-link
:underline="false"
@ -859,6 +875,8 @@
effect="light"
placement="right"
width="350"
:persistent="false"
teleported
>
<template #reference>
<el-icon
@ -927,6 +945,7 @@
:modal-append-to-body="false"
width="500px"
center
append-to-body
>
<el-form
label-position="right"
@ -952,6 +971,8 @@
multiple
collapse-tags
style="width: 100%;"
:persistent="false"
teleported
>
<el-option
v-for="(value, key) of logLevel"
@ -997,6 +1018,7 @@
:title="$T('SETTINGS_SET_PICGO_SERVER')"
:modal-append-to-body="false"
center
append-to-body
>
<div class="notice-text">
{{ $T('SETTINGS_TIPS_SERVER_NOTICE') }}
@ -1058,6 +1080,7 @@
:title="$T('SETTINGS_SYNC_CONFIG_TITLE')"
:modal-append-to-body="false"
center
append-to-body
>
<div class="notice-text">
{{ $T('SETTINGS_SYNC_CONFIG_NOTE') }}
@ -1072,6 +1095,8 @@
<el-select
v-model="sync.type"
style="width: 100%;"
:persistent="false"
teleported
>
<el-option
v-for="typeitem of syncType"
@ -1151,6 +1176,7 @@
:title="$T('SETTINGS_UP_DOWN_DESC')"
:modal-append-to-body="false"
center
append-to-body
>
<el-form
label-position="right"
@ -1225,6 +1251,7 @@
draggable
center
align-center
append-to-body
>
<el-form
label-position="top"
@ -1238,8 +1265,7 @@
>
<el-switch
v-model="waterMarkForm.isAddWatermark"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -1248,7 +1274,7 @@
>
<el-radio-group v-model="waterMarkForm.watermarkType">
<el-radio label="text">
{{ $T('UPLOAD_PAGE_IMAGE_PROCESS_WMTYPE_TEXT') }}}
{{ $T('UPLOAD_PAGE_IMAGE_PROCESS_WMTYPE_TEXT') }}
</el-radio>
<el-radio label="image">
{{ $T('UPLOAD_PAGE_IMAGE_PROCESS_WMTYPE_IMAGE') }}
@ -1261,8 +1287,7 @@
>
<el-switch
v-model="waterMarkForm.isFullScreenWatermark"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -1333,8 +1358,7 @@
>
<el-switch
v-model="compressForm.isRemoveExif"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -1352,15 +1376,18 @@
>
<el-switch
v-model="compressForm.isConvert"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
v-show="compressForm.isConvert"
:label="$T('UPLOAD_PAGE_IMAGE_PROCESS_CONVERTFORMAT')"
>
<el-select v-model="compressForm.convertFormat">
<el-select
v-model="compressForm.convertFormat"
:persistent="false"
teleported
>
<el-option
v-for="item in availableFormat"
:key="item"
@ -1374,8 +1401,7 @@
>
<el-switch
v-model="compressForm.isFlip"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -1383,8 +1409,7 @@
>
<el-switch
v-model="compressForm.isFlop"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -1392,8 +1417,7 @@
>
<el-switch
v-model="compressForm.isReSize"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -1420,8 +1444,7 @@
>
<el-switch
v-model="compressForm.skipReSizeOfSmallImg"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -1430,8 +1453,7 @@
>
<el-switch
v-model="compressForm.skipReSizeOfSmallImg"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -1439,8 +1461,7 @@
>
<el-switch
v-model="compressForm.isReSizeByPercent"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -1457,8 +1478,7 @@
>
<el-switch
v-model="compressForm.isRotate"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item

View File

@ -5,6 +5,8 @@
<el-tooltip
:content="pluginListToolTip"
placement="right"
:persistent="false"
teleported
>
<el-icon
class="el-icon-goods"
@ -16,6 +18,8 @@
<el-tooltip
:content="updateAllToolTip"
placement="left"
:persistent="false"
teleported
>
<el-icon
class="el-icon-update"
@ -30,6 +34,8 @@
>
<el-icon
class="el-icon-download"
:persistent="false"
teleported
@click="handleImportLocalPlugin"
>
<Download />
@ -194,6 +200,7 @@
c: configName
})"
width="70%"
append-to-body
>
<config-form
:id="configName"

View File

@ -81,6 +81,7 @@
v-model="keyBindingVisible"
:title="$T('SHORTCUT_CHANGE_UPLOAD')"
:modal-append-to-body="false"
append-to-body
>
<el-form
label-position="top"

View File

@ -12,12 +12,14 @@
placement="top"
effect="light"
:content="$T('UPLOAD_VIEW_HINT')"
:persistent="false"
teleported
>
<span
id="upload-view-title"
@click="handlePicBedNameClick(picBedName, picBedConfigName)"
>
{{ picBedName }} - {{ picBedConfigName }}
{{ picBedName }} - {{ picBedConfigName || 'Default' }}
</span>
</el-tooltip>
<el-icon
@ -156,6 +158,7 @@
draggable
center
align-center
append-to-body
>
<el-form
label-position="top"
@ -169,8 +172,7 @@
>
<el-switch
v-model="waterMarkForm.isAddWatermark"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -192,8 +194,7 @@
>
<el-switch
v-model="waterMarkForm.isFullScreenWatermark"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -264,8 +265,7 @@
>
<el-switch
v-model="compressForm.isRemoveExif"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -283,15 +283,18 @@
>
<el-switch
v-model="compressForm.isConvert"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
v-show="compressForm.isConvert"
:label="$T('UPLOAD_PAGE_IMAGE_PROCESS_CONVERTFORMAT')"
>
<el-select v-model="compressForm.convertFormat">
<el-select
v-model="compressForm.convertFormat"
:persistent="false"
teleported
>
<el-option
v-for="item in availableFormat"
:key="item"
@ -305,8 +308,7 @@
>
<el-switch
v-model="compressForm.isFlip"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -314,8 +316,7 @@
>
<el-switch
v-model="compressForm.isFlop"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -323,8 +324,7 @@
>
<el-switch
v-model="compressForm.isReSize"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -351,8 +351,7 @@
>
<el-switch
v-model="compressForm.skipReSizeOfSmallImg"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -361,8 +360,7 @@
>
<el-switch
v-model="compressForm.skipReSizeOfSmallImg"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -370,8 +368,7 @@
>
<el-switch
v-model="compressForm.isReSizeByPercent"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -388,8 +385,7 @@
>
<el-switch
v-model="compressForm.isRotate"
active-color="#13ce66"
inactive-color="#ff4949"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949;"
/>
</el-form-item>
<el-form-item
@ -449,7 +445,7 @@ import {
import { ElMessage as $message } from 'element-plus'
//
import { getConfig, saveConfig, sendToMain } from '@/utils/dataSender'
import { getConfig, saveConfig, sendToMain, triggerRPC } from '@/utils/dataSender'
//
import { IBuildInCompressOptions, IBuildInWaterMarkOptions } from 'piclist'
@ -459,6 +455,7 @@ import { useRouter } from 'vue-router'
//
import { PICBEDS_PAGE } from '@/router/config'
import { IRPCActionType } from '~/universal/types/enum'
const $router = useRouter()
@ -602,16 +599,18 @@ function onProgressChange (val: number) {
}
}
async function handlePicBedNameClick (picBedName: string, picBedConfigName: string) {
async function handlePicBedNameClick (_picBedName: string, picBedConfigName: string | undefined) {
const formatedpicBedConfigName = picBedConfigName || 'Default'
const currentPicBed = await getConfig<string>('picBed.current')
const currentPicBedConfig = await getConfig<any[]>(`uploader.${currentPicBed}`) as any || {}
const configList = currentPicBedConfig.configList || []
const config = configList.find((item: any) => item._configName === picBedConfigName)
const configList = await triggerRPC<IUploaderConfigItem>(IRPCActionType.GET_PICBED_CONFIG_LIST, currentPicBed)
const currentConfigList = configList?.configList ?? []
const config = currentConfigList.find((item: any) => item._configName === formatedpicBedConfigName)
$router.push({
name: PICBEDS_PAGE,
params: {
type: currentPicBed,
configId: config._id
configId: config?._id || ''
},
query: {
defaultConfigId: currentPicBedConfig.defaultId || ''

View File

@ -68,6 +68,7 @@
placement="top"
style="color: #fff; font-size: 12px;width: 100%;"
:disabled="picBedConfigList.length === 0"
teleported
>
{{ $T('MANAGE_LOGIN_PAGE_PANE_IMPORT') }}
<template #dropdown>

View File

@ -683,6 +683,7 @@ interface ILocales {
MANAGE_BUCKET_SORT_TYPE: string
MANAGE_BUCKET_SORT_TIME: string
MANAGE_BUCKET_SORT_SELECTED: string
MANAGE_BUCKET_INIT: string
MANAGE_BUCKET_URL_UPLOAD_DIALOG_TITLE: string
MANAGE_BUCKET_URL_UPLOAD_DIALOG_CONFIRM: string
MANAGE_BUCKET_URL_UPLOAD_DIALOG_CANCEL: string

722
yarn.lock

File diff suppressed because it is too large Load Diff