diff --git a/frontend/src/pages/settings/SettingsPage.vue b/frontend/src/pages/settings/SettingsPage.vue index 08a02d94..3eaed232 100644 --- a/frontend/src/pages/settings/SettingsPage.vue +++ b/frontend/src/pages/settings/SettingsPage.vue @@ -17,6 +17,7 @@ import { useAllSetting } from './useAllSetting.js'; import GeneralTab from './GeneralTab.vue'; import SecurityTab from './SecurityTab.vue'; import TelegramTab from './TelegramTab.vue'; +import SubscriptionGeneralTab from './SubscriptionGeneralTab.vue'; const antdThemeConfig = computed(() => ({ algorithm: themeState.isDark ? antdTheme.darkAlgorithm : antdTheme.defaultAlgorithm, @@ -230,7 +231,7 @@ const alertVisible = ref(true); Subscription - + +import { computed } from 'vue'; +import SettingListItem from '@/components/SettingListItem.vue'; + +const props = defineProps({ + allSetting: { type: Object, required: true }, +}); + +// Sub path is constrained: no `:` or `*`, must start and end with `/`, +// and no double slashes. Strip on input, normalize on blur — same +// behavior as the legacy template. +const subPath = computed({ + get: () => props.allSetting.subPath, + set: (v) => { + props.allSetting.subPath = String(v ?? '').replace(/[:*]/g, ''); + }, +}); + +function normalizeSubPath() { + let p = props.allSetting.subPath || '/'; + if (!p.startsWith('/')) p = '/' + p; + if (!p.endsWith('/')) p += '/'; + p = p.replace(/\/+/g, '/'); + props.allSetting.subPath = p; +} + + +