mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-31 10:49:47 +08:00
✨ Feature(custom): rewrite setting page, WIP
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IStringKeyMap } from '#/types/types'
|
||||
import type { IStringKeyMap } from '#/types/types'
|
||||
|
||||
const AliyunAreaCodeName: IStringKeyMap = {
|
||||
'oss-cn-hangzhou': '华东1(杭州)',
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'>({
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user