mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-06-23 22:16:53 +08:00
update
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { createContext } from "react";
|
||||
import { LoginContextType, GlobalConf } from "./type";
|
||||
|
||||
export const loginContextDefault: LoginContextType = {
|
||||
login: {
|
||||
login: false,
|
||||
type: '',
|
||||
name: ''
|
||||
},
|
||||
save: () => {}
|
||||
};
|
||||
|
||||
export const LoginContext = createContext(loginContextDefault);
|
||||
export const GlobalConfContext = createContext<GlobalConf>({platformConf: []});
|
||||
@@ -0,0 +1,29 @@
|
||||
export interface LoginStatus {
|
||||
login: boolean
|
||||
type: String
|
||||
name: String
|
||||
}
|
||||
|
||||
export type LoginContextType = {
|
||||
login: LoginStatus
|
||||
save: (status: LoginStatus) => void
|
||||
}
|
||||
|
||||
export interface SubscribeConfig {
|
||||
platform: String
|
||||
target?: String
|
||||
catetories: Array<number>
|
||||
tags: Array<String>
|
||||
}
|
||||
|
||||
export interface GlobalConf {
|
||||
platformConf: Array<PlatformConfig>
|
||||
}
|
||||
|
||||
export interface PlatformConfig {
|
||||
name: string
|
||||
catetories: Map<number, string>,
|
||||
enableTag: boolean,
|
||||
platformName: string,
|
||||
hasTarget: boolean
|
||||
}
|
||||
Reference in New Issue
Block a user