diff --git a/apps/thin/.env b/apps/thin/.env new file mode 100644 index 00000000..12f4e270 --- /dev/null +++ b/apps/thin/.env @@ -0,0 +1,5 @@ +# The title of your application (string) +VITE_GLOB_APP_TITLE='Celeris Web Thin' + +# port +VITE_PORT=8888 diff --git a/apps/thin/.env.development b/apps/thin/.env.development new file mode 100644 index 00000000..9ab38b3e --- /dev/null +++ b/apps/thin/.env.development @@ -0,0 +1,57 @@ +# App Environment Variables + +NODE_ENV="development" + +# Whether to use mock data (true/false) +VITE_USE_MOCK=false + +# Whether to enable build analyzer (true/false) +VITE_USE_BUILD_ANALYZER=false + +# Whether to enable PWA (true/false) +VITE_USE_PWA=true + +# The public path for assets in your application +VITE_PUBLIC_PATH=/ + +# Proxy settings for your development server (array of [string, string] pairs) +VITE_PROXY=[["/api","http://localhost:8899"]] + +# Basic interface address SPA +VITE_GLOB_API_URL=/api + +# Basic interface address SSR +VITE_GLOB_API_URL_SSR=/api + +# Basic interface address prefix +VITE_GLOB_API_URL_PREFIX= + +# The title of your application (string) +VITE_GLOB_APP_TITLE="Celeris Web Thin" + +# The short name of your application (string) +VITE_GLOB_APP_SHORT_NAME="Celeris_Web_Thin" + +# Whether to use a CDN for assets (true/false) +VITE_USE_CDN=false + +# Whether to drop console.log statements (true/false) +VITE_DROP_CONSOLE=false + +# Whether to use HTTPS for your development server (true/false) +VITE_USE_HTTPS=false + +# The compression algorithm to use when building your application (gzip/brotli/none) +VITE_BUILD_COMPRESS=gzip + +# Whether to delete the original file after compressing it (true/false) +VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE=false + +# Whether to build your application in legacy mode (true/false) +VITE_LEGACY=true + +# Whether to use imagemin to optimize images during build (true/false) +VITE_USE_IMAGEMIN=true + +# Whether to generate a configuration file (true/false) +VITE_GLOB_BUILD_GENERATE_CONFIG=true diff --git a/apps/thin/.env.production b/apps/thin/.env.production new file mode 100644 index 00000000..de052e3f --- /dev/null +++ b/apps/thin/.env.production @@ -0,0 +1,57 @@ +# App Environment Variables + +NODE_ENV="production" + +# Whether to use mock data (true/false) +VITE_USE_MOCK=false + +# Whether to enable build analyzer (true/false) +VITE_USE_BUILD_ANALYZER=false + +# Whether to enable PWA (true/false) +VITE_USE_PWA=true + +# The public path for assets in your application +VITE_PUBLIC_PATH=/ + +# Proxy settings for your development server (array of [string, string] pairs) +VITE_PROXY=[["/api","https://celeris-web-api.vercel.app/"]] + +# Basic interface address SPA +VITE_GLOB_API_URL=/api + +# Basic interface address SSR +VITE_GLOB_API_URL_SSR=/api + +# Basic interface address prefix +VITE_GLOB_API_URL_PREFIX= + +# The title of your application (string) +VITE_GLOB_APP_TITLE="Celeris Web Thin" + +# The short name of your application (string) +VITE_GLOB_APP_SHORT_NAME="Celeris_Web_Thin" + +# Whether to use a CDN for assets (true/false) +VITE_USE_CDN=false + +# Whether to drop console.log statements (true/false) +VITE_DROP_CONSOLE=true + +# Whether to use HTTPS for your development server (true/false) +VITE_USE_HTTPS=false + +# The compression algorithm to use when building your application (gzip/brotli/none) +VITE_BUILD_COMPRESS=gzip + +# Whether to delete the original file after compressing it (true/false) +VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE=false + +# Whether to build your application in legacy mode (true/false) +VITE_LEGACY=true + +# Whether to use imagemin to optimize images during build (true/false) +VITE_USE_IMAGEMIN=true + +# Whether to generate a configuration file (true/false) +VITE_GLOB_BUILD_GENERATE_CONFIG=true diff --git a/apps/thin/.env.test b/apps/thin/.env.test new file mode 100644 index 00000000..3a3e07e8 --- /dev/null +++ b/apps/thin/.env.test @@ -0,0 +1,5 @@ +# 测试环境 +NODE_ENV="test" + +# 测试环境接口地址 +VITE_API_URL="/api" diff --git a/apps/thin/autoResolver/auto-imports.d.ts b/apps/thin/autoResolver/auto-imports.d.ts new file mode 100644 index 00000000..36baab41 --- /dev/null +++ b/apps/thin/autoResolver/auto-imports.d.ts @@ -0,0 +1,932 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// noinspection JSUnusedGlobalSymbols +// Generated by unplugin-auto-import +export {} +declare global { + const EffectScope: typeof import('vue')['EffectScope'] + const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] + const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] + const computed: typeof import('vue')['computed'] + const computedAsync: typeof import('@vueuse/core')['computedAsync'] + const computedEager: typeof import('@vueuse/core')['computedEager'] + const computedInject: typeof import('@vueuse/core')['computedInject'] + const computedWithControl: typeof import('@vueuse/core')['computedWithControl'] + const controlledComputed: typeof import('@vueuse/core')['controlledComputed'] + const controlledRef: typeof import('@vueuse/core')['controlledRef'] + const createApp: typeof import('vue')['createApp'] + const createEventHook: typeof import('@vueuse/core')['createEventHook'] + const createGlobalState: typeof import('@vueuse/core')['createGlobalState'] + const createInjectionState: typeof import('@vueuse/core')['createInjectionState'] + const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn'] + const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate'] + const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable'] + const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise'] + const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn'] + const customRef: typeof import('vue')['customRef'] + const debouncedRef: typeof import('@vueuse/core')['debouncedRef'] + const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch'] + const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] + const defineComponent: typeof import('vue')['defineComponent'] + const eagerComputed: typeof import('@vueuse/core')['eagerComputed'] + const effectScope: typeof import('vue')['effectScope'] + const extendRef: typeof import('@vueuse/core')['extendRef'] + const getCurrentInstance: typeof import('vue')['getCurrentInstance'] + const getCurrentScope: typeof import('vue')['getCurrentScope'] + const getPermissionMode: typeof import('../src/composables/setting/usePermissionSetting')['getPermissionMode'] + const h: typeof import('vue')['h'] + const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch'] + const inject: typeof import('vue')['inject'] + const injectLocal: typeof import('@vueuse/core')['injectLocal'] + const isBackendMode: typeof import('../src/composables/setting/usePermissionSetting')['isBackendMode'] + const isDefined: typeof import('@vueuse/core')['isDefined'] + const isProxy: typeof import('vue')['isProxy'] + const isReactive: typeof import('vue')['isReactive'] + const isReadonly: typeof import('vue')['isReadonly'] + const isRef: typeof import('vue')['isRef'] + const isRoleMode: typeof import('../src/composables/setting/usePermissionSetting')['isRoleMode'] + const isRouteMappingMode: typeof import('../src/composables/setting/usePermissionSetting')['isRouteMappingMode'] + const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable'] + const markRaw: typeof import('vue')['markRaw'] + const nextTick: typeof import('vue')['nextTick'] + const onActivated: typeof import('vue')['onActivated'] + const onBeforeMount: typeof import('vue')['onBeforeMount'] + const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave'] + const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate'] + const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] + const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] + const onClickOutside: typeof import('@vueuse/core')['onClickOutside'] + const onDeactivated: typeof import('vue')['onDeactivated'] + const onErrorCaptured: typeof import('vue')['onErrorCaptured'] + const onKeyStroke: typeof import('@vueuse/core')['onKeyStroke'] + const onLongPress: typeof import('@vueuse/core')['onLongPress'] + const onMounted: typeof import('vue')['onMounted'] + const onRenderTracked: typeof import('vue')['onRenderTracked'] + const onRenderTriggered: typeof import('vue')['onRenderTriggered'] + const onScopeDispose: typeof import('vue')['onScopeDispose'] + const onServerPrefetch: typeof import('vue')['onServerPrefetch'] + const onStartTyping: typeof import('@vueuse/core')['onStartTyping'] + const onUnmounted: typeof import('vue')['onUnmounted'] + const onUpdated: typeof import('vue')['onUpdated'] + const pausableWatch: typeof import('@vueuse/core')['pausableWatch'] + const provide: typeof import('vue')['provide'] + const provideLocal: typeof import('@vueuse/core')['provideLocal'] + const reactify: typeof import('@vueuse/core')['reactify'] + const reactifyObject: typeof import('@vueuse/core')['reactifyObject'] + const reactive: typeof import('vue')['reactive'] + const reactiveComputed: typeof import('@vueuse/core')['reactiveComputed'] + const reactiveOmit: typeof import('@vueuse/core')['reactiveOmit'] + const reactivePick: typeof import('@vueuse/core')['reactivePick'] + const readonly: typeof import('vue')['readonly'] + const ref: typeof import('vue')['ref'] + const refAutoReset: typeof import('@vueuse/core')['refAutoReset'] + const refDebounced: typeof import('@vueuse/core')['refDebounced'] + const refDefault: typeof import('@vueuse/core')['refDefault'] + const refThrottled: typeof import('@vueuse/core')['refThrottled'] + const refWithControl: typeof import('@vueuse/core')['refWithControl'] + const resolveComponent: typeof import('vue')['resolveComponent'] + const resolveRef: typeof import('@vueuse/core')['resolveRef'] + const resolveUnref: typeof import('@vueuse/core')['resolveUnref'] + const setupStore: typeof import('../src/store/index')['setupStore'] + const shallowReactive: typeof import('vue')['shallowReactive'] + const shallowReadonly: typeof import('vue')['shallowReadonly'] + const shallowRef: typeof import('vue')['shallowRef'] + const store: typeof import('../src/store/index')['store'] + const syncRef: typeof import('@vueuse/core')['syncRef'] + const syncRefs: typeof import('@vueuse/core')['syncRefs'] + const templateRef: typeof import('@vueuse/core')['templateRef'] + const throttledRef: typeof import('@vueuse/core')['throttledRef'] + const throttledWatch: typeof import('@vueuse/core')['throttledWatch'] + const toRaw: typeof import('vue')['toRaw'] + const toReactive: typeof import('@vueuse/core')['toReactive'] + const toRef: typeof import('vue')['toRef'] + const toRefs: typeof import('vue')['toRefs'] + const toValue: typeof import('vue')['toValue'] + const toggleDark: typeof import('../src/composables/dark')['toggleDark'] + const triggerRef: typeof import('vue')['triggerRef'] + const tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount'] + const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount'] + const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted'] + const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose'] + const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted'] + const unref: typeof import('vue')['unref'] + const unrefElement: typeof import('@vueuse/core')['unrefElement'] + const until: typeof import('@vueuse/core')['until'] + const useActiveElement: typeof import('@vueuse/core')['useActiveElement'] + const useAnimate: typeof import('@vueuse/core')['useAnimate'] + const useAppPermission: typeof import('../src/composables/setting/usePermissionSetting')['useAppPermission'] + const useAppSetting: typeof import('../src/composables/setting/useAppSetting')['useAppSetting'] + const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference'] + const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery'] + const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter'] + const useArrayFind: typeof import('@vueuse/core')['useArrayFind'] + const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex'] + const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast'] + const useArrayIncludes: typeof import('@vueuse/core')['useArrayIncludes'] + const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin'] + const useArrayMap: typeof import('@vueuse/core')['useArrayMap'] + const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce'] + const useArraySome: typeof import('@vueuse/core')['useArraySome'] + const useArrayUnique: typeof import('@vueuse/core')['useArrayUnique'] + const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue'] + const useAsyncState: typeof import('@vueuse/core')['useAsyncState'] + const useAttrs: typeof import('vue')['useAttrs'] + const useBase64: typeof import('@vueuse/core')['useBase64'] + const useBattery: typeof import('@vueuse/core')['useBattery'] + const useBluetooth: typeof import('@vueuse/core')['useBluetooth'] + const useBreakpoints: typeof import('@vueuse/core')['useBreakpoints'] + const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel'] + const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation'] + const useCached: typeof import('@vueuse/core')['useCached'] + const useChartOption: typeof import('../src/composables/useChartOption')['useChartOption'] + const useClipboard: typeof import('@vueuse/core')['useClipboard'] + const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems'] + const useCloned: typeof import('@vueuse/core')['useCloned'] + const useColorMode: typeof import('@vueuse/core')['useColorMode'] + const useComponentRef: typeof import('@celeris/hooks')['useComponentRef'] + const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog'] + const useCounter: typeof import('@vueuse/core')['useCounter'] + const useCssModule: typeof import('vue')['useCssModule'] + const useCssVar: typeof import('@vueuse/core')['useCssVar'] + const useCssVars: typeof import('vue')['useCssVars'] + const useCurrentElement: typeof import('@vueuse/core')['useCurrentElement'] + const useCycleList: typeof import('@vueuse/core')['useCycleList'] + const useDark: typeof import('@vueuse/core')['useDark'] + const useDateFormat: typeof import('@vueuse/core')['useDateFormat'] + const useDebounce: typeof import('@vueuse/core')['useDebounce'] + const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn'] + const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory'] + const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion'] + const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation'] + const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio'] + const useDevicesList: typeof import('@vueuse/core')['useDevicesList'] + const useDialog: typeof import('@celeris/ca-components')['useDialog'] + const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia'] + const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility'] + const useDraggable: typeof import('@vueuse/core')['useDraggable'] + const useDropZone: typeof import('@vueuse/core')['useDropZone'] + const useElementBounding: typeof import('@vueuse/core')['useElementBounding'] + const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint'] + const useElementHover: typeof import('@vueuse/core')['useElementHover'] + const useElementSize: typeof import('@vueuse/core')['useElementSize'] + const useElementVisibility: typeof import('@vueuse/core')['useElementVisibility'] + const useEventBus: typeof import('@vueuse/core')['useEventBus'] + const useEventListener: typeof import('@vueuse/core')['useEventListener'] + const useEventSource: typeof import('@vueuse/core')['useEventSource'] + const useEyeDropper: typeof import('@vueuse/core')['useEyeDropper'] + const useFavicon: typeof import('@vueuse/core')['useFavicon'] + const useFetch: typeof import('@vueuse/core')['useFetch'] + const useFileDialog: typeof import('@vueuse/core')['useFileDialog'] + const useFileSystemAccess: typeof import('@vueuse/core')['useFileSystemAccess'] + const useFocus: typeof import('@vueuse/core')['useFocus'] + const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin'] + const useFps: typeof import('@vueuse/core')['useFps'] + const useFullscreen: typeof import('@vueuse/core')['useFullscreen'] + const useGamepad: typeof import('@vueuse/core')['useGamepad'] + const useGeolocation: typeof import('@vueuse/core')['useGeolocation'] + const useGlobSetting: typeof import('../src/composables/setting/useGlobSetting')['useGlobSetting'] + const useHeaderSetting: typeof import('../src/composables/setting/useHeaderSetting')['useHeaderSetting'] + const useI18n: typeof import('vue-i18n')['useI18n'] + const useIdle: typeof import('@vueuse/core')['useIdle'] + const useImage: typeof import('@vueuse/core')['useImage'] + const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll'] + const useIntersectionObserver: typeof import('@vueuse/core')['useIntersectionObserver'] + const useInterval: typeof import('@vueuse/core')['useInterval'] + const useIntervalFn: typeof import('@vueuse/core')['useIntervalFn'] + const useKeyModifier: typeof import('@vueuse/core')['useKeyModifier'] + const useLastChanged: typeof import('@vueuse/core')['useLastChanged'] + const useLink: typeof import('vue-router')['useLink'] + const useLoading: typeof import('@celeris/hooks')['useLoading'] + const useLoadingBar: typeof import('@celeris/ca-components')['useLoadingBar'] + const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage'] + const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys'] + const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory'] + const useMediaControls: typeof import('@vueuse/core')['useMediaControls'] + const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery'] + const useMemoize: typeof import('@vueuse/core')['useMemoize'] + const useMemory: typeof import('@vueuse/core')['useMemory'] + const useMenuSetting: typeof import('../src/composables/setting/useMenuSetting')['useMenuSetting'] + const useMergeState: typeof import('@celeris/hooks')['useMergeState'] + const useMessage: typeof import('@celeris/ca-components')['useMessage'] + const useMounted: typeof import('@vueuse/core')['useMounted'] + const useMouse: typeof import('@vueuse/core')['useMouse'] + const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement'] + const useMousePressed: typeof import('@vueuse/core')['useMousePressed'] + const useMutationObserver: typeof import('@vueuse/core')['useMutationObserver'] + const useNaiveUIConfigProvider: typeof import('../src/composables/useNaiveUIConfigProvider')['useNaiveUIConfigProvider'] + const useNavigatorLanguage: typeof import('@vueuse/core')['useNavigatorLanguage'] + const useNetwork: typeof import('@vueuse/core')['useNetwork'] + const useNotification: typeof import('@celeris/ca-components')['useNotification'] + const useNow: typeof import('@vueuse/core')['useNow'] + const useObjectUrl: typeof import('@vueuse/core')['useObjectUrl'] + const useOffsetPagination: typeof import('@vueuse/core')['useOffsetPagination'] + const useOnline: typeof import('@vueuse/core')['useOnline'] + const usePageLeave: typeof import('@vueuse/core')['usePageLeave'] + const useParallax: typeof import('@vueuse/core')['useParallax'] + const useParentElement: typeof import('@vueuse/core')['useParentElement'] + const usePerformanceObserver: typeof import('@vueuse/core')['usePerformanceObserver'] + const usePermission: typeof import('@vueuse/core')['usePermission'] + const usePointer: typeof import('@vueuse/core')['usePointer'] + const usePointerLock: typeof import('@vueuse/core')['usePointerLock'] + const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe'] + const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme'] + const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast'] + const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark'] + const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages'] + const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion'] + const usePrevious: typeof import('@vueuse/core')['usePrevious'] + const useRafFn: typeof import('@vueuse/core')['useRafFn'] + const useRefHistory: typeof import('@vueuse/core')['useRefHistory'] + const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver'] + const useRoute: typeof import('vue-router')['useRoute'] + const useRouter: typeof import('vue-router')['useRouter'] + const useScreen: typeof import('@celeris/hooks')['useScreen'] + const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation'] + const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea'] + const useScriptTag: typeof import('@vueuse/core')['useScriptTag'] + const useScroll: typeof import('@vueuse/core')['useScroll'] + const useScrollLock: typeof import('@vueuse/core')['useScrollLock'] + const useSearchDialog: typeof import('../src/composables/useSearchDialog')['useSearchDialog'] + const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage'] + const useShare: typeof import('@vueuse/core')['useShare'] + const useSlots: typeof import('vue')['useSlots'] + const useSorted: typeof import('@vueuse/core')['useSorted'] + const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition'] + const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis'] + const useState: typeof import('@celeris/hooks')['useState'] + const useStepper: typeof import('@vueuse/core')['useStepper'] + const useStorage: typeof import('@vueuse/core')['useStorage'] + const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync'] + const useStyleTag: typeof import('@vueuse/core')['useStyleTag'] + const useSupported: typeof import('@vueuse/core')['useSupported'] + const useSwipe: typeof import('@vueuse/core')['useSwipe'] + const useTabs: typeof import('../src/composables/useTabs')['useTabs'] + const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList'] + const useTextDirection: typeof import('@vueuse/core')['useTextDirection'] + const useTextSelection: typeof import('@vueuse/core')['useTextSelection'] + const useTextareaAutosize: typeof import('@vueuse/core')['useTextareaAutosize'] + const useThemeSetting: typeof import('../src/composables/setting/useThemeSetting')['useThemeSetting'] + const useThrottle: typeof import('@vueuse/core')['useThrottle'] + const useThrottleFn: typeof import('@vueuse/core')['useThrottleFn'] + const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory'] + const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo'] + const useTimeout: typeof import('@vueuse/core')['useTimeout'] + const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn'] + const useTimeoutPoll: typeof import('@vueuse/core')['useTimeoutPoll'] + const useTimestamp: typeof import('@vueuse/core')['useTimestamp'] + const useTitle: typeof import('@vueuse/core')['useTitle'] + const useToNumber: typeof import('@vueuse/core')['useToNumber'] + const useToString: typeof import('@vueuse/core')['useToString'] + const useToggle: typeof import('@vueuse/core')['useToggle'] + const useTransition: typeof import('@vueuse/core')['useTransition'] + const useTransitionSetting: typeof import('../src/composables/setting/useTransitionSetting')['useTransitionSetting'] + const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams'] + const useUserMedia: typeof import('@vueuse/core')['useUserMedia'] + const useVModel: typeof import('@vueuse/core')['useVModel'] + const useVModels: typeof import('@vueuse/core')['useVModels'] + const useVibrate: typeof import('@vueuse/core')['useVibrate'] + const useVirtualList: typeof import('@vueuse/core')['useVirtualList'] + const useWakeLock: typeof import('@vueuse/core')['useWakeLock'] + const useWebNotification: typeof import('@vueuse/core')['useWebNotification'] + const useWebSocket: typeof import('@vueuse/core')['useWebSocket'] + const useWebWorker: typeof import('@vueuse/core')['useWebWorker'] + const useWebWorkerFn: typeof import('@vueuse/core')['useWebWorkerFn'] + const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus'] + const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll'] + const useWindowSize: typeof import('@vueuse/core')['useWindowSize'] + const watch: typeof import('vue')['watch'] + const watchArray: typeof import('@vueuse/core')['watchArray'] + const watchAtMost: typeof import('@vueuse/core')['watchAtMost'] + const watchDebounced: typeof import('@vueuse/core')['watchDebounced'] + const watchDeep: typeof import('@vueuse/core')['watchDeep'] + const watchEffect: typeof import('vue')['watchEffect'] + const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable'] + const watchImmediate: typeof import('@vueuse/core')['watchImmediate'] + const watchOnce: typeof import('@vueuse/core')['watchOnce'] + const watchPausable: typeof import('@vueuse/core')['watchPausable'] + const watchPostEffect: typeof import('vue')['watchPostEffect'] + const watchSyncEffect: typeof import('vue')['watchSyncEffect'] + const watchThrottled: typeof import('@vueuse/core')['watchThrottled'] + const watchTriggerable: typeof import('@vueuse/core')['watchTriggerable'] + const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter'] + const whenever: typeof import('@vueuse/core')['whenever'] +} +// for type re-export +declare global { + // @ts-ignore + export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' + import('vue') +} +// for vue template auto import +import { UnwrapRef } from 'vue' +declare module 'vue' { + interface GlobalComponents {} + interface ComponentCustomProperties { + readonly EffectScope: UnwrapRef + readonly asyncComputed: UnwrapRef + readonly autoResetRef: UnwrapRef + readonly computed: UnwrapRef + readonly computedAsync: UnwrapRef + readonly computedEager: UnwrapRef + readonly computedInject: UnwrapRef + readonly computedWithControl: UnwrapRef + readonly controlledComputed: UnwrapRef + readonly controlledRef: UnwrapRef + readonly createApp: UnwrapRef + readonly createEventHook: UnwrapRef + readonly createGlobalState: UnwrapRef + readonly createInjectionState: UnwrapRef + readonly createReactiveFn: UnwrapRef + readonly createReusableTemplate: UnwrapRef + readonly createSharedComposable: UnwrapRef + readonly createTemplatePromise: UnwrapRef + readonly createUnrefFn: UnwrapRef + readonly customRef: UnwrapRef + readonly debouncedRef: UnwrapRef + readonly debouncedWatch: UnwrapRef + readonly defineAsyncComponent: UnwrapRef + readonly defineComponent: UnwrapRef + readonly eagerComputed: UnwrapRef + readonly effectScope: UnwrapRef + readonly extendRef: UnwrapRef + readonly getCurrentInstance: UnwrapRef + readonly getCurrentScope: UnwrapRef + readonly h: UnwrapRef + readonly ignorableWatch: UnwrapRef + readonly inject: UnwrapRef + readonly injectLocal: UnwrapRef + readonly isDefined: UnwrapRef + readonly isProxy: UnwrapRef + readonly isReactive: UnwrapRef + readonly isReadonly: UnwrapRef + readonly isRef: UnwrapRef + readonly makeDestructurable: UnwrapRef + readonly markRaw: UnwrapRef + readonly nextTick: UnwrapRef + readonly onActivated: UnwrapRef + readonly onBeforeMount: UnwrapRef + readonly onBeforeRouteLeave: UnwrapRef + readonly onBeforeRouteUpdate: UnwrapRef + readonly onBeforeUnmount: UnwrapRef + readonly onBeforeUpdate: UnwrapRef + readonly onClickOutside: UnwrapRef + readonly onDeactivated: UnwrapRef + readonly onErrorCaptured: UnwrapRef + readonly onKeyStroke: UnwrapRef + readonly onLongPress: UnwrapRef + readonly onMounted: UnwrapRef + readonly onRenderTracked: UnwrapRef + readonly onRenderTriggered: UnwrapRef + readonly onScopeDispose: UnwrapRef + readonly onServerPrefetch: UnwrapRef + readonly onStartTyping: UnwrapRef + readonly onUnmounted: UnwrapRef + readonly onUpdated: UnwrapRef + readonly pausableWatch: UnwrapRef + readonly provide: UnwrapRef + readonly provideLocal: UnwrapRef + readonly reactify: UnwrapRef + readonly reactifyObject: UnwrapRef + readonly reactive: UnwrapRef + readonly reactiveComputed: UnwrapRef + readonly reactiveOmit: UnwrapRef + readonly reactivePick: UnwrapRef + readonly readonly: UnwrapRef + readonly ref: UnwrapRef + readonly refAutoReset: UnwrapRef + readonly refDebounced: UnwrapRef + readonly refDefault: UnwrapRef + readonly refThrottled: UnwrapRef + readonly refWithControl: UnwrapRef + readonly resolveComponent: UnwrapRef + readonly resolveRef: UnwrapRef + readonly resolveUnref: UnwrapRef + readonly setupStore: UnwrapRef + readonly shallowReactive: UnwrapRef + readonly shallowReadonly: UnwrapRef + readonly shallowRef: UnwrapRef + readonly store: UnwrapRef + readonly syncRef: UnwrapRef + readonly syncRefs: UnwrapRef + readonly templateRef: UnwrapRef + readonly throttledRef: UnwrapRef + readonly throttledWatch: UnwrapRef + readonly toRaw: UnwrapRef + readonly toReactive: UnwrapRef + readonly toRef: UnwrapRef + readonly toRefs: UnwrapRef + readonly toValue: UnwrapRef + readonly triggerRef: UnwrapRef + readonly tryOnBeforeMount: UnwrapRef + readonly tryOnBeforeUnmount: UnwrapRef + readonly tryOnMounted: UnwrapRef + readonly tryOnScopeDispose: UnwrapRef + readonly tryOnUnmounted: UnwrapRef + readonly unref: UnwrapRef + readonly unrefElement: UnwrapRef + readonly until: UnwrapRef + readonly useActiveElement: UnwrapRef + readonly useAnimate: UnwrapRef + readonly useAppPermission: UnwrapRef + readonly useAppSetting: UnwrapRef + readonly useArrayDifference: UnwrapRef + readonly useArrayEvery: UnwrapRef + readonly useArrayFilter: UnwrapRef + readonly useArrayFind: UnwrapRef + readonly useArrayFindIndex: UnwrapRef + readonly useArrayFindLast: UnwrapRef + readonly useArrayIncludes: UnwrapRef + readonly useArrayJoin: UnwrapRef + readonly useArrayMap: UnwrapRef + readonly useArrayReduce: UnwrapRef + readonly useArraySome: UnwrapRef + readonly useArrayUnique: UnwrapRef + readonly useAsyncQueue: UnwrapRef + readonly useAsyncState: UnwrapRef + readonly useAttrs: UnwrapRef + readonly useBase64: UnwrapRef + readonly useBattery: UnwrapRef + readonly useBluetooth: UnwrapRef + readonly useBreakpoints: UnwrapRef + readonly useBroadcastChannel: UnwrapRef + readonly useBrowserLocation: UnwrapRef + readonly useCached: UnwrapRef + readonly useChartOption: UnwrapRef + readonly useClipboard: UnwrapRef + readonly useClipboardItems: UnwrapRef + readonly useCloned: UnwrapRef + readonly useColorMode: UnwrapRef + readonly useComponentRef: UnwrapRef + readonly useConfirmDialog: UnwrapRef + readonly useCounter: UnwrapRef + readonly useCssModule: UnwrapRef + readonly useCssVar: UnwrapRef + readonly useCssVars: UnwrapRef + readonly useCurrentElement: UnwrapRef + readonly useCycleList: UnwrapRef + readonly useDark: UnwrapRef + readonly useDateFormat: UnwrapRef + readonly useDebounce: UnwrapRef + readonly useDebounceFn: UnwrapRef + readonly useDebouncedRefHistory: UnwrapRef + readonly useDeviceMotion: UnwrapRef + readonly useDeviceOrientation: UnwrapRef + readonly useDevicePixelRatio: UnwrapRef + readonly useDevicesList: UnwrapRef + readonly useDialog: UnwrapRef + readonly useDisplayMedia: UnwrapRef + readonly useDocumentVisibility: UnwrapRef + readonly useDraggable: UnwrapRef + readonly useDropZone: UnwrapRef + readonly useElementBounding: UnwrapRef + readonly useElementByPoint: UnwrapRef + readonly useElementHover: UnwrapRef + readonly useElementSize: UnwrapRef + readonly useElementVisibility: UnwrapRef + readonly useEventBus: UnwrapRef + readonly useEventListener: UnwrapRef + readonly useEventSource: UnwrapRef + readonly useEyeDropper: UnwrapRef + readonly useFavicon: UnwrapRef + readonly useFetch: UnwrapRef + readonly useFileDialog: UnwrapRef + readonly useFileSystemAccess: UnwrapRef + readonly useFocus: UnwrapRef + readonly useFocusWithin: UnwrapRef + readonly useFps: UnwrapRef + readonly useFullscreen: UnwrapRef + readonly useGamepad: UnwrapRef + readonly useGeolocation: UnwrapRef + readonly useGlobSetting: UnwrapRef + readonly useHeaderSetting: UnwrapRef + readonly useI18n: UnwrapRef + readonly useIdle: UnwrapRef + readonly useImage: UnwrapRef + readonly useInfiniteScroll: UnwrapRef + readonly useIntersectionObserver: UnwrapRef + readonly useInterval: UnwrapRef + readonly useIntervalFn: UnwrapRef + readonly useKeyModifier: UnwrapRef + readonly useLastChanged: UnwrapRef + readonly useLink: UnwrapRef + readonly useLoading: UnwrapRef + readonly useLoadingBar: UnwrapRef + readonly useLocalStorage: UnwrapRef + readonly useMagicKeys: UnwrapRef + readonly useManualRefHistory: UnwrapRef + readonly useMediaControls: UnwrapRef + readonly useMediaQuery: UnwrapRef + readonly useMemoize: UnwrapRef + readonly useMemory: UnwrapRef + readonly useMenuSetting: UnwrapRef + readonly useMergeState: UnwrapRef + readonly useMessage: UnwrapRef + readonly useMounted: UnwrapRef + readonly useMouse: UnwrapRef + readonly useMouseInElement: UnwrapRef + readonly useMousePressed: UnwrapRef + readonly useMutationObserver: UnwrapRef + readonly useNaiveUIConfigProvider: UnwrapRef + readonly useNavigatorLanguage: UnwrapRef + readonly useNetwork: UnwrapRef + readonly useNotification: UnwrapRef + readonly useNow: UnwrapRef + readonly useObjectUrl: UnwrapRef + readonly useOffsetPagination: UnwrapRef + readonly useOnline: UnwrapRef + readonly usePageLeave: UnwrapRef + readonly useParallax: UnwrapRef + readonly useParentElement: UnwrapRef + readonly usePerformanceObserver: UnwrapRef + readonly usePermission: UnwrapRef + readonly usePointer: UnwrapRef + readonly usePointerLock: UnwrapRef + readonly usePointerSwipe: UnwrapRef + readonly usePreferredColorScheme: UnwrapRef + readonly usePreferredContrast: UnwrapRef + readonly usePreferredDark: UnwrapRef + readonly usePreferredLanguages: UnwrapRef + readonly usePreferredReducedMotion: UnwrapRef + readonly usePrevious: UnwrapRef + readonly useRafFn: UnwrapRef + readonly useRefHistory: UnwrapRef + readonly useResizeObserver: UnwrapRef + readonly useRoute: UnwrapRef + readonly useRouter: UnwrapRef + readonly useScreen: UnwrapRef + readonly useScreenOrientation: UnwrapRef + readonly useScreenSafeArea: UnwrapRef + readonly useScriptTag: UnwrapRef + readonly useScroll: UnwrapRef + readonly useScrollLock: UnwrapRef + readonly useSearchDialog: UnwrapRef + readonly useSessionStorage: UnwrapRef + readonly useShare: UnwrapRef + readonly useSlots: UnwrapRef + readonly useSorted: UnwrapRef + readonly useSpeechRecognition: UnwrapRef + readonly useSpeechSynthesis: UnwrapRef + readonly useState: UnwrapRef + readonly useStepper: UnwrapRef + readonly useStorage: UnwrapRef + readonly useStorageAsync: UnwrapRef + readonly useStyleTag: UnwrapRef + readonly useSupported: UnwrapRef + readonly useSwipe: UnwrapRef + readonly useTemplateRefsList: UnwrapRef + readonly useTextDirection: UnwrapRef + readonly useTextSelection: UnwrapRef + readonly useTextareaAutosize: UnwrapRef + readonly useThemeSetting: UnwrapRef + readonly useThrottle: UnwrapRef + readonly useThrottleFn: UnwrapRef + readonly useThrottledRefHistory: UnwrapRef + readonly useTimeAgo: UnwrapRef + readonly useTimeout: UnwrapRef + readonly useTimeoutFn: UnwrapRef + readonly useTimeoutPoll: UnwrapRef + readonly useTimestamp: UnwrapRef + readonly useTitle: UnwrapRef + readonly useToNumber: UnwrapRef + readonly useToString: UnwrapRef + readonly useToggle: UnwrapRef + readonly useTransition: UnwrapRef + readonly useTransitionSetting: UnwrapRef + readonly useUrlSearchParams: UnwrapRef + readonly useUserMedia: UnwrapRef + readonly useVModel: UnwrapRef + readonly useVModels: UnwrapRef + readonly useVibrate: UnwrapRef + readonly useVirtualList: UnwrapRef + readonly useWakeLock: UnwrapRef + readonly useWebNotification: UnwrapRef + readonly useWebSocket: UnwrapRef + readonly useWebWorker: UnwrapRef + readonly useWebWorkerFn: UnwrapRef + readonly useWindowFocus: UnwrapRef + readonly useWindowScroll: UnwrapRef + readonly useWindowSize: UnwrapRef + readonly watch: UnwrapRef + readonly watchArray: UnwrapRef + readonly watchAtMost: UnwrapRef + readonly watchDebounced: UnwrapRef + readonly watchDeep: UnwrapRef + readonly watchEffect: UnwrapRef + readonly watchIgnorable: UnwrapRef + readonly watchImmediate: UnwrapRef + readonly watchOnce: UnwrapRef + readonly watchPausable: UnwrapRef + readonly watchPostEffect: UnwrapRef + readonly watchSyncEffect: UnwrapRef + readonly watchThrottled: UnwrapRef + readonly watchTriggerable: UnwrapRef + readonly watchWithFilter: UnwrapRef + readonly whenever: UnwrapRef + } +} +declare module '@vue/runtime-core' { + interface GlobalComponents {} + interface ComponentCustomProperties { + readonly EffectScope: UnwrapRef + readonly asyncComputed: UnwrapRef + readonly autoResetRef: UnwrapRef + readonly computed: UnwrapRef + readonly computedAsync: UnwrapRef + readonly computedEager: UnwrapRef + readonly computedInject: UnwrapRef + readonly computedWithControl: UnwrapRef + readonly controlledComputed: UnwrapRef + readonly controlledRef: UnwrapRef + readonly createApp: UnwrapRef + readonly createEventHook: UnwrapRef + readonly createGlobalState: UnwrapRef + readonly createInjectionState: UnwrapRef + readonly createReactiveFn: UnwrapRef + readonly createReusableTemplate: UnwrapRef + readonly createSharedComposable: UnwrapRef + readonly createTemplatePromise: UnwrapRef + readonly createUnrefFn: UnwrapRef + readonly customRef: UnwrapRef + readonly debouncedRef: UnwrapRef + readonly debouncedWatch: UnwrapRef + readonly defineAsyncComponent: UnwrapRef + readonly defineComponent: UnwrapRef + readonly eagerComputed: UnwrapRef + readonly effectScope: UnwrapRef + readonly extendRef: UnwrapRef + readonly getCurrentInstance: UnwrapRef + readonly getCurrentScope: UnwrapRef + readonly h: UnwrapRef + readonly ignorableWatch: UnwrapRef + readonly inject: UnwrapRef + readonly injectLocal: UnwrapRef + readonly isDefined: UnwrapRef + readonly isProxy: UnwrapRef + readonly isReactive: UnwrapRef + readonly isReadonly: UnwrapRef + readonly isRef: UnwrapRef + readonly makeDestructurable: UnwrapRef + readonly markRaw: UnwrapRef + readonly nextTick: UnwrapRef + readonly onActivated: UnwrapRef + readonly onBeforeMount: UnwrapRef + readonly onBeforeRouteLeave: UnwrapRef + readonly onBeforeRouteUpdate: UnwrapRef + readonly onBeforeUnmount: UnwrapRef + readonly onBeforeUpdate: UnwrapRef + readonly onClickOutside: UnwrapRef + readonly onDeactivated: UnwrapRef + readonly onErrorCaptured: UnwrapRef + readonly onKeyStroke: UnwrapRef + readonly onLongPress: UnwrapRef + readonly onMounted: UnwrapRef + readonly onRenderTracked: UnwrapRef + readonly onRenderTriggered: UnwrapRef + readonly onScopeDispose: UnwrapRef + readonly onServerPrefetch: UnwrapRef + readonly onStartTyping: UnwrapRef + readonly onUnmounted: UnwrapRef + readonly onUpdated: UnwrapRef + readonly pausableWatch: UnwrapRef + readonly provide: UnwrapRef + readonly provideLocal: UnwrapRef + readonly reactify: UnwrapRef + readonly reactifyObject: UnwrapRef + readonly reactive: UnwrapRef + readonly reactiveComputed: UnwrapRef + readonly reactiveOmit: UnwrapRef + readonly reactivePick: UnwrapRef + readonly readonly: UnwrapRef + readonly ref: UnwrapRef + readonly refAutoReset: UnwrapRef + readonly refDebounced: UnwrapRef + readonly refDefault: UnwrapRef + readonly refThrottled: UnwrapRef + readonly refWithControl: UnwrapRef + readonly resolveComponent: UnwrapRef + readonly resolveRef: UnwrapRef + readonly resolveUnref: UnwrapRef + readonly setupStore: UnwrapRef + readonly shallowReactive: UnwrapRef + readonly shallowReadonly: UnwrapRef + readonly shallowRef: UnwrapRef + readonly store: UnwrapRef + readonly syncRef: UnwrapRef + readonly syncRefs: UnwrapRef + readonly templateRef: UnwrapRef + readonly throttledRef: UnwrapRef + readonly throttledWatch: UnwrapRef + readonly toRaw: UnwrapRef + readonly toReactive: UnwrapRef + readonly toRef: UnwrapRef + readonly toRefs: UnwrapRef + readonly toValue: UnwrapRef + readonly triggerRef: UnwrapRef + readonly tryOnBeforeMount: UnwrapRef + readonly tryOnBeforeUnmount: UnwrapRef + readonly tryOnMounted: UnwrapRef + readonly tryOnScopeDispose: UnwrapRef + readonly tryOnUnmounted: UnwrapRef + readonly unref: UnwrapRef + readonly unrefElement: UnwrapRef + readonly until: UnwrapRef + readonly useActiveElement: UnwrapRef + readonly useAnimate: UnwrapRef + readonly useAppPermission: UnwrapRef + readonly useAppSetting: UnwrapRef + readonly useArrayDifference: UnwrapRef + readonly useArrayEvery: UnwrapRef + readonly useArrayFilter: UnwrapRef + readonly useArrayFind: UnwrapRef + readonly useArrayFindIndex: UnwrapRef + readonly useArrayFindLast: UnwrapRef + readonly useArrayIncludes: UnwrapRef + readonly useArrayJoin: UnwrapRef + readonly useArrayMap: UnwrapRef + readonly useArrayReduce: UnwrapRef + readonly useArraySome: UnwrapRef + readonly useArrayUnique: UnwrapRef + readonly useAsyncQueue: UnwrapRef + readonly useAsyncState: UnwrapRef + readonly useAttrs: UnwrapRef + readonly useBase64: UnwrapRef + readonly useBattery: UnwrapRef + readonly useBluetooth: UnwrapRef + readonly useBreakpoints: UnwrapRef + readonly useBroadcastChannel: UnwrapRef + readonly useBrowserLocation: UnwrapRef + readonly useCached: UnwrapRef + readonly useChartOption: UnwrapRef + readonly useClipboard: UnwrapRef + readonly useClipboardItems: UnwrapRef + readonly useCloned: UnwrapRef + readonly useColorMode: UnwrapRef + readonly useComponentRef: UnwrapRef + readonly useConfirmDialog: UnwrapRef + readonly useCounter: UnwrapRef + readonly useCssModule: UnwrapRef + readonly useCssVar: UnwrapRef + readonly useCssVars: UnwrapRef + readonly useCurrentElement: UnwrapRef + readonly useCycleList: UnwrapRef + readonly useDark: UnwrapRef + readonly useDateFormat: UnwrapRef + readonly useDebounce: UnwrapRef + readonly useDebounceFn: UnwrapRef + readonly useDebouncedRefHistory: UnwrapRef + readonly useDeviceMotion: UnwrapRef + readonly useDeviceOrientation: UnwrapRef + readonly useDevicePixelRatio: UnwrapRef + readonly useDevicesList: UnwrapRef + readonly useDialog: UnwrapRef + readonly useDisplayMedia: UnwrapRef + readonly useDocumentVisibility: UnwrapRef + readonly useDraggable: UnwrapRef + readonly useDropZone: UnwrapRef + readonly useElementBounding: UnwrapRef + readonly useElementByPoint: UnwrapRef + readonly useElementHover: UnwrapRef + readonly useElementSize: UnwrapRef + readonly useElementVisibility: UnwrapRef + readonly useEventBus: UnwrapRef + readonly useEventListener: UnwrapRef + readonly useEventSource: UnwrapRef + readonly useEyeDropper: UnwrapRef + readonly useFavicon: UnwrapRef + readonly useFetch: UnwrapRef + readonly useFileDialog: UnwrapRef + readonly useFileSystemAccess: UnwrapRef + readonly useFocus: UnwrapRef + readonly useFocusWithin: UnwrapRef + readonly useFps: UnwrapRef + readonly useFullscreen: UnwrapRef + readonly useGamepad: UnwrapRef + readonly useGeolocation: UnwrapRef + readonly useGlobSetting: UnwrapRef + readonly useHeaderSetting: UnwrapRef + readonly useI18n: UnwrapRef + readonly useIdle: UnwrapRef + readonly useImage: UnwrapRef + readonly useInfiniteScroll: UnwrapRef + readonly useIntersectionObserver: UnwrapRef + readonly useInterval: UnwrapRef + readonly useIntervalFn: UnwrapRef + readonly useKeyModifier: UnwrapRef + readonly useLastChanged: UnwrapRef + readonly useLink: UnwrapRef + readonly useLoading: UnwrapRef + readonly useLoadingBar: UnwrapRef + readonly useLocalStorage: UnwrapRef + readonly useMagicKeys: UnwrapRef + readonly useManualRefHistory: UnwrapRef + readonly useMediaControls: UnwrapRef + readonly useMediaQuery: UnwrapRef + readonly useMemoize: UnwrapRef + readonly useMemory: UnwrapRef + readonly useMenuSetting: UnwrapRef + readonly useMergeState: UnwrapRef + readonly useMessage: UnwrapRef + readonly useMounted: UnwrapRef + readonly useMouse: UnwrapRef + readonly useMouseInElement: UnwrapRef + readonly useMousePressed: UnwrapRef + readonly useMutationObserver: UnwrapRef + readonly useNaiveUIConfigProvider: UnwrapRef + readonly useNavigatorLanguage: UnwrapRef + readonly useNetwork: UnwrapRef + readonly useNotification: UnwrapRef + readonly useNow: UnwrapRef + readonly useObjectUrl: UnwrapRef + readonly useOffsetPagination: UnwrapRef + readonly useOnline: UnwrapRef + readonly usePageLeave: UnwrapRef + readonly useParallax: UnwrapRef + readonly useParentElement: UnwrapRef + readonly usePerformanceObserver: UnwrapRef + readonly usePermission: UnwrapRef + readonly usePointer: UnwrapRef + readonly usePointerLock: UnwrapRef + readonly usePointerSwipe: UnwrapRef + readonly usePreferredColorScheme: UnwrapRef + readonly usePreferredContrast: UnwrapRef + readonly usePreferredDark: UnwrapRef + readonly usePreferredLanguages: UnwrapRef + readonly usePreferredReducedMotion: UnwrapRef + readonly usePrevious: UnwrapRef + readonly useRafFn: UnwrapRef + readonly useRefHistory: UnwrapRef + readonly useResizeObserver: UnwrapRef + readonly useRoute: UnwrapRef + readonly useRouter: UnwrapRef + readonly useScreen: UnwrapRef + readonly useScreenOrientation: UnwrapRef + readonly useScreenSafeArea: UnwrapRef + readonly useScriptTag: UnwrapRef + readonly useScroll: UnwrapRef + readonly useScrollLock: UnwrapRef + readonly useSearchDialog: UnwrapRef + readonly useSessionStorage: UnwrapRef + readonly useShare: UnwrapRef + readonly useSlots: UnwrapRef + readonly useSorted: UnwrapRef + readonly useSpeechRecognition: UnwrapRef + readonly useSpeechSynthesis: UnwrapRef + readonly useState: UnwrapRef + readonly useStepper: UnwrapRef + readonly useStorage: UnwrapRef + readonly useStorageAsync: UnwrapRef + readonly useStyleTag: UnwrapRef + readonly useSupported: UnwrapRef + readonly useSwipe: UnwrapRef + readonly useTemplateRefsList: UnwrapRef + readonly useTextDirection: UnwrapRef + readonly useTextSelection: UnwrapRef + readonly useTextareaAutosize: UnwrapRef + readonly useThemeSetting: UnwrapRef + readonly useThrottle: UnwrapRef + readonly useThrottleFn: UnwrapRef + readonly useThrottledRefHistory: UnwrapRef + readonly useTimeAgo: UnwrapRef + readonly useTimeout: UnwrapRef + readonly useTimeoutFn: UnwrapRef + readonly useTimeoutPoll: UnwrapRef + readonly useTimestamp: UnwrapRef + readonly useTitle: UnwrapRef + readonly useToNumber: UnwrapRef + readonly useToString: UnwrapRef + readonly useToggle: UnwrapRef + readonly useTransition: UnwrapRef + readonly useTransitionSetting: UnwrapRef + readonly useUrlSearchParams: UnwrapRef + readonly useUserMedia: UnwrapRef + readonly useVModel: UnwrapRef + readonly useVModels: UnwrapRef + readonly useVibrate: UnwrapRef + readonly useVirtualList: UnwrapRef + readonly useWakeLock: UnwrapRef + readonly useWebNotification: UnwrapRef + readonly useWebSocket: UnwrapRef + readonly useWebWorker: UnwrapRef + readonly useWebWorkerFn: UnwrapRef + readonly useWindowFocus: UnwrapRef + readonly useWindowScroll: UnwrapRef + readonly useWindowSize: UnwrapRef + readonly watch: UnwrapRef + readonly watchArray: UnwrapRef + readonly watchAtMost: UnwrapRef + readonly watchDebounced: UnwrapRef + readonly watchDeep: UnwrapRef + readonly watchEffect: UnwrapRef + readonly watchIgnorable: UnwrapRef + readonly watchImmediate: UnwrapRef + readonly watchOnce: UnwrapRef + readonly watchPausable: UnwrapRef + readonly watchPostEffect: UnwrapRef + readonly watchSyncEffect: UnwrapRef + readonly watchThrottled: UnwrapRef + readonly watchTriggerable: UnwrapRef + readonly watchWithFilter: UnwrapRef + readonly whenever: UnwrapRef + } +} diff --git a/apps/thin/autoResolver/components.d.ts b/apps/thin/autoResolver/components.d.ts new file mode 100644 index 00000000..df0a12a2 --- /dev/null +++ b/apps/thin/autoResolver/components.d.ts @@ -0,0 +1,71 @@ +/* eslint-disable */ +// @ts-nocheck +// Generated by unplugin-vue-components +// Read more: https://github.com/vuejs/core/pull/3399 +export {} + +/* prettier-ignore */ +declare module 'vue' { + export interface GlobalComponents { + CAAppLogo: typeof import('@celeris/components')['CAAppLogo'] + CAAppNaiveUIProvider: typeof import('@celeris/components')['CAAppNaiveUIProvider'] + CACharts: typeof import('@celeris/components')['CACharts'] + CAIcon: typeof import('@celeris/components')['CAIcon'] + NAlert: typeof import('@celeris/ca-components')['NAlert'] + NAvatar: typeof import('@celeris/ca-components')['NAvatar'] + NBadge: typeof import('@celeris/ca-components')['NBadge'] + NBreadcrumb: typeof import('@celeris/ca-components')['NBreadcrumb'] + NBreadcrumbItem: typeof import('@celeris/ca-components')['NBreadcrumbItem'] + NButton: typeof import('@celeris/ca-components')['NButton'] + NCard: typeof import('@celeris/ca-components')['NCard'] + NCheckbox: typeof import('@celeris/ca-components')['NCheckbox'] + NCol: typeof import('@celeris/ca-components')['NCol'] + NCollapse: typeof import('@celeris/ca-components')['NCollapse'] + NCollapseItem: typeof import('@celeris/ca-components')['NCollapseItem'] + NColorPicker: typeof import('@celeris/ca-components')['NColorPicker'] + NConfigProvider: typeof import('@celeris/ca-components')['NConfigProvider'] + NDescriptions: typeof import('@celeris/ca-components')['NDescriptions'] + NDescriptionsItem: typeof import('@celeris/ca-components')['NDescriptionsItem'] + NDialogProvider: typeof import('@celeris/ca-components')['NDialogProvider'] + NDivider: typeof import('@celeris/ca-components')['NDivider'] + NDrawer: typeof import('@celeris/ca-components')['NDrawer'] + NDrawerContent: typeof import('@celeris/ca-components')['NDrawerContent'] + NDropdown: typeof import('@celeris/ca-components')['NDropdown'] + NEl: typeof import('@celeris/ca-components')['NEl'] + NEmpty: typeof import('@celeris/ca-components')['NEmpty'] + NForm: typeof import('@celeris/ca-components')['NForm'] + NFormItem: typeof import('@celeris/ca-components')['NFormItem'] + NGlobalStyle: typeof import('@celeris/ca-components')['NGlobalStyle'] + NGrid: typeof import('@celeris/ca-components')['NGrid'] + NGridItem: typeof import('@celeris/ca-components')['NGridItem'] + NInput: typeof import('@celeris/ca-components')['NInput'] + NLayout: typeof import('@celeris/ca-components')['NLayout'] + NLayoutContent: typeof import('@celeris/ca-components')['NLayoutContent'] + NLayoutSider: typeof import('@celeris/ca-components')['NLayoutSider'] + NLoadingBarProvider: typeof import('@celeris/ca-components')['NLoadingBarProvider'] + NMenu: typeof import('@celeris/ca-components')['NMenu'] + NMessageProvider: typeof import('@celeris/ca-components')['NMessageProvider'] + NModal: typeof import('@celeris/ca-components')['NModal'] + NNotificationProvider: typeof import('@celeris/ca-components')['NNotificationProvider'] + NPagination: typeof import('@celeris/ca-components')['NPagination'] + NPopover: typeof import('@celeris/ca-components')['NPopover'] + NResult: typeof import('@celeris/ca-components')['NResult'] + NRow: typeof import('@celeris/ca-components')['NRow'] + NScrollbar: typeof import('@celeris/ca-components')['NScrollbar'] + NSelect: typeof import('@celeris/ca-components')['NSelect'] + NSpace: typeof import('@celeris/ca-components')['NSpace'] + NSpin: typeof import('@celeris/ca-components')['NSpin'] + NSplit: typeof import('@celeris/ca-components')['NSplit'] + NStatistic: typeof import('@celeris/ca-components')['NStatistic'] + NStep: typeof import('@celeris/ca-components')['NStep'] + NSteps: typeof import('@celeris/ca-components')['NSteps'] + NSwitch: typeof import('@celeris/ca-components')['NSwitch'] + NTable: typeof import('@celeris/ca-components')['NTable'] + NText: typeof import('@celeris/ca-components')['NText'] + NTime: typeof import('@celeris/ca-components')['NTime'] + NTooltip: typeof import('@celeris/ca-components')['NTooltip'] + NVirtualList: typeof import('@celeris/ca-components')['NVirtualList'] + RouterLink: typeof import('vue-router')['RouterLink'] + RouterView: typeof import('vue-router')['RouterView'] + } +} diff --git a/apps/thin/index.html b/apps/thin/index.html new file mode 100644 index 00000000..e0083181 --- /dev/null +++ b/apps/thin/index.html @@ -0,0 +1,115 @@ + + + + + + + Celeris Web + + + + +
+ +
+
+
+
+
+
+ + + + diff --git a/apps/thin/package.json b/apps/thin/package.json new file mode 100644 index 00000000..c586313d --- /dev/null +++ b/apps/thin/package.json @@ -0,0 +1,64 @@ +{ + "name": "@celeris/admin-thin", + "type": "module", + "version": "0.0.2", + "packageManager": "pnpm@9.1.0", + "description": "Celeris Web", + "author": "Kirk Lin (https://github.com/kirklin)", + "license": "MIT", + "homepage": "https://github.com/kirklin/celeris-web", + "keywords": [ + "celeris-web-admin", + "celeris-web", + "celeris", + "vite", + "unocss", + "fast", + "boot" + ], + "main": "src/main.ts", + "scripts": { + "dev": "vite", + "build": "pnpm cross-env NODE_ENV=production vite build", + "clean": "pnpm rimraf node_modules && pnpm rimraf dist", + "typecheck": "vue-tsc --noEmit --skipLibCheck", + "preview": "npm run build && vite preview", + "preview:dist": "vite preview" + }, + "dependencies": { + "@celeris/constants": "workspace:*", + "@celeris/directives": "workspace:*", + "@celeris/locale": "workspace:*", + "@celeris/request": "workspace:*", + "@celeris/styles": "workspace:*", + "@celeris/utils": "workspace:*", + "destr": "^2.0.3", + "headless-highlighter": "^0.0.0", + "nprogress": "^0.2.0", + "pinia": "^2.1.7", + "pinia-plugin-persistedstate": "^3.2.1", + "pkg-types": "^1.1.0", + "vue": "^3.4.27", + "vue-i18n": "^9.13.1", + "vue-router": "^4.3.2" + }, + "devDependencies": { + "@celeris/admin-api": "workspace:*", + "@celeris/assets": "workspace:*", + "@celeris/ca-components": "workspace:*", + "@celeris/components": "workspace:*", + "@celeris/hooks": "workspace:*", + "@celeris/types": "workspace:*", + "@celeris/vite": "workspace:*", + "@vitejs/plugin-vue": "^5.0.4", + "@vue/compiler-dom": "^3.4.27", + "@vue/test-utils": "^2.4.6", + "jsdom": "^24.0.0", + "pnpm": "^9.1.0", + "typescript": "^5.4.5", + "unocss": "^0.60.0", + "vite": "^5.2.11", + "vitest": "^1.6.0", + "vue-tsc": "^2.0.16" + } +} diff --git a/apps/thin/public/favicon.ico b/apps/thin/public/favicon.ico new file mode 100644 index 00000000..94ef03ec Binary files /dev/null and b/apps/thin/public/favicon.ico differ diff --git a/apps/thin/src/App.vue b/apps/thin/src/App.vue new file mode 100644 index 00000000..180ea233 --- /dev/null +++ b/apps/thin/src/App.vue @@ -0,0 +1,21 @@ + + + diff --git a/apps/thin/src/AppConfiguration.ts b/apps/thin/src/AppConfiguration.ts new file mode 100644 index 00000000..2ce1f181 --- /dev/null +++ b/apps/thin/src/AppConfiguration.ts @@ -0,0 +1,96 @@ +import { HttpRequestEngine } from "@celeris/request"; +import { LocalesEngine } from "@celeris/locale"; +import { createDiscreteApi } from "@celeris/ca-components"; +import { field, logger } from "@celeris/utils"; +import { useUserStoreWithOut } from "~/store/modules/user"; +import { useAppSetting, useNaiveUIConfigProvider } from "~/composables"; + +function initializeHttpRequest() { + const { configProviderProps } = useNaiveUIConfigProvider(); + + const { message: _message, notification, dialog } = createDiscreteApi( + ["message", "dialog", "notification", "loadingBar"], + { + configProviderProps, + }, + ); + HttpRequestEngine.initRequest(() => ({ + getToken: () => { + const userStore = useUserStoreWithOut(); + return userStore.getToken; + }, + })); + HttpRequestEngine.setTimeoutHandler(() => { + const userStore = useUserStoreWithOut(); + userStore.setToken(undefined); + userStore.logout(true).then(() => {}); + }); + HttpRequestEngine.setUnauthorizedHandler(() => { + const userStore = useUserStoreWithOut(); + userStore.setToken(undefined); + userStore.logout(true).then(() => {}); + }); + HttpRequestEngine.setMessageHandler((message, mode) => { + if (mode === "message") { + _message.info(message); + } else if (mode === "dialog") { + dialog.info({ title: "Information", content: message }); + } else if (mode === "notification") { + notification.info({ title: "Information", content: message }); + } else if (mode === undefined || mode === "none") { + logger.info(`HttpRequestEngine MessageHandler: ${message}`); + } + }); + HttpRequestEngine.setSuccessMessageHandler((message, mode) => { + if (mode === "message") { + _message.success(message); + } else if (mode === "dialog") { + dialog.success({ title: "Success", content: message }); + } else if (mode === "notification") { + notification.success({ title: "Success", content: message }); + } else if (mode === undefined || mode === "none") { + logger.info(`HttpRequestEngine SuccessHandler: ${message}`); + } + }); + HttpRequestEngine.setErrorMessageHandler((message, mode) => { + if (mode === "message") { + _message.error(message); + } else if (mode === "dialog") { + dialog.error({ title: "Error", content: message }); + } else if (mode === "notification") { + notification.error({ title: "Error", content: message }); + } else if (mode === undefined || mode === "none") { + logger.error("HttpRequestEngine ErrorHandler", field("content:", message)); + } + }); +} + +function initializeI18n() { + const { getLocale } = useAppSetting(); + const messages = Object.fromEntries( + Object.entries( + import.meta.glob<{ default: any }>("./locales/*.json", { eager: true }), + ).map(([key, value]) => { + return [key.slice(10, -5), value.default]; + }), + ); + LocalesEngine.initLocales(() => ({ + locale: getLocale.value, + fallbackLocale: "en", + messagesHandler: () => { + return messages; + }, + otherOptions: { + sync: true, + availableLocales: Object.keys(messages), + silentTranslationWarn: true, + missingWarn: false, + silentFallbackWarn: true, + }, + })); +} + +export function initializeConfiguration() { + initializeHttpRequest(); + initializeI18n(); +} diff --git a/apps/thin/src/apis/index.ts b/apps/thin/src/apis/index.ts new file mode 100644 index 00000000..d5cc7845 --- /dev/null +++ b/apps/thin/src/apis/index.ts @@ -0,0 +1,25 @@ +import type { App } from "vue"; +import type { VueQueryPluginOptions } from "@tanstack/vue-query"; +import { VueQueryPlugin } from "@tanstack/vue-query"; +import { persistQueryClient } from "@tanstack/query-persist-client-core"; +import { createSyncStoragePersister } from "@tanstack/query-sync-storage-persister"; + +const vueQueryOptions: VueQueryPluginOptions = { + queryClientConfig: { + defaultOptions: { + queries: { + staleTime: 1000 * 60 * 60 * 24, + }, + }, + }, + clientPersister: (queryClient) => { + return persistQueryClient({ + queryClient, + persister: createSyncStoragePersister({ storage: localStorage }), + }); + }, +}; + +export function setupVueQuery(app: App) { + app.use(VueQueryPlugin, vueQueryOptions); +} diff --git a/apps/thin/src/apis/internal/auth.ts b/apps/thin/src/apis/internal/auth.ts new file mode 100644 index 00000000..145171b6 --- /dev/null +++ b/apps/thin/src/apis/internal/auth.ts @@ -0,0 +1,85 @@ +import type { FakeUserInfo } from "@celeris/admin-api/models/auth/FakeUserInfo"; +import type { MessageMode, UserInfo } from "@celeris/types"; +import { request } from "@celeris/request"; + +// Define the API endpoint URLs as an enum +enum API { + Login = "/auth/login", + Logout = "/auth/logout", + UserInfo = "/user/info", + PermissionCode = "/auth/permission-code", +} + +// Define the parameters for the login API +export interface LoginParams { + username: string; + password: string; +} + +// Define a function to call the login API +export function loginApi( + params: LoginParams, + errorMessageMode: MessageMode = "dialog", +) { + // Make a POST request to the login API endpoint with the given parameters + return request.post>( + { + url: API.Login, + params, + }, + // Set the error message mode for the request + { + errorMessageMode, + }, + ); +} + +// Define a function to call the logout API +export function logoutApi( + errorMessageMode: MessageMode = "dialog", +) { + // Make a GET request to the logout API endpoint + return request.get( + { + url: API.Logout, + }, + // Set the error message mode for the request + { + errorMessageMode, + }, + ); +} + +// Define a function to call the user info API +export function userInfoApi( + errorMessageMode: MessageMode = "none", +) { + // Make a GET request to the user info API endpoint + return request.get( + { + url: API.UserInfo, + }, + // Set the error message mode for the request + { + errorMessageMode, + }, + ); +} + +// Define a function to call the permission code API +export function permissionCodeApi( + errorMessageMode: MessageMode = "dialog", +) { + // Make a GET request to the permission code API endpoint + return request.get( + { + url: API.PermissionCode, + }, + // Set the error message mode for the request + { + errorMessageMode, + }, + ); +} + +export { API }; diff --git a/apps/thin/src/apis/internal/dashboard.ts b/apps/thin/src/apis/internal/dashboard.ts new file mode 100644 index 00000000..9961497a --- /dev/null +++ b/apps/thin/src/apis/internal/dashboard.ts @@ -0,0 +1,26 @@ +import { request } from "@celeris/request"; + +// Define the API endpoint URLs as an enum +enum API { + queryDataOverview = "/dashboard/data-overview", + queryUserAnalysisData = "/dashboard/user-analysis-data", +} + +export interface DataOverviewRes { + xAxis: string[]; + data: Array<{ name: string; value: number[]; count: number }>; +} +export interface UserAnalysisDataRes { + count: number; + growth: number; + chartData: { + xAxis: string[]; + data: { name: string; value: number[] }; + }; +} +export function queryDataOverview() { + return request.post({ url: API.queryDataOverview }); +} +export function queryUserAnalysisData(params: { quota: string }) { + return request.post({ url: API.queryUserAnalysisData, params }); +} diff --git a/apps/thin/src/apis/internal/menu.ts b/apps/thin/src/apis/internal/menu.ts new file mode 100644 index 00000000..43ce2dad --- /dev/null +++ b/apps/thin/src/apis/internal/menu.ts @@ -0,0 +1,26 @@ +import type { RouteItem } from "@celeris/admin-api/models/menu/RouteItem"; +import type { MessageMode } from "@celeris/types"; +import { request } from "@celeris/request"; + +// Define the API endpoint URLs as an enum +enum API { + Menus = "/menu/list", +} + +// Define a function to call the menus API +export function menusApi( + errorMessageMode: MessageMode = "message", +) { + // Make a GET request to the logout API endpoint + return request.get( + { + url: API.Menus, + }, + // Set the error message mode for the request + { + errorMessageMode, + }, + ); +} + +export { API }; diff --git a/apps/thin/src/component/ActionIcon/index.ts b/apps/thin/src/component/ActionIcon/index.ts new file mode 100644 index 00000000..e2da4cbf --- /dev/null +++ b/apps/thin/src/component/ActionIcon/index.ts @@ -0,0 +1,6 @@ +import { withInstall } from "@celeris/utils"; +import actionIcon from "./src/ActionIcon.vue"; +import toolTipper from "./src/ToolTipper.vue"; + +export const ActionIcon = withInstall(actionIcon); +export const ToolTipper = withInstall(toolTipper); diff --git a/apps/thin/src/component/ActionIcon/src/ActionIcon.vue b/apps/thin/src/component/ActionIcon/src/ActionIcon.vue new file mode 100644 index 00000000..9b0a75e6 --- /dev/null +++ b/apps/thin/src/component/ActionIcon/src/ActionIcon.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/apps/thin/src/component/ActionIcon/src/ToolTipper.vue b/apps/thin/src/component/ActionIcon/src/ToolTipper.vue new file mode 100644 index 00000000..f026b6e3 --- /dev/null +++ b/apps/thin/src/component/ActionIcon/src/ToolTipper.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/apps/thin/src/component/Authority/index.ts b/apps/thin/src/component/Authority/index.ts new file mode 100644 index 00000000..b42a2f70 --- /dev/null +++ b/apps/thin/src/component/Authority/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from "@celeris/utils"; +import authority from "./src/Authority.vue"; + +export const Authority = withInstall(authority); diff --git a/apps/thin/src/component/Authority/src/Authority.vue b/apps/thin/src/component/Authority/src/Authority.vue new file mode 100644 index 00000000..95a0c8fb --- /dev/null +++ b/apps/thin/src/component/Authority/src/Authority.vue @@ -0,0 +1,25 @@ + + + diff --git a/apps/thin/src/component/Card/index.ts b/apps/thin/src/component/Card/index.ts new file mode 100644 index 00000000..fb954cc7 --- /dev/null +++ b/apps/thin/src/component/Card/index.ts @@ -0,0 +1,6 @@ +import { withInstall } from "@celeris/utils"; +import dataInsightCard from "./src/DataInsightCard.vue"; +import dataCard from "./src/DataCard.vue"; + +export const DataInsightCard = withInstall(dataInsightCard); +export const DataCard = withInstall(dataCard); diff --git a/apps/thin/src/component/Card/src/DataCard.vue b/apps/thin/src/component/Card/src/DataCard.vue new file mode 100644 index 00000000..30b47f0e --- /dev/null +++ b/apps/thin/src/component/Card/src/DataCard.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/apps/thin/src/component/Card/src/DataInsightCard.vue b/apps/thin/src/component/Card/src/DataInsightCard.vue new file mode 100644 index 00000000..58e3230d --- /dev/null +++ b/apps/thin/src/component/Card/src/DataInsightCard.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/apps/thin/src/component/PageWrapper/index.ts b/apps/thin/src/component/PageWrapper/index.ts new file mode 100644 index 00000000..1027a0ce --- /dev/null +++ b/apps/thin/src/component/PageWrapper/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from "@celeris/utils"; +import pageWrapper from "./src/PageWrapper.vue"; + +export const PageWrapper = withInstall(pageWrapper); diff --git a/apps/thin/src/component/PageWrapper/src/PageWrapper.vue b/apps/thin/src/component/PageWrapper/src/PageWrapper.vue new file mode 100644 index 00000000..27a90406 --- /dev/null +++ b/apps/thin/src/component/PageWrapper/src/PageWrapper.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/apps/thin/src/component/SearchDialog/index.ts b/apps/thin/src/component/SearchDialog/index.ts new file mode 100644 index 00000000..765e9431 --- /dev/null +++ b/apps/thin/src/component/SearchDialog/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from "@celeris/utils"; +import searchDialog from "./src/SearchDialog.vue"; + +export const SearchDialog = withInstall(searchDialog); diff --git a/apps/thin/src/component/SearchDialog/src/SearchDialog.vue b/apps/thin/src/component/SearchDialog/src/SearchDialog.vue new file mode 100644 index 00000000..73084279 --- /dev/null +++ b/apps/thin/src/component/SearchDialog/src/SearchDialog.vue @@ -0,0 +1,348 @@ + + + + + diff --git a/apps/thin/src/component/SearchDialog/src/types.ts b/apps/thin/src/component/SearchDialog/src/types.ts new file mode 100644 index 00000000..09d47a9b --- /dev/null +++ b/apps/thin/src/component/SearchDialog/src/types.ts @@ -0,0 +1,15 @@ +export interface SearchGroupItem { + iconName: string | null | undefined; + iconImage: string | null; + key: number | string; + title: string; + label: string; + tags?: string; + action: () => void; +} + +export interface SearchGroup { + name: string; + items: SearchGroupItem[]; +} +export type SearchGroups = SearchGroup[]; diff --git a/apps/thin/src/composables/index.ts b/apps/thin/src/composables/index.ts new file mode 100644 index 00000000..17b8f8eb --- /dev/null +++ b/apps/thin/src/composables/index.ts @@ -0,0 +1,3 @@ +export * from "./setting"; +export * from "./useChartOption"; +export * from "./useNaiveUIConfigProvider"; diff --git a/apps/thin/src/composables/setting/index.ts b/apps/thin/src/composables/setting/index.ts new file mode 100644 index 00000000..616acb6e --- /dev/null +++ b/apps/thin/src/composables/setting/index.ts @@ -0,0 +1,7 @@ +export * from "./useAppSetting"; +export * from "./useGlobSetting"; +export * from "./useHeaderSetting"; +export * from "./useMenuSetting"; +export * from "./usePermissionSetting"; +export * from "./useThemeSetting"; +export * from "./useTransitionSetting"; diff --git a/apps/thin/src/composables/setting/useAppSetting.ts b/apps/thin/src/composables/setting/useAppSetting.ts new file mode 100644 index 00000000..d12f2a76 --- /dev/null +++ b/apps/thin/src/composables/setting/useAppSetting.ts @@ -0,0 +1,113 @@ +import type { ProjectSetting } from "@celeris/types"; +import { useAppStoreWithOut } from "~/store/modules/app"; + +export function useAppSetting() { + const appStore = useAppStoreWithOut(); + + // 获取是否显示配置按钮 + // Get whether to display the setting button + const getShouldShowSettingButton = toRef(() => appStore.getProjectSetting.shouldShowSettingButton); + + // 获取国际化语言 + // Get the locale + const getLocale = toRef(() => appStore.getProjectSetting.locale); + + // 获取是否显示主题切换按钮 + // Get whether to display the dark mode toggle button + const getShouldShowDarkModeToggle = toRef(() => appStore.getProjectSetting.shouldShowDarkModeToggle); + + // 获取配置按钮显示位置 + // Get the position of the setting button display + const getSettingButtonPosition = toRef(() => appStore.getProjectSetting.settingButtonPosition); + + // 获取权限模式 + // Get the permission mode + const getPermissionMode = toRef(() => appStore.getProjectSetting.permissionMode); + + // 获取权限缓存类型 + // Get the permission cache type + const getPermissionCacheType = toRef(() => appStore.getProjectSetting.permissionCacheType); + + // 获取会话超时处理方式 + // Get the session timeout processing method + const getSessionTimeoutProcessing = toRef(() => appStore.getProjectSetting.sessionTimeoutProcessing); + + // 获取主界面全屏显示,不显示菜单和顶部 + // Get whether to display the main interface in full screen, without menu and top bar + const getShouldShowFullContent = toRef(() => appStore.getProjectSetting.shouldShowFullContent); + + // 获取是否显示 logo + // Get whether to display the logo + const getShouldShowLogo = toRef(() => appStore.getProjectSetting.shouldShowLogo); + + // 获取是否显示全局底部 + // Get whether to display the global footer + const getShouldShowFooter = toRef(() => appStore.getProjectSetting.shouldShowFooter); + + // 获取页面布局是否启用 keep-alive + // Get whether to enable keep-alive for page layout + const getShouldOpenKeepAlive = toRef(() => appStore.getProjectSetting.shouldOpenKeepAlive); + + // 获取锁屏时间 + // Get the lock screen time + const getLockTime = toRef(() => appStore.getProjectSetting.lockTime); + + // 获取是否显示面包屑 + // Get whether to display the breadcrumb + const getShouldShowBreadCrumb = toRef(() => appStore.getProjectSetting.shouldShowBreadCrumb); + + // 获取是否显示面包屑图标 + // Get whether to display the breadcrumb icon + const getShouldShowBreadCrumbIcon = toRef(() => appStore.getProjectSetting.shouldShowBreadCrumbIcon); + + // 获取是否使用 error-handler-plugin + // Get whether to use the error-handler-plugin + const getShouldUseErrorHandle = toRef(() => appStore.getProjectSetting.shouldUseErrorHandle); + + // 获取是否开启返回顶部 + // Get whether to enable the back to top function + const getShouldUseOpenBackTop = toRef(() => appStore.getProjectSetting.shouldUseOpenBackTop); + + // 获取是否可以嵌入 iframe 页面 + // Get whether to embed iframe pages + const getCanEmbedIFramePage = toRef(() => appStore.getProjectSetting.canEmbedIFramePage); + + // 获取是否在切换界面时删除未关闭的消息并通知 + // Get whether to delete unclosed messages and notify when switching pages + const getShouldCloseMessageOnSwitch = toRef(() => appStore.getProjectSetting.shouldCloseMessageOnSwitch); + + // 获取是否在切换界面时取消已发送但未响应的 http 请求 + // Get whether to cancel sent but unresponsive http requests when switching pages + const getShouldRemoveAllHttpPending = toRef(() => appStore.getProjectSetting.shouldRemoveAllHttpPending); + + function getProjectSetting() { + return appStore.getProjectSetting; + } + function setProjectSetting(config: DeepPartial) { + appStore.setProjectSetting(config); + } + + return { + getProjectSetting, + setProjectSetting, + getShouldShowSettingButton, + getLocale, + getShouldShowDarkModeToggle, + getSettingButtonPosition, + getPermissionMode, + getPermissionCacheType, + getSessionTimeoutProcessing, + getShouldShowFullContent, + getShouldShowLogo, + getShouldShowFooter, + getShouldOpenKeepAlive, + getLockTime, + getShouldShowBreadCrumb, + getShouldShowBreadCrumbIcon, + getShouldUseErrorHandle, + getShouldUseOpenBackTop, + getCanEmbedIFramePage, + getShouldCloseMessageOnSwitch, + getShouldRemoveAllHttpPending, + }; +} diff --git a/apps/thin/src/composables/setting/useGlobSetting.ts b/apps/thin/src/composables/setting/useGlobSetting.ts new file mode 100644 index 00000000..27f14812 --- /dev/null +++ b/apps/thin/src/composables/setting/useGlobSetting.ts @@ -0,0 +1,7 @@ +import type { GlobConfig, GlobEnvConfig } from "@celeris/types"; +import { getAppGlobalConfig } from "@celeris/utils"; + +export function useGlobSetting(): Readonly { + const glob = getAppGlobalConfig(import.meta.env); + return glob as Readonly; +} diff --git a/apps/thin/src/composables/setting/useHeaderSetting.ts b/apps/thin/src/composables/setting/useHeaderSetting.ts new file mode 100644 index 00000000..67717d70 --- /dev/null +++ b/apps/thin/src/composables/setting/useHeaderSetting.ts @@ -0,0 +1,53 @@ +import type { HeaderSetting } from "@celeris/types"; +import { useAppStoreWithOut } from "~/store/modules/app"; + +export function useHeaderSetting() { + const appStore = useAppStoreWithOut(); + + // 获取是否显示网站头部 + // Get whether to show the website header + const getShouldShowHeader = computed(() => appStore.getHeaderSetting.shouldShow); + + // 获取是否显示全屏按钮 + // Get whether to show the full screen button + const getShouldShowFullScreen = computed(() => appStore.getHeaderSetting.shouldShowFullScreen); + + // 获取是否显示搜索 + // Get whether to show the search + const getShouldShowSearch = computed(() => appStore.getHeaderSetting.shouldShowSearch); + + // 获取是否显示通知 + // Get whether to show the notice + const getShouldShowNotice = computed(() => appStore.getHeaderSetting.shouldShowNotice); + + // 获取是否显示设置抽屉 + // Get whether to show the setting drawer + const getShouldShowSettingDrawer = computed(() => appStore.getHeaderSetting.shouldShowSettingDrawer); + + const setShouldShowSettingDrawer = (shouldShowSettingDrawer: boolean) => { + appStore.setHeaderSetting({ shouldShowSettingDrawer }); + }; + + const toggleShouldShowSettingDrawer = () => { + setShouldShowSettingDrawer(!getShouldShowSettingDrawer.value); + }; + + function getHeaderSetting() { + return appStore.getHeaderSetting; + } + function setHeaderSetting(headerSetting: Partial) { + appStore.setHeaderSetting(headerSetting); + } + + return { + getHeaderSetting, + setHeaderSetting, + getShouldShowHeader, + getShouldShowFullScreen, + getShouldShowSearch, + getShouldShowNotice, + getShouldShowSettingDrawer, + setShouldShowSettingDrawer, + toggleShouldShowSettingDrawer, + }; +} diff --git a/apps/thin/src/composables/setting/useMenuSetting.ts b/apps/thin/src/composables/setting/useMenuSetting.ts new file mode 100644 index 00000000..8e02d2ef --- /dev/null +++ b/apps/thin/src/composables/setting/useMenuSetting.ts @@ -0,0 +1,29 @@ +import type { MenuSetting } from "@celeris/types"; +import { useAppStoreWithOut } from "~/store/modules/app"; + +export function useMenuSetting() { + const appStore = useAppStoreWithOut(); + + const getCollapsed = computed(() => appStore.getMenuSetting.collapsed); + + function getMenuSetting() { + return appStore.getMenuSetting; + } + + // Set menu configuration + function setMenuSetting(menuSetting: Partial): void { + appStore.setProjectSetting({ menuSetting }); + } + + function toggleCollapsed() { + setMenuSetting({ + collapsed: !unref(getCollapsed), + }); + } + return { + getMenuSetting, + setMenuSetting, + getCollapsed, + toggleCollapsed, + }; +} diff --git a/apps/thin/src/composables/setting/usePermissionSetting.ts b/apps/thin/src/composables/setting/usePermissionSetting.ts new file mode 100644 index 00000000..3e00f59e --- /dev/null +++ b/apps/thin/src/composables/setting/usePermissionSetting.ts @@ -0,0 +1,121 @@ +import type { RoleConstants } from "@celeris/constants"; +import { PermissionModeConstants } from "@celeris/constants"; +import { intersection, isArray } from "@celeris/utils"; +import type { RouteRecordRaw } from "vue-router"; +import { resetRouter, router } from "~/router"; +import { DEFAULT_PROJECT_SETTING } from "~/setting/projectSetting"; +import { useAppStoreWithOut } from "~/store/modules/app"; +import { usePermissionStoreWithOut } from "~/store/modules/permission"; +import { useUserStoreWithOut } from "~/store/modules/user"; + +export function useAppPermission() { + const userStore = useUserStoreWithOut(); + const appStore = useAppStoreWithOut(); + const permissionStore = usePermissionStoreWithOut(); + + const getPermissionMode = toRef(() => appStore.getProjectSetting.permissionMode); + + const isBackendPermissionMode = toRef(() => getPermissionMode.value === PermissionModeConstants.BACKEND); + + const isRouteMappingPermissionMode = toRef(() => getPermissionMode.value === PermissionModeConstants.ROUTE_MAPPING); + + const isRolePermissionMode = toRef(() => getPermissionMode.value === PermissionModeConstants.ROLE); + + /** + * Toggle permission mode function. + * 切换权限模式函数。 + * + * Changes the permission mode between backend and route mapping. + * 在后端和路由映射之间切换权限模式。 + * + */ + function togglePermissionMode() { + appStore.setProjectSetting({ + permissionMode: + appStore.projectSetting?.permissionMode === PermissionModeConstants.BACKEND + ? PermissionModeConstants.ROUTE_MAPPING + : PermissionModeConstants.BACKEND, + }); + location.reload(); + } + + /** + * Reset and regain authority resource information + * 重置和重新获得权限资源信息 + * @returns Promise + */ + async function resume() { + resetRouter(); + const routes: RouteRecordRaw[] = await permissionStore.buildRoutesAction(); + routes.forEach((route: RouteRecordRaw) => { + router.addRoute(route); + }); + permissionStore.setLastMenuBuildTime(); + } + + /** + * Determine whether there is permission + * 判断是否有权限 + * @param permission RoleConstants | RoleConstants[] | string | string[] permission value. 权限值 + * @param defaultValue boolean default value. 默认值 + * @returns boolean whether there is permission + * 返回值是否有权限 + */ + function hasPermission(permission?: RoleConstants | RoleConstants[] | string | string[], defaultValue = false): boolean { + if (!permission) { + return defaultValue; + } + + const permMode = DEFAULT_PROJECT_SETTING.permissionMode; + + if ([PermissionModeConstants.ROUTE_MAPPING, PermissionModeConstants.ROLE].includes(permMode)) { + if (!isArray(permission)) { + return userStore.getRoleList.includes(permission as RoleConstants); + } + return (intersection(permission, userStore.getRoleList)).length > 0; + } + + if (PermissionModeConstants.BACKEND === permMode) { + const allCodeList = permissionStore.getPermissionCodes as string[]; + if (!isArray(permission)) { + return allCodeList.includes(permission); + } + return (intersection(permission, allCodeList)).length > 0; + } + return defaultValue; + } + + /** + * Change the roles of the current user. + * 更改当前用户的角色。 + * @param roles RoleConstants | RoleConstants[] The roles to be assigned to the user. 要分配给用户的角色。 + * @returns Promise + */ + async function changeRole(roles: RoleConstants | RoleConstants[]): Promise { + if (DEFAULT_PROJECT_SETTING.permissionMode !== PermissionModeConstants.ROUTE_MAPPING) { + throw new Error( + "Please switch to ROUTE_MAPPING mode in the configuration before performing this operation.", + ); + } + + if (!isArray(roles)) { + roles = [roles]; + } + userStore.setRoleList(roles); + await resume(); + } + + async function refreshMenu() { + await resume(); + } + return { + getPermissionMode, + isBackendPermissionMode, + isRouteMappingPermissionMode, + isRolePermissionMode, + changeRole, + hasPermission, + togglePermissionMode, + refreshMenu, + }; +} diff --git a/apps/thin/src/composables/setting/useThemeSetting.ts b/apps/thin/src/composables/setting/useThemeSetting.ts new file mode 100644 index 00000000..b3bed525 --- /dev/null +++ b/apps/thin/src/composables/setting/useThemeSetting.ts @@ -0,0 +1,70 @@ +import { useDesignStoreWithOut } from "~/store/modules/design"; + +export function useThemeSetting() { + const designStore = useDesignStoreWithOut(); + + // 获取主题配置 + // get theme setting + const getThemeSetting = () => designStore.getThemeSetting; + + // 设置主题配置 + // set theme setting + const setThemeSetting = themeSetting => designStore.setThemeSetting(themeSetting); + + // 获取Naive UI 预设主题 + // get Naive UI preset theme + const getNaiveUIPresetTheme = toRef(() => designStore.getNaiveUIPresetTheme); + + // 获取Naive UI 自定义主题 + // get Naive UI custom theme + const getNaiveUICustomTheme = toRef(() => designStore.getNaiveUICustomTheme); + + // 获取暗黑模式 + // get dark mode + const getDarkMode = toRef(() => designStore.getDarkMode); + + // 获取色弱模式 + // get color weak mode + const getColorWeakMode = toRef(() => designStore.getColorWeakMode); + + // 获取灰色模式 + // get gray mode + const getGrayMode = toRef(() => designStore.getGrayMode); + + // 获取跟随系统主题 + // get follow system theme + const getFollowSystemTheme = toRef(() => designStore.getFollowSystemTheme); + + // 获取主题颜色 + // get theme color + const getThemeColor = toRef(() => designStore.getThemeColor); + + const setDarkMode = darkMode => designStore.setDarkMode(darkMode); + + const setColorWeakMode = colorWeakMode => designStore.setColorWeakMode(colorWeakMode); + + const setGrayMode = grayMode => designStore.setGrayMode(grayMode); + + const setFollowSystemTheme = followSystemTheme => designStore.setFollowSystemTheme(followSystemTheme); + + const setThemeColor = themeColor => designStore.setThemeColor(themeColor); + + const resetDesignState = () => designStore.resetDesignState(); + return { + getThemeSetting, + setThemeSetting, + getNaiveUIPresetTheme, + getNaiveUICustomTheme, + getDarkMode, + getColorWeakMode, + getGrayMode, + getFollowSystemTheme, + getThemeColor, + setDarkMode, + setColorWeakMode, + setGrayMode, + setFollowSystemTheme, + setThemeColor, + resetDesignState, + }; +} diff --git a/apps/thin/src/composables/setting/useTransitionSetting.ts b/apps/thin/src/composables/setting/useTransitionSetting.ts new file mode 100644 index 00000000..e09d90a9 --- /dev/null +++ b/apps/thin/src/composables/setting/useTransitionSetting.ts @@ -0,0 +1,50 @@ +import type { TransitionSetting } from "@celeris/types"; +import { useAppStoreWithOut } from "~/store/modules/app"; + +export function useTransitionSetting() { + const appStore = useAppStoreWithOut(); + + const getShouldEnableTransition = toRef(() => appStore.getTransitionSetting.shouldEnable); + + const getShouldOpenNProgress = toRef(() => appStore.getTransitionSetting.shouldOpenNProgress); + + const getShouldOpenPageLoading = toRef(() => appStore.getTransitionSetting.shouldOpenPageLoading); + + const getRouterBasicTransition = toRef(() => appStore.getTransitionSetting.routerBasicTransition); + + const setRouterBasicTransition = (routerBasicTransition: TransitionSetting["routerBasicTransition"]) => { + appStore.setProjectSetting({ transitionSetting: { routerBasicTransition } }); + }; + + const setShouldEnableTransition = (shouldEnable: TransitionSetting["shouldEnable"]) => { + appStore.setProjectSetting({ transitionSetting: { shouldEnable } }); + }; + + const setShouldOpenNProgress = (shouldOpenNProgress: TransitionSetting["shouldOpenNProgress"]) => { + appStore.setProjectSetting({ transitionSetting: { shouldOpenNProgress } }); + }; + + const setShouldOpenPageLoading = (shouldOpenPageLoading: TransitionSetting["shouldOpenPageLoading"]) => { + appStore.setProjectSetting({ transitionSetting: { shouldOpenPageLoading } }); + }; + + function getTransitionSetting() { + return appStore.getTransitionSetting; + } + function setTransitionSetting(transitionSetting: Partial) { + appStore.setProjectSetting({ transitionSetting }); + } + return { + getTransitionSetting, + setTransitionSetting, + + getShouldEnableTransition, + setShouldEnableTransition, + getShouldOpenNProgress, + setShouldOpenNProgress, + getShouldOpenPageLoading, + setShouldOpenPageLoading, + getRouterBasicTransition, + setRouterBasicTransition, + }; +} diff --git a/apps/thin/src/composables/useChartOption.ts b/apps/thin/src/composables/useChartOption.ts new file mode 100644 index 00000000..403206e6 --- /dev/null +++ b/apps/thin/src/composables/useChartOption.ts @@ -0,0 +1,33 @@ +import type { ComputedRef } from "vue"; +import { computed } from "vue"; +import type { EChartsOption } from "echarts"; + +// Define function type +interface ChartOptionsGenerator { + (isDark: boolean): EChartsOption; +} + +// Define return type +interface UseChartOptionReturn { + chartOption: ComputedRef; +} + +// 根据源选项生成图表选项 +// Generate chart options based on source options +export function useChartOption(generateSourceOptions: ChartOptionsGenerator): UseChartOptionReturn { + const { getDarkMode: isDark } = useThemeSetting(); + // 生成图表选项 + // Generate chart options + const generateChartOptions = (): EChartsOption => { + // TODO: echarts themes + // ECharts可以使用主题构建器,但这里未使用 + // ECharts can use theme builders, but it is not used here + return generateSourceOptions(isDark.value); + }; + + // 返回计算属性 + // Return computed property + return { + chartOption: computed(() => generateChartOptions()), + }; +} diff --git a/apps/thin/src/composables/useNaiveUIConfigProvider.ts b/apps/thin/src/composables/useNaiveUIConfigProvider.ts new file mode 100644 index 00000000..62b982c5 --- /dev/null +++ b/apps/thin/src/composables/useNaiveUIConfigProvider.ts @@ -0,0 +1,22 @@ +import { dateZhCN, zhCN } from "naive-ui"; +import { useAppSetting, useThemeSetting } from "~/composables/setting"; +import { designNamespace, designPrefixCls } from "~/setting/designSetting"; + +// Naive UI Config Provider +export function useNaiveUIConfigProvider() { + const { getNaiveUIPresetTheme, getNaiveUICustomTheme } = useThemeSetting(); + const { getLocale } = useAppSetting(); + const configProviderProps = toRef({ + "cls-prefix": designPrefixCls, + "theme": getNaiveUIPresetTheme, + "theme-overrides": getNaiveUICustomTheme, + "namespace": designNamespace, + "locale": getLocale.value === "zh" ? zhCN : null, + "date-locale": getLocale.value === "zh" ? dateZhCN : null, + "inline-theme-disabled": true, + }); + + return { + configProviderProps, + }; +} diff --git a/apps/thin/src/composables/useSearchDialog.ts b/apps/thin/src/composables/useSearchDialog.ts new file mode 100644 index 00000000..85481483 --- /dev/null +++ b/apps/thin/src/composables/useSearchDialog.ts @@ -0,0 +1,16 @@ +import { ref } from "vue"; +import { isWindows } from "@celeris/utils"; + +const listener = ref(); +export function useSearchDialog() { + const commandIcon = ref(isWindows() ? "CTRL" : "⌘"); + return { + commandIcon, + trigger: (cb: () => void): void => { + listener.value = cb; + }, + open: (): void => { + listener.value && listener.value(); + }, + }; +} diff --git a/apps/thin/src/directives/permission.ts b/apps/thin/src/directives/permission.ts new file mode 100644 index 00000000..89347c02 --- /dev/null +++ b/apps/thin/src/directives/permission.ts @@ -0,0 +1,32 @@ +/** + * Global authority directive + * Used for fine-grained control of component permissions + * @Example v-auth="RoleEnum.ADMIN" + */ +import type { App, Directive, DirectiveBinding } from "vue"; + +function isAuth(el: Element, binding: any) { + const { hasPermission } = useAppPermission(); + + const value = binding.value; + if (!value) { + return; + } + if (!hasPermission(value)) { + el.parentNode?.removeChild(el); + } +} + +function mounted(el: Element, binding: DirectiveBinding) { + isAuth(el, binding); +} + +const authDirective: Directive = { + mounted, +}; + +export function setupPermissionDirective(app: App) { + app.directive("auth", authDirective); +} + +export default authDirective; diff --git a/apps/thin/src/layouts/content/index.vue b/apps/thin/src/layouts/content/index.vue new file mode 100644 index 00000000..a25881e7 --- /dev/null +++ b/apps/thin/src/layouts/content/index.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/apps/thin/src/layouts/footer/index.vue b/apps/thin/src/layouts/footer/index.vue new file mode 100644 index 00000000..f5dd1299 --- /dev/null +++ b/apps/thin/src/layouts/footer/index.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/thin/src/layouts/header/components/Breadcrumb.vue b/apps/thin/src/layouts/header/components/Breadcrumb.vue new file mode 100644 index 00000000..4ba0a789 --- /dev/null +++ b/apps/thin/src/layouts/header/components/Breadcrumb.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/apps/thin/src/layouts/header/components/CollapseButton.vue b/apps/thin/src/layouts/header/components/CollapseButton.vue new file mode 100644 index 00000000..e995b19b --- /dev/null +++ b/apps/thin/src/layouts/header/components/CollapseButton.vue @@ -0,0 +1,12 @@ + + + diff --git a/apps/thin/src/layouts/header/components/FullScreenButton.vue b/apps/thin/src/layouts/header/components/FullScreenButton.vue new file mode 100644 index 00000000..effa8970 --- /dev/null +++ b/apps/thin/src/layouts/header/components/FullScreenButton.vue @@ -0,0 +1,14 @@ + + + + + diff --git a/apps/thin/src/layouts/header/components/LocaleSwitcher.vue b/apps/thin/src/layouts/header/components/LocaleSwitcher.vue new file mode 100644 index 00000000..e882ce3c --- /dev/null +++ b/apps/thin/src/layouts/header/components/LocaleSwitcher.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/apps/thin/src/layouts/header/components/SearchAnyWhere.vue b/apps/thin/src/layouts/header/components/SearchAnyWhere.vue new file mode 100644 index 00000000..2053b132 --- /dev/null +++ b/apps/thin/src/layouts/header/components/SearchAnyWhere.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/apps/thin/src/layouts/header/components/UserInfoButton.vue b/apps/thin/src/layouts/header/components/UserInfoButton.vue new file mode 100644 index 00000000..2429d6ad --- /dev/null +++ b/apps/thin/src/layouts/header/components/UserInfoButton.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/apps/thin/src/layouts/header/index.vue b/apps/thin/src/layouts/header/index.vue new file mode 100644 index 00000000..e5f13a0b --- /dev/null +++ b/apps/thin/src/layouts/header/index.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/apps/thin/src/layouts/index.vue b/apps/thin/src/layouts/index.vue new file mode 100644 index 00000000..824160d2 --- /dev/null +++ b/apps/thin/src/layouts/index.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/apps/thin/src/layouts/setting/components/SettingButton.vue b/apps/thin/src/layouts/setting/components/SettingButton.vue new file mode 100644 index 00000000..1818e6ef --- /dev/null +++ b/apps/thin/src/layouts/setting/components/SettingButton.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/apps/thin/src/layouts/setting/components/SettingDrawer/components/DarkMode/index.vue b/apps/thin/src/layouts/setting/components/SettingDrawer/components/DarkMode/index.vue new file mode 100644 index 00000000..6892b1bf --- /dev/null +++ b/apps/thin/src/layouts/setting/components/SettingDrawer/components/DarkMode/index.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/apps/thin/src/layouts/setting/components/SettingDrawer/components/SettingMenu/index.vue b/apps/thin/src/layouts/setting/components/SettingDrawer/components/SettingMenu/index.vue new file mode 100644 index 00000000..be8b6c52 --- /dev/null +++ b/apps/thin/src/layouts/setting/components/SettingDrawer/components/SettingMenu/index.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/apps/thin/src/layouts/setting/components/SettingDrawer/components/SettingTransition/index.vue b/apps/thin/src/layouts/setting/components/SettingDrawer/components/SettingTransition/index.vue new file mode 100644 index 00000000..6d9dbe2e --- /dev/null +++ b/apps/thin/src/layouts/setting/components/SettingDrawer/components/SettingTransition/index.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeBackup/index.vue b/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeBackup/index.vue new file mode 100644 index 00000000..85a5b1c4 --- /dev/null +++ b/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeBackup/index.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeColor/components/ColorCheckbox.vue b/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeColor/components/ColorCheckbox.vue new file mode 100644 index 00000000..ce25e3d8 --- /dev/null +++ b/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeColor/components/ColorCheckbox.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeColor/components/index.ts b/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeColor/components/index.ts new file mode 100644 index 00000000..9488f28d --- /dev/null +++ b/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeColor/components/index.ts @@ -0,0 +1,3 @@ +import ColorCheckbox from "./ColorCheckbox.vue"; + +export { ColorCheckbox }; diff --git a/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeColor/index.vue b/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeColor/index.vue new file mode 100644 index 00000000..0258991c --- /dev/null +++ b/apps/thin/src/layouts/setting/components/SettingDrawer/components/ThemeColor/index.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/apps/thin/src/layouts/setting/components/SettingDrawer/components/index.ts b/apps/thin/src/layouts/setting/components/SettingDrawer/components/index.ts new file mode 100644 index 00000000..959415bd --- /dev/null +++ b/apps/thin/src/layouts/setting/components/SettingDrawer/components/index.ts @@ -0,0 +1,7 @@ +import DarkMode from "./DarkMode/index.vue"; +import SettingMenu from "./SettingMenu/index.vue"; +import SettingTransition from "./SettingTransition/index.vue"; +import ThemeBackup from "./ThemeBackup/index.vue"; +import ThemeColor from "./ThemeColor/index.vue"; + +export { DarkMode, SettingMenu, SettingTransition, ThemeBackup, ThemeColor }; diff --git a/apps/thin/src/layouts/setting/components/SettingDrawer/index.vue b/apps/thin/src/layouts/setting/components/SettingDrawer/index.vue new file mode 100644 index 00000000..8e9af143 --- /dev/null +++ b/apps/thin/src/layouts/setting/components/SettingDrawer/index.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/apps/thin/src/layouts/setting/index.vue b/apps/thin/src/layouts/setting/index.vue new file mode 100644 index 00000000..099f1b5f --- /dev/null +++ b/apps/thin/src/layouts/setting/index.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/apps/thin/src/layouts/sidebar/components/Menu.vue b/apps/thin/src/layouts/sidebar/components/Menu.vue new file mode 100644 index 00000000..e332e178 --- /dev/null +++ b/apps/thin/src/layouts/sidebar/components/Menu.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/apps/thin/src/layouts/sidebar/components/SidebarFooter.vue b/apps/thin/src/layouts/sidebar/components/SidebarFooter.vue new file mode 100644 index 00000000..9316d9ed --- /dev/null +++ b/apps/thin/src/layouts/sidebar/components/SidebarFooter.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/apps/thin/src/layouts/sidebar/components/SidebarHeader.vue b/apps/thin/src/layouts/sidebar/components/SidebarHeader.vue new file mode 100644 index 00000000..ebfc4c77 --- /dev/null +++ b/apps/thin/src/layouts/sidebar/components/SidebarHeader.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/apps/thin/src/layouts/sidebar/index.vue b/apps/thin/src/layouts/sidebar/index.vue new file mode 100644 index 00000000..2724973b --- /dev/null +++ b/apps/thin/src/layouts/sidebar/index.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/apps/thin/src/layouts/transition.ts b/apps/thin/src/layouts/transition.ts new file mode 100644 index 00000000..89a9ebe2 --- /dev/null +++ b/apps/thin/src/layouts/transition.ts @@ -0,0 +1,19 @@ +import type { RouteLocationNormalizedLoaded } from "vue-router"; +import { useTransitionSetting } from "~/composables"; + +interface Context { + route: RouteLocationNormalizedLoaded; +} + +interface TransitionOptions { + enableTransition: boolean; +} + +export function getTransitionName({ route }: Context, { enableTransition }: TransitionOptions): string | undefined { + const { getRouterBasicTransition, getShouldEnableTransition } = useTransitionSetting(); + if (!enableTransition || !toValue(getShouldEnableTransition)) { + return undefined; + } + + return (route.meta.transitionName as string) || toValue(getRouterBasicTransition); +} diff --git a/apps/thin/src/locales/en.json b/apps/thin/src/locales/en.json new file mode 100644 index 00000000..98751b09 --- /dev/null +++ b/apps/thin/src/locales/en.json @@ -0,0 +1,250 @@ +{ + "routes": { + "components": { + "components": "Component Example", + "table": "Table Component", + "headlessTable": "Headless Table", + "headlessTableBasic": "Basic Table", + "headlessTablePagination": "Pagination Table" + }, + "chat": { + "chat": "Chat" + }, + "profile": { + "profile": "Profile" + }, + "design": { + "design": "Design", + "palette": "Palette", + "typography": "Typography" + }, + "dashboard": { + "dashboard": "Dashboard" + }, + "directives": { + "directives": "Directive Examples", + "permission": "Permission Directive", + "copy": "Copy Directive", + "ripple": "Ripple Directive" + }, + "iframe": { + "iframe": "Embedded Webpage", + "githubInternal": "GitHub (Embedded)", + "GitHubExternal": "GitHub (External)", + "viteInternal": "Vite Documentation (Embedded)", + "ViteExternal": "Vite Documentation (External)" + }, + "permission": { + "permission": "Permission Test", + "authPageA": "Test Page A", + "authPageB": "Test Page B", + "frontend": "Frontend-based", + "backend": "Backend-based", + "pageAuth": "Page Permissions", + "buttonAuth": "Button Permissions", + "role": "Role Permissions", + "directive": "Directive Permissions" + }, + "result": { + "result": "Result Page", + "success": "Success Page", + "fail": "Fail Page" + } + }, + "layouts": { + "header": { + "toggleCollapsed": "Toggle Menu", + "toggleFullScreen": "Toggle Fullscreen", + "switchLocale": "Switch Language", + "settingDrawer": "Settings Drawer", + "openSettingDrawer": "Open Settings Drawer", + "projectSetting": "Project Settings", + "darkMode": "Dark Mode", + "followSystem": "Follow System", + "systemDefault": "System Default", + "systemTheme": "System Theme", + "themeMode": "Theme Mode", + "lightMode": "Light Mode", + "colorWeak": "Color Weak Mode", + "themeConfig": { + "title": "Theme Configuration", + "copyConfigButton": "Copy Current Configuration", + "resetConfigButton": "Reset Current Configuration", + "message": { + "copyConfigSuccess": "Configuration copied successfully!", + "resetConfigSuccess": "Configuration reset successfully!" + } + }, + "transitionSetting": { + "title": "Animation Settings", + "enableTransition": "Enable Animation", + "enableProgressBar": "Enable Progress Bar", + "enablePageLoadingTransition": "Enable Page Loading Animation", + "routeTransition": "Route Transition" + } + }, + "userInfo": { + "userInformation": "User Information", + "greeting": "Hello", + "rolesList": "Role List: {roles}", + "logoutButton": "Logout" + }, + "logoutConfirmation": { + "title": "Warning", + "content": "Are you sure you want to log out?", + "positiveText": "Logout", + "negativeText": "Cancel", + "onNegativeClickMessage": "Logout canceled", + "onPositiveClickMessage": "Logout successful" + } + }, + "searchDialog": { + "searchPlaceholder": "Search", + "noResultsFound": "Sorry, no results found for { search }", + "toSelectTooltip": "to select", + "toNavigateTooltip": "to navigate", + "applications": "Applications", + "chatBot": "ChatBot", + "action": "Action", + "actions": "Actions", + "shortcut": "Shortcut", + "go": "Go to " + }, + "page": { + "login": { + "title": "Login", + "form": { + "username": { + "label": "Username", + "placeholder": "Enter your username", + "error": "Username cannot be empty" + }, + "password": { + "label": "Password", + "placeholder": "Enter your password", + "error": "Password cannot be empty" + }, + "confirmPassword": { + "label": "Confirm Password", + "placeholder": "Enter your password", + "error": "Confirm password cannot be empty", + "validator": "Password is not same!" + }, + "forgotPassword": { + "label": "Phone Number", + "placeholder": "Example: 13812345678", + "requiredError": "Phone number is required", + "invalidFormatError": "Invalid phone number format" + }, + "socialButtons": { + "signInWithQQ": "Sign in with QQ", + "signInWithWeChat": "Sign in with WeChat" + }, + "signText": { + "signIn": "Don't you have an account?", + "forgotPassword": "Back to Sign in", + "signUp": "Do you have an account?" + }, + "welcomeBackTitle": "Welcome Back", + "helloTitle": "Hello", + "forgotPasswordTitle": "Forgot Password", + "greetingText": "Celeris Web is a highly performant and customizable front-end development template built with Vue 3, Vite, and TypeScript.", + "sendResetLinkButton": "Send Reset Link", + "resetLinkSentMessage": "Reset Link sent", + "signUp": "Sign up", + "backToSignIn": "Back to Sign in", + "signIn": "Sign in", + "remember": "Remember me", + "loginButton": "Sign in", + "registerButton": "Create an account", + "forgetPassword": "Forgot password", + "incorrectAccountOrPassword": "Incorrect account or password!" + }, + "notification": { + "loginSuccessMessage": "Login successful", + "welcomeBackMessage": "Welcome back, {username}!" + } + }, + "copyDirective": { + "copy": "Copy", + "copyDirective": "Copy Directive Example", + "copyPlaceholder": "Please enter the content to copy", + "copySuccess": "Copy successful", + "copyError": "Copy failed" + }, + "rippleDirective": { + "ripple": "Ripple", + "rippleDirective": "Ripple Directive Example", + "description1": "Ripples are state layers used to communicate the status of a component or interactive element.", + "description2": "A state layer is a semi-transparent covering on an element that indicates its state." + }, + "permission": { + "permissionMode": { + "currentMode": "Current Permission Mode", + "backendMode": "Backend Permission Mode", + "frontendMode": "Frontend Role Permission Mode", + "toggleMode": "Toggle Permission Mode" + }, + "pageTitles": { + "frontend": "Frontend Permission Example", + "backend": "Backend Permission Example", + "button": "Button Permission Control" + }, + "roleButtonText": "Visible with {role} Role", + "codeButtonText": "Visible with [{code}] Code", + "currentPermissionMode": "Current Permission Mode", + "currentRole": "Current Role", + "currentCode": "Current Code", + "clickToSeeButtonChange": "Click to see button changes", + "clickToSeeLeftMenuChange": "Click to see left menu changes", + "frontendPermissionSwitchTitle": "Permission Switching (Please switch permission mode to Frontend Role mode first)", + "backendPermissionSwitchTitle": "Permission Switching (Please switch permission mode to Backend Role mode first)", + "componentWayTitle": "Component-based Permission Check (You can register it globally if needed)", + "functionWayTitle": "Function-based Permission Check (Suitable for filtering within functions)", + "directiveWayTitle": "Directive-based Permission Check (This method cannot dynamically modify permissions)", + "backendLeftMenuChangeTitle": "Click to see left menu changes (Must be in Backend Role mode to test the functionality displayed on this page)" + }, + "headlessTable": { + "pageTitles": { + "basic": "Basic Table" + } + }, + "result": { + "status": { + "error": "Error", + "success": "Success" + }, + "failPage": { + "title": "Error Sending Content", + "subTitle": "Sorry, there was a problem sending the content.", + "buttons": { + "home": "Return to Home", + "back": "Go Back" + }, + "errorHeader": "There might be the following issues when sending content:", + "networkIssue": "Network connection problem", + "checkNetwork": "Check network >", + "messageTooLong": "Message is too long, please simplify", + "viewHelp": "View help >" + }, + "successPage": { + "title": "Operation Successful", + "subTitle": "Content generated by ChatGPT has been successfully created.", + "buttons": { + "home": "Return to Home" + }, + "contentHeader": "AIGC Generated Content:", + "generatedTimeLabel": "Generated Time", + "generatorLabel": "Generator", + "generatedContent": "Generated content will be displayed here", + "contentLabel": "Content", + "step1": "Input Content", + "step2": "Generating", + "step2Content": "ChatGPT is generating content, please wait a moment.", + "step3": "Under Review", + "step3Content": "Generated content is under review and will be approved shortly.", + "step4": "Completed" + } + } + } +} diff --git a/apps/thin/src/locales/zh.json b/apps/thin/src/locales/zh.json new file mode 100644 index 00000000..44c550c7 --- /dev/null +++ b/apps/thin/src/locales/zh.json @@ -0,0 +1,251 @@ +{ + "routes": { + "components": { + "components": "组件示例", + "table": "表格组件", + "headlessTable": "Headless 表格", + "headlessTableBasic": "基础表格", + "headlessTablePagination": "分页表格" + }, + "chat": { + "chat": "Chat" + }, + "profile": { + "profile": "个人资料" + }, + "design": { + "design": "设计", + "palette": "调色板", + "typography": "汉字排版" + }, + "dashboard": { + "dashboard": "仪表盘" + }, + "directives": { + "directives": "指令示例", + "permission": "权限指令", + "copy": "复制指令", + "ripple": "涟漪指令" + }, + "iframe": { + "iframe": "内嵌网页", + "githubInternal": "GitHub 仓库(内嵌)", + "GitHubExternal": "GitHub 仓库(外链)", + "viteInternal": "Vite 中文文档 (内嵌)", + "ViteExternal": "Vite 官方文档 (外链)" + }, + "permission": { + "permission": "权限测试页", + "authPageA": "权限测试页A", + "authPageB": "权限测试页B", + "frontend": "基于前端权限", + "backend": "基于后台权限", + "pageAuth": "页面权限", + "buttonAuth": "按钮权限", + "role": "角色权限", + "directive": "指令权限" + }, + "result": { + "result": "结果页", + "success": "成功页", + "fail": "失败页" + } + }, + "layouts": { + "header": { + "toggleCollapsed": "折叠菜单", + "toggleFullScreen": "切换全屏", + "switchLocale": "切换语言", + "settingDrawer": "设置抽屉", + "openSettingDrawer": "打开设置抽屉", + "projectSetting": "项目设置", + "darkMode": "深色主题", + "followSystem": "跟随系统", + "systemDefault": "系统默认", + "systemTheme": "系统主题", + "themeMode": "主题模式", + "lightMode": "浅色主题", + "colorWeak": "色弱模式", + "themeConfig": { + "title": "主题配置", + "copyConfigButton": "拷贝当前配置", + "resetConfigButton": "重置当前配置", + "message": { + "copyConfigSuccess": "拷贝配置成功!", + "resetConfigSuccess": "重置配置成功!" + } + }, + "transitionSetting": { + "title": "动画设置", + "enableTransition": "开启动画", + "enableProgressBar": "开启进度条", + "enablePageLoadingTransition": "开启页面加载动画", + "routeTransition": "切换路由动画" + } + }, + "userInfo": { + "userInformation": "用户信息", + "greeting": "你好", + "rolesList": "角色列表:{roles}", + "logoutButton": "退出登录" + }, + "logoutConfirmation": { + "title": "警告", + "content": "您确定要退出登录吗?", + "positiveText": "退出登录", + "negativeText": "取消", + "onNegativeClickMessage": "取消退出登录", + "onPositiveClickMessage": "退出登录成功" + } + }, + "searchDialog": { + "searchPlaceholder": "搜索", + "noResultsFound": "抱歉,未找到符合 { search } 的结果", + "toSelectTooltip": "选择", + "toNavigateTooltip": "导航", + "applications": "应用程序", + "chatBot": "ChatBot", + "actions": "操作列表", + "action": "操作", + "shortcut": "快捷方式", + "go": "前往" + }, + "page": { + "login": { + "title": "登录", + "form": { + "username": { + "label": "用户名", + "placeholder": "请输入用户名", + "error": "用户名不能为空" + }, + "password": { + "label": "密码", + "placeholder": "请输入密码", + "error": "密码不能为空" + }, + "confirmPassword": { + "label": "确认密码", + "placeholder": "请输入密码", + "error": "确认密码不能为空", + "validator": "两次密码不一致!" + }, + "forgotPassword": { + "label": "手机号码", + "placeholder": "示例:15912345678", + "requiredError": "手机号码不能为空", + "invalidFormatError": "无效的手机号码格式" + }, + "socialButtons": { + "signInWithQQ": "使用 QQ 登录", + "signInWithWeChat": "使用微信登录" + }, + "signText": { + "signIn": "还没有账号吗?", + "forgotPassword": "返回登录", + "signUp": "已经有账号了吗?" + }, + "welcomeBackTitle": "欢迎回来", + "helloTitle": "你好", + "forgotPasswordTitle": "忘记密码", + "greetingText": "Celeris Web 是一个使用 Vue 3、Vite 和 TypeScript 构建的高性能、可定制的前端开发模板。", + "sendResetLinkButton": "发送重置链接", + "resetLinkSentMessage": "重置链接已发送", + "signUp": "注册", + "backToSignIn": "返回登录", + "signIn": "登录", + "remember": "记住我", + "loginButton": "登录", + "registerButton": "注册", + "forgetPassword": "忘记密码", + "incorrectAccountOrPassword": "账号或密码不正确!" + }, + "notification": { + "loginSuccessMessage": "登录成功", + "welcomeBackMessage": "欢迎回来,{username}!" + } + }, + "copyDirective": { + "copy": "复制", + "copyDirective": "复制指令示例", + "copyPlaceholder": "请输入要复制的内容", + "copySuccess": "复制成功", + "copyError": "复制失败" + }, + "rippleDirective": { + "ripple": "涟漪", + "rippleDirective": "涟漪指令示例", + "description1": "涟漪是用于传达组件或交互元素状态的状态图层。", + "description2": "状态图层是放置在元素上的半透明覆盖层,用于指示其状态。" + }, + "permission": { + "permissionMode": { + "currentMode": "当前权限模式", + "backendMode": "后台权限模式", + "frontendMode": "前端角色权限模式", + "toggleMode": "切换权限模式" + }, + "pageTitles": { + "frontend": "前端权限示例", + "backend": "后端权限示例", + "button": "按钮权限控制" + }, + "roleButtonText": "拥有 { role } 角色权限可见", + "codeButtonText": "拥有code { code } 权限可见", + "currentPermissionMode": "当前权限模式", + "currentRole": "当前角色", + "currentCode": "当前code", + "clickToSeeButtonChange": "点击后请查看按钮变化", + "clickToSeeLeftMenuChange": "点击后请查看左侧菜单变化", + "frontendPermissionSwitchTitle": "权限切换(请先切换权限模式为前端角色权限模式)", + "backendPermissionSwitchTitle": "权限切换(请先切换权限模式为后端角色权限模式)", + "componentWayTitle": "组件方式判断权限(有需要可以自行全局注册)", + "functionWayTitle": "函数方式方式判断权限(适用于函数内部过滤)", + "functionWayButtonBoth": "拥有[USER,ADMIN]角色权限可见", + "directiveWayTitle": "指令方式方式判断权限(该方式不能动态修改权限.)", + "backendLeftMenuChangeTitle": "点击后请查看左侧菜单变化(必须处于后台权限模式才可测试此页面所展示的功能)" + }, + "headlessTable": { + "pageTitles": { + "basic": "基础表格" + } + }, + "result": { + "status": { + "error": "错误", + "success": "成功" + }, + "failPage": { + "title": "内容发送出错", + "subTitle": "很抱歉,发送内容时出现了问题。", + "buttons": { + "home": "返回主页", + "back": "返回上一级" + }, + "errorHeader": "发送内容出错时可能会有以下问题:", + "networkIssue": "网络连接问题", + "checkNetwork": "检查网络 >", + "messageTooLong": "消息过长,请精简一些", + "viewHelp": "查看帮助 >" + }, + "successPage": { + "title": "操作成功", + "subTitle": "ChatGPT 生成的内容已成功创建。", + "buttons": { + "home": "返回主页" + }, + "contentHeader": "AIGC 生成内容:", + "generatedTimeLabel": "生成时间", + "generatorLabel": "生成者", + "generatedContent": "在此显示生成的内容", + "contentLabel": "内容", + "step1": "输入内容", + "step2": "生成中", + "step2Content": "ChatGPT 正在生成内容,请稍等片刻。", + "step3": "审核中", + "step3Content": "生成的内容正在审核中,将很快完成审核。", + "step4": "完成" + } + } + } +} diff --git a/apps/thin/src/main.ts b/apps/thin/src/main.ts new file mode 100644 index 00000000..5a96dc4f --- /dev/null +++ b/apps/thin/src/main.ts @@ -0,0 +1,43 @@ +import { createApp } from "vue"; + +import { setupDirectives } from "@celeris/directives"; +import { setupI18n } from "@celeris/locale"; +import { router, setupRouter } from "./router"; +import { setupStore } from "./store"; +import { setupPermissionDirective } from "~/directives/permission"; +import { initializeConfiguration } from "~/AppConfiguration"; +import { setupRouterGuard } from "~/router/guard"; + +import App from "~/App.vue"; + +import "@celeris/styles"; + +const app = createApp(App); + +// Configure store +// 配置 store +setupStore(app); + +// Configure routing +// 配置路由 +setupRouter(app); + +// Configure router guard +// 配置路由守卫 +setupRouterGuard(router); + +// Register global directive +// 注册全局指令 +setupDirectives(app); +setupPermissionDirective(app); + +void Promise.all([ + // Initialize internal system configuration + // 初始化内部系统配置 + initializeConfiguration(), + // Configure i18n + // 配置国际化 + setupI18n(app), +]).finally(() => { + app.mount("#app"); +}); diff --git a/apps/thin/src/pages/dashboard/components/APIHealthMetrics.vue b/apps/thin/src/pages/dashboard/components/APIHealthMetrics.vue new file mode 100644 index 00000000..2b097e04 --- /dev/null +++ b/apps/thin/src/pages/dashboard/components/APIHealthMetrics.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/apps/thin/src/pages/dashboard/components/CardInnerIcon.vue b/apps/thin/src/pages/dashboard/components/CardInnerIcon.vue new file mode 100644 index 00000000..7f08ef02 --- /dev/null +++ b/apps/thin/src/pages/dashboard/components/CardInnerIcon.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/apps/thin/src/pages/dashboard/components/DataOverview.vue b/apps/thin/src/pages/dashboard/components/DataOverview.vue new file mode 100644 index 00000000..370da557 --- /dev/null +++ b/apps/thin/src/pages/dashboard/components/DataOverview.vue @@ -0,0 +1,272 @@ + + + + + diff --git a/apps/thin/src/pages/dashboard/components/PerformanceMetrics.vue b/apps/thin/src/pages/dashboard/components/PerformanceMetrics.vue new file mode 100644 index 00000000..556d2ef6 --- /dev/null +++ b/apps/thin/src/pages/dashboard/components/PerformanceMetrics.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/apps/thin/src/pages/dashboard/components/PopularAssistants.vue b/apps/thin/src/pages/dashboard/components/PopularAssistants.vue new file mode 100644 index 00000000..5e8d0724 --- /dev/null +++ b/apps/thin/src/pages/dashboard/components/PopularAssistants.vue @@ -0,0 +1,15 @@ + + + + + diff --git a/apps/thin/src/pages/dashboard/components/ResponseTypeDistribution.vue b/apps/thin/src/pages/dashboard/components/ResponseTypeDistribution.vue new file mode 100644 index 00000000..e76444d4 --- /dev/null +++ b/apps/thin/src/pages/dashboard/components/ResponseTypeDistribution.vue @@ -0,0 +1,15 @@ + + + + + diff --git a/apps/thin/src/pages/dashboard/components/UserAnalysis.vue b/apps/thin/src/pages/dashboard/components/UserAnalysis.vue new file mode 100644 index 00000000..255989ab --- /dev/null +++ b/apps/thin/src/pages/dashboard/components/UserAnalysis.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/apps/thin/src/pages/dashboard/components/UserAnalysisItem.vue b/apps/thin/src/pages/dashboard/components/UserAnalysisItem.vue new file mode 100644 index 00000000..9bc86578 --- /dev/null +++ b/apps/thin/src/pages/dashboard/components/UserAnalysisItem.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/apps/thin/src/pages/dashboard/index.vue b/apps/thin/src/pages/dashboard/index.vue new file mode 100644 index 00000000..a59a75cf --- /dev/null +++ b/apps/thin/src/pages/dashboard/index.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/apps/thin/src/pages/internal/exception/Exception.vue b/apps/thin/src/pages/internal/exception/Exception.vue new file mode 100644 index 00000000..ec042728 --- /dev/null +++ b/apps/thin/src/pages/internal/exception/Exception.vue @@ -0,0 +1,65 @@ + + + diff --git a/apps/thin/src/pages/internal/iframe/IframeContainer.vue b/apps/thin/src/pages/internal/iframe/IframeContainer.vue new file mode 100644 index 00000000..1b7f4319 --- /dev/null +++ b/apps/thin/src/pages/internal/iframe/IframeContainer.vue @@ -0,0 +1,32 @@ + + + diff --git a/apps/thin/src/pages/internal/iframe/IframePage.vue b/apps/thin/src/pages/internal/iframe/IframePage.vue new file mode 100644 index 00000000..f41e76b4 --- /dev/null +++ b/apps/thin/src/pages/internal/iframe/IframePage.vue @@ -0,0 +1,32 @@ + + +