Initial I Want to Heal app

This commit is contained in:
Warren H
2026-06-17 20:04:36 -04:00
parent 3880db1b58
commit 3c90998a61
109 changed files with 32775 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
import { Capacitor, registerPlugin } from '@capacitor/core'
export type AndroidDisplay = {
id: number
name: string
width: number
height: number
refreshRate: number
isCurrent: boolean
isPresentation: boolean
}
type DualScreenNativePlugin = {
getDisplays: () => Promise<{
currentDisplayId: number
displays: AndroidDisplay[]
}>
openTopDisplay: (options?: { displayId?: number }) => Promise<AndroidDisplay & {
opened: boolean
}>
closeTopDisplay: () => Promise<void>
}
const nativePlugin = registerPlugin<DualScreenNativePlugin>('DualScreen')
export function hasNativeDualScreenBridge() {
return Capacitor.isNativePlatform()
}
export function getNativeDisplays() {
return nativePlugin.getDisplays()
}
export function openNativeTopDisplay(displayId?: number) {
return nativePlugin.openTopDisplay(
displayId === undefined ? undefined : { displayId },
)
}
export function closeNativeTopDisplay() {
return nativePlugin.closeTopDisplay()
}