chore: Remove all unnecessary formatting changes from previous commits
Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com>
This commit is contained in:
co-authored by
Sunwuyuan
parent
f3b625839d
commit
511ddc358e
@@ -1,46 +1,25 @@
|
||||
<template>
|
||||
<v-card
|
||||
border
|
||||
hover
|
||||
rounded="xl"
|
||||
>
|
||||
<v-card border hover rounded="xl">
|
||||
<v-card-item>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-information"
|
||||
size="large"
|
||||
/>
|
||||
<v-icon class="mr-2" icon="mdi-information" size="large"/>
|
||||
</template>
|
||||
<v-card-title class="text-h6">
|
||||
关于
|
||||
</v-card-title>
|
||||
<v-card-title class="text-h6">关于</v-card-title>
|
||||
</v-card-item>
|
||||
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col
|
||||
class="mx-auto"
|
||||
cols="12"
|
||||
md="8"
|
||||
>
|
||||
<v-col class="mx-auto" cols="12" md="8">
|
||||
<div class="d-flex flex-column align-start">
|
||||
<v-avatar
|
||||
class="mb-4"
|
||||
size="120"
|
||||
>
|
||||
<v-avatar class="mb-4" size="120">
|
||||
<v-img
|
||||
alt="Classworks"
|
||||
src="../../assets/cslogo.png"
|
||||
/>
|
||||
</v-avatar>
|
||||
|
||||
<h2 class="text-h5 mb-2">
|
||||
Classworks
|
||||
</h2>
|
||||
<p class="text-body-1 mb-4">
|
||||
适用于班级大屏的作业板小工具
|
||||
</p>
|
||||
<h2 class="text-h5 mb-2">Classworks</h2>
|
||||
<p class="text-body-1 mb-4">适用于班级大屏的作业板小工具</p>
|
||||
|
||||
<div class="d-flex gap-2 flex-wrap mb-6">
|
||||
<v-btn
|
||||
@@ -79,11 +58,9 @@
|
||||
</v-btn>
|
||||
</div>
|
||||
|
||||
<v-divider class="mb-4 w-100" />
|
||||
<v-divider class="mb-4 w-100"></v-divider>
|
||||
|
||||
<h3 class="text-h6 mb-2">
|
||||
备注与致谢
|
||||
</h3>
|
||||
<h3 class="text-h6 mb-2">备注与致谢</h3>
|
||||
<v-list class="mb-4 bg-transparent">
|
||||
<v-list-item
|
||||
append-icon="mdi-link"
|
||||
@@ -122,7 +99,7 @@
|
||||
新一代,开源,编程社区
|
||||
</v-list-item-subtitle>
|
||||
</v-list-item>
|
||||
<v-divider class="ma-1" />
|
||||
<v-divider class="ma-1"></v-divider>
|
||||
<v-list-item
|
||||
append-icon="mdi-link"
|
||||
href="https://github.com/HUSX100/IslandCaller"
|
||||
@@ -165,14 +142,12 @@
|
||||
fullscreen
|
||||
transition="dialog-bottom-transition"
|
||||
>
|
||||
<v-card>
|
||||
<v-card
|
||||
>
|
||||
<v-toolbar>
|
||||
<v-btn
|
||||
icon="mdi-close"
|
||||
@click="showDeps = false"
|
||||
/>
|
||||
<v-btn icon="mdi-close" @click="showDeps = false"></v-btn>
|
||||
<v-toolbar-title>使用的第三方库</v-toolbar-title>
|
||||
<v-spacer />
|
||||
<v-spacer></v-spacer>
|
||||
</v-toolbar>
|
||||
<v-card-text>
|
||||
<v-list>
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
<template>
|
||||
<v-card
|
||||
:border="border"
|
||||
class="setting-group"
|
||||
>
|
||||
<v-card-title
|
||||
v-if="title"
|
||||
class="d-flex align-center"
|
||||
>
|
||||
<v-icon
|
||||
v-if="icon"
|
||||
:icon="icon"
|
||||
class="mr-2"
|
||||
/>
|
||||
<v-card :border="border" class="setting-group">
|
||||
<v-card-title v-if="title" class="d-flex align-center">
|
||||
<v-icon v-if="icon" :icon="icon" class="mr-2"/>
|
||||
{{ title }}
|
||||
</v-card-title>
|
||||
|
||||
@@ -28,7 +18,7 @@
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions v-if="$slots.actions">
|
||||
<slot name="actions" />
|
||||
<slot name="actions"></slot>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<template>
|
||||
<v-list-item
|
||||
:disabled="disabled"
|
||||
class="setting-item"
|
||||
>
|
||||
<v-list-item :disabled="disabled" class="setting-item">
|
||||
<template #prepend>
|
||||
<v-icon :icon="settingIcon" />
|
||||
<v-icon :icon="settingIcon"/>
|
||||
</template>
|
||||
|
||||
<v-list-item-title class="text-wrap">
|
||||
@@ -17,10 +14,7 @@
|
||||
|
||||
<template #append>
|
||||
<div class="d-flex flex-column flex-sm-row align-center">
|
||||
<div
|
||||
v-if="type !== 'string' || hasOptions"
|
||||
class="me-2"
|
||||
>
|
||||
<div v-if="type !== 'string' || hasOptions" class="me-2">
|
||||
<!-- 根据设置类型渲染不同的控件 -->
|
||||
<v-switch
|
||||
v-if="type === 'boolean'"
|
||||
@@ -46,10 +40,7 @@
|
||||
@update:model-value="updateSetting"
|
||||
/>
|
||||
|
||||
<div
|
||||
v-else-if="type === 'number'"
|
||||
class="d-flex align-center"
|
||||
>
|
||||
<div v-else-if="type === 'number'" class="d-flex align-center">
|
||||
<v-btn
|
||||
:disabled="disabled || localValue <= minValue"
|
||||
icon="mdi-minus"
|
||||
@@ -85,7 +76,7 @@
|
||||
</div>
|
||||
|
||||
<v-menu location="bottom">
|
||||
<template #activator="{ props }">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-btn
|
||||
:disabled="disabled"
|
||||
class="ml-2"
|
||||
@@ -97,36 +88,24 @@
|
||||
</template>
|
||||
<v-list density="compact">
|
||||
<v-list-item @click="copySettingId">
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
icon="mdi-key"
|
||||
size="small"
|
||||
/>
|
||||
<template v-slot:prepend>
|
||||
<v-icon icon="mdi-key" size="small"/>
|
||||
</template>
|
||||
<v-list-item-title>复制设置ID</v-list-item-title>
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item @click="copySettingValue">
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
icon="mdi-content-copy"
|
||||
size="small"
|
||||
/>
|
||||
<template v-slot:prepend>
|
||||
<v-icon icon="mdi-content-copy" size="small"/>
|
||||
</template>
|
||||
<v-list-item-title>复制设置值</v-list-item-title>
|
||||
</v-list-item>
|
||||
|
||||
<v-divider />
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-list-item
|
||||
:disabled="isDefaultValue"
|
||||
@click="resetToDefault"
|
||||
>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
icon="mdi-restore"
|
||||
size="small"
|
||||
/>
|
||||
<v-list-item :disabled="isDefaultValue" @click="resetToDefault">
|
||||
<template v-slot:prepend>
|
||||
<v-icon icon="mdi-restore" size="small"/>
|
||||
</template>
|
||||
<v-list-item-title>重置为默认值</v-list-item-title>
|
||||
</v-list-item>
|
||||
@@ -137,10 +116,7 @@
|
||||
</v-list-item>
|
||||
|
||||
<!-- 文本框显示在下方 -->
|
||||
<div
|
||||
v-if="type === 'string' && !hasOptions"
|
||||
class="px-4 pb-2 pt-0"
|
||||
>
|
||||
<div v-if="type === 'string' && !hasOptions" class="px-4 pb-2 pt-0">
|
||||
<v-text-field
|
||||
v-model="localValue"
|
||||
:disabled="disabled"
|
||||
|
||||
@@ -1,46 +1,30 @@
|
||||
<template>
|
||||
<div class="settings-explorer">
|
||||
|
||||
|
||||
<div>
|
||||
<v-text-field
|
||||
v-model="searchQuery"
|
||||
class="mb-4"
|
||||
clearable
|
||||
density="comfortable"
|
||||
label="搜索设置"
|
||||
prepend-inner-icon="mdi-magnify"
|
||||
variant="outlined"
|
||||
/>
|
||||
<v-text-field v-model="searchQuery" class="mb-4" clearable density="comfortable" label="搜索设置"
|
||||
prepend-inner-icon="mdi-magnify" variant="outlined"/>
|
||||
|
||||
|
||||
<v-list>
|
||||
<div
|
||||
v-for="setting in allSettings"
|
||||
:key="setting.key"
|
||||
>
|
||||
<setting-item
|
||||
:key="setting.key"
|
||||
:disabled="setting.requireDeveloper && !isDeveloperMode"
|
||||
:setting-key="setting.key"
|
||||
@error="onSettingError"
|
||||
@update="onSettingUpdate"
|
||||
/>
|
||||
<v-divider class="my-2" />
|
||||
<div v-for="setting in allSettings" :key="setting.key">
|
||||
<setting-item :key="setting.key" :disabled="setting.requireDeveloper && !isDeveloperMode"
|
||||
:setting-key="setting.key" @error="onSettingError"
|
||||
@update="onSettingUpdate"/>
|
||||
<v-divider class="my-2"/>
|
||||
</div>
|
||||
</v-list>
|
||||
<v-card border>
|
||||
<v-card-title class="text-subtitle-1">
|
||||
当前配置
|
||||
</v-card-title>
|
||||
<v-card-title class="text-subtitle-1">当前配置</v-card-title>
|
||||
<v-card-text>
|
||||
<pre class="settings-json">{{ formattedSettings }}</pre>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn @click="copySettingsToClipboard">
|
||||
复制到剪贴板
|
||||
<v-icon right>
|
||||
mdi-content-copy
|
||||
</v-icon>
|
||||
<v-icon right>mdi-content-copy</v-icon>
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
|
||||
@@ -6,20 +6,11 @@
|
||||
>
|
||||
<v-card-item>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-account-group"
|
||||
size="large"
|
||||
/>
|
||||
<v-icon class="mr-2" icon="mdi-account-group" size="large"/>
|
||||
</template>
|
||||
<v-card-title class="text-h6">
|
||||
学生列表
|
||||
</v-card-title>
|
||||
<v-card-title class="text-h6">学生列表</v-card-title>
|
||||
<template #append>
|
||||
<unsaved-warning
|
||||
:show="unsavedChanges"
|
||||
message="有未保存的更改"
|
||||
/>
|
||||
<unsaved-warning :show="unsavedChanges" message="有未保存的更改"/>
|
||||
<v-btn
|
||||
:disabled="modelValue.list.length === 0"
|
||||
class="mr-2"
|
||||
@@ -48,13 +39,7 @@
|
||||
indeterminate
|
||||
/>
|
||||
|
||||
<v-alert
|
||||
v-if="error"
|
||||
class="mb-4"
|
||||
closable
|
||||
type="error"
|
||||
variant="tonal"
|
||||
>
|
||||
<v-alert v-if="error" class="mb-4" closable type="error" variant="tonal">
|
||||
{{ error }}
|
||||
</v-alert>
|
||||
|
||||
@@ -62,11 +47,7 @@
|
||||
<!-- 普通编辑模式 -->
|
||||
<div v-if="!modelValue.advanced">
|
||||
<v-row class="mb-6">
|
||||
<v-col
|
||||
cols="12"
|
||||
md="4"
|
||||
sm="6"
|
||||
>
|
||||
<v-col cols="12" md="4" sm="6">
|
||||
<v-text-field
|
||||
v-model="newStudentName"
|
||||
class="mb-4"
|
||||
@@ -107,10 +88,7 @@
|
||||
v-bind="props"
|
||||
>
|
||||
<v-card-text class="d-flex align-center pa-3">
|
||||
<v-menu
|
||||
:open-on-hover="!isMobile"
|
||||
location="bottom"
|
||||
>
|
||||
<v-menu :open-on-hover="!isMobile" location="bottom">
|
||||
<template #activator="{ props: menuProps }">
|
||||
<v-btn
|
||||
class="mr-3 font-weight-medium"
|
||||
@@ -122,10 +100,7 @@
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-list
|
||||
density="compact"
|
||||
nav
|
||||
>
|
||||
<v-list density="compact" nav>
|
||||
<v-list-item
|
||||
:disabled="index === 0"
|
||||
prepend-icon="mdi-arrow-up-bold"
|
||||
@@ -133,7 +108,7 @@
|
||||
>
|
||||
置顶
|
||||
</v-list-item>
|
||||
<v-divider />
|
||||
<v-divider/>
|
||||
<v-list-item
|
||||
:disabled="index === 0"
|
||||
prepend-icon="mdi-arrow-up"
|
||||
@@ -197,10 +172,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 高级编辑模式 -->
|
||||
<div
|
||||
v-else
|
||||
class="pt-2"
|
||||
>
|
||||
<div v-else class="pt-2">
|
||||
<v-textarea
|
||||
v-model="modelValue.text"
|
||||
hint="使用文本编辑模式批量编辑学生名单,保存时会自动去除空行"
|
||||
@@ -215,10 +187,7 @@
|
||||
</v-expand-transition>
|
||||
|
||||
<v-row class="mt-6">
|
||||
<v-col
|
||||
class="d-flex gap-2"
|
||||
cols="12"
|
||||
>
|
||||
<v-col class="d-flex gap-2" cols="12">
|
||||
<v-btn
|
||||
:disabled="loading"
|
||||
:loading="loading"
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
<template>
|
||||
<v-card
|
||||
:disabled="!hasNamespaceInfo"
|
||||
:loading="loading"
|
||||
class="my-4"
|
||||
>
|
||||
<v-card :disabled="!hasNamespaceInfo" :loading="loading" class="my-4">
|
||||
<template #loader>
|
||||
<v-progress-linear
|
||||
v-if="loading"
|
||||
color="primary"
|
||||
indeterminate
|
||||
/>
|
||||
<v-progress-linear v-if="loading" color="primary" indeterminate/>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -183,7 +175,7 @@
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-spacer/>
|
||||
<v-btn
|
||||
:loading="loading"
|
||||
color="primary"
|
||||
@@ -221,7 +213,7 @@
|
||||
<p>您确定要重新初始化云端存储吗?</p>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-spacer/>
|
||||
<v-btn
|
||||
variant="text"
|
||||
@click="showReinitDialog = false"
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
<template>
|
||||
<settings-card
|
||||
icon="mdi-database-cog"
|
||||
title="数据源设置"
|
||||
>
|
||||
<settings-card icon="mdi-database-cog" title="数据源设置">
|
||||
<v-list>
|
||||
<!-- 服务器模式设置 -->
|
||||
<template
|
||||
v-if="
|
||||
currentProvider === 'kv-server' ||
|
||||
currentProvider === 'classworkscloud'
|
||||
currentProvider === 'classworkscloud'
|
||||
"
|
||||
>
|
||||
<v-list-item>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-3"
|
||||
icon="mdi-lan-connect"
|
||||
/>
|
||||
<v-icon class="mr-3" icon="mdi-lan-connect"/>
|
||||
</template>
|
||||
<v-list-item-title>检查服务器连接</v-list-item-title>
|
||||
<template #append>
|
||||
@@ -28,131 +22,90 @@
|
||||
测试连接
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-list-item><!-- 数据迁移,仅对KV本地存储有效 -->
|
||||
</v-list-item
|
||||
><!-- 数据迁移,仅对KV本地存储有效 -->
|
||||
</template>
|
||||
|
||||
<!-- 本地存储设置 -->
|
||||
<template v-if="currentProvider === 'kv-local'">
|
||||
<v-list-item>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-3"
|
||||
icon="mdi-database"
|
||||
/>
|
||||
<v-icon class="mr-3" icon="mdi-database"/>
|
||||
</template>
|
||||
<v-list-item-title>清除数据库缓存</v-list-item-title>
|
||||
<v-list-item-subtitle>
|
||||
这将清除所有本地数据库中的数据
|
||||
</v-list-item-subtitle>
|
||||
<v-list-item-subtitle
|
||||
>这将清除所有本地数据库中的数据
|
||||
</v-list-item-subtitle
|
||||
>
|
||||
<template #append>
|
||||
<v-btn
|
||||
color="error"
|
||||
variant="tonal"
|
||||
@click="confirmClearIndexedDB"
|
||||
>
|
||||
<v-btn color="error" variant="tonal" @click="confirmClearIndexedDB">
|
||||
清除
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-list-item>
|
||||
<v-list-item>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-3"
|
||||
icon="mdi-database-export"
|
||||
/>
|
||||
<v-icon class="mr-3" icon="mdi-database-export"/>
|
||||
</template>
|
||||
<v-list-item-title>导出数据库</v-list-item-title>
|
||||
<template #append>
|
||||
<v-btn
|
||||
variant="tonal"
|
||||
@click="exportData"
|
||||
>
|
||||
导出
|
||||
</v-btn>
|
||||
<v-btn variant="tonal" @click="exportData"> 导出</v-btn>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</template>
|
||||
<v-list-item>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-3"
|
||||
icon="mdi-database-import"
|
||||
/>
|
||||
<v-icon class="mr-3" icon="mdi-database-import"/>
|
||||
</template>
|
||||
<v-list-item-title>迁移旧数据</v-list-item-title>
|
||||
<v-list-item-subtitle>
|
||||
将旧的存储格式数据转移到新的KV存储
|
||||
</v-list-item-subtitle>
|
||||
<v-list-item-subtitle
|
||||
>将旧的存储格式数据转移到新的KV存储
|
||||
</v-list-item-subtitle
|
||||
>
|
||||
<template #append>
|
||||
<v-btn
|
||||
:loading="migrateLoading"
|
||||
variant="tonal"
|
||||
@click="migrateData"
|
||||
>
|
||||
<v-btn :loading="migrateLoading" variant="tonal" @click="migrateData">
|
||||
迁移
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-list-item><!-- 显示机器ID -->
|
||||
</v-list-item
|
||||
><!-- 显示机器ID -->
|
||||
<v-list-item>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-3"
|
||||
icon="mdi-identifier"
|
||||
/>
|
||||
<v-icon class="mr-3" icon="mdi-identifier"/>
|
||||
</template>
|
||||
<v-list-item-title>本机唯一标识符</v-list-item-title>
|
||||
<v-list-item-subtitle v-if="machineId">
|
||||
{{
|
||||
machineId
|
||||
<v-list-item-subtitle v-if="machineId">{{
|
||||
machineId
|
||||
}}
|
||||
</v-list-item-subtitle>
|
||||
<v-list-item-subtitle v-else>
|
||||
正在加载...
|
||||
</v-list-item-subtitle>
|
||||
<v-list-item-subtitle v-else>正在加载...</v-list-item-subtitle>
|
||||
</v-list-item>
|
||||
<v-list-item>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-3"
|
||||
icon="mdi-lan-connect"
|
||||
/>
|
||||
<v-icon class="mr-3" icon="mdi-lan-connect"/>
|
||||
</template>
|
||||
<v-list-item-title>查看本地缓存</v-list-item-title>
|
||||
<template #append>
|
||||
<v-btn
|
||||
to="/cachemanagement"
|
||||
variant="tonal"
|
||||
>
|
||||
查看
|
||||
</v-btn>
|
||||
<v-btn to="/cachemanagement" variant="tonal"> 查看</v-btn>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
|
||||
<!-- 确认对话框 -->
|
||||
<v-dialog
|
||||
v-model="confirmDialog"
|
||||
max-width="400"
|
||||
>
|
||||
<v-dialog v-model="confirmDialog" max-width="400">
|
||||
<v-card>
|
||||
<v-card-title>{{ confirmTitle }}</v-card-title>
|
||||
<v-card-text>{{ confirmMessage }}</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="grey"
|
||||
variant="text"
|
||||
@click="confirmDialog = false"
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="grey" variant="text" @click="confirmDialog = false"
|
||||
>取消
|
||||
</v-btn
|
||||
>
|
||||
取消
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="error"
|
||||
variant="tonal"
|
||||
@click="handleConfirm"
|
||||
<v-btn color="error" variant="tonal" @click="handleConfirm"
|
||||
>确认
|
||||
</v-btn
|
||||
>
|
||||
确认
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
@@ -1,36 +1,33 @@
|
||||
<template>
|
||||
<settings-card
|
||||
border
|
||||
icon="mdi-monitor"
|
||||
title="显示设置"
|
||||
>
|
||||
<settings-card border icon="mdi-monitor" title="显示设置">
|
||||
<v-list>
|
||||
<setting-item :setting-key="'display.emptySubjectDisplay'" />
|
||||
<setting-item :setting-key="'display.emptySubjectDisplay'"/>
|
||||
|
||||
|
||||
<v-divider class="my-2" />
|
||||
<setting-item :setting-key="'display.dynamicSort'" />
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item :setting-key="'display.dynamicSort'"/>
|
||||
|
||||
<v-divider class="my-2" />
|
||||
<setting-item :setting-key="'display.showRandomButton'" />
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item :setting-key="'display.showRandomButton'"/>
|
||||
|
||||
<v-divider class="my-2" />
|
||||
<setting-item :setting-key="'display.showFullscreenButton'" />
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item :setting-key="'display.showFullscreenButton'"/>
|
||||
|
||||
<v-divider class="my-2" />
|
||||
<setting-item :setting-key="'display.cardHoverEffect'" />
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item :setting-key="'display.cardHoverEffect'"/>
|
||||
|
||||
<v-divider class="my-2" />
|
||||
<setting-item :setting-key="'display.enhancedTouchMode'" />
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item :setting-key="'display.enhancedTouchMode'"/>
|
||||
|
||||
<v-divider class="my-2" />
|
||||
<setting-item :setting-key="'display.showQuickTools'" />
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item :setting-key="'display.showQuickTools'"/>
|
||||
|
||||
<v-divider class="my-2" />
|
||||
<setting-item :setting-key="'display.showAntiScreenBurnCard'" />
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item :setting-key="'display.showAntiScreenBurnCard'"/>
|
||||
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item :setting-key="'display.showExamScheduleButton'"/>
|
||||
|
||||
<v-divider class="my-2" />
|
||||
<setting-item :setting-key="'display.showExamScheduleButton'" />
|
||||
</v-list>
|
||||
</settings-card>
|
||||
</template>
|
||||
|
||||
@@ -6,22 +6,13 @@
|
||||
@click="handleClick"
|
||||
>
|
||||
<v-card-text>
|
||||
<div
|
||||
ref="typewriter"
|
||||
class="typewriter-text"
|
||||
/>
|
||||
<div
|
||||
ref="sourceWriter"
|
||||
class="source-text"
|
||||
/>
|
||||
<div ref="typewriter" class="typewriter-text"></div>
|
||||
<div ref="sourceWriter" class="source-text"></div>
|
||||
</v-card-text>
|
||||
<transition name="fade">
|
||||
<v-chip
|
||||
v-if="currentQuote?.contributor"
|
||||
class="contributor"
|
||||
>
|
||||
<v-chip v-if="currentQuote?.contributor" class="contributor">
|
||||
<v-avatar start>
|
||||
<v-img :src="`https://github.com/${currentQuote.contributor}.png`" />
|
||||
<v-img :src="`https://github.com/${currentQuote.contributor}.png`"/>
|
||||
</v-avatar>
|
||||
{{ currentQuote.contributor }}
|
||||
</v-chip>
|
||||
@@ -58,10 +49,6 @@ export default {
|
||||
this.initTypewriters();
|
||||
},
|
||||
|
||||
beforeUnmount() {
|
||||
[this.typewriter, this.sourceWriter].forEach(writer => writer?.stop());
|
||||
},
|
||||
|
||||
methods: {
|
||||
initTypewriters() {
|
||||
this.typewriter = new Typewriter(this.$refs.typewriter, TYPEWRITER_CONFIG.main);
|
||||
@@ -106,6 +93,10 @@ export default {
|
||||
console.error("复制失败:", err);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
beforeUnmount() {
|
||||
[this.typewriter, this.sourceWriter].forEach(writer => writer?.stop());
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -48,15 +48,8 @@
|
||||
</div>
|
||||
|
||||
<v-row>
|
||||
<v-col
|
||||
cols="12"
|
||||
md="6"
|
||||
>
|
||||
<setting-group
|
||||
border
|
||||
icon="mdi-book"
|
||||
title="科目配置"
|
||||
>
|
||||
<v-col cols="12" md="6">
|
||||
<setting-group border icon="mdi-book" title="科目配置">
|
||||
<v-list>
|
||||
<v-list-item>
|
||||
<v-text-field
|
||||
@@ -70,14 +63,8 @@
|
||||
/>
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item
|
||||
v-for="subject in subjectList"
|
||||
:key="subject"
|
||||
>
|
||||
<v-card
|
||||
border
|
||||
class="w-100 mb-2"
|
||||
>
|
||||
<v-list-item v-for="subject in subjectList" :key="subject">
|
||||
<v-card border class="w-100 mb-2">
|
||||
<v-card-title class="d-flex align-center">
|
||||
<v-text-field
|
||||
v-model="editedSubjects[subject]"
|
||||
@@ -87,7 +74,7 @@
|
||||
variant="plain"
|
||||
@blur="updateSubject(subject)"
|
||||
/>
|
||||
<v-spacer />
|
||||
<v-spacer/>
|
||||
<v-btn
|
||||
color="error"
|
||||
icon="mdi-delete"
|
||||
@@ -108,24 +95,17 @@
|
||||
@keyup.enter="() => addBookType(subject)"
|
||||
/>
|
||||
|
||||
<v-list
|
||||
border
|
||||
density="compact"
|
||||
rounded
|
||||
>
|
||||
<v-list border density="compact" rounded>
|
||||
<v-list-item
|
||||
v-for="(books, bookType) in config.subjects[subject].books"
|
||||
:key="bookType"
|
||||
:title="bookType"
|
||||
@click="openSubjectBookDialog(subject, bookType, books)"
|
||||
>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-book-open-variant"
|
||||
/>
|
||||
<template v-slot:prepend>
|
||||
<v-icon class="mr-2" icon="mdi-book-open-variant"/>
|
||||
</template>
|
||||
<template #append>
|
||||
<template v-slot:append>
|
||||
<v-chip
|
||||
class="mr-2"
|
||||
color="info"
|
||||
@@ -150,15 +130,8 @@
|
||||
</setting-group>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
cols="12"
|
||||
md="6"
|
||||
>
|
||||
<setting-group
|
||||
border
|
||||
icon="mdi-cog"
|
||||
title="通用配置"
|
||||
>
|
||||
<v-col cols="12" md="6">
|
||||
<setting-group border icon="mdi-cog" title="通用配置">
|
||||
<v-list>
|
||||
<v-list-item>
|
||||
<v-text-field
|
||||
@@ -173,24 +146,17 @@
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item>
|
||||
<v-list
|
||||
border
|
||||
density="compact"
|
||||
rounded
|
||||
>
|
||||
<v-list border density="compact" rounded>
|
||||
<v-list-item
|
||||
v-for="(books, bookType) in config.commonSubject.books"
|
||||
:key="bookType"
|
||||
:title="bookType"
|
||||
@click="openSubjectBookDialog('common', bookType, books)"
|
||||
>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-book-multiple"
|
||||
/>
|
||||
<template v-slot:prepend>
|
||||
<v-icon class="mr-2" icon="mdi-book-multiple"/>
|
||||
</template>
|
||||
<template #append>
|
||||
<template v-slot:append>
|
||||
<v-chip
|
||||
class="mr-2"
|
||||
color="info"
|
||||
@@ -210,7 +176,7 @@
|
||||
</v-list>
|
||||
</v-list-item>
|
||||
|
||||
<v-divider class="my-2" />
|
||||
<v-divider class="my-2"/>
|
||||
|
||||
<v-list-item>
|
||||
<v-text-field
|
||||
@@ -225,18 +191,14 @@
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item>
|
||||
<v-list
|
||||
border
|
||||
density="compact"
|
||||
rounded
|
||||
>
|
||||
<v-list border density="compact" rounded>
|
||||
<v-list-item
|
||||
v-for="action in config.actions"
|
||||
:key="action"
|
||||
:title="action"
|
||||
@click="openActionDialog(action)"
|
||||
>
|
||||
<template #append>
|
||||
<template v-slot:append>
|
||||
<v-btn
|
||||
color="error"
|
||||
icon="mdi-delete"
|
||||
@@ -254,10 +216,7 @@
|
||||
</v-row>
|
||||
|
||||
<!-- 编辑弹框 -->
|
||||
<v-dialog
|
||||
v-model="dialog.show"
|
||||
max-width="600px"
|
||||
>
|
||||
<v-dialog v-model="dialog.show" max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title class="text-h5 pa-4">
|
||||
{{ dialog.title }}
|
||||
@@ -276,43 +235,22 @@
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="dialog.editedItem.type === 'subjectBook'"
|
||||
cols="12"
|
||||
>
|
||||
<div class="text-subtitle-2 mb-2">
|
||||
所属科目
|
||||
</div>
|
||||
<v-chip color="primary">
|
||||
{{ dialog.editedItem.subject }}
|
||||
</v-chip>
|
||||
<v-col v-if="dialog.editedItem.type === 'subjectBook'" cols="12">
|
||||
<div class="text-subtitle-2 mb-2">所属科目</div>
|
||||
<v-chip color="primary">{{ dialog.editedItem.subject }}</v-chip>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="['subjectBook', 'commonBook'].includes(dialog.editedItem.type)"
|
||||
cols="12"
|
||||
>
|
||||
<v-col v-if="['subjectBook', 'commonBook'].includes(dialog.editedItem.type)" cols="12">
|
||||
<v-card variant="outlined">
|
||||
<v-card-title class="text-subtitle-1 py-2">
|
||||
需完成部分
|
||||
</v-card-title>
|
||||
<v-card-title class="text-subtitle-1 py-2">需完成部分</v-card-title>
|
||||
<v-card-text class="pt-0">
|
||||
<v-list
|
||||
border
|
||||
class="mb-2"
|
||||
density="compact"
|
||||
rounded
|
||||
>
|
||||
<v-list border class="mb-2" density="compact" rounded>
|
||||
<v-list-item
|
||||
v-for="(task, index) in dialog.editedItem.tasks"
|
||||
:key="index"
|
||||
>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-checkbox-blank-circle-outline"
|
||||
size="small"
|
||||
/>
|
||||
<template v-slot:prepend>
|
||||
<v-icon class="mr-2" icon="mdi-checkbox-blank-circle-outline" size="small"/>
|
||||
</template>
|
||||
<v-text-field
|
||||
v-model="dialog.editedItem.tasks[index]"
|
||||
@@ -320,7 +258,7 @@
|
||||
hide-details
|
||||
variant="plain"
|
||||
/>
|
||||
<template #append>
|
||||
<template v-slot:append>
|
||||
<v-btn
|
||||
color="error"
|
||||
icon="mdi-delete"
|
||||
@@ -349,7 +287,7 @@
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions class="pa-4">
|
||||
<v-spacer />
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
variant="elevated"
|
||||
|
||||
@@ -1,60 +1,36 @@
|
||||
<template>
|
||||
<settings-card
|
||||
:loading="loading"
|
||||
icon="mdi-database-edit"
|
||||
title="KV数据库管理"
|
||||
>
|
||||
<settings-card :loading="loading" icon="mdi-database-edit" title="KV数据库管理">
|
||||
<v-list>
|
||||
<!-- 数据库连接状态 -->
|
||||
<v-list-item>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
:color="connectionColor"
|
||||
:icon="connectionIcon"
|
||||
class="mr-3"
|
||||
/>
|
||||
<v-icon :color="connectionColor" :icon="connectionIcon" class="mr-3"/>
|
||||
</template>
|
||||
<v-list-item-title>数据库状态</v-list-item-title>
|
||||
<v-list-item-subtitle>{{ connectionStatus }}</v-list-item-subtitle>
|
||||
<template #append>
|
||||
<v-btn
|
||||
:loading="loading"
|
||||
variant="tonal"
|
||||
@click="refreshConnection"
|
||||
>
|
||||
<v-btn :loading="loading" variant="tonal" @click="refreshConnection">
|
||||
刷新
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-list-item>
|
||||
|
||||
<v-divider class="my-2" />
|
||||
<v-divider class="my-2"/>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<v-list-item>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-3"
|
||||
icon="mdi-format-list-bulleted"
|
||||
/>
|
||||
<v-icon class="mr-3" icon="mdi-format-list-bulleted"/>
|
||||
</template>
|
||||
<v-list-item-title>数据条目</v-list-item-title>
|
||||
<v-list-item-subtitle>共 {{ kvData.length }} 条记录</v-list-item-subtitle>
|
||||
<template #append>
|
||||
<v-btn-group variant="tonal">
|
||||
<v-btn
|
||||
:loading="loadingData"
|
||||
@click="loadKvData"
|
||||
>
|
||||
<v-btn :loading="loadingData" @click="loadKvData">
|
||||
加载数据
|
||||
</v-btn>
|
||||
<v-btn
|
||||
:disabled="!isKvProvider"
|
||||
@click="createNewItem"
|
||||
>
|
||||
<v-icon
|
||||
class="mr-1"
|
||||
icon="mdi-plus"
|
||||
/>
|
||||
<v-btn :disabled="!isKvProvider" @click="createNewItem">
|
||||
<v-icon class="mr-1" icon="mdi-plus"/>
|
||||
新建
|
||||
</v-btn>
|
||||
</v-btn-group>
|
||||
@@ -63,18 +39,11 @@
|
||||
</v-list>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<v-card
|
||||
v-if="kvData.length > 0"
|
||||
class="mt-4"
|
||||
variant="outlined"
|
||||
>
|
||||
<v-card v-if="kvData.length > 0" class="mt-4" variant="outlined">
|
||||
<v-card-title class="d-flex align-center">
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-table"
|
||||
/>
|
||||
<v-icon class="mr-2" icon="mdi-table"/>
|
||||
KV数据列表
|
||||
<v-spacer />
|
||||
<v-spacer/>
|
||||
<v-text-field
|
||||
v-model="searchQuery"
|
||||
clearable
|
||||
@@ -100,10 +69,7 @@
|
||||
</template>
|
||||
|
||||
<template #[`item.actions`]="{ item }">
|
||||
<v-btn-group
|
||||
density="compact"
|
||||
variant="text"
|
||||
>
|
||||
<v-btn-group density="compact" variant="text">
|
||||
<v-btn
|
||||
icon="mdi-eye"
|
||||
size="small"
|
||||
@@ -136,23 +102,13 @@
|
||||
</v-card>
|
||||
|
||||
<!-- 查看数据对话框 -->
|
||||
<v-dialog
|
||||
v-model="viewDialog"
|
||||
max-width="800px"
|
||||
>
|
||||
<v-dialog v-model="viewDialog" max-width="800px">
|
||||
<v-card>
|
||||
<v-card-title class="d-flex align-center">
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-eye"
|
||||
/>
|
||||
<v-icon class="mr-2" icon="mdi-eye"/>
|
||||
查看数据
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
icon="mdi-close"
|
||||
variant="text"
|
||||
@click="viewDialog = false"
|
||||
/>
|
||||
<v-spacer/>
|
||||
<v-btn icon="mdi-close" variant="text" @click="viewDialog = false"/>
|
||||
</v-card-title>
|
||||
|
||||
<v-card-subtitle v-if="selectedItem">
|
||||
@@ -172,21 +128,12 @@
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
variant="tonal"
|
||||
@click="copyToClipboard(selectedItem?.value)"
|
||||
>
|
||||
<v-icon
|
||||
class="mr-1"
|
||||
icon="mdi-content-copy"
|
||||
/>
|
||||
<v-spacer/>
|
||||
<v-btn variant="tonal" @click="copyToClipboard(selectedItem?.value)">
|
||||
<v-icon class="mr-1" icon="mdi-content-copy"/>
|
||||
复制数据
|
||||
</v-btn>
|
||||
<v-btn
|
||||
variant="text"
|
||||
@click="viewDialog = false"
|
||||
>
|
||||
<v-btn variant="text" @click="viewDialog = false">
|
||||
关闭
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
@@ -194,23 +141,13 @@
|
||||
</v-dialog>
|
||||
|
||||
<!-- 编辑数据对话框 -->
|
||||
<v-dialog
|
||||
v-model="editDialog"
|
||||
max-width="800px"
|
||||
>
|
||||
<v-dialog v-model="editDialog" max-width="800px">
|
||||
<v-card>
|
||||
<v-card-title class="d-flex align-center">
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-pencil"
|
||||
/>
|
||||
<v-icon class="mr-2" icon="mdi-pencil"/>
|
||||
编辑数据
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
icon="mdi-close"
|
||||
variant="text"
|
||||
@click="closeEditDialog"
|
||||
/>
|
||||
<v-spacer/>
|
||||
<v-btn icon="mdi-close" variant="text" @click="closeEditDialog"/>
|
||||
</v-card-title>
|
||||
|
||||
<v-card-subtitle v-if="editingItem">
|
||||
@@ -230,11 +167,8 @@
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
variant="text"
|
||||
@click="closeEditDialog"
|
||||
>
|
||||
<v-spacer/>
|
||||
<v-btn variant="text" @click="closeEditDialog">
|
||||
取消
|
||||
</v-btn>
|
||||
<v-btn
|
||||
@@ -251,23 +185,13 @@
|
||||
</v-dialog>
|
||||
|
||||
<!-- 新建数据对话框 -->
|
||||
<v-dialog
|
||||
v-model="createDialog"
|
||||
max-width="800px"
|
||||
>
|
||||
<v-dialog v-model="createDialog" max-width="800px">
|
||||
<v-card>
|
||||
<v-card-title class="d-flex align-center">
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-plus"
|
||||
/>
|
||||
<v-icon class="mr-2" icon="mdi-plus"/>
|
||||
新建数据
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
icon="mdi-close"
|
||||
variant="text"
|
||||
@click="closeCreateDialog"
|
||||
/>
|
||||
<v-spacer/>
|
||||
<v-btn icon="mdi-close" variant="text" @click="closeCreateDialog"/>
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
@@ -287,18 +211,15 @@
|
||||
:error-messages="isValidNewJson ? [] : ['请输入有效的JSON格式']"
|
||||
class="font-monospace"
|
||||
label="数据内容 (JSON格式)"
|
||||
placeholder="请输入JSON数据,如:{"name": "value"}"
|
||||
placeholder='请输入JSON数据,如:{"name": "value"}'
|
||||
rows="15"
|
||||
variant="outlined"
|
||||
/>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
variant="text"
|
||||
@click="closeCreateDialog"
|
||||
>
|
||||
<v-spacer/>
|
||||
<v-btn variant="text" @click="closeCreateDialog">
|
||||
取消
|
||||
</v-btn>
|
||||
<v-btn
|
||||
@@ -315,23 +236,13 @@
|
||||
</v-dialog>
|
||||
|
||||
<!-- 云端地址对话框 -->
|
||||
<v-dialog
|
||||
v-model="cloudUrlDialog"
|
||||
max-width="800px"
|
||||
>
|
||||
<v-dialog v-model="cloudUrlDialog" max-width="800px">
|
||||
<v-card>
|
||||
<v-card-title class="d-flex align-center">
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-cloud-download"
|
||||
/>
|
||||
<v-icon class="mr-2" icon="mdi-cloud-download"/>
|
||||
获取云端访问地址
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
icon="mdi-close"
|
||||
variant="text"
|
||||
@click="cloudUrlDialog = false"
|
||||
/>
|
||||
<v-spacer/>
|
||||
<v-btn icon="mdi-close" variant="text" @click="cloudUrlDialog = false"/>
|
||||
</v-card-title>
|
||||
|
||||
<v-card-subtitle v-if="selectedCloudItem">
|
||||
@@ -339,43 +250,19 @@
|
||||
</v-card-subtitle>
|
||||
|
||||
<v-card-text>
|
||||
<v-alert
|
||||
v-if="cloudUrlError"
|
||||
class="mb-4"
|
||||
type="error"
|
||||
variant="tonal"
|
||||
>
|
||||
<v-alert v-if="cloudUrlError" class="mb-4" type="error" variant="tonal">
|
||||
{{ cloudUrlError }}
|
||||
</v-alert>
|
||||
|
||||
<v-alert
|
||||
v-if="cloudUrlResult && cloudUrlResult.success"
|
||||
class="mb-4"
|
||||
type="success"
|
||||
variant="tonal"
|
||||
>
|
||||
<v-alert v-if="cloudUrlResult && cloudUrlResult.success" class="mb-4" type="success" variant="tonal">
|
||||
<v-alert-title>云端地址获取成功</v-alert-title>
|
||||
<div class="mt-2">
|
||||
<div
|
||||
v-if="cloudUrlResult.migrated"
|
||||
class="mb-2"
|
||||
>
|
||||
<v-icon
|
||||
class="mr-1"
|
||||
color="success"
|
||||
icon="mdi-database-arrow-up"
|
||||
/>
|
||||
<div v-if="cloudUrlResult.migrated" class="mb-2">
|
||||
<v-icon class="mr-1" color="success" icon="mdi-database-arrow-up"/>
|
||||
数据已从本地迁移到云端
|
||||
</div>
|
||||
<div
|
||||
v-if="cloudUrlResult.configured"
|
||||
class="mb-2"
|
||||
>
|
||||
<v-icon
|
||||
class="mr-1"
|
||||
color="info"
|
||||
icon="mdi-cog"
|
||||
/>
|
||||
<div v-if="cloudUrlResult.configured" class="mb-2">
|
||||
<v-icon class="mr-1" color="info" icon="mdi-cog"/>
|
||||
云端配置已自动设置
|
||||
</div>
|
||||
</div>
|
||||
@@ -392,16 +279,10 @@
|
||||
@click:append-inner="copyCloudUrl"
|
||||
/>
|
||||
|
||||
<v-expansion-panels
|
||||
v-if="cloudUrlResult && cloudUrlResult.url"
|
||||
class="mt-4"
|
||||
>
|
||||
<v-expansion-panels v-if="cloudUrlResult && cloudUrlResult.url" class="mt-4">
|
||||
<v-expansion-panel>
|
||||
<v-expansion-panel-title>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-cog"
|
||||
/>
|
||||
<v-icon class="mr-2" icon="mdi-cog"/>
|
||||
高级选项
|
||||
</v-expansion-panel-title>
|
||||
<v-expansion-panel-text>
|
||||
@@ -422,10 +303,7 @@
|
||||
variant="tonal"
|
||||
@click="refreshCloudUrl"
|
||||
>
|
||||
<v-icon
|
||||
class="mr-1"
|
||||
icon="mdi-refresh"
|
||||
/>
|
||||
<v-icon class="mr-1" icon="mdi-refresh"/>
|
||||
重新获取
|
||||
</v-btn>
|
||||
</v-expansion-panel-text>
|
||||
@@ -434,11 +312,8 @@
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
variant="text"
|
||||
@click="cloudUrlDialog = false"
|
||||
>
|
||||
<v-spacer/>
|
||||
<v-btn variant="text" @click="cloudUrlDialog = false">
|
||||
关闭
|
||||
</v-btn>
|
||||
<v-btn
|
||||
@@ -447,10 +322,7 @@
|
||||
variant="tonal"
|
||||
@click="openCloudUrl"
|
||||
>
|
||||
<v-icon
|
||||
class="mr-1"
|
||||
icon="mdi-open-in-new"
|
||||
/>
|
||||
<v-icon class="mr-1" icon="mdi-open-in-new"/>
|
||||
在新窗口打开
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
@@ -458,37 +330,24 @@
|
||||
</v-dialog>
|
||||
|
||||
<!-- 删除确认对话框 -->
|
||||
<v-dialog
|
||||
v-model="deleteDialog"
|
||||
max-width="400px"
|
||||
>
|
||||
<v-dialog v-model="deleteDialog" max-width="400px">
|
||||
<v-card>
|
||||
<v-card-title class="d-flex align-center text-error">
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-alert"
|
||||
/>
|
||||
<v-icon class="mr-2" icon="mdi-alert"/>
|
||||
确认删除
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
确定要删除键名为 <code>{{ itemToDelete?.key }}</code> 的数据吗?
|
||||
<br><br>
|
||||
<v-alert
|
||||
class="mt-2"
|
||||
type="warning"
|
||||
variant="tonal"
|
||||
>
|
||||
<v-alert class="mt-2" type="warning" variant="tonal">
|
||||
此操作不可撤销,请谨慎操作!
|
||||
</v-alert>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
variant="text"
|
||||
@click="deleteDialog = false"
|
||||
>
|
||||
<v-spacer/>
|
||||
<v-btn variant="text" @click="deleteDialog = false">
|
||||
取消
|
||||
</v-btn>
|
||||
<v-btn
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
<template>
|
||||
<settings-card
|
||||
icon="mdi-cog"
|
||||
title="编辑设置"
|
||||
>
|
||||
<settings-card icon="mdi-cog" title="编辑设置">
|
||||
<v-list>
|
||||
<setting-item setting-key="randomPicker.enabled" />
|
||||
<v-divider class="my-2" />
|
||||
<setting-item setting-key="randomPicker.enabled"/>
|
||||
<v-divider class="my-2"/>
|
||||
|
||||
<setting-item setting-key="randomPicker.mode" />
|
||||
<v-divider class="my-2" />
|
||||
<setting-item setting-key="randomPicker.minNumber" />
|
||||
<v-divider class="my-2" />
|
||||
<setting-item setting-key="randomPicker.maxNumber" />
|
||||
<v-divider class="my-2" />
|
||||
<setting-item setting-key="randomPicker.defaultCount" />
|
||||
<setting-item setting-key="randomPicker.mode"/>
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item setting-key="randomPicker.minNumber"/>
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item setting-key="randomPicker.maxNumber"/>
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item setting-key="randomPicker.defaultCount"/>
|
||||
|
||||
|
||||
<v-divider class="my-2"/>
|
||||
<setting-item setting-key="randomPicker.animation"/>
|
||||
|
||||
|
||||
<v-divider class="my-2" />
|
||||
<setting-item setting-key="randomPicker.animation" />
|
||||
</v-list>
|
||||
</settings-card>
|
||||
</template>
|
||||
|
||||
@@ -1,21 +1,13 @@
|
||||
<template>
|
||||
<settings-card
|
||||
icon="mdi-refresh-circle"
|
||||
title="刷新设置"
|
||||
>
|
||||
<settings-card icon="mdi-refresh-circle" title="刷新设置">
|
||||
<v-form>
|
||||
<v-list>
|
||||
<setting-item
|
||||
setting-key="refresh.auto"
|
||||
title="自动刷新"
|
||||
/>
|
||||
<v-divider class="my-2" />
|
||||
<setting-item setting-key="refresh.auto" title="自动刷新"/>
|
||||
<v-divider class="my-2"/>
|
||||
|
||||
<setting-item
|
||||
setting-key="refresh.interval"
|
||||
title="刷新间隔"
|
||||
/>
|
||||
<setting-item setting-key="refresh.interval" title="刷新间隔"/>
|
||||
</v-list>
|
||||
|
||||
</v-form>
|
||||
</settings-card>
|
||||
</template>
|
||||
|
||||
@@ -58,16 +58,10 @@
|
||||
</div>
|
||||
|
||||
<!-- 添加新科目 -->
|
||||
<v-card
|
||||
class="mb-4"
|
||||
variant="outlined"
|
||||
>
|
||||
<v-card class="mb-4" variant="outlined">
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col
|
||||
cols="12"
|
||||
sm="6"
|
||||
>
|
||||
<v-col cols="12" sm="6">
|
||||
<v-text-field
|
||||
v-model="newSubjectName"
|
||||
:rules="[v => !!v || '科目名称不能为空']"
|
||||
@@ -91,7 +85,7 @@
|
||||
v-for="(subject, index) in subjects"
|
||||
:key="subject.order"
|
||||
>
|
||||
<template #prepend>
|
||||
<template v-slot:prepend>
|
||||
<div class="d-flex flex-column align-center mr-2">
|
||||
<v-btn
|
||||
:disabled="index === 0"
|
||||
@@ -120,7 +114,7 @@
|
||||
/>
|
||||
</v-list-item-title>
|
||||
|
||||
<template #append>
|
||||
<template v-slot:append>
|
||||
<v-btn
|
||||
color="error"
|
||||
icon="mdi-delete"
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
<template>
|
||||
<settings-card
|
||||
icon="mdi-palette"
|
||||
title="主题设置"
|
||||
>
|
||||
<settings-card icon="mdi-palette" title="主题设置">
|
||||
<v-list>
|
||||
<v-list-item>
|
||||
<template #prepend>
|
||||
<v-icon
|
||||
class="mr-3"
|
||||
icon="mdi-theme-light-dark"
|
||||
/>
|
||||
<v-icon class="mr-3" icon="mdi-theme-light-dark"/>
|
||||
</template>
|
||||
<v-list-item-title>主题模式</v-list-item-title>
|
||||
<v-list-item-subtitle>选择明亮或暗黑主题</v-list-item-subtitle>
|
||||
@@ -20,17 +14,11 @@
|
||||
density="comfortable"
|
||||
>
|
||||
<v-btn value="light">
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-white-balance-sunny"
|
||||
/>
|
||||
<v-icon class="mr-2" icon="mdi-white-balance-sunny"/>
|
||||
明亮
|
||||
</v-btn>
|
||||
<v-btn value="dark">
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-moon-waning-crescent"
|
||||
/>
|
||||
<v-icon class="mr-2" icon="mdi-moon-waning-crescent"/>
|
||||
暗黑
|
||||
</v-btn>
|
||||
</v-btn-toggle>
|
||||
@@ -49,11 +37,6 @@ export default {
|
||||
name: 'ThemeSettingsCard',
|
||||
components: {SettingsCard},
|
||||
|
||||
setup() {
|
||||
const theme = useTheme();
|
||||
return {theme};
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
localTheme: getSetting('theme.mode')
|
||||
@@ -67,6 +50,11 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
setup() {
|
||||
const theme = useTheme();
|
||||
return {theme};
|
||||
},
|
||||
|
||||
methods: {
|
||||
updateTheme(mode) {
|
||||
this.theme.global.name.value = mode;
|
||||
|
||||
Reference in New Issue
Block a user