You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
786 B

24 hours ago
import { ProjectGmBootstrap } from '../gm/ProjectGmBootstrap';
import { GmShell } from '../../mx/module/gm';
3 weeks ago
24 hours ago
/**
* GM 入口门面:委托可视化壳 `GmShell` / `ProjectGmBootstrap`。
* 旧巨型 Component + 输入框实现已移除,见 docs/方案-GM可视化模块.md。
*/
export class GM {
/** 是否显示(与壳同步) */
static get ShowGM(): boolean {
return GmShell.visible;
3 weeks ago
}
24 hours ago
static set ShowGM(v: boolean) {
if (v && !GmShell.visible) ProjectGmBootstrap.show();
else if (!v && GmShell.visible) GmShell.hide();
3 weeks ago
}
/**
24 hours ago
* 切换 GM 面板。
3 weeks ago
*/
24 hours ago
static show(): void {
ProjectGmBootstrap.show();
3 weeks ago
}
24 hours ago
/**
* 关闭 GM。
*/
static hide(): void {
GmShell.hide();
3 weeks ago
}
24 hours ago
}