mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-06-23 14:16:52 +08:00
still bugs
This commit is contained in:
@@ -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});
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user