|
|
|
@ -155,6 +155,24 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
@@ -155,6 +155,24 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
|
|
|
|
|
background: #616161; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* 响应式保存按钮样式 */ |
|
|
|
|
.btn-disabled[data-v-a5c10072] { |
|
|
|
|
background: #e0e0e0; |
|
|
|
|
color: #9e9e9e; |
|
|
|
|
cursor: not-allowed; |
|
|
|
|
} |
|
|
|
|
.btn-disabled[data-v-a5c10072]:hover { |
|
|
|
|
background: #e0e0e0; |
|
|
|
|
} |
|
|
|
|
.btn-saving[data-v-a5c10072] { |
|
|
|
|
background: #ff9800; |
|
|
|
|
color: white; |
|
|
|
|
cursor: not-allowed; |
|
|
|
|
} |
|
|
|
|
.btn-saving[data-v-a5c10072]:hover { |
|
|
|
|
background: #ff9800; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* 响应式设计 */ |
|
|
|
|
@media (max-width: 768px) { |
|
|
|
|
.setting-item[data-v-a5c10072] { |
|
|
|
@ -194,12 +212,17 @@ __webpack_require__.r(__webpack_exports__);
@@ -194,12 +212,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
/* harmony export */ }); |
|
|
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.runtime.esm-bundler.js"); |
|
|
|
|
/* harmony import */ var _utils_themeManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/themeManager.js */ "./src/renderer/utils/themeManager.js"); |
|
|
|
|
/* harmony import */ var _components_Toast_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/Toast.vue */ "./src/renderer/components/Toast.vue"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ |
|
|
|
|
name: 'Settings', |
|
|
|
|
components: { |
|
|
|
|
Toast: _components_Toast_vue__WEBPACK_IMPORTED_MODULE_2__["default"] |
|
|
|
|
}, |
|
|
|
|
setup() { |
|
|
|
|
const settings = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)({ |
|
|
|
|
// 基本设置
|
|
|
|
@ -228,20 +251,69 @@ __webpack_require__.r(__webpack_exports__);
@@ -228,20 +251,69 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
backupFrequency: 'weekly' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// 保存原始设置用于比较
|
|
|
|
|
const originalSettings = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)({}) |
|
|
|
|
const hasChanges = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false) |
|
|
|
|
const isSaving = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false) |
|
|
|
|
|
|
|
|
|
// Toast 相关状态
|
|
|
|
|
const showToast = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false) |
|
|
|
|
const toastConfig = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)({ |
|
|
|
|
type: 'success', |
|
|
|
|
title: '保存成功', |
|
|
|
|
content: '用户设置已成功保存', |
|
|
|
|
duration: 3000 |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// 计算保存按钮的样式类
|
|
|
|
|
const saveButtonClass = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { |
|
|
|
|
if (isSaving.value) { |
|
|
|
|
return 'btn-saving' |
|
|
|
|
} else if (hasChanges.value) { |
|
|
|
|
return 'btn-primary' |
|
|
|
|
} else { |
|
|
|
|
return 'btn-disabled' |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// 检查设置是否有变化
|
|
|
|
|
const checkChanges = () => { |
|
|
|
|
hasChanges.value = JSON.stringify(settings) !== JSON.stringify(originalSettings.value) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 显示Toast提示
|
|
|
|
|
const showToastMessage = (type, title, content, duration = 3000) => { |
|
|
|
|
toastConfig.type = type |
|
|
|
|
toastConfig.title = title |
|
|
|
|
toastConfig.content = content |
|
|
|
|
toastConfig.duration = duration |
|
|
|
|
showToast.value = true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const loadSettings = () => { |
|
|
|
|
const savedSettings = localStorage.getItem('gofaster-settings') |
|
|
|
|
if (savedSettings) { |
|
|
|
|
Object.assign(settings, JSON.parse(savedSettings)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 保存原始设置
|
|
|
|
|
originalSettings.value = JSON.parse(JSON.stringify(settings)) |
|
|
|
|
|
|
|
|
|
// 同步主题管理器
|
|
|
|
|
if (settings.theme) { |
|
|
|
|
_utils_themeManager_js__WEBPACK_IMPORTED_MODULE_1__["default"].setTheme(settings.theme) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const saveSettings = () => { |
|
|
|
|
const saveSettings = async () => { |
|
|
|
|
if (!hasChanges.value || isSaving.value) return |
|
|
|
|
|
|
|
|
|
isSaving.value = true |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
// 模拟保存延迟
|
|
|
|
|
await new Promise(resolve => setTimeout(resolve, 1000)) |
|
|
|
|
|
|
|
|
|
localStorage.setItem('gofaster-settings', JSON.stringify(settings)) |
|
|
|
|
|
|
|
|
|
// 应用主题设置
|
|
|
|
@ -254,10 +326,20 @@ __webpack_require__.r(__webpack_exports__);
@@ -254,10 +326,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
detail: { settings: settings } |
|
|
|
|
})); |
|
|
|
|
|
|
|
|
|
// 这里可以添加保存成功的提示
|
|
|
|
|
console.log('用户设置已保存') |
|
|
|
|
// 更新原始设置
|
|
|
|
|
originalSettings.value = JSON.parse(JSON.stringify(settings)) |
|
|
|
|
hasChanges.value = false |
|
|
|
|
|
|
|
|
|
// 显示保存成功提示
|
|
|
|
|
showToastMessage('success', '保存成功', '用户设置已成功保存') |
|
|
|
|
|
|
|
|
|
console.log('用户设置已保存') |
|
|
|
|
} catch (error) { |
|
|
|
|
console.error('保存用户设置失败:', error) |
|
|
|
|
console.error('保存用户设置失败:', error) |
|
|
|
|
// 显示保存失败提示
|
|
|
|
|
showToastMessage('error', '保存失败', '保存用户设置时发生错误,请重试') |
|
|
|
|
} finally { |
|
|
|
|
isSaving.value = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -274,12 +356,22 @@ __webpack_require__.r(__webpack_exports__);
@@ -274,12 +356,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 监听设置变化
|
|
|
|
|
;(0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(settings, () => { |
|
|
|
|
checkChanges() |
|
|
|
|
}, { deep: true }) |
|
|
|
|
|
|
|
|
|
;(0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { |
|
|
|
|
loadSettings() |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
settings, |
|
|
|
|
hasChanges, |
|
|
|
|
isSaving, |
|
|
|
|
saveButtonClass, |
|
|
|
|
showToast, |
|
|
|
|
toastConfig, |
|
|
|
|
saveSettings, |
|
|
|
|
resetSettings, |
|
|
|
|
handleThemeChange |
|
|
|
@ -331,18 +423,24 @@ const _hoisted_24 = { class: "setting-item" }
@@ -331,18 +423,24 @@ const _hoisted_24 = { class: "setting-item" }
|
|
|
|
|
const _hoisted_25 = { class: "toggle-switch" } |
|
|
|
|
const _hoisted_26 = { class: "setting-item" } |
|
|
|
|
const _hoisted_27 = { class: "settings-actions" } |
|
|
|
|
const _hoisted_28 = ["disabled"] |
|
|
|
|
const _hoisted_29 = { key: 0 } |
|
|
|
|
const _hoisted_30 = { key: 1 } |
|
|
|
|
const _hoisted_31 = { key: 2 } |
|
|
|
|
|
|
|
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) { |
|
|
|
|
const _component_Toast = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Toast") |
|
|
|
|
|
|
|
|
|
return ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [ |
|
|
|
|
_cache[44] || (_cache[44] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { class: "page-header" }, [ |
|
|
|
|
_cache[45] || (_cache[45] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { class: "page-header" }, [ |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h2", null, "用户设置") |
|
|
|
|
], -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [ |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" 个人偏好 "), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [ |
|
|
|
|
_cache[22] || (_cache[22] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "个人偏好", -1 /* CACHED */)), |
|
|
|
|
_cache[23] || (_cache[23] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "个人偏好", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [ |
|
|
|
|
_cache[17] || (_cache[17] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "应用名称", -1 /* CACHED */)), |
|
|
|
|
_cache[18] || (_cache[18] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "应用名称", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { |
|
|
|
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($setup.settings.appName) = $event)), |
|
|
|
|
type: "text", |
|
|
|
@ -352,10 +450,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -352,10 +450,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
]) |
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [ |
|
|
|
|
_cache[19] || (_cache[19] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "语言", -1 /* CACHED */)), |
|
|
|
|
_cache[20] || (_cache[20] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "语言", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("select", { |
|
|
|
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($setup.settings.language) = $event)) |
|
|
|
|
}, _cache[18] || (_cache[18] = [ |
|
|
|
|
}, _cache[19] || (_cache[19] = [ |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("option", { value: "zh-CN" }, "简体中文", -1 /* CACHED */), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("option", { value: "en-US" }, "English", -1 /* CACHED */) |
|
|
|
|
]), 512 /* NEED_PATCH */), [ |
|
|
|
@ -363,11 +461,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -363,11 +461,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
]) |
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [ |
|
|
|
|
_cache[21] || (_cache[21] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "主题", -1 /* CACHED */)), |
|
|
|
|
_cache[22] || (_cache[22] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "主题", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("select", { |
|
|
|
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (($setup.settings.theme) = $event)), |
|
|
|
|
onChange: _cache[3] || (_cache[3] = $event => ($setup.handleThemeChange($setup.settings.theme))) |
|
|
|
|
}, _cache[20] || (_cache[20] = [ |
|
|
|
|
}, _cache[21] || (_cache[21] = [ |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("option", { value: "light" }, "浅色主题", -1 /* CACHED */), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("option", { value: "dark" }, "深色主题", -1 /* CACHED */), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("option", { value: "auto" }, "跟随系统", -1 /* CACHED */) |
|
|
|
@ -378,9 +476,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -378,9 +476,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" 应用设置 "), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [ |
|
|
|
|
_cache[25] || (_cache[25] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "应用设置", -1 /* CACHED */)), |
|
|
|
|
_cache[26] || (_cache[26] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "应用设置", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_8, [ |
|
|
|
|
_cache[23] || (_cache[23] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "请求超时时间 (秒)", -1 /* CACHED */)), |
|
|
|
|
_cache[24] || (_cache[24] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "请求超时时间 (秒)", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { |
|
|
|
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = $event => (($setup.settings.timeout) = $event)), |
|
|
|
|
type: "number", |
|
|
|
@ -391,7 +489,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -391,7 +489,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
]) |
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_9, [ |
|
|
|
|
_cache[24] || (_cache[24] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "自动重试次数", -1 /* CACHED */)), |
|
|
|
|
_cache[25] || (_cache[25] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "自动重试次数", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { |
|
|
|
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = $event => (($setup.settings.retryCount) = $event)), |
|
|
|
|
type: "number", |
|
|
|
@ -404,9 +502,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -404,9 +502,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" 用户设置 "), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_10, [ |
|
|
|
|
_cache[31] || (_cache[31] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "用户设置", -1 /* CACHED */)), |
|
|
|
|
_cache[32] || (_cache[32] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "用户设置", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_11, [ |
|
|
|
|
_cache[27] || (_cache[27] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "自动登录", -1 /* CACHED */)), |
|
|
|
|
_cache[28] || (_cache[28] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "自动登录", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_12, [ |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { |
|
|
|
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = $event => (($setup.settings.autoLogin) = $event)), |
|
|
|
@ -415,14 +513,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -415,14 +513,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
}, null, 512 /* NEED_PATCH */), [ |
|
|
|
|
[vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox, $setup.settings.autoLogin] |
|
|
|
|
]), |
|
|
|
|
_cache[26] || (_cache[26] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", { |
|
|
|
|
_cache[27] || (_cache[27] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", { |
|
|
|
|
for: "autoLogin", |
|
|
|
|
class: "toggle-label" |
|
|
|
|
}, null, -1 /* CACHED */)) |
|
|
|
|
]) |
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_13, [ |
|
|
|
|
_cache[29] || (_cache[29] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "记住密码", -1 /* CACHED */)), |
|
|
|
|
_cache[30] || (_cache[30] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "记住密码", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_14, [ |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { |
|
|
|
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = $event => (($setup.settings.rememberPassword) = $event)), |
|
|
|
@ -431,14 +529,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -431,14 +529,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
}, null, 512 /* NEED_PATCH */), [ |
|
|
|
|
[vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox, $setup.settings.rememberPassword] |
|
|
|
|
]), |
|
|
|
|
_cache[28] || (_cache[28] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", { |
|
|
|
|
_cache[29] || (_cache[29] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", { |
|
|
|
|
for: "rememberPassword", |
|
|
|
|
class: "toggle-label" |
|
|
|
|
}, null, -1 /* CACHED */)) |
|
|
|
|
]) |
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_15, [ |
|
|
|
|
_cache[30] || (_cache[30] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "会话超时时间 (分钟)", -1 /* CACHED */)), |
|
|
|
|
_cache[31] || (_cache[31] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "会话超时时间 (分钟)", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { |
|
|
|
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = $event => (($setup.settings.sessionTimeout) = $event)), |
|
|
|
|
type: "number", |
|
|
|
@ -451,9 +549,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -451,9 +549,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" 通知偏好 "), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_16, [ |
|
|
|
|
_cache[37] || (_cache[37] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "通知偏好", -1 /* CACHED */)), |
|
|
|
|
_cache[38] || (_cache[38] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "通知偏好", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_17, [ |
|
|
|
|
_cache[33] || (_cache[33] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "桌面通知", -1 /* CACHED */)), |
|
|
|
|
_cache[34] || (_cache[34] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "桌面通知", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_18, [ |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { |
|
|
|
|
"onUpdate:modelValue": _cache[9] || (_cache[9] = $event => (($setup.settings.desktopNotifications) = $event)), |
|
|
|
@ -462,14 +560,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -462,14 +560,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
}, null, 512 /* NEED_PATCH */), [ |
|
|
|
|
[vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox, $setup.settings.desktopNotifications] |
|
|
|
|
]), |
|
|
|
|
_cache[32] || (_cache[32] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", { |
|
|
|
|
_cache[33] || (_cache[33] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", { |
|
|
|
|
for: "desktopNotifications", |
|
|
|
|
class: "toggle-label" |
|
|
|
|
}, null, -1 /* CACHED */)) |
|
|
|
|
]) |
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_19, [ |
|
|
|
|
_cache[35] || (_cache[35] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "声音提醒", -1 /* CACHED */)), |
|
|
|
|
_cache[36] || (_cache[36] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "声音提醒", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_20, [ |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { |
|
|
|
|
"onUpdate:modelValue": _cache[10] || (_cache[10] = $event => (($setup.settings.soundNotifications) = $event)), |
|
|
|
@ -478,14 +576,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -478,14 +576,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
}, null, 512 /* NEED_PATCH */), [ |
|
|
|
|
[vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox, $setup.settings.soundNotifications] |
|
|
|
|
]), |
|
|
|
|
_cache[34] || (_cache[34] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", { |
|
|
|
|
_cache[35] || (_cache[35] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", { |
|
|
|
|
for: "soundNotifications", |
|
|
|
|
class: "toggle-label" |
|
|
|
|
}, null, -1 /* CACHED */)) |
|
|
|
|
]) |
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_21, [ |
|
|
|
|
_cache[36] || (_cache[36] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "消息提醒间隔 (秒)", -1 /* CACHED */)), |
|
|
|
|
_cache[37] || (_cache[37] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "消息提醒间隔 (秒)", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { |
|
|
|
|
"onUpdate:modelValue": _cache[11] || (_cache[11] = $event => (($setup.settings.notificationInterval) = $event)), |
|
|
|
|
type: "number", |
|
|
|
@ -498,9 +596,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -498,9 +596,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" 数据管理 "), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_22, [ |
|
|
|
|
_cache[43] || (_cache[43] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "数据管理", -1 /* CACHED */)), |
|
|
|
|
_cache[44] || (_cache[44] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "数据管理", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_23, [ |
|
|
|
|
_cache[38] || (_cache[38] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "数据缓存大小 (MB)", -1 /* CACHED */)), |
|
|
|
|
_cache[39] || (_cache[39] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "数据缓存大小 (MB)", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { |
|
|
|
|
"onUpdate:modelValue": _cache[12] || (_cache[12] = $event => (($setup.settings.cacheSize) = $event)), |
|
|
|
|
type: "number", |
|
|
|
@ -511,7 +609,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -511,7 +609,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
]) |
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_24, [ |
|
|
|
|
_cache[40] || (_cache[40] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "自动清理缓存", -1 /* CACHED */)), |
|
|
|
|
_cache[41] || (_cache[41] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "自动清理缓存", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_25, [ |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { |
|
|
|
|
"onUpdate:modelValue": _cache[13] || (_cache[13] = $event => (($setup.settings.autoCleanCache) = $event)), |
|
|
|
@ -520,17 +618,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -520,17 +618,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
}, null, 512 /* NEED_PATCH */), [ |
|
|
|
|
[vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox, $setup.settings.autoCleanCache] |
|
|
|
|
]), |
|
|
|
|
_cache[39] || (_cache[39] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", { |
|
|
|
|
_cache[40] || (_cache[40] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", { |
|
|
|
|
for: "autoCleanCache", |
|
|
|
|
class: "toggle-label" |
|
|
|
|
}, null, -1 /* CACHED */)) |
|
|
|
|
]) |
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_26, [ |
|
|
|
|
_cache[42] || (_cache[42] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "数据备份频率", -1 /* CACHED */)), |
|
|
|
|
_cache[43] || (_cache[43] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, "数据备份频率", -1 /* CACHED */)), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("select", { |
|
|
|
|
"onUpdate:modelValue": _cache[14] || (_cache[14] = $event => (($setup.settings.backupFrequency) = $event)) |
|
|
|
|
}, _cache[41] || (_cache[41] = [ |
|
|
|
|
}, _cache[42] || (_cache[42] = [ |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("option", { value: "daily" }, "每日", -1 /* CACHED */), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("option", { value: "weekly" }, "每周", -1 /* CACHED */), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("option", { value: "monthly" }, "每月", -1 /* CACHED */), |
|
|
|
@ -547,11 +645,27 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -547,11 +645,27 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
|
onClick: _cache[15] || (_cache[15] = (...args) => ($setup.resetSettings && $setup.resetSettings(...args))) |
|
|
|
|
}, " 重置所有设置 "), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { |
|
|
|
|
class: "btn btn-primary", |
|
|
|
|
onClick: _cache[16] || (_cache[16] = (...args) => ($setup.saveSettings && $setup.saveSettings(...args))) |
|
|
|
|
}, " 保存更改 ") |
|
|
|
|
class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["btn", $setup.saveButtonClass]), |
|
|
|
|
onClick: _cache[16] || (_cache[16] = (...args) => ($setup.saveSettings && $setup.saveSettings(...args))), |
|
|
|
|
disabled: !$setup.hasChanges || $setup.isSaving |
|
|
|
|
}, [ |
|
|
|
|
($setup.isSaving) |
|
|
|
|
? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_29, "保存中...")) |
|
|
|
|
: ($setup.hasChanges) |
|
|
|
|
? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_30, "保存更改")) |
|
|
|
|
: ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_31, "已保存")) |
|
|
|
|
], 10 /* CLASS, PROPS */, _hoisted_28) |
|
|
|
|
]) |
|
|
|
|
]) |
|
|
|
|
]), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Toast 消息提示 "), |
|
|
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Toast, { |
|
|
|
|
visible: $setup.showToast, |
|
|
|
|
"onUpdate:visible": _cache[17] || (_cache[17] = $event => (($setup.showToast) = $event)), |
|
|
|
|
type: $setup.toastConfig.type, |
|
|
|
|
title: $setup.toastConfig.title, |
|
|
|
|
content: $setup.toastConfig.content, |
|
|
|
|
duration: $setup.toastConfig.duration |
|
|
|
|
}, null, 8 /* PROPS */, ["visible", "type", "title", "content", "duration"]) |
|
|
|
|
])) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|