mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
style: 移除老旧代码
This commit is contained in:
@@ -1,27 +1,4 @@
|
|||||||
interface IGlobalAdapter {
|
export class NodeIGlobalAdapter {
|
||||||
onLog(...args: unknown[]): void;
|
|
||||||
|
|
||||||
onGetSrvCalTime(...args: unknown[]): void;
|
|
||||||
|
|
||||||
onShowErrUITips(...args: unknown[]): void;
|
|
||||||
|
|
||||||
fixPicImgType(...args: unknown[]): void;
|
|
||||||
|
|
||||||
getAppSetting(...args: unknown[]): void;
|
|
||||||
|
|
||||||
onInstallFinished(...args: unknown[]): void;
|
|
||||||
|
|
||||||
onUpdateGeneralFlag(...args: unknown[]): void;
|
|
||||||
|
|
||||||
onGetOfflineMsg(...args: unknown[]): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NodeIGlobalAdapter extends IGlobalAdapter {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-misused-new
|
|
||||||
new(adapter: IGlobalAdapter): NodeIGlobalAdapter;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class GlobalAdapter implements IGlobalAdapter {
|
|
||||||
onLog(...args: unknown[]) {
|
onLog(...args: unknown[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@ import type { SelfInfo } from '@/core/entities';
|
|||||||
|
|
||||||
import { LogWrapper } from '@/common/utils/log';
|
import { LogWrapper } from '@/common/utils/log';
|
||||||
import { LoginListener, NodeIKernelSessionListener } from '@/core/listeners';
|
import { LoginListener, NodeIKernelSessionListener } from '@/core/listeners';
|
||||||
import { NodeIDispatcherAdapter, GlobalAdapter, NodeIDependsAdapter } from '@/core/adapters';
|
import { NodeIDispatcherAdapter, NodeIDependsAdapter, NodeIGlobalAdapter } from '@/core/adapters';
|
||||||
import { NapCatPathWrapper } from '@/common/framework/napcat';
|
import { NapCatPathWrapper } from '@/common/framework/napcat';
|
||||||
import {
|
import {
|
||||||
InstanceContext,
|
InstanceContext,
|
||||||
@@ -70,7 +70,7 @@ export async function NCoreInitShell() {
|
|||||||
},
|
},
|
||||||
thumb_config: { maxSide: 324, minSide: 48, longLimit: 6, density: 2 },
|
thumb_config: { maxSide: 324, minSide: 48, longLimit: 6, density: 2 },
|
||||||
},
|
},
|
||||||
new GlobalAdapter() as any,
|
new NodeIGlobalAdapter(),
|
||||||
);
|
);
|
||||||
loginService.initConfig({
|
loginService.initConfig({
|
||||||
machineId: '',
|
machineId: '',
|
||||||
@@ -190,7 +190,7 @@ export async function NCoreInitShell() {
|
|||||||
logger.log(`可用于快速登录的 QQ:\n${historyLoginList
|
logger.log(`可用于快速登录的 QQ:\n${historyLoginList
|
||||||
.map((u, index) => `${index + 1}. ${u.uin} ${u.nickName}`)
|
.map((u, index) => `${index + 1}. ${u.uin} ${u.nickName}`)
|
||||||
.join('\n')
|
.join('\n')
|
||||||
}`);
|
}`);
|
||||||
}
|
}
|
||||||
loginService.getQRCodePicture();
|
loginService.getQRCodePicture();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user