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