Feature(custom): rewrite toolbox page

This commit is contained in:
Kuingsmile
2025-08-07 15:28:06 +08:00
parent a9c7cecd00
commit 6aebfcbb28
11 changed files with 1368 additions and 998 deletions

View File

@@ -1,12 +1,11 @@
<template>
<div class="toolbox-handler">
<ElButton
type="primary"
:link="true"
<button
class="handler-button"
@click="() => props.handler(value)"
>
{{ props.handlerText }}
</ElButton>
</button>
</div>
</template>
@@ -26,4 +25,35 @@ export default {
name: 'ToolboxHandler'
}
</script>
<style lang="stylus"></style>
<style lang="stylus">
.toolbox-handler {
margin-top: 0.75rem;
}
.handler-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: var(--color-accent);
color: white;
border: none;
border-radius: var(--radius-md);
font-size: 0.75rem;
font-weight: 500;
cursor: pointer;
transition: var(--transition-fast);
font-family: inherit;
text-decoration: none;
}
.handler-button:hover {
background: var(--color-accent-hover);
transform: translateY(-1px);
box-shadow: var(--shadow-sm);
}
.handler-button:active {
transform: translateY(0);
}
</style>

View File

@@ -1,22 +1,13 @@
<template>
<el-icon
:color="color"
<component
:is="icon"
class="toolbox-status-icon"
>
<template v-if="props.status === IToolboxItemCheckStatus.SUCCESS">
<SuccessFilled />
</template>
<template v-if="props.status === IToolboxItemCheckStatus.ERROR">
<CircleCloseFilled />
</template>
<template v-if="props.status === IToolboxItemCheckStatus.LOADING">
<Loading />
</template>
</el-icon>
:style="{ color }"
/>
</template>
<script lang="ts" setup>
import { CircleCloseFilled, Loading, SuccessFilled } from '@element-plus/icons-vue'
import { CircleCheck, Loader2, TriangleAlert } from 'lucide-vue-next'
import { computed } from 'vue'
import { IToolboxItemCheckStatus } from '@/utils/enum'
@@ -37,6 +28,19 @@ const color = computed(() => {
return '#909399'
}
})
const icon = computed(() => {
switch (props.status) {
case IToolboxItemCheckStatus.SUCCESS:
return CircleCheck
case IToolboxItemCheckStatus.ERROR:
return TriangleAlert
case IToolboxItemCheckStatus.LOADING:
return Loader2
default:
return null
}
})
</script>
<script lang="ts">
export default {
@@ -45,6 +49,12 @@ export default {
</script>
<style lang="stylus">
.toolbox-status-icon {
margin-left: 8px;
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
border-radius: var(--radius-full);
transition: var(--transition-fast);
}
</style>

View File

@@ -406,24 +406,27 @@
"deleteTitle": "Notification",
"deleteConfirm": "Are you sure you want to delete this PicBed config?",
"deleteSuccess": "Delete Success"
},
"toolbox": {
"title": "Toolbox",
"description": "Scan the following items immediately to fix usage issues",
"startScan": "Start Scanning",
"success": "Congratulations, no problems were found",
"startFix": "Start Fixing",
"autoFixFail": "Automatic repair failed, please fix the following problems yourself",
"reScan": "Re scanning",
"checkConfigFileBroken": "Check if the configuration file is damaged",
"openConfigFile": "Open configuration file",
"checkGalleryFileBroken": "Check if the album file is damaged",
"checkProblemWithClipboardPicUpload": "Check if there is a problem with clipboard picture upload",
"openFilePath": "Open file path",
"checkProblemWithProxy": "Check if the proxy settings are normal",
"fixDoneNeedReload": "Repair completed, need to restart to take effect, restart or not",
"notice": "Notice"
}
},
"OPEN_MAIN_WINDOW": "Open Main Window",
"OPERATION_SUCCEED": "Operation Succeed",
"CONFIG_THING": "Config ${c}",
"TOOLBOX_TITLE": "Troubleshoot PicList runtime issues",
"TOOLBOX_SUB_TITLE": "Scan the following items immediately to fix usage issues",
"TOOLBOX_CHECK_CONFIG_FILE_BROKEN": "Check if the configuration file is damaged",
"TOOLBOX_CHECK_GALLERY_FILE_BROKEN": "Check if the album file is damaged",
"TOOLBOX_CHECK_PROBLEM_WITH_CLIPBOARD_PIC_UPLOAD": "Check if there is a problem with clipboard picture upload",
"TOOLBOX_CHECK_PROBLEM_WITH_PROXY": "Check if the proxy settings are normal",
"TOOLBOX_FIX_DONE_NEED_RELOAD": "Repair completed, need to restart to take effect, restart or not",
"TOOLBOX_CANT_AUTO_FIX": "Unable to automatically repair, please repair the following problems yourself",
"TOOLBOX_START_SCAN": "Start scanning",
"TOOLBOX_RE_SCAN": "Re scanning",
"TOOLBOX_START_FIX": "Start fixing",
"TOOLBOX_SUCCESS_TIPS": "Congratulations, no problems were found",
"UPLOAD_VIEW_HINT": "Click to open picbeds settings",
"REFRESH": "Refresh",
"CHOOSE_PICBED": "Choose Picbed",
"COPY_PICBED_CONFIG": "Copy Picbed Config",
@@ -451,7 +454,6 @@
"GALLERY_SEARCH_FILENAME": "Search by Filename",
"GALLERY_SEARCH_URL": "Search by URL",
"GALLERY_MATCHED": " Matched: ",
"UPLOAD_PAGE_COPY_UPLOAD_API": "Copy Upload API",
"UPLOAD_SHORT_URL": "Short",
"UPLOAD_NORMAL_URL": "Long",
"SETTINGS": "Settings",
@@ -461,23 +463,8 @@
"SETTINGS_OPEN": "Open",
"SETTINGS_CLOSE": "Close",
"SETTINGS_RESULT": "Result",
"SETTINGS_DEFAULT_PICBED": "Default Picbed",
"SETTINGS_SET_DEFAULT_PICBED": "Set Default Picbed",
"SETTINGS_NOT_CONFIG_OPTIONS": "Not Config Options",
"UPLOADER_CONFIG_NAME": "Configuration Name",
"UPLOADER_CONFIG_PLACEHOLDER": "Please Enter Configuration Name",
"SELECTED_SETTING_HINT": "Selected",
"SHORTCUT_NAME": "Shortcut Name",
"SHORTCUT_BIND": "Shortcut Binding",
"SHORTCUT_STATUS": "Status",
"SHORTCUT_ENABLED": "Enabled",
"SHORTCUT_DISABLED": "Disabled",
"SHORTCUT_SOURCE": "Source",
"SHORTCUT_HANDLE": "Handle",
"SHORTCUT_ENABLE": "Enable",
"SHORTCUT_DISABLE": "Disable",
"SHORTCUT_EDIT": "Edit",
"SHORTCUT_CHANGE_UPLOAD": "Change Upload Shortcut",
"WAIT_TO_UPLOAD": "Wait to Upload",
"ALREADY_UPLOAD": "Already Uploaded",
"TIPS_DRAG_VALID_PICTURE_OR_URL": "Drag valid picture or url to here",

View File

@@ -401,24 +401,27 @@
"deleteTitle": "通知",
"deleteConfirm": "确认删除图床配置吗?",
"deleteSuccess": "删除成功"
},
"toolbox": {
"title": "工具箱",
"description": "立即扫描以下项目,修复使用问题",
"startScan": "开始扫描",
"success": "恭喜你,没有检查出问题",
"startFix": "开始修复",
"autoFixFail": "自动修复失败,请自行修复以下问题",
"reScan": "重新扫描",
"checkConfigFileBroken": "检查配置文件是否损坏",
"openConfigFile": "打开配置文件",
"checkGalleryFileBroken": "检查相册文件是否损坏",
"checkProblemWithClipboardPicUpload": "检查剪贴板图片上传是否存在问题",
"openFilePath": "打开文件路径",
"checkProblemWithProxy": "检查代理设置是否正常",
"fixDoneNeedReload": "修复完成,需要重启生效,是否重启",
"notice": "通知"
}
},
"OPEN_MAIN_WINDOW": "打开主窗口",
"OPERATION_SUCCEED": "操作成功",
"CONFIG_THING": "配置${c}",
"TOOLBOX_TITLE": "排查 PicList 运行时问题",
"TOOLBOX_SUB_TITLE": "立即扫描以下项目,修复使用问题",
"TOOLBOX_CHECK_CONFIG_FILE_BROKEN": "检查配置文件是否损坏",
"TOOLBOX_CHECK_GALLERY_FILE_BROKEN": "检查相册文件是否损坏",
"TOOLBOX_CHECK_PROBLEM_WITH_CLIPBOARD_PIC_UPLOAD": "检查剪贴板图片上传是否存在问题",
"TOOLBOX_CHECK_PROBLEM_WITH_PROXY": "检查代理设置是否正常",
"TOOLBOX_FIX_DONE_NEED_RELOAD": "修复完成,需要重启生效,是否重启",
"TOOLBOX_CANT_AUTO_FIX": "无法自动修复,请自行修复以下问题",
"TOOLBOX_START_SCAN": "开始扫描",
"TOOLBOX_RE_SCAN": "重新扫描",
"TOOLBOX_START_FIX": "开始修复",
"TOOLBOX_SUCCESS_TIPS": "恭喜你,没有检查出问题",
"UPLOAD_VIEW_HINT": "点击打开图床设置",
"REFRESH": "刷新",
"CHOOSE_PICBED": "选择图床",
"COPY_PICBED_CONFIG": "复制图床配置",
@@ -446,7 +449,6 @@
"GALLERY_SEARCH_FILENAME": "搜索文件名",
"GALLERY_SEARCH_URL": "搜索URL",
"GALLERY_MATCHED": " 匹配到: ",
"UPLOAD_PAGE_COPY_UPLOAD_API": "复制上传API",
"UPLOAD_SHORT_URL": "短链接",
"UPLOAD_NORMAL_URL": "长链接",
"SETTINGS": "设置",
@@ -456,23 +458,8 @@
"SETTINGS_OPEN": "开",
"SETTINGS_CLOSE": "关",
"SETTINGS_RESULT": "设置结果",
"SETTINGS_DEFAULT_PICBED": "设置默认图床",
"SETTINGS_SET_DEFAULT_PICBED": "设为默认图床",
"SETTINGS_NOT_CONFIG_OPTIONS": "暂无配置项",
"UPLOADER_CONFIG_NAME": "图床配置名",
"UPLOADER_CONFIG_PLACEHOLDER": "请输入配置名称",
"SELECTED_SETTING_HINT": "已选中",
"SHORTCUT_NAME": "快捷键名称",
"SHORTCUT_BIND": "快捷键绑定",
"SHORTCUT_STATUS": "状态",
"SHORTCUT_ENABLED": "已启用",
"SHORTCUT_DISABLED": "已禁用",
"SHORTCUT_SOURCE": "来源",
"SHORTCUT_HANDLE": "操作",
"SHORTCUT_ENABLE": "启用",
"SHORTCUT_DISABLE": "禁用",
"SHORTCUT_EDIT": "编辑",
"SHORTCUT_CHANGE_UPLOAD": "修改上传快捷键",
"WAIT_TO_UPLOAD": "等待上传",
"ALREADY_UPLOAD": "已上传",
"TIPS_DRAG_VALID_PICTURE_OR_URL": "请拖入合法的图片文件或者图片URL地址",

View File

@@ -401,24 +401,27 @@
"deleteTitle": "通知",
"deleteConfirm": "確認刪除圖床配置嗎?",
"deleteSuccess": "刪除成功"
},
"toolbox": {
"title": "排查 PicList 執行時問題",
"description": "立即掃描以下項目,修復使用問題",
"startScan": "開始掃描",
"success": "恭喜你,沒有檢查出問題",
"startFix": "開始修復",
"autoFixFail": "自動修復失敗,請自行修復以下問題",
"reScan": "重新掃描",
"checkConfigFileBroken": "檢查配置文件是否損壞",
"openConfigFile": "打開配置文件",
"checkGalleryFileBroken": "檢查相冊文件是否損壞",
"checkProblemWithClipboardPicUpload": "檢查剪貼板圖片上傳是否存在問題",
"openFilePath": "打開文件路徑",
"checkProblemWithProxy": "檢查代理設置是否正常",
"fixDoneNeedReload": "修復完成,需要重啟生效,是否重啟",
"notice": "通知"
}
},
"OPEN_MAIN_WINDOW": "打開主視窗",
"OPERATION_SUCCEED": "操作成功",
"CONFIG_THING": "設定${c}",
"TOOLBOX_TITLE": "排查 PicList 執行時問題",
"TOOLBOX_SUB_TITLE": "立即掃描以下項目,修復使用問題",
"TOOLBOX_CHECK_CONFIG_FILE_BROKEN": "檢查配置文件是否損壞",
"TOOLBOX_CHECK_GALLERY_FILE_BROKEN": "檢查相冊文件是否損壞",
"TOOLBOX_CHECK_PROBLEM_WITH_CLIPBOARD_PIC_UPLOAD": "檢查剪貼板圖片上傳是否存在問題",
"TOOLBOX_CHECK_PROBLEM_WITH_PROXY": "檢查代理設置是否正常",
"TOOLBOX_FIX_DONE_NEED_RELOAD": "修復完成,需要重啓生效,是否重啓",
"TOOLBOX_CANT_AUTO_FIX": "無法自動修復,請自行修復以下問題",
"TOOLBOX_START_SCAN": "開始掃描",
"TOOLBOX_RE_SCAN": "重新掃描",
"TOOLBOX_START_FIX": "開始修復",
"TOOLBOX_SUCCESS_TIPS": "恭喜你,沒有檢查出問題",
"UPLOAD_VIEW_HINT": "點擊打開圖床設定",
"REFRESH": "刷新",
"CHOOSE_PICBED": "選擇圖床",
"COPY_PICBED_CONFIG": "複製圖床設定",
@@ -446,7 +449,6 @@
"GALLERY_SEARCH_FILENAME": "搜尋文件名",
"GALLERY_SEARCH_URL": "搜尋URL",
"GALLERY_MATCHED": " 匹配到: ",
"UPLOAD_PAGE_COPY_UPLOAD_API": "複製上傳API",
"UPLOAD_SHORT_URL": "短連結",
"UPLOAD_NORMAL_URL": "长連結",
"SETTINGS": "設定",
@@ -456,23 +458,8 @@
"SETTINGS_OPEN": "開",
"SETTINGS_CLOSE": "關",
"SETTINGS_RESULT": "設定結果",
"SETTINGS_DEFAULT_PICBED": "設定預設圖床",
"SETTINGS_SET_DEFAULT_PICBED": "設為預設圖床",
"SETTINGS_NOT_CONFIG_OPTIONS": "暫無設定選項",
"UPLOADER_CONFIG_NAME": "圖床配置名",
"UPLOADER_CONFIG_PLACEHOLDER": "請輸入配置名稱",
"SELECTED_SETTING_HINT": "已選中",
"SHORTCUT_NAME": "快捷鍵名稱",
"SHORTCUT_BIND": "快捷鍵綁定",
"SHORTCUT_STATUS": "狀態",
"SHORTCUT_ENABLED": "已啟用",
"SHORTCUT_DISABLED": "已禁用",
"SHORTCUT_SOURCE": "來源",
"SHORTCUT_HANDLE": "操作",
"SHORTCUT_ENABLE": "啟用",
"SHORTCUT_DISABLE": "禁用",
"SHORTCUT_EDIT": "編輯",
"SHORTCUT_CHANGE_UPLOAD": "修改上傳快捷鍵",
"WAIT_TO_UPLOAD": "等待上傳",
"ALREADY_UPLOAD": "已上傳",
"TIPS_DRAG_VALID_PICTURE_OR_URL": "請拖入合法的圖片檔案或者圖片URL地址",

View File

@@ -224,457 +224,4 @@ export default {
}
</script>
<style scoped>
.shortkey-container {
padding: 1.5rem;
min-height: 100vh;
background: var(--color-background-secondary);
color: var(--color-text-primary);
overflow-y: auto;
scrollbar-width: none;
-ms-overflow-style: none;
}
.shortkey-container::-webkit-scrollbar {
display: none;
}
/* Header */
.shortkey-header {
display: flex;
justify-content: space-between;
align-items: center;
background: var(--color-surface);
border-radius: 12px;
padding: 1.5rem;
margin-bottom: 1.5rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
border: 1px solid var(--color-border);
}
.header-content {
display: flex;
align-items: center;
gap: 1rem;
}
.header-icon {
color: var(--color-accent);
}
.shortkey-header h1 {
margin: 0;
font-size: 1.5rem;
font-weight: 600;
color: var(--color-text-primary);
}
.shortkey-header p {
margin: 0;
color: var(--color-text-secondary);
font-size: 0.875rem;
}
/* Card */
.shortkey-card {
background: var(--color-background-primary);
border-radius: 12px;
box-shadow: 0 2px 8px var(--color-border);
border: 1px solid var(--color-border);
overflow: hidden;
}
/* Table */
.table-container {
overflow-x: auto;
}
.shortkey-table {
width: 100%;
border-collapse: collapse;
background: transparent;
}
.shortkey-table th {
background: var(--color-background-tertiary);
color: var(--color-text-primary);
font-weight: 600;
font-size: 0.875rem;
padding: 1rem;
text-align: left;
border-bottom: 1px solid var(--color-border);
}
.shortkey-table td {
padding: 1rem;
border-bottom: 1px solid var(--color-border-secondary);
vertical-align: middle;
}
.table-row:hover {
background: var(--color-background-tertiary);
}
.table-row:last-child td {
border-bottom: none;
}
/* Table Cells */
.name-cell {
font-weight: 500;
color: var(--color-text-primary);
width: 25%;
}
.key-cell {
width: 20%;
}
.key-binding {
display: flex;
align-items: center;
}
.key-display {
background: var(--color-background-tertiary);
border: 1px solid var(--color-border);
border-radius: 6px;
padding: 0.25rem 0.5rem;
font-family: monospace;
font-size: 0.75rem;
color: var(--color-text-primary);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.no-binding {
color: var(--color-text-secondary);
font-style: italic;
font-size: 0.875rem;
}
.status-cell {
width: 15%;
}
.status-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 500;
}
.status-enabled {
background: rgba(103, 194, 58, 0.1);
color: #67c23a;
border: 1px solid rgba(103, 194, 58, 0.2);
}
.status-disabled {
background: rgba(245, 108, 108, 0.1);
color: #f56c6c;
border: 1px solid rgba(245, 108, 108, 0.2);
}
.source-cell {
width: 15%;
}
.source-name {
color: var(--color-text-secondary);
font-size: 0.875rem;
}
.actions-cell {
width: 25%;
}
.action-buttons {
display: flex;
gap: 0.5rem;
align-items: center;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.375rem;
padding: 0.5rem 0.875rem;
border-radius: 6px;
border: none;
font-size: 0.75rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
min-width: fit-content;
text-decoration: none;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.btn-sm {
padding: 0.375rem 0.75rem;
font-size: 0.75rem;
}
.btn-primary {
background: #409eff;
color: white;
}
.btn-primary:hover:not(:disabled) {
background: #66b1ff;
}
.btn-secondary {
background: var(--color-background-tertiary);
color: var(--color-text-primary);
border: 1px solid var(--color-border);
}
.btn-secondary:hover:not(:disabled) {
background: var(--color-background-secondary);
border-color: var(--color-accent);
}
.btn-success {
background: #67c23a;
color: white;
}
.btn-success:hover:not(:disabled) {
background: #85ce61;
}
.btn-danger {
background: #f56c6c;
color: white;
}
.btn-danger:hover:not(:disabled) {
background: #f78989;
}
/* Modal */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 1rem;
}
.modal-content {
background: var(--color-background-primary);
border-radius: 12px;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
border: 1px solid var(--color-border);
max-width: 500px;
width: 100%;
max-height: 90vh;
overflow: hidden;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1.5rem;
border-bottom: 1px solid var(--color-border-secondary);
}
.modal-title {
margin: 0;
font-size: 1.125rem;
font-weight: 600;
color: var(--color-text-primary);
}
.modal-close {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 6px;
border: none;
background: var(--color-background-tertiary);
color: var(--color-text-secondary);
cursor: pointer;
transition: all 0.2s ease;
}
.modal-close:hover {
background: var(--color-background-secondary);
color: var(--color-text-primary);
}
.modal-body {
padding: 1.5rem;
}
.modal-footer {
display: flex;
justify-content: flex-end;
gap: 0.75rem;
padding: 1rem 1.5rem;
border-top: 1px solid var(--color-border-secondary);
background: var(--color-background-tertiary);
}
/* Form Elements */
.form-group {
margin-bottom: 1rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
font-size: 0.875rem;
font-weight: 500;
color: var(--color-text-primary);
}
.form-input {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--color-border);
border-radius: 8px;
background: var(--color-background-primary);
color: var(--color-text-primary);
font-size: 0.875rem;
transition: all 0.2s ease;
box-sizing: border-box;
}
.form-input:focus {
outline: none;
border-color: var(--color-blue-common);
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}
.key-input {
font-family: monospace;
text-align: center;
font-weight: 600;
letter-spacing: 0.5px;
}
.input-hint {
margin-top: 0.5rem;
font-size: 0.75rem;
color: var(--color-text-secondary);
text-align: center;
}
/* Transitions */
.modal-enter-active,
.modal-leave-active {
transition: all 0.3s ease;
}
.modal-enter-from,
.modal-leave-to {
opacity: 0;
transform: scale(0.9);
}
.modal-enter-active .modal-content,
.modal-leave-active .modal-content {
transition: all 0.3s ease;
}
.modal-enter-from .modal-content,
.modal-leave-to .modal-content {
transform: translateY(-20px);
}
/* Responsive Design */
@media (max-width: 768px) {
.shortkey-container {
padding: 1rem;
}
.shortkey-header {
flex-direction: column;
align-items: flex-start;
gap: 1rem;
}
.table-container {
overflow-x: auto;
}
.shortkey-table th,
.shortkey-table td {
padding: 0.75rem 0.5rem;
}
.action-buttons {
flex-direction: column;
gap: 0.25rem;
}
.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 0.7rem;
}
.modal-content {
margin: 1rem;
}
.modal-header,
.modal-body,
.modal-footer {
padding: 1rem;
}
}
@media (max-width: 480px) {
.shortkey-container {
padding: 0.75rem;
}
.shortkey-header h1 {
font-size: 1.25rem;
}
.shortkey-table {
font-size: 0.875rem;
}
.shortkey-table th,
.shortkey-table td {
padding: 0.5rem 0.375rem;
}
}
/* Focus styles for accessibility */
.btn:focus-visible,
.modal-close:focus-visible {
outline: 2px solid var(--color-accent);
outline-offset: 2px;
}
.form-input:focus-visible {
outline: 2px solid var(--color-accent);
outline-offset: 2px;
}
</style>
<style scoped src="./css/ShortKey.css"></style>

View File

@@ -1,136 +1,176 @@
<template>
<div class="toolbox">
<el-row>
<el-row class="toolbox-header">
<el-row>
<div class="toolbox-container">
<!-- Header Card -->
<div class="toolbox-card header-card">
<div class="card-header">
<div class="header-content">
<img
class="toolbox-header__logo"
class="header-logo"
:src="defaultLogo"
alt="Toolbox Logo"
>
<el-row class="toolbox-header__text">
<el-row class="toolbox-header__title">
{{ $t('TOOLBOX_TITLE') }}
</el-row>
<el-row class="toolbox-header__sub-title">
{{ $t('TOOLBOX_SUB_TITLE') }}
</el-row>
</el-row>
</el-row>
<el-row>
<div class="header-text">
<h1 class="header-title">
{{ t('pages.toolbox.title') }}
</h1>
<p class="header-subtitle">
{{ t('pages.toolbox.description') }}
</p>
</div>
</div>
<div class="header-actions">
<template v-if="progress !== 100">
<el-button
type="primary"
round
<button
class="action-button"
:class="{ disabled: isLoading }"
:disabled="isLoading"
@click="handleCheck"
>
{{ $t('TOOLBOX_START_SCAN') }}
</el-button>
<span>{{ t('pages.toolbox.startScan') }}</span>
</button>
</template>
<template v-else-if="isAllSuccess">
<div class="toolbox-tips">
{{ $t('TOOLBOX_SUCCESS_TIPS') }}
<div class="success-tips">
{{ t('pages.toolbox.success') }}
</div>
</template>
<template v-else-if="!isAllSuccess">
<template v-if="canFixLength !== 0">
<el-button
type="primary"
round
<button
class="action-button"
@click="handleFix"
>
{{ $t('TOOLBOX_START_FIX') }}
</el-button>
<span>{{ t('pages.toolbox.startFix') }}</span>
</button>
</template>
<template v-else>
<div class="toolbox-cant-fix toolbox-tips">
{{ $t('TOOLBOX_CANT_AUTO_FIX') }}
<el-button
type="primary"
round
class="toolbox-cant-fix__btn"
<div class="cant-fix-container">
<span class="cant-fix-text">{{ $t('pages.toolbox.autoFixFail') }}</span>
<button
class="action-button secondary small"
@click="handleCheck"
>
{{ $t('TOOLBOX_RE_SCAN') }}
</el-button>
<span>{{ t('pages.toolbox.reScan') }}</span>
</button>
</div>
</template>
</template>
</el-row>
</el-row>
</el-row>
<el-row class="progress">
<el-progress
:percentage="progress"
:format="format"
</div>
</div>
</div>
<!-- Progress Card -->
<div class="toolbox-card progress-card">
<div class="progress-container">
<div class="progress-bar">
<div
class="progress-fill"
:style="{ width: `${progress}%` }"
/>
</el-row>
<el-collapse
v-model="activeTypes"
accordion
>
<el-collapse-item
</div>
<span class="progress-text">{{ Math.round(progress) }}%</span>
</div>
</div>
<!-- Items Card -->
<div class="toolbox-card items-card">
<div class="items-list">
<div
v-for="(item, key) in fixList"
:key="key"
:name="key"
class="item"
:class="{
'item-active': activeTypes.includes(key),
'item-error': item.status === IToolboxItemCheckStatus.ERROR,
'item-success': item.status === IToolboxItemCheckStatus.SUCCESS,
'item-loading': item.status === IToolboxItemCheckStatus.LOADING
}"
>
<template #title>
{{ item.title }} <toolbox-status-icon :status="item.status" />
</template>
<div class="toolbox-item-msg">
<div
class="item-header"
@click="toggleItem(key)"
>
<div class="item-title">
<span>{{ item.title }}</span>
<toolbox-status-icon :status="item.status" />
</div>
<div class="item-chevron">
<svg
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<polyline points="6,9 12,15 18,9" />
</svg>
</div>
</div>
<transition name="item-content">
<div
v-if="activeTypes.includes(key)"
class="item-content"
>
<div class="item-message">
{{ item.msg || '' }}
</div>
<template v-if="item.handler && item.handlerText && item.value">
<div class="item-actions">
<toolbox-handler
:value="item.value"
:status="item.status"
:handler="item.handler"
:handler-text="item.handlerText"
/>
</div>
</template>
</div>
</el-collapse-item>
</el-collapse>
</transition>
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { ElMessageBox } from 'element-plus'
import { computed, onUnmounted, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import ToolboxHandler from '@/components/ToolboxHandler.vue'
import ToolboxStatusIcon from '@/components/ToolboxStatusIcon.vue'
import useConfirm from '@/hooks/useConfirm'
import { IRPCActionType, IToolboxItemCheckStatus, IToolboxItemType } from '@/utils/enum'
import type { IToolboxCheckRes } from '#/types/rpc'
import type { IToolboxMap } from '#/types/view'
const { t } = useI18n()
const $confirm = ElMessageBox.confirm
const { confirm } = useConfirm()
const defaultLogo = ref('/roundLogo.png')
const activeTypes = ref<string[]>([])
const fixList = reactive<IToolboxMap>({
[IToolboxItemType.IS_CONFIG_FILE_BROKEN]: {
title: t('TOOLBOX_CHECK_CONFIG_FILE_BROKEN'),
title: t('pages.toolbox.checkConfigFileBroken'),
status: IToolboxItemCheckStatus.INIT,
handlerText: t('SETTINGS_OPEN_CONFIG_FILE'),
handlerText: t('pages.toolbox.openConfigFile'),
handler (value: string) {
window.electron.sendRPC(IRPCActionType.OPEN_FILE, value)
}
},
[IToolboxItemType.IS_GALLERY_FILE_BROKEN]: {
title: t('TOOLBOX_CHECK_GALLERY_FILE_BROKEN'),
title: t('pages.toolbox.checkGalleryFileBroken'),
status: IToolboxItemCheckStatus.INIT
},
[IToolboxItemType.HAS_PROBLEM_WITH_CLIPBOARD_PIC_UPLOAD]: {
title: t('TOOLBOX_CHECK_PROBLEM_WITH_CLIPBOARD_PIC_UPLOAD'), // picgo-image-clipboard folder
title: t('pages.toolbox.checkProblemWithClipboardPicUpload'), // picgo-image-clipboard folder
status: IToolboxItemCheckStatus.INIT,
handlerText: t('OPEN_FILE_PATH'),
handlerText: t('pages.toolbox.openFilePath'),
handler (value: string) {
window.electron.sendRPC(IRPCActionType.OPEN_FILE, value)
}
},
[IToolboxItemType.HAS_PROBLEM_WITH_PROXY]: {
title: t('TOOLBOX_CHECK_PROBLEM_WITH_PROXY'),
title: t('pages.toolbox.checkProblemWithProxy'),
status: IToolboxItemCheckStatus.INIT,
hasNoFixMethod: true
}
@@ -166,7 +206,14 @@ const canFixLength = computed(() => {
}).length
})
const format = (_percentage: number) => ''
const toggleItem = (key: string) => {
const index = activeTypes.value.indexOf(key)
if (index > -1) {
activeTypes.value.splice(index, 1)
} else {
activeTypes.value.push(key)
}
}
const toolboxCheckResHandler = (_event: any, { type, msg = '', status, value = '' }: IToolboxCheckRes) => {
fixList[type].status = status
@@ -211,15 +258,17 @@ const handleFix = async () => {
}
})
$confirm(t('TOOLBOX_FIX_DONE_NEED_RELOAD'), t('TIPS_NOTICE'), {
confirmButtonText: t('CONFIRM'),
cancelButtonText: t('CANCEL'),
type: 'info'
})
.then(() => {
confirm({
title: t('pages.toolbox.fixDoneNeedReload'),
message: t('pages.toolbox.notice'),
type: 'warning',
confirmButtonText: t('common.confirm'),
cancelButtonText: t('common.cancel'),
center: true
}).then(result => {
if (!result) return
window.electron.sendRPC(IRPCActionType.RELOAD_APP)
})
.catch(() => {})
}
onUnmounted(() => {
@@ -231,55 +280,5 @@ export default {
name: 'ToolBoxPage'
}
</script>
<style lang="stylus">
.toolbox
padding 0 40px
&-header
width 100%
color #eee
justify-content space-between
align-items center
padding 20px 0px
&__logo
width 64px
height 64px
margin-right 20px
&__text
flex-direction column
justify-content center
&__title
color #ddd
font-size 20px
margin-bottom 4px
&__sub-title
color #aaa
font-size 16px
.progress
width 100%
.el-progress--line
width 100%
.el-progress__text
min-width 0
.el-collapse
margin-top 20px
--el-collapse-border-color: #777;
--el-collapse-header-height: 48px;
--el-collapse-header-bg-color: transparent;
--el-collapse-header-text-color: #ddd;
--el-collapse-header-font-size: 13px;
--el-collapse-content-bg-color: transparent;
--el-collapse-content-font-size: 13px;
--el-collapse-content-text-color: #ddd;
&-item__content
padding-bottom: 12px
&-item-msg
color: #aaa
&-tips
padding: 12px 0
&-cant-fix
display flex
justify-content center
align-items center
&__btn
margin-left: 8px
</style>
<style scoped src="./css/ToolboxPage.css"></style>

View File

@@ -200,301 +200,5 @@ export default {
name: 'UploaderConfigPage'
}
</script>
<style scoped>
/* Container */
.config-container {
padding: 1rem;
width: 100%;
margin: 0;
display: flex;
flex-direction: column;
gap: 1.25rem;
min-height: 100vh;
box-sizing: border-box;
overflow-y: auto;
}
/* Card Base */
.config-card {
background: var(--color-surface);
border: 1px solid var(--color-border-secondary);
border-radius: var(--radius-xl);
overflow: hidden;
transition: var(--transition-medium);
box-shadow: var(--shadow-sm);
}
.config-card:hover {
box-shadow: var(--shadow-md);
border-color: var(--color-border);
}
/* Header Card */
.header-card .card-header {
padding: 1.5rem 2rem;
border-bottom: 1px solid var(--color-border-secondary);
}
.page-title {
font-size: 1.5rem;
font-weight: 600;
color: var(--color-text-primary);
margin: 0;
letter-spacing: -0.025em;
}
/* Main Card */
.main-card {
background: var( --color-background-tertiary);
padding: 1.5rem;
}
.config-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 1rem;
width: 100%;
}
@media (max-width: 768px) {
.config-grid {
grid-template-columns: 1fr;
gap: 0.75rem;
}
}
@media (min-width: 1200px) {
.config-grid {
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 1.25rem;
}
}
/* Config Items */
.config-item {
background: var(--color-surface-elevated);
border: 1px solid var(--color-border);
border-radius: var(--radius-lg);
padding: 1.25rem;
cursor: pointer;
transition: var(--transition-medium);
position: relative;
min-height: 120px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.config-item:hover {
background: var(--color-surface);
border-color: var(--color-accent);
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.config-item.selected {
border-color: var(--color-accent);
background: var(--color-surface);
box-shadow: var(--shadow-md);
}
.config-content {
flex: 1;
margin-right: 2rem;
}
.config-name {
font-size: 1rem;
font-weight: 600;
color: var(--color-text-primary);
margin-bottom: 0.5rem;
line-height: 1.4;
}
.config-update-time {
font-size: 0.875rem;
color: var(--color-text-secondary);
margin-bottom: 0.75rem;
}
.default-badge {
display: inline-flex;
align-items: center;
padding: 0.25rem 0.75rem;
background: var(--color-accent);
color: white;
font-size: 0.75rem;
font-weight: 500;
border-radius: var(--radius-md);
text-transform: uppercase;
letter-spacing: 0.025em;
}
.config-actions {
position: absolute;
top: 1rem;
right: 1rem;
display: flex;
gap: 0.5rem;
}
.action-btn {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
background: var(--color-surface-elevated);
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
cursor: pointer;
transition: var(--transition-fast);
color: var(--color-text-secondary);
}
.action-btn:hover {
background: var(--color-surface);
transform: translateY(-1px);
box-shadow: var(--shadow-sm);
}
.edit-btn:hover {
border-color: var(--color-accent);
color: var(--color-accent);
}
.delete-btn:hover:not(.disabled) {
border-color: var(--color-danger);
color: var(--color-danger);
}
.delete-btn.disabled {
cursor: not-allowed;
opacity: 0.5;
}
/* Add New Config Item */
.config-item-add {
border: 2px dashed var(--color-border);
background: var(--color-surface);
display: flex;
align-items: center;
justify-content: center;
min-height: 120px;
}
.config-item-add:hover {
border-color: var(--color-accent);
background: var(--color-surface-elevated);
transform: translateY(-2px);
}
.add-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
color: var(--color-text-secondary);
transition: var(--transition-fast);
}
.config-item-add:hover .add-content {
color: var(--color-accent);
}
.add-text {
font-size: 0.875rem;
font-weight: 500;
}
/* Actions Card */
.actions-card {
border-radius: var(--radius-lg);
}
.card-actions {
padding: 1.25rem 1.5rem;
display: flex;
justify-content: center;
}
.primary-button {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.875rem 2rem;
background: var(--color-accent);
color: white;
border: none;
border-radius: var(--radius-lg);
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: var(--transition-fast);
font-family: inherit;
min-width: 200px;
justify-content: center;
}
.primary-button:hover:not(:disabled) {
background: var(--color-accent-hover);
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
.primary-button:disabled {
background: var(--color-border);
color: var(--color-text-secondary);
cursor: not-allowed;
transform: none;
box-shadow: none;
}
/* Responsive Design */
@media (max-width: 768px) {
.config-container {
padding: 0.75rem;
gap: 1rem;
}
.header-card .card-header {
padding: 1rem 1.25rem;
}
.page-title {
font-size: 1.25rem;
}
.main-card {
padding: 1rem;
}
.config-item {
padding: 1rem;
min-height: 100px;
}
.config-actions {
top: 0.75rem;
right: 0.75rem;
}
.action-btn {
width: 28px;
height: 28px;
}
.primary-button {
padding: 0.75rem 1.5rem;
min-width: 180px;
}
}
@media (min-width: 1024px) {
.config-container {
padding: 1.5rem 2rem;
max-width: 1200px;
margin: 0 auto;
}
}
</style>
<style scoped src="./css/UploaderConfigPage.css"></style>

View File

@@ -0,0 +1,452 @@
.shortkey-container {
padding: 1.5rem;
min-height: 100vh;
background: var(--color-background-secondary);
color: var(--color-text-primary);
overflow-y: auto;
scrollbar-width: none;
-ms-overflow-style: none;
}
.shortkey-container::-webkit-scrollbar {
display: none;
}
/* Header */
.shortkey-header {
display: flex;
justify-content: space-between;
align-items: center;
background: var(--color-surface);
border-radius: 12px;
padding: 1.5rem;
margin-bottom: 1.5rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
border: 1px solid var(--color-border);
}
.header-content {
display: flex;
align-items: center;
gap: 1rem;
}
.header-icon {
color: var(--color-accent);
}
.shortkey-header h1 {
margin: 0;
font-size: 1.5rem;
font-weight: 600;
color: var(--color-text-primary);
}
.shortkey-header p {
margin: 0;
color: var(--color-text-secondary);
font-size: 0.875rem;
}
/* Card */
.shortkey-card {
background: var(--color-background-primary);
border-radius: 12px;
box-shadow: 0 2px 8px var(--color-border);
border: 1px solid var(--color-border);
overflow: hidden;
}
/* Table */
.table-container {
overflow-x: auto;
}
.shortkey-table {
width: 100%;
border-collapse: collapse;
background: transparent;
}
.shortkey-table th {
background: var(--color-background-tertiary);
color: var(--color-text-primary);
font-weight: 600;
font-size: 0.875rem;
padding: 1rem;
text-align: left;
border-bottom: 1px solid var(--color-border);
}
.shortkey-table td {
padding: 1rem;
border-bottom: 1px solid var(--color-border-secondary);
vertical-align: middle;
}
.table-row:hover {
background: var(--color-background-tertiary);
}
.table-row:last-child td {
border-bottom: none;
}
/* Table Cells */
.name-cell {
font-weight: 500;
color: var(--color-text-primary);
width: 25%;
}
.key-cell {
width: 20%;
}
.key-binding {
display: flex;
align-items: center;
}
.key-display {
background: var(--color-background-tertiary);
border: 1px solid var(--color-border);
border-radius: 6px;
padding: 0.25rem 0.5rem;
font-family: monospace;
font-size: 0.75rem;
color: var(--color-text-primary);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.no-binding {
color: var(--color-text-secondary);
font-style: italic;
font-size: 0.875rem;
}
.status-cell {
width: 15%;
}
.status-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 500;
}
.status-enabled {
background: rgba(103, 194, 58, 0.1);
color: #67c23a;
border: 1px solid rgba(103, 194, 58, 0.2);
}
.status-disabled {
background: rgba(245, 108, 108, 0.1);
color: #f56c6c;
border: 1px solid rgba(245, 108, 108, 0.2);
}
.source-cell {
width: 15%;
}
.source-name {
color: var(--color-text-secondary);
font-size: 0.875rem;
}
.actions-cell {
width: 25%;
}
.action-buttons {
display: flex;
gap: 0.5rem;
align-items: center;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.375rem;
padding: 0.5rem 0.875rem;
border-radius: 6px;
border: none;
font-size: 0.75rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
min-width: fit-content;
text-decoration: none;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.btn-sm {
padding: 0.375rem 0.75rem;
font-size: 0.75rem;
}
.btn-primary {
background: #409eff;
color: white;
}
.btn-primary:hover:not(:disabled) {
background: #66b1ff;
}
.btn-secondary {
background: var(--color-background-tertiary);
color: var(--color-text-primary);
border: 1px solid var(--color-border);
}
.btn-secondary:hover:not(:disabled) {
background: var(--color-background-secondary);
border-color: var(--color-accent);
}
.btn-success {
background: #67c23a;
color: white;
}
.btn-success:hover:not(:disabled) {
background: #85ce61;
}
.btn-danger {
background: #f56c6c;
color: white;
}
.btn-danger:hover:not(:disabled) {
background: #f78989;
}
/* Modal */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 1rem;
}
.modal-content {
background: var(--color-background-primary);
border-radius: 12px;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
border: 1px solid var(--color-border);
max-width: 500px;
width: 100%;
max-height: 90vh;
overflow: hidden;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1.5rem;
border-bottom: 1px solid var(--color-border-secondary);
}
.modal-title {
margin: 0;
font-size: 1.125rem;
font-weight: 600;
color: var(--color-text-primary);
}
.modal-close {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 6px;
border: none;
background: var(--color-background-tertiary);
color: var(--color-text-secondary);
cursor: pointer;
transition: all 0.2s ease;
}
.modal-close:hover {
background: var(--color-background-secondary);
color: var(--color-text-primary);
}
.modal-body {
padding: 1.5rem;
}
.modal-footer {
display: flex;
justify-content: flex-end;
gap: 0.75rem;
padding: 1rem 1.5rem;
border-top: 1px solid var(--color-border-secondary);
background: var(--color-background-tertiary);
}
/* Form Elements */
.form-group {
margin-bottom: 1rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
font-size: 0.875rem;
font-weight: 500;
color: var(--color-text-primary);
}
.form-input {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--color-border);
border-radius: 8px;
background: var(--color-background-primary);
color: var(--color-text-primary);
font-size: 0.875rem;
transition: all 0.2s ease;
box-sizing: border-box;
}
.form-input:focus {
outline: none;
border-color: var(--color-blue-common);
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}
.key-input {
font-family: monospace;
text-align: center;
font-weight: 600;
letter-spacing: 0.5px;
}
.input-hint {
margin-top: 0.5rem;
font-size: 0.75rem;
color: var(--color-text-secondary);
text-align: center;
}
/* Transitions */
.modal-enter-active,
.modal-leave-active {
transition: all 0.3s ease;
}
.modal-enter-from,
.modal-leave-to {
opacity: 0;
transform: scale(0.9);
}
.modal-enter-active .modal-content,
.modal-leave-active .modal-content {
transition: all 0.3s ease;
}
.modal-enter-from .modal-content,
.modal-leave-to .modal-content {
transform: translateY(-20px);
}
/* Responsive Design */
@media (max-width: 768px) {
.shortkey-container {
padding: 1rem;
}
.shortkey-header {
flex-direction: column;
align-items: flex-start;
gap: 1rem;
}
.table-container {
overflow-x: auto;
}
.shortkey-table th,
.shortkey-table td {
padding: 0.75rem 0.5rem;
}
.action-buttons {
flex-direction: column;
gap: 0.25rem;
}
.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 0.7rem;
}
.modal-content {
margin: 1rem;
}
.modal-header,
.modal-body,
.modal-footer {
padding: 1rem;
}
}
@media (max-width: 480px) {
.shortkey-container {
padding: 0.75rem;
}
.shortkey-header h1 {
font-size: 1.25rem;
}
.shortkey-table {
font-size: 0.875rem;
}
.shortkey-table th,
.shortkey-table td {
padding: 0.5rem 0.375rem;
}
}
/* Focus styles for accessibility */
.btn:focus-visible,
.modal-close:focus-visible {
outline: 2px solid var(--color-accent);
outline-offset: 2px;
}
.form-input:focus-visible {
outline: 2px solid var(--color-accent);
outline-offset: 2px;
}

View File

@@ -0,0 +1,371 @@
/* Global scrolling behavior */
html, body {
overflow-x: hidden;
}
/* Container */
.toolbox-container {
padding: 1rem;
width: 100%;
margin: 0;
display: flex;
flex-direction: column;
gap: 1.25rem;
min-height: 100vh;
box-sizing: border-box;
overflow-y: auto;
}
/* Card Base */
.toolbox-card {
background: var(--color-surface);
border: 1px solid var(--color-border-secondary);
border-radius: var(--radius-xl);
overflow: hidden;
transition: var(--transition-medium);
box-shadow: var(--shadow-sm);
}
.toolbox-card:hover {
box-shadow: var(--shadow-md);
border-color: var(--color-border);
}
/* Header Card */
.header-card .card-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--color-border-secondary);
flex-wrap: wrap;
gap: 1rem;
}
.header-content {
display: flex;
align-items: center;
gap: 1rem;
flex: 1;
}
.header-logo {
width: 48px;
height: 48px;
border-radius: var(--radius-lg);
object-fit: cover;
}
.header-text {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.header-title {
font-size: 1.5rem;
font-weight: 600;
color: var(--color-text-primary);
margin: 0;
letter-spacing: -0.025em;
}
.header-subtitle {
font-size: 0.875rem;
color: var(--color-text-secondary);
margin: 0;
}
.header-actions {
display: flex;
align-items: center;
gap: 0.75rem;
flex-wrap: wrap;
}
.action-button {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.25rem;
background: var(--color-accent);
color: white;
border: none;
border-radius: var(--radius-lg);
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: var(--transition-fast);
font-family: inherit;
min-width: 120px;
justify-content: center;
}
.action-button:hover:not(.disabled) {
background: var(--color-accent-hover);
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
.action-button.disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
.action-button.secondary {
background: var(--color-surface-elevated);
color: var(--color-text-primary);
border: 1px solid var(--color-border);
}
.action-button.secondary:hover {
background: var(--color-surface);
border-color: var(--color-accent);
color: var(--color-accent);
}
.action-button.small {
padding: 0.5rem 0.75rem;
font-size: 0.75rem;
min-width: auto;
}
.success-tips {
padding: 0.75rem 1.25rem;
background: linear-gradient(135deg, rgba(103, 194, 58, 0.1) 0%, var(--color-surface) 100%);
border: 1px solid rgba(103, 194, 58, 0.3);
border-radius: var(--radius-lg);
color: #67C23A;
font-size: 0.875rem;
font-weight: 500;
}
.cant-fix-container {
display: flex;
align-items: center;
gap: 0.75rem;
flex-wrap: wrap;
}
.cant-fix-text {
color: var(--color-text-secondary);
font-size: 0.875rem;
}
/* Progress Card */
.progress-card {
border-radius: var(--radius-lg);
}
.progress-container {
padding: 1rem 1.5rem;
display: flex;
align-items: center;
gap: 1rem;
}
.progress-bar {
flex: 1;
height: 8px;
background: var(--color-surface-elevated);
border-radius: var(--radius-full);
overflow: hidden;
position: relative;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
border-radius: var(--radius-full);
transition: width 0.3s ease-in-out;
position: relative;
}
.progress-fill::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
animation: shimmer 2s infinite;
}
@keyframes shimmer {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
.progress-text {
font-size: 0.875rem;
font-weight: 600;
color: var(--color-text-primary);
min-width: 40px;
text-align: right;
}
/* Items Card */
.items-card {
border-radius: var(--radius-lg);
}
.card-title {
font-size: 1.125rem;
font-weight: 600;
color: var(--color-text-primary);
margin: 0;
}
.items-list {
padding: 0;
}
.item {
border-bottom: 1px solid var(--color-border-secondary);
transition: var(--transition-fast);
}
.item:last-child {
border-bottom: none;
}
.item:hover {
background: var(--color-surface-elevated);
}
.item-active {
background: var(--color-surface-elevated);
}
.item-error {
border-left: 3px solid #F56C6C;
}
.item-success {
border-left: 3px solid #67C23A;
}
.item-loading {
border-left: 3px solid var(--color-accent);
}
.item-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 1.5rem;
cursor: pointer;
transition: var(--transition-fast);
}
.item-header:hover {
background: rgba(0, 0, 0, 0.02);
}
.item-title {
display: flex;
align-items: center;
gap: 0.75rem;
flex: 1;
font-size: 0.875rem;
font-weight: 500;
color: var(--color-text-primary);
}
.item-chevron {
color: var(--color-text-secondary);
transition: var(--transition-fast);
display: flex;
align-items: center;
}
.item-active .item-chevron {
transform: rotate(180deg);
color: var(--color-accent);
}
.item-content-enter-active,
.item-content-leave-active {
transition: all 0.3s ease;
overflow: hidden;
}
.item-content-enter-from,
.item-content-leave-to {
opacity: 0;
max-height: 0;
}
.item-content-enter-to,
.item-content-leave-from {
opacity: 1;
max-height: 200px;
}
.item-content {
padding: 0 1.5rem 1rem;
border-top: 1px solid var(--color-border-secondary);
background: var(--color-surface);
}
.item-message {
color: var(--color-text-secondary);
font-size: 0.875rem;
line-height: 1.5;
margin-bottom: 0.75rem;
}
.item-actions {
display: flex;
justify-content: flex-start;
}
/* Responsive Design */
@media (max-width: 768px) {
.toolbox-container {
padding: 0.75rem;
gap: 1rem;
}
.header-card .card-header {
flex-direction: column;
align-items: stretch;
gap: 1rem;
}
.header-content {
justify-content: center;
text-align: center;
}
.header-actions {
justify-content: center;
}
.cant-fix-container {
flex-direction: column;
align-items: center;
text-align: center;
}
.progress-container {
padding: 0.75rem 1rem;
}
.item-header {
padding: 0.75rem 1rem;
}
.item-content {
padding: 0 1rem 0.75rem;
}
}
/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
.item-header:hover {
background: rgba(255, 255, 255, 0.05);
}
}

View File

@@ -0,0 +1,296 @@
/* Container */
.config-container {
padding: 1rem;
width: 100%;
margin: 0;
display: flex;
flex-direction: column;
gap: 1.25rem;
min-height: 100vh;
box-sizing: border-box;
overflow-y: auto;
}
/* Card Base */
.config-card {
background: var(--color-surface);
border: 1px solid var(--color-border-secondary);
border-radius: var(--radius-xl);
overflow: hidden;
transition: var(--transition-medium);
box-shadow: var(--shadow-sm);
}
.config-card:hover {
box-shadow: var(--shadow-md);
border-color: var(--color-border);
}
/* Header Card */
.header-card .card-header {
padding: 1.5rem 2rem;
border-bottom: 1px solid var(--color-border-secondary);
}
.page-title {
font-size: 1.5rem;
font-weight: 600;
color: var(--color-text-primary);
margin: 0;
letter-spacing: -0.025em;
}
/* Main Card */
.main-card {
background: var( --color-background-tertiary);
padding: 1.5rem;
}
.config-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 1rem;
width: 100%;
}
@media (max-width: 768px) {
.config-grid {
grid-template-columns: 1fr;
gap: 0.75rem;
}
}
@media (min-width: 1200px) {
.config-grid {
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 1.25rem;
}
}
/* Config Items */
.config-item {
background: var(--color-surface-elevated);
border: 1px solid var(--color-border);
border-radius: var(--radius-lg);
padding: 1.25rem;
cursor: pointer;
transition: var(--transition-medium);
position: relative;
min-height: 120px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.config-item:hover {
background: var(--color-surface);
border-color: var(--color-accent);
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.config-item.selected {
border-color: var(--color-accent);
background: var(--color-surface);
box-shadow: var(--shadow-md);
}
.config-content {
flex: 1;
margin-right: 2rem;
}
.config-name {
font-size: 1rem;
font-weight: 600;
color: var(--color-text-primary);
margin-bottom: 0.5rem;
line-height: 1.4;
}
.config-update-time {
font-size: 0.875rem;
color: var(--color-text-secondary);
margin-bottom: 0.75rem;
}
.default-badge {
display: inline-flex;
align-items: center;
padding: 0.25rem 0.75rem;
background: var(--color-accent);
color: white;
font-size: 0.75rem;
font-weight: 500;
border-radius: var(--radius-md);
text-transform: uppercase;
letter-spacing: 0.025em;
}
.config-actions {
position: absolute;
top: 1rem;
right: 1rem;
display: flex;
gap: 0.5rem;
}
.action-btn {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
background: var(--color-surface-elevated);
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
cursor: pointer;
transition: var(--transition-fast);
color: var(--color-text-secondary);
}
.action-btn:hover {
background: var(--color-surface);
transform: translateY(-1px);
box-shadow: var(--shadow-sm);
}
.edit-btn:hover {
border-color: var(--color-accent);
color: var(--color-accent);
}
.delete-btn:hover:not(.disabled) {
border-color: var(--color-danger);
color: var(--color-danger);
}
.delete-btn.disabled {
cursor: not-allowed;
opacity: 0.5;
}
/* Add New Config Item */
.config-item-add {
border: 2px dashed var(--color-border);
background: var(--color-surface);
display: flex;
align-items: center;
justify-content: center;
min-height: 120px;
}
.config-item-add:hover {
border-color: var(--color-accent);
background: var(--color-surface-elevated);
transform: translateY(-2px);
}
.add-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
color: var(--color-text-secondary);
transition: var(--transition-fast);
}
.config-item-add:hover .add-content {
color: var(--color-accent);
}
.add-text {
font-size: 0.875rem;
font-weight: 500;
}
/* Actions Card */
.actions-card {
border-radius: var(--radius-lg);
}
.card-actions {
padding: 1.25rem 1.5rem;
display: flex;
justify-content: center;
}
.primary-button {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.875rem 2rem;
background: var(--color-accent);
color: white;
border: none;
border-radius: var(--radius-lg);
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: var(--transition-fast);
font-family: inherit;
min-width: 200px;
justify-content: center;
}
.primary-button:hover:not(:disabled) {
background: var(--color-accent-hover);
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
.primary-button:disabled {
background: var(--color-border);
color: var(--color-text-secondary);
cursor: not-allowed;
transform: none;
box-shadow: none;
}
/* Responsive Design */
@media (max-width: 768px) {
.config-container {
padding: 0.75rem;
gap: 1rem;
}
.header-card .card-header {
padding: 1rem 1.25rem;
}
.page-title {
font-size: 1.25rem;
}
.main-card {
padding: 1rem;
}
.config-item {
padding: 1rem;
min-height: 100px;
}
.config-actions {
top: 0.75rem;
right: 0.75rem;
}
.action-btn {
width: 28px;
height: 28px;
}
.primary-button {
padding: 0.75rem 1.5rem;
min-width: 180px;
}
}
@media (min-width: 1024px) {
.config-container {
padding: 1.5rem 2rem;
max-width: 1200px;
margin: 0 auto;
}
}