mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-10-21 12:07:59 +08:00
[feat] add HarmonyOS desktop and mobile clients,issue #117
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { UIAbility } from '@kit.AbilityKit';
|
||||
import { window } from '@kit.ArkUI';
|
||||
import { DesktopHost } from '../pages/DesktopHost';
|
||||
|
||||
export default class EntryAbility extends UIAbility {
|
||||
onPrepareToTerminate(): boolean { return DesktopHost.requestExit(); }
|
||||
onNewWant(): void { DesktopHost.restore(); }
|
||||
onForeground(): void { DesktopHost.foreground(); }
|
||||
onWindowStageCreate(stage: window.WindowStage): void {
|
||||
DesktopHost.start(stage, this.context);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user