diff --git a/src/constants/index.ts b/src/constants/index.ts index a07de631..0ce391a9 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -151,12 +151,6 @@ export enum TAILWINDCSS_SIZE { LG = 'lg', } -export enum MODE_OPTIONS { - Global = 'global', - Rule = 'rule', - Direct = 'direct', -} - export enum LOG_LEVEL { Info = 'info', Error = 'error', diff --git a/src/pages/Config.tsx b/src/pages/Config.tsx index 27c2b05a..ca290e5d 100644 --- a/src/pages/Config.tsx +++ b/src/pages/Config.tsx @@ -21,7 +21,7 @@ import { upgradingUI, } from '~/apis' import { Button, ConfigTitle } from '~/components' -import { LANG, MODE_OPTIONS, ROUTES, themes } from '~/constants' +import { LANG, ROUTES, themes } from '~/constants' import { locale, setLocale, useI18n } from '~/i18n' import { autoSwitchTheme, @@ -179,6 +179,10 @@ const ConfigForm = () => { } }) + const modes = () => { + return configsData()?.modes || ["rule", "direct", "global"] + } + return (