update: add zustand store and basic setup
This commit is contained in:
21
src/types/cfg.ts
Normal file
21
src/types/cfg.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { AdvancedListItem } from "@/types/common"
|
||||
|
||||
export interface File {
|
||||
dir: string
|
||||
filename: string
|
||||
format: "cfg" | "vcfg" | "txt" | "zip"
|
||||
createTime: number
|
||||
updateTime: number
|
||||
size: number
|
||||
}
|
||||
|
||||
export interface Owner {
|
||||
ownerSteamId64: string
|
||||
ownerSteamName: string
|
||||
ownerToolboxId: string
|
||||
ownerToolboxName: string
|
||||
}
|
||||
|
||||
export interface CfgBackup extends File, Owner {}
|
||||
|
||||
export interface Cfg extends File, AdvancedListItem {}
|
||||
30
src/types/cfgx.ts
Normal file
30
src/types/cfgx.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Owner } from "@/types/cfg"
|
||||
|
||||
export interface XBase {
|
||||
name: string
|
||||
value: string
|
||||
default: string
|
||||
info: string
|
||||
}
|
||||
|
||||
export interface Key extends XBase {}
|
||||
export interface Alias extends XBase {}
|
||||
export interface Value extends XBase {
|
||||
option: { name: string; value: string }[]
|
||||
}
|
||||
|
||||
// 转换方法 [[key=${name}]] | [[alias=${name}]] | [[value=${name}]] -> value
|
||||
export interface XItem {
|
||||
version: string
|
||||
creater: string
|
||||
key: Key[]
|
||||
alias: Alias[]
|
||||
value: Value[]
|
||||
comment: string
|
||||
content: string
|
||||
}
|
||||
|
||||
export interface CfgX extends Owner {
|
||||
note: string
|
||||
items: XItem[]
|
||||
}
|
||||
5
src/types/common.ts
Normal file
5
src/types/common.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface AdvancedListItem {
|
||||
mark?: boolean
|
||||
hidden?: boolean
|
||||
priority?: number
|
||||
}
|
||||
10
src/types/steam.ts
Normal file
10
src/types/steam.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { AdvancedListItem } from "@/types/common"
|
||||
|
||||
export interface SteamUser extends AdvancedListItem {
|
||||
steamID64: string
|
||||
steamID32: string
|
||||
accountName: string
|
||||
personaName: string
|
||||
recent: number
|
||||
avatar: string
|
||||
}
|
||||
Reference in New Issue
Block a user