Skip to content

Commit 3cc83d1

Browse files
committed
refactor: Relocate scheduler service settings from the main settings page to a new dedicated system view accessible via the shortcut bar.
1 parent 192ded3 commit 3cc83d1

7 files changed

Lines changed: 50 additions & 24 deletions

File tree

src/layouts/components/ShortcutBar.vue

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import ModuleTestView from '@/views/system/ModuleTestView.vue'
77
import MessageView from '@/views/system/MessageView.vue'
88
import WordsView from '@/views/system/WordsView.vue'
99
import CacheView from '@/views/system/CacheView.vue'
10+
import AccountSettingService from '@/views/system/ServiceView.vue'
1011
import api from '@/api'
1112
import { useDisplay } from 'vuetify'
1213
import { getQueryValue } from '@/@core/utils'
@@ -49,6 +50,9 @@ const wordsDialog = ref(false)
4950
// 缓存管理弹窗
5051
const cacheDialog = ref(false)
5152
53+
// 定时服务弹窗
54+
const schedulerDialog = ref(false)
55+
5256
// 输入消息
5357
const user_message = ref('')
5458
@@ -108,6 +112,13 @@ const shortcuts = [
108112
dialog: 'cache',
109113
dialogRef: cacheDialog,
110114
},
115+
{
116+
title: t('shortcut.scheduler.title'),
117+
subtitle: t('shortcut.scheduler.subtitle'),
118+
icon: 'mdi-list-box',
119+
dialog: 'scheduler',
120+
dialogRef: schedulerDialog,
121+
},
111122
{
112123
title: t('shortcut.system.title'),
113124
subtitle: t('shortcut.system.subtitle'),
@@ -275,10 +286,10 @@ onMounted(() => {
275286
item.dialog === 'message'
276287
? openMessageDialog()
277288
: item.dialog === 'words'
278-
? openDialog(item.dialogRef)
279-
: item.dialog === 'cache'
280-
? openDialog(item.dialogRef)
281-
: openDialog(item.dialogRef)
289+
? openDialog(item.dialogRef)
290+
: item.dialog === 'cache'
291+
? openDialog(item.dialogRef)
292+
: openDialog(item.dialogRef)
282293
"
283294
>
284295
<VAvatar variant="text" size="48" rounded="lg">
@@ -420,6 +431,29 @@ onMounted(() => {
420431
</VCardText>
421432
</VCard>
422433
</VDialog>
434+
<!-- 定时服务弹窗 -->
435+
<VDialog
436+
v-if="schedulerDialog"
437+
v-model="schedulerDialog"
438+
max-width="60rem"
439+
scrollable
440+
:fullscreen="!display.mdAndUp.value"
441+
>
442+
<VCard>
443+
<VCardItem class="py-2">
444+
<VCardTitle>
445+
<VIcon icon="mdi-list-box" class="me-2" />
446+
{{ t('shortcut.scheduler.subtitle') }}
447+
</VCardTitle>
448+
<VCardSubtitle>{{ t('setting.scheduler.subtitle') }}</VCardSubtitle>
449+
<VDialogCloseBtn @click="schedulerDialog = false" />
450+
</VCardItem>
451+
<VDivider />
452+
<VCardText class="pa-0">
453+
<AccountSettingService />
454+
</VCardText>
455+
</VCard>
456+
</VDialog>
423457
<!-- 系统健康检查弹窗 -->
424458
<VDialog
425459
v-if="systemTestDialog"

src/locales/en-US.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,10 @@ export default {
582582
title: 'Cache',
583583
subtitle: 'Manage Cache',
584584
},
585+
scheduler: {
586+
title: 'Services',
587+
subtitle: 'Scheduled Services',
588+
},
585589
},
586590
workflow: {
587591
components: 'Action Components',

src/locales/zh-CN.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,10 @@ export default {
579579
title: '缓存',
580580
subtitle: '管理缓存',
581581
},
582+
scheduler: {
583+
title: '服务',
584+
subtitle: '定时服务',
585+
},
582586
},
583587
workflow: {
584588
components: '动作组件',

src/locales/zh-TW.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,10 @@ export default {
579579
title: '緩存',
580580
subtitle: '管理緩存',
581581
},
582+
scheduler: {
583+
title: '服務',
584+
subtitle: '定時服務',
585+
},
582586
},
583587
workflow: {
584588
components: '動作組件',

src/pages/setting.vue

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import AccountSettingSite from '@/views/setting/AccountSettingSite.vue'
66
import AccountSettingSearch from '@/views/setting/AccountSettingSearch.vue'
77
import AccountSettingSubscribe from '@/views/setting/AccountSettingSubscribe.vue'
88
import AccountSettingSystem from '@/views/setting/AccountSettingSystem.vue'
9-
import AccountSettingService from '@/views/setting/AccountSettingService.vue'
109
import AccountSettingDirectory from '@/views/setting/AccountSettingDirectory.vue'
1110
import AccountSettingRule from '@/views/setting/AccountSettingRule.vue'
1211
import { getSettingTabs } from '@/router/i18n-menu'
@@ -93,15 +92,6 @@ onMounted(() => {
9392
</transition>
9493
</VWindowItem>
9594

96-
<!-- 服务 -->
97-
<VWindowItem value="scheduler">
98-
<transition name="fade-slide" appear>
99-
<div>
100-
<AccountSettingService />
101-
</div>
102-
</transition>
103-
</VWindowItem>
104-
10595
<!-- 通知 -->
10696
<VWindowItem value="notification">
10797
<transition name="fade-slide" appear>

src/router/i18n-menu.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,6 @@ export function getSettingTabs(t: Composer['t']) {
185185
tab: 'subscribe',
186186
description: t('settingTabs.subscribe.description'),
187187
},
188-
{
189-
title: t('settingTabs.scheduler.title'),
190-
icon: 'mdi-list-box',
191-
tab: 'scheduler',
192-
description: t('settingTabs.scheduler.description'),
193-
},
194188
{
195189
title: t('settingTabs.notification.title'),
196190
icon: 'mdi-bell',

src/views/setting/AccountSettingService.vue renamed to src/views/system/ServiceView.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ useDataRefresh(
7070

7171
<template>
7272
<VCard>
73-
<VCardItem>
74-
<VCardTitle>{{ t('setting.scheduler.title') }}</VCardTitle>
75-
<VCardSubtitle>{{ t('setting.scheduler.subtitle') }}</VCardSubtitle>
76-
</VCardItem>
7773
<VTable class="text-no-wrap">
7874
<thead>
7975
<tr>

0 commit comments

Comments
 (0)