Add password login support to web UI and backend
Implement password-based QQ login across the stack: add a PasswordLogin React component, integrate it into the QQ login page, and add a frontend controller method to call a new /QQLogin/PasswordLogin API. On the backend, add QQPasswordLoginHandler, router entry, and WebUiDataRuntime hooks (setPasswordLoginCall / requestPasswordLogin) plus a default handler. Register a password login callback in the shell (base.ts) that calls the kernel login service, handles common error cases and falls back to QR code when needed. Update types to include onPasswordLoginRequested and adjust NodeIKernelLoginService method signatures (including passwordLogin return type changed to Promise<QuickLoginResult>) and minor formatting fixes.
This commit is contained in:
1 parent
0fd1a32293
commit
168447dcbc
9 files changed
+269
-20
No files matched your search
@@ -21,7 +21,7 @@ export interface PasswordLoginRetType {
|
||||
jumpWord: string;
|
||||
tipsTitle: string;
|
||||
tipsContent: string;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export interface PasswordLoginArgType {
|
||||
@@ -55,37 +55,37 @@ export interface QuickLoginResult {
|
||||
jumpUrl: string,
|
||||
jumpWord: string,
|
||||
tipsTitle: string,
|
||||
tipsContent: string
|
||||
tipsContent: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface NodeIKernelLoginService {
|
||||
getMsfStatus: () => number;
|
||||
|
||||
setLoginMiscData(arg0: string, value: string): unknown;
|
||||
setLoginMiscData (arg0: string, value: string): unknown;
|
||||
|
||||
getMachineGuid(): string;
|
||||
getMachineGuid (): string;
|
||||
|
||||
get(): NodeIKernelLoginService;
|
||||
get (): NodeIKernelLoginService;
|
||||
|
||||
connect(): boolean;
|
||||
connect (): boolean;
|
||||
|
||||
addKernelLoginListener(listener: NodeIKernelLoginListener): number;
|
||||
addKernelLoginListener (listener: NodeIKernelLoginListener): number;
|
||||
|
||||
removeKernelLoginListener(listener: number): void;
|
||||
removeKernelLoginListener (listener: number): void;
|
||||
|
||||
initConfig(config: LoginInitConfig): void;
|
||||
initConfig (config: LoginInitConfig): void;
|
||||
|
||||
getLoginMiscData(data: string): Promise<GeneralCallResult & { value: string }>;
|
||||
getLoginMiscData (data: string): Promise<GeneralCallResult & { value: string; }>;
|
||||
|
||||
getLoginList(): Promise<{
|
||||
getLoginList (): Promise<{
|
||||
result: number, // 0是ok
|
||||
LocalLoginInfoList: LoginListItem[]
|
||||
LocalLoginInfoList: LoginListItem[];
|
||||
}>;
|
||||
|
||||
quickLoginWithUin(uin: string): Promise<QuickLoginResult>;
|
||||
quickLoginWithUin (uin: string): Promise<QuickLoginResult>;
|
||||
|
||||
passwordLogin(param: PasswordLoginArgType): Promise<unknown>;
|
||||
passwordLogin (param: PasswordLoginArgType): Promise<QuickLoginResult>;
|
||||
|
||||
getQRCodePicture(): boolean;
|
||||
getQRCodePicture (): boolean;
|
||||
}
|
||||
Reference in new issue
Block a user