Feature(custom): rewrite setting page, WIP

This commit is contained in:
Kuingsmile
2025-08-06 11:19:19 +08:00
parent 32c3eaba12
commit 4b8bfded1d
182 changed files with 5536 additions and 3322 deletions

View File

@@ -1,4 +1,4 @@
import { IStringKeyMap } from '#/types/types'
import type { IStringKeyMap } from '#/types/types'
const AliyunAreaCodeName: IStringKeyMap = {
'oss-cn-hangzhou': '华东1(杭州)',

View File

@@ -2,8 +2,19 @@ import { v4 as uuidv4 } from 'uuid'
import { getConfig } from '@/manage/utils/dataSender'
import { availableIconList } from '@/manage/utils/icon'
import { IStringKeyMap } from '#/types/types'
import { handleUrlEncode, isNeedToShorten, safeSliceF } from '#/utils/common'
import { isNeedToShorten, safeSliceF } from '@/utils/common'
import type { IStringKeyMap } from '#/types/types'
export const isUrlEncode = (url: string): boolean => {
url = url || ''
try {
return url !== decodeURI(url)
} catch {
return false
}
}
export const handleUrlEncode = (url: string): string => (isUrlEncode(url) ? url : encodeURI(url))
export function randomStringGenerator (length: number): string {
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'

View File

@@ -3,7 +3,7 @@ import { createI18n } from 'vue-i18n'
import en from '@/i18n/locales/en.json'
import zhCN from '@/i18n/locales/zh-CN.json'
import zhTW from '@/i18n/locales/zh-TW.json'
import { IStringKeyMap } from '#/types/types'
import type { IStringKeyMap } from '#/types/types'
type MessageSchema = typeof en
const i18n = createI18n<MessageSchema, 'en' | 'zh-CN' | 'zh-TW'>({

View File

@@ -1,5 +1,5 @@
import { IRPCActionType } from '#/types/enum'
import { IObj } from '#/types/types'
import { IRPCActionType } from '@/utils/enum'
import type { IObj } from '#/types/types'
export function saveConfig (config: IObj | string, value?: any) {
const configObj = typeof config === 'string' ? { [config]: value } : config

View File

@@ -1,4 +1,4 @@
import { IStringKeyMap } from '#/types/types'
import type { IStringKeyMap } from '#/types/types'
const AUTH_KEY_VALUE_RE = /(\w+)=["']?([^'"]{1,10000})["']?/
let NC = 0

View File

@@ -3,7 +3,7 @@ import { createI18n } from 'vue-i18n'
import en from '@/i18n/locales/en.json'
import zhCN from '@/i18n/locales/zh-CN.json'
import zhTW from '@/i18n/locales/zh-TW.json'
import { IStringKeyMap } from '#/types/types'
import type { IStringKeyMap } from '#/types/types'
import { AliyunAreaCodeName, QiniuAreaCodeName, TencentAreaCodeName } from './bucketConfigCons'
type MessageSchema = typeof en