still bugs

This commit is contained in:
felinae98
2021-09-26 16:22:49 +08:00
parent dce58580f2
commit 5e153b0d2f
11 changed files with 308 additions and 36 deletions
+1 -1
View File
@@ -14,4 +14,4 @@ export const loginContextDefault: LoginContextType = {
};
export const LoginContext = createContext(loginContextDefault);
export const GlobalConfContext = createContext<GlobalConf>({platformConf: []});
export const GlobalConfContext = createContext<GlobalConf>({platformConf: {}, loaded: false});
+28 -5
View File
@@ -18,20 +18,30 @@ export type LoginContextType = {
}
export interface SubscribeConfig {
platform: string
targetType: string
target?: string
catetories: Array<number>
targetName: string
cats: Array<number>
tags: Array<string>
}
export interface GlobalConf {
platformConf: Array<PlatformConfig>
platformConf: AllPlatformConf,
loaded: boolean
}
export interface AllPlatformConf {
[idx: string]: PlatformConfig;
}
interface CategoryConfig {
[idx: number]: string
}
export interface PlatformConfig {
name: string
catetories: Map<number, string>,
enableTag: boolean,
categories: CategoryConfig
enabledTag: boolean,
platformName: string,
hasTarget: boolean
}
@@ -43,3 +53,16 @@ export interface TokenResp {
id: string
name: string
}
export interface SubscribeGroupDetail {
name: string,
subscribes: Array<SubscribeConfig>
}
export interface SubscribeResp {
[idx: string]: SubscribeGroupDetail
}
export interface TargetNameResp {
targetName: string
}