🚧 WIP: i18n of manage page, setting page done

This commit is contained in:
萌萌哒赫萝 2023-03-17 18:32:59 +08:00
parent d725e71617
commit fd9ea16909
7 changed files with 310 additions and 59 deletions

View File

@ -177,6 +177,64 @@ TIPS_PLUGIN_NOT_GUI_IMPLEMENT: This plugin is not optimized for the GUI, continu
TIPS_CLICK_NOTIFICATION_TO_RELOAD: Click notification to reload app
TIPS_GET_PLUGIN_LIST_FAILED: Get plugin list failed
# manage page
# manageSetting
MANAGE_SETTING_TITLE: Manage Setting
MANAGE_SETTING_AUTO_FRESH_TITLE: Auto refresh file list when entering new directory
MANAGE_SETTING_AUTO_FRESH_TIPS: Only applies to non-paginated mode, data is cached to indexdb to speed up loading speed
MANAGE_SETTING_CLEAR_CACHE_TITLE: 'Clear file list cache database, currently in use:'
MANAGE_SETTING_CLEAR_CACHE_FREE_TITLE: 'Available:'
MANAGE_SETTING_CLEAR_CACHE_TIPS: After clearing, the file list will be reloaded when entering a new directory next time
MANAGE_SETTING_CLEAR_CACHE_PROMPT: Are you sure you want to clear the file list cache database?
MANAGE_SETTING_CLEAR_CACHE_BUTTON: Clear
MANAGE_SETTING_SHOW_THUMBNAIL_TITLE: Display the original image instead of format icon (requires public access permissions)
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_TITLE: Default display mode for the file list
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_LIST: List
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_CARD: Card
MANAGE_SETTING_FORCE_CUSTOM_URL_HTTPS_TITLE: Force custom URL to use HTTPS
MANAGE_SETTING_FORCE_CUSTOM_URL_HTTPS_TIPS: After enabling, all operations will automatically add the https prefix to custom domains
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_UPLOAD_TITLE: Preserve directory structure when uploading
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_UPLOAD_TIPS: After disabling, all files will be expanded to the specified directory
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_A: Download
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_B: File
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_C: will preserve the directory structure
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_D: Folder
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_FILE_TIPS: After enabling, the original directory structure will be preserved
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_TITLE: Maximum number of files to download simultaneously (1-9999)
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_TIPS: Not work on Tencent
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_INPUT_TIPS: Please enter the maximum number of files to download simultaneously
MANAGE_SETTING_SEARCH_IGNORE_CASE_TITLE: Should file search be case-insensitive
MANAGE_SETTING_SEARCH_IGNORE_CASE_TIPS: After enabling, the search will be case-insensitive
MANAGE_SETTING_TIMESTAMP_RENAME_TITLE: Rename uploaded files with timestamp - (highest priority)
MANAGE_SETTING_TIMESTAMP_RENAME_TIPS: After enabling, the uploaded file will be renamed with the timestamp
MANAGE_SETTING_RANDOM_STRING_RENAME_TITLE: Rename uploaded files with random strings - (medium priority)
MANAGE_SETTING_RANDOM_STRING_RENAME_TIPS: Random string length is 20
MANAGE_SETTING_CUSTOM_RENAME_TITLE: Rename uploaded files with custom names - (lowest priority)
MANAGE_SETTING_CUSTOM_RENAME_TIPS: After enabling, the uploaded file will be renamed with the custom pattern
MANAGE_SETTING_CUSTOM_PATTERN_TITLE: Custom rename format, placeholders can be freely combined, please refer to the table below
MANAGE_SETTING_CUSTOM_PATTERN_TIPS: Please enter the custom rename format
MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TITLE: Placeholder
MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TIPS: Description
MANAGE_SETTING_PRESIGNED_URL_EXPIRE_TITLE: Presigned URL expiration time (seconds)
MANAGE_SETTING_PRESIGNED_URL_EXPIRE_TIPS: Please enter the presigned URL expiration time
MANAGE_SETTING_CHOOSE_COPY_FORMAT_TITLE: Select default link format for copying
MANAGE_SETTING_CHOOSE_COPY_FORMAT_MARKDOWN: Markdown
MANAGE_SETTING_CHOOSE_COPY_FORMAT_MARKDOWN_WITH_LINK: Markdown with link
MANAGE_SETTING_CHOOSE_COPY_FORMAT_RAWURL: Raw URL
MANAGE_SETTING_CHOOSE_COPY_FORMAT_HTML: HTML
MANAGE_SETTING_CHOOSE_COPY_FORMAT_BBCODE: BBCode
MANAGE_SETTING_CHOOSE_COPY_FORMAT_CUSTOM: Custom
MANAGE_SETTING_CUSTOM_COPY_FORMAT_TITLE: Custom link format($url -> raw url, $fileName -> raw fileName)
MANAGE_SETTING_CUSTOM_COPY_FORMAT_TIPS: Please enter the custom link format
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TITLE: Choose default download folder
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TIPS: System default download directory
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_BUTTON: Choose folder
MANAGE_SETTING_COPY_MESSAGE: Copied
MANAGE_SETTING_CLEAR_CACHE_SUCCESS: Cleared successfully
MANAGE_SETTING_CLEAR_CACHE_FAILED: Clear failed
# ---renderer i18n end---
# plugins
@ -208,7 +266,7 @@ TIPS_CUSTOM_CONFIG_FILE_PATH_ERROR: Custom config file parse error, please check
TIPS_SHORTCUT_MODIFIED_SUCCEED: Shortcut modified successfully
TIPS_SHORTCUT_MODIFIED_CONFLICT: Shortcut conflict, please reset
TIPS_CUSTOM_LINK_STYLE_MODIFIED_SUCCEED: Custom link style modified successfully
TIPS_FIND_NEW_VERSION: Find new version ${v}update many new features, do you want to download the latest version?
TIPS_FIND_NEW_VERSION: Find new version ${v}, update many new features, do you want to download the latest version?
# privacy
PRIVACY: >

View File

@ -177,6 +177,63 @@ TIPS_PLUGIN_NOT_GUI_IMPLEMENT: 该插件未对可视化界面进行优化, 是
TIPS_CLICK_NOTIFICATION_TO_RELOAD: 请点击此通知重启应用以生效
TIPS_GET_PLUGIN_LIST_FAILED: 获取插件列表失败
# manage page
# manageSetting
MANAGE_SETTING_TITLE: 管理页面设置
MANAGE_SETTING_AUTO_FRESH_TITLE: 每次进入新目录时,是否自动刷新文件列表
MANAGE_SETTING_AUTO_FRESH_TIPS: 仅对不分页模式有效,默认在加载过一次后自动缓存到数据库来加快下次加载速度
MANAGE_SETTING_CLEAR_CACHE_TITLE: '清空文件列表缓存数据库 已占用:'
MANAGE_SETTING_CLEAR_CACHE_FREE_TITLE: '剩余可用:'
MANAGE_SETTING_CLEAR_CACHE_TIPS: 清空后下次进入新目录时将会重新加载文件列表
MANAGE_SETTING_CLEAR_CACHE_PROMPT: 确定要清空文件列表缓存数据库吗?
MANAGE_SETTING_CLEAR_CACHE_BUTTON: 清空
MANAGE_SETTING_SHOW_THUMBNAIL_TITLE: 图片显示为原图而非默认文件格式图标(需要存储桶可公开访问)
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_TITLE: 文件列表默认显示方式
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_LIST: 列表
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_CARD: 卡片
MANAGE_SETTING_FORCE_CUSTOM_URL_HTTPS_TITLE: 为自定义域名开启强制HTTPS
MANAGE_SETTING_FORCE_CUSTOM_URL_HTTPS_TIPS: 开启后, 复制链接等操作将会自动为自定义域名添加https前缀
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_UPLOAD_TITLE: 上传时保留目录结构
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_UPLOAD_TIPS: 关闭后会将所有文件展开到指定目录下
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_A: 下载
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_B: 文件
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_C: 时保留目录结构
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_D: 文件夹
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_FILE_TIPS: 开启后,下载时会保留原始目录结构
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_TITLE: 最大同时下载文件数(1-9999)
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_TIPS: 腾讯云由于后端实现不同,该设置不生效
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_INPUT_TIPS: 请输入最大同时下载文件数
MANAGE_SETTING_SEARCH_IGNORE_CASE_TITLE: 文件搜索时,是否忽略大小写
MANAGE_SETTING_SEARCH_IGNORE_CASE_TIPS: 开启后,搜索时会忽略大小写
MANAGE_SETTING_TIMESTAMP_RENAME_TITLE: 上传文件时间戳重命名--(优先级最高)
MANAGE_SETTING_TIMESTAMP_RENAME_TIPS: 开启后,上传文件时会自动重命名为时间戳
MANAGE_SETTING_RANDOM_STRING_RENAME_TITLE: 上传文件随机字符串重命名--(优先级中)
MANAGE_SETTING_RANDOM_STRING_RENAME_TIPS: 随机字符串长度为20
MANAGE_SETTING_CUSTOM_RENAME_TITLE: 上传文件自定义重命名--(优先级最低)
MANAGE_SETTING_CUSTOM_RENAME_TIPS: 请填写自定义重命名格式
MANAGE_SETTING_CUSTOM_PATTERN_TITLE: 自定义重命名格式,占位符请参考下表,可自由组合
MANAGE_SETTING_CUSTOM_PATTERN_TIPS: 请填写自定义重命名格式
MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TITLE: 占位符
MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TIPS: 描述
MANAGE_SETTING_PRESIGNED_URL_EXPIRE_TITLE: 预签名URL过期时间(单位:秒)
MANAGE_SETTING_PRESIGNED_URL_EXPIRE_TIPS: 请填写预签名URL过期时间
MANAGE_SETTING_CHOOSE_COPY_FORMAT_TITLE: 选择默认复制的链接格式
MANAGE_SETTING_CHOOSE_COPY_FORMAT_MARKDOWN: Markdown
MANAGE_SETTING_CHOOSE_COPY_FORMAT_MARKDOWN_WITH_LINK: Markdown(带链接)
MANAGE_SETTING_CHOOSE_COPY_FORMAT_RAWURL: 原始链接
MANAGE_SETTING_CHOOSE_COPY_FORMAT_HTML: HTML格式
MANAGE_SETTING_CHOOSE_COPY_FORMAT_BBCODE: BBCode格式
MANAGE_SETTING_CHOOSE_COPY_FORMAT_CUSTOM: 自定义格式
MANAGE_SETTING_CUSTOM_COPY_FORMAT_TITLE: 自定义链接格式($url为链接,$fileName为文件名)
MANAGE_SETTING_CUSTOM_COPY_FORMAT_TIPS: 请填写自定义链接格式
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TITLE: 选择下载目录
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TIPS: 系统默认下载目录
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_BUTTON: 选择目录
MANAGE_SETTING_COPY_MESSAGE: 已复制
MANAGE_SETTING_CLEAR_CACHE_SUCCESS: 清除成功
MANAGE_SETTING_CLEAR_CACHE_FAILED: 清除失败
# ---renderer i18n end---
# plugins

View File

@ -177,6 +177,64 @@ TIPS_PLUGIN_NOT_GUI_IMPLEMENT: 該插件未對GUI進行優化是否繼續安
TIPS_CLICK_NOTIFICATION_TO_RELOAD: 請點擊此通知重新啟動程式以生效
TIPS_GET_PLUGIN_LIST_FAILED: 取得插件列表失敗
# manage page
# manageSetting
MANAGE_SETTING_TITLE: 管理設定
MANAGE_SETTING_AUTO_FRESH_TITLE: 每次進入新目錄時,是否自動重新整理檔案列表
MANAGE_SETTING_AUTO_FRESH_TIPS: 僅對不分頁模式有效,預設會在載入後自動快取至資料庫以提升下次載入速度
MANAGE_SETTING_CLEAR_CACHE_TITLE: '清空檔案列表快取資料庫 已佔用:'
MANAGE_SETTING_CLEAR_CACHE_FREE_TITLE: '剩餘可用:'
MANAGE_SETTING_CLEAR_CACHE_TIPS: 清空後下次進入新目錄時將會重新載入檔案列表
MANAGE_SETTING_CLEAR_CACHE_PROMPT: 確定要清空檔案列表快取資料庫嗎?
MANAGE_SETTING_CLEAR_CACHE_BUTTON: 清空
MANAGE_SETTING_SHOW_THUMBNAIL_TITLE: 顯示圖片的原始圖像而非預設的檔案格式圖示(需要存儲桶公開訪問權限)
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_TITLE: 檔案列表預設顯示方式
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_LIST: 列表
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_CARD: 卡片
MANAGE_SETTING_FORCE_CUSTOM_URL_HTTPS_TITLE: 自定義域名啟用強制 HTTPS
MANAGE_SETTING_FORCE_CUSTOM_URL_HTTPS_TIPS: 開啟後,複製鏈結等操作將會自動為自定義域名添加 HTTPS 前綴
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_UPLOAD_TITLE: 保留上傳時的目錄結構
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_UPLOAD_TIPS: 停用後,所有文件將會展開到指定目錄下
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_A: 下載
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_B: 文件
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_C: 時保留目錄結構
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_D: 目錄
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_FILE_TIPS: 啟用後,下載時會保留原始目錄結構
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_TITLE: 最大同時下載檔案數量(1-9999)
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_TIPS: 由於後端實現方式不同,此設定在腾讯云上不生效
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_INPUT_TIPS: 請輸入最大同時下載檔案數量
MANAGE_SETTING_SEARCH_IGNORE_CASE_TITLE: 搜尋檔案時,是否忽略大小寫
MANAGE_SETTING_SEARCH_IGNORE_CASE_TIPS: 啟用後,搜尋時將會忽略大小寫
MANAGE_SETTING_TIMESTAMP_RENAME_TITLE: 上傳檔案時間戳重新命名--(最高優先級)
MANAGE_SETTING_TIMESTAMP_RENAME_TIPS: 啟用後,上傳檔案時將會使用時間戳重新命名
MANAGE_SETTING_RANDOM_STRING_RENAME_TITLE: 上傳檔案隨機字符串重新命名--(中優先級)
MANAGE_SETTING_RANDOM_STRING_RENAME_TIPS: 隨機字符串長度為20
MANAGE_SETTING_CUSTOM_RENAME_TITLE: 上傳檔案自定義重新命名--(最低優先級)
MANAGE_SETTING_CUSTOM_RENAME_TIPS: 啟用後,上傳檔案時將會使用自定義重新命名
MANAGE_SETTING_CUSTOM_PATTERN_TITLE: 自訂重新命名格式,占位符請參考下表,可自由組合
MANAGE_SETTING_CUSTOM_PATTERN_TIPS: 請輸入自訂重新命名格式
MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TITLE: 占位符
MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TIPS: 說明
MANAGE_SETTING_PRESIGNED_URL_EXPIRE_TITLE: 預設下載鏈結有效期(秒)
MANAGE_SETTING_PRESIGNED_URL_EXPIRE_TIPS: 請輸入下載鏈結有效期
MANAGE_SETTING_CHOOSE_COPY_FORMAT_TITLE: 選擇預設複製的連結格式
MANAGE_SETTING_CHOOSE_COPY_FORMAT_MARKDOWN: Markdown
MANAGE_SETTING_CHOOSE_COPY_FORMAT_MARKDOWN_WITH_LINK: Markdown(帶連結)
MANAGE_SETTING_CHOOSE_COPY_FORMAT_RAWURL: 原始鏈結
MANAGE_SETTING_CHOOSE_COPY_FORMAT_HTML: HTML格式
MANAGE_SETTING_CHOOSE_COPY_FORMAT_BBCODE: BBCode格式
MANAGE_SETTING_CHOOSE_COPY_FORMAT_CUSTOM: 自定義格式
MANAGE_SETTING_CUSTOM_COPY_FORMAT_TITLE: 自定義鏈結格式($url為原始鏈結,$fileName為檔案名稱)
MANAGE_SETTING_CUSTOM_COPY_FORMAT_TIPS: 請輸入自定義鏈結格式
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TITLE: 選擇下載目錄
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TIPS: 系統預設下載目錄
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_BUTTON: 選擇目錄
MANAGE_SETTING_COPY_MESSAGE: 已複製
MANAGE_SETTING_CLEAR_CACHE_SUCCESS: 清除成功
MANAGE_SETTING_CLEAR_CACHE_FAILED: 清除失敗
# ---renderer i18n end---
# plugins

View File

@ -5,6 +5,7 @@ import UpDownTaskQueue from '../datastore/upDownTaskQueue'
import { downloadFileFromUrl } from '../utils/common'
import path from 'path'
import fs from 'fs-extra'
import { selectDownloadFolder } from '@/manage/utils/static'
export const manageIpcList = {
listen () {
@ -121,7 +122,7 @@ export const manageIpcList = {
UpDownTaskQueue.getInstance().clearDownloadTaskQueue()
})
ipcMain.handle('selectDownloadFolder', async () => {
ipcMain.handle(selectDownloadFolder, async () => {
const res = await dialog.showOpenDialog({
properties: ['openDirectory']
})

View File

@ -6,7 +6,7 @@
justify="center"
style="font-size: 20px;color: black;"
>
管理页面设置
{{ $T('MANAGE_SETTING_TITLE') }}
</el-row>
<el-row
class="setting-list"
@ -28,10 +28,11 @@
<template #label>
<span
style="position:absolute;left: 0;"
>每次进入新目录时是否自动刷新文件列表
>
{{ $T('MANAGE_SETTING_AUTO_FRESH_TITLE') }}
<el-tooltip
effect="dark"
content="仅对不分页模式有效,默认在加载过一次后自动缓存到数据库来加快下次加载速度"
:content="$T('MANAGE_SETTING_AUTO_FRESH_TIPS')"
placement="right"
>
<el-icon>
@ -53,17 +54,17 @@
<span
style="position:absolute;left: 0;"
>
<span>清空文件列表缓存数据库 已占用: </span>
<span>{{ $T('MANAGE_SETTING_CLEAR_CACHE_TITLE') }} </span>
<span
style="color: #ff4949;"
>{{ formatFileSize(dbSize) === ''? 0 : formatFileSize(dbSize) }}</span>
<span> 剩余可用: </span>
<span> {{ $T('MANAGE_SETTING_CLEAR_CACHE_FREE_TITLE') }} </span>
<span
style="color: #ff4949;"
>{{ dbSizeAvailableRate }} %</span>
<el-tooltip
effect="dark"
content="清空后下次进入新目录时将会重新加载文件列表"
:content="$T('MANAGE_SETTING_CLEAR_CACHE_TIPS')"
placement="right"
>
<el-icon>
@ -73,9 +74,9 @@
</span>
</template>
<el-popconfirm
title="确定要清空文件列表缓存数据库吗?"
confirm-button-text="确定"
cancel-button-text="取消"
:title="$T('MANAGE_SETTING_CLEAR_CACHE_PROMPT')"
:confirm-button-text="$T('CONFIRM')"
:cancel-button-text="$T('CANCEL')"
hide-icon
@confirm="handleClearDb"
>
@ -85,7 +86,7 @@
plain
style="position:absolute;right: 0;"
>
清空
{{ $T('MANAGE_SETTING_CLEAR_CACHE_BUTTON') }}
</el-button>
</template>
</el-popconfirm>
@ -94,7 +95,8 @@
<template #label>
<span
style="position:absolute;left: 0;"
>图片显示为原图而非默认文件格式图标(需要存储桶可公开访问)
>
{{ $T('MANAGE_SETTING_SHOW_THUMBNAIL_TITLE') }}
</span>
</template>
<el-switch
@ -109,14 +111,15 @@
<template #label>
<span
style="position:absolute;left: 0;"
>文件列表默认显示方式
>
{{ $T('MANAGE_SETTING_SHOW_FILE_LIST_TYPE_TITLE') }}
</span>
</template>
<el-switch
v-model="form.isShowList"
style="position:absolute;right: 0;"
active-text="列表"
inactive-text="卡片"
: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="handelIsShowListChange"
@ -126,10 +129,11 @@
<template #label>
<span
style="position:absolute;left: 0;"
>为自定义域名开启强制HTTPS
>
{{ $T('MANAGE_SETTING_FORCE_CUSTOM_URL_HTTPS_TITLE') }}
<el-tooltip
effect="dark"
content="开启后复制链接等操作将会自动为自定义域名添加https前缀"
:content="$T('MANAGE_SETTING_FORCE_CUSTOM_URL_HTTPS_TIPS')"
placement="right"
>
<el-icon>
@ -150,10 +154,11 @@
<template #label>
<span
style="position:absolute;left: 0;"
>上传时保留目录结构
>
{{ $T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_UPLOAD_TITLE') }}
<el-tooltip
effect="dark"
content="开启后,上传文件时会保留目录结构,关闭后会将所有文件展开到指定目录下"
:content="$T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_UPLOAD_TIPS')"
placement="right"
>
<el-icon>
@ -174,10 +179,13 @@
<template #label>
<span
style="position:absolute;left: 0;"
><span>下载</span><span style="color: orange;">文件</span><span>时保留目录结构</span>
>
<span>{{ $T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_A') }}</span>
<span style="color: orange;">{{ $T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_B') }}</span>
<span>{{ $T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_C') }}</span>
<el-tooltip
effect="dark"
content="开启后,下载文件时会保留原始目录结构"
:content="$T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_FILE_TIPS')"
placement="right"
>
<el-icon>
@ -198,10 +206,13 @@
<template #label>
<span
style="position:absolute;left: 0;"
><span>下载</span><span style="color: coral;">文件夹</span><span>时保留目录结构</span>
>
<span>{{ $T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_A') }}</span>
<span style="color: coral;">{{ $T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_D') }}</span>
<span>{{ $T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_C') }}</span>
<el-tooltip
effect="dark"
content="开启后,下载文件夹时会保留目录结构,关闭后会将所有文件展开到下载目录下"
:content="$T('MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_FILE_TIPS')"
placement="right"
>
<el-icon>
@ -222,10 +233,11 @@
<template #label>
<span
style="position:absolute;left: 0;"
>最大同时下载文件数(1-9999)
>
{{ $T('MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_TITLE') }}
<el-tooltip
effect="dark"
content="腾讯云由于后端实现不同,该设置不生效"
:content="$T('MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_TIPS')"
placement="right"
>
<el-icon>
@ -237,7 +249,7 @@
<el-input-number
v-model="maxDownloadFileCount"
style="position:absolute;right: 0;"
placeholder="请输入最大同时下载文件数"
:placeholder="$T('MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_INPUT_TIPS')"
:min="1"
:max="9999"
:step="1"
@ -247,10 +259,11 @@
<template #label>
<span
style="position:absolute;left: 0;"
>文件搜索时是否忽略大小写
>
{{ $T('MANAGE_SETTING_SEARCH_IGNORE_CASE_TITLE') }}
<el-tooltip
effect="dark"
content="开启后,文件搜索时,将会忽略大小写"
:content="$T('MANAGE_SETTING_SEARCH_IGNORE_CASE_TIPS')"
placement="right"
>
<el-icon>
@ -271,10 +284,11 @@
<template #label>
<span
style="position:absolute;left: 0;"
>上传文件时间戳重命名--(优先级最高)
>
{{ $T('MANAGE_SETTING_TIMESTAMP_RENAME_TITLE') }}
<el-tooltip
effect="dark"
content="开启后,上传时文件名将会根据当前时间进行重命名"
:content="$T('MANAGE_SETTING_TIMESTAMP_RENAME_TIPS')"
placement="right"
>
<el-icon>
@ -295,10 +309,11 @@
<template #label>
<span
style="position:absolute;left: 0;"
>上传文件随机字符串重命名--(优先级中)
>
{{ $T('MANAGE_SETTING_RANDOM_STRING_RENAME_TITLE') }}
<el-tooltip
effect="dark"
content="开启后上传时文件名重命名为20位随机字符串"
:content="$T('MANAGE_SETTING_RANDOM_STRING_RENAME_TIPS')"
placement="right"
>
<el-icon>
@ -319,10 +334,11 @@
<template #label>
<span
style="position:absolute;left: 0;"
>上传文件自定义重命名--(优先级最低)
>
{{ $T('MANAGE_SETTING_CUSTOM_RENAME_TITLE') }}
<el-tooltip
effect="dark"
content="开启后,上传时文件名将会根据自定义格式进行重命名"
:content="$T('MANAGE_SETTING_CUSTOM_RENAME_TIPS')"
placement="right"
>
<el-icon>
@ -344,12 +360,12 @@
style="margin-top: 10px;margin-bottom: 10px;color: #409eff;"
:underline="false"
>
自定义重命名格式占位符请参考下表可自由组合
{{ $T('MANAGE_SETTING_CUSTOM_PATTERN_TITLE') }}
</el-link>
<el-input
v-if="form.customRename"
v-model="customRenameFormat.value"
placeholder="请输入自定义重命名格式"
:placeholder="$T('MANAGE_SETTING_CUSTOM_PATTERN_TIPS')"
style="width: 100%;"
/>
<el-table
@ -362,22 +378,22 @@
>
<el-table-column
prop="placeholder"
label="占位符"
:label="$T('MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TITLE')"
width="150"
/>
<el-table-column
prop="description"
label="描述"
:label="$T('MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TIPS')"
width="150"
/>
<el-table-column
prop="placeholderB"
label="占位符"
:label="$T('MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TITLE')"
width="150"
/>
<el-table-column
prop="descriptionB"
label="描述"
:label="$T('MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TIPS')"
width="150"
/>
</el-table>
@ -385,11 +401,11 @@
style="margin-top: 10px;margin-bottom: 10px;color: #409eff;"
:underline="false"
>
预签名链接过期时间(单位)
{{ $T('MANAGE_SETTING_PRESIGNED_URL_EXPIRE_TITLE') }}
</el-link>
<el-input
v-model="PreSignedExpire"
placeholder="请输入预签名链接过期时间"
:placeholder="$T('MANAGE_SETTING_PRESIGNED_URL_EXPIRE_TIPS')"
clearable
@blur="handelPreSignedExpireChange"
/>
@ -397,28 +413,29 @@
style="margin-top: 10px;margin-bottom: 10px;color: #409eff;"
:underline="false"
>
选择默认复制的链接格式
{{ $T('MANAGE_SETTING_CHOOSE_COPY_FORMAT_TITLE') }}
</el-link>
<br />
<el-radio-group
v-model="pasteFormat"
>
<el-radio label="markdown">
Markdown
{{ $T('MANAGE_SETTING_CHOOSE_COPY_FORMAT_MARKDOWN') }}
</el-radio>
<el-radio lable="markdown-with-link">
Markdown(带链接)
{{ $T('MANAGE_SETTING_CHOOSE_COPY_FORMAT_MARKDOWN_WITH_LINK') }}
</el-radio>
<el-radio label="rawurl">
原始链接
{{ $T('MANAGE_SETTING_CHOOSE_COPY_FORMAT_RAWURL') }}
</el-radio>
<el-radio label="html">
HTML格式
{{ $T('MANAGE_SETTING_CHOOSE_COPY_FORMAT_HTML') }}
</el-radio>
<el-radio label="bbcode">
BBCode格式
{{ $T('MANAGE_SETTING_CHOOSE_COPY_FORMAT_BBCODE') }}
</el-radio>
<el-radio label="custom">
自定义格式
{{ $T('MANAGE_SETTING_CHOOSE_COPY_FORMAT_CUSTOM') }}
</el-radio>
</el-radio-group>
<el-link
@ -426,12 +443,12 @@
style="margin-top: 10px;margin-bottom: 10px;color: #409eff;"
:underline="false"
>
自定义链接格式$url为链接$fileName为文件名
{{ $T('MANAGE_SETTING_CUSTOM_COPY_FORMAT_TITLE') }}
</el-link>
<el-input
v-if="pasteFormat === 'custom'"
v-model="customPasteFormat"
placeholder="请输入自定义链接格式"
:placeholder="$T('MANAGE_SETTING_CUSTOM_COPY_FORMAT_TIPS')"
style="width: 100%;"
/>
<div>
@ -439,13 +456,13 @@
style="margin-top: 10px;margin-bottom: 10px;color: #409eff;"
:underline="false"
>
选择下载目录
{{ $T('MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TITLE') }}
</el-link>
</div>
<el-input
v-model="downloadDir"
disabled
placeholder="系统默认下载目录"
:placeholder="$T('MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TIPS')"
style="width: 100%;margin-top: 10px;"
>
<template #append>
@ -456,11 +473,14 @@
<el-icon>
<Folder />
</el-icon>
选择目录
{{ $T('MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_BUTTON') }}
</el-button>
</template>
</el-input>
</el-form>
<el-divider
border-style="none"
/>
</el-row>
</el-col>
</el-row>
@ -475,6 +495,9 @@ import { ElMessage } from 'element-plus'
import { useManageStore } from '../store/manageStore'
import { fileCacheDbInstance } from '../store/bucketFileDb'
import { formatFileSize, customRenameFormatTable } from '../utils/common'
import { T as $T } from '@/i18n'
import { selectDownloadFolder } from '../utils/static'
const manageStore = useManageStore()
const form = reactive<IStringKeyMap>({
@ -564,7 +587,7 @@ async function initData () {
}
async function handleDownloadDirClick () {
const result = await invokeToMain('selectDownloadFolder')
const result = await invokeToMain(selectDownloadFolder)
if (result) {
downloadDir.value = result
}
@ -638,15 +661,15 @@ function handelCustomRenameChange (val:ICheckBoxValueType) {
const handleCellClick = (row:any, column:any) => {
navigator.clipboard.writeText(row[column.property])
ElMessage.success(`已复制${row[column.property]}`)
ElMessage.success(`${$T('MANAGE_SETTING_COPY_MESSAGE')}${row[column.property]}`)
}
function handleClearDb () {
fileCacheDbInstance.delete().then(() => {
getIndexDbSize()
ElMessage.success('清除成功')
ElMessage.success($T('MANAGE_SETTING_CLEAR_CACHE_SUCCESS'))
}).catch(() => {
ElMessage.error('清除失败')
ElMessage.error($T('MANAGE_SETTING_CLEAR_CACHE_FAILED'))
})
}

View File

@ -1,2 +1,3 @@
export const cancelDownloadLoadingFileList = 'cancelDownloadLoadingFileList'
export const refreshDownloadFileTransferList = 'refreshDownloadFileTransferList'
export const selectDownloadFolder = 'selectDownloadFolder'

View File

@ -156,6 +156,59 @@ interface ILocales {
TIPS_PLUGIN_NOT_GUI_IMPLEMENT: string
TIPS_CLICK_NOTIFICATION_TO_RELOAD: string
TIPS_GET_PLUGIN_LIST_FAILED: string
MANAGE_SETTING_TITLE: string
MANAGE_SETTING_AUTO_FRESH_TITLE: string
MANAGE_SETTING_AUTO_FRESH_TIPS: string
MANAGE_SETTING_CLEAR_CACHE_TITLE: string
MANAGE_SETTING_CLEAR_CACHE_FREE_TITLE: string
MANAGE_SETTING_CLEAR_CACHE_TIPS: string
MANAGE_SETTING_CLEAR_CACHE_PROMPT: string
MANAGE_SETTING_CLEAR_CACHE_BUTTON: string
MANAGE_SETTING_SHOW_THUMBNAIL_TITLE: string
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_TITLE: string
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_LIST: string
MANAGE_SETTING_SHOW_FILE_LIST_TYPE_CARD: string
MANAGE_SETTING_FORCE_CUSTOM_URL_HTTPS_TITLE: string
MANAGE_SETTING_FORCE_CUSTOM_URL_HTTPS_TIPS: string
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_UPLOAD_TITLE: string
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_UPLOAD_TIPS: string
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_A: string
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_B: string
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_C: string
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_TITLE_D: string
MANAGE_SETTING_KEEP_FOLDER_STRUCTURE_DOWNLOAD_FILE_TIPS: string
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_TITLE: string
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_TIPS: string
MANAGE_SETTING_MAX_DOWNLOAD_FILE_SIZE_INPUT_TIPS: string
MANAGE_SETTING_SEARCH_IGNORE_CASE_TITLE: string
MANAGE_SETTING_SEARCH_IGNORE_CASE_TIPS: string
MANAGE_SETTING_TIMESTAMP_RENAME_TITLE: string
MANAGE_SETTING_TIMESTAMP_RENAME_TIPS: string
MANAGE_SETTING_RANDOM_STRING_RENAME_TITLE: string
MANAGE_SETTING_RANDOM_STRING_RENAME_TIPS: string
MANAGE_SETTING_CUSTOM_RENAME_TITLE: string
MANAGE_SETTING_CUSTOM_RENAME_TIPS: string
MANAGE_SETTING_CUSTOM_PATTERN_TITLE: string
MANAGE_SETTING_CUSTOM_PATTERN_TIPS: string
MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TITLE: string
MANAGE_SETTING_CUSTOM_PATTERN_TABLE_TIPS: string
MANAGE_SETTING_PRESIGNED_URL_EXPIRE_TITLE: string
MANAGE_SETTING_PRESIGNED_URL_EXPIRE_TIPS: string
MANAGE_SETTING_CHOOSE_COPY_FORMAT_TITLE: string
MANAGE_SETTING_CHOOSE_COPY_FORMAT_MARKDOWN: string
MANAGE_SETTING_CHOOSE_COPY_FORMAT_MARKDOWN_WITH_LINK: string
MANAGE_SETTING_CHOOSE_COPY_FORMAT_RAWURL: string
MANAGE_SETTING_CHOOSE_COPY_FORMAT_HTML: string
MANAGE_SETTING_CHOOSE_COPY_FORMAT_BBCODE: string
MANAGE_SETTING_CHOOSE_COPY_FORMAT_CUSTOM: string
MANAGE_SETTING_CUSTOM_COPY_FORMAT_TITLE: string
MANAGE_SETTING_CUSTOM_COPY_FORMAT_TIPS: string
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TITLE: string
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TIPS: string
MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_BUTTON: string
MANAGE_SETTING_COPY_MESSAGE: string
MANAGE_SETTING_CLEAR_CACHE_SUCCESS: string
MANAGE_SETTING_CLEAR_CACHE_FAILED: string
PLUGIN_INSTALL_SUCCEED: string
PLUGIN_INSTALL_FAILED: string
PLUGIN_UNINSTALL_SUCCEED: string