forked from Blendman974/faceclaw
iOS porting: Battery indicators, app icon, add the rest of the apps
This commit is contained in:
1 parent
00a5e38f75
commit
e5ba7abc18
31 files changed
+501
-65
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { Application, Button, Color, Dialogs, GridLayout, Image, Label, Page, StackLayout, type TouchGestureEventData } from '@nativescript/core'
|
||||
import { createConfigureDevicesPage } from './config-page.ios'
|
||||
import { ALL_APPS } from '../apps/all-apps'
|
||||
import { IosPreviewController } from '../g2/ios-preview-controller'
|
||||
import { PhoneGestureRecognizer } from './phone-gestures'
|
||||
import { onAnySettingChanged, previewColorSetting } from '../ui/dashboard-settings'
|
||||
@@ -103,6 +104,12 @@ export function createMainPage(): Page {
|
||||
GridLayout.setColumn(view, index); tabs.addChild(view); tabButtons.push(view)
|
||||
}
|
||||
const sizeButton = button(controller.displayModeLabel, () => controller.cycleDisplayMode())
|
||||
settings.addChild(button('Open app', () => { void (async () => {
|
||||
const apps = ALL_APPS.filter(app => app.showInLauncher !== false).slice().sort((a, b) => a.title.localeCompare(b.title))
|
||||
const title = await Dialogs.action({ title: 'Open app', cancelButtonText: 'Cancel', actions: apps.map(app => app.title) })
|
||||
const app = apps.find(app => app.title === title)
|
||||
if (app) { await controller.launchApp(app.appId); selectTab('watch') }
|
||||
})() }))
|
||||
settings.addChild(sizeButton)
|
||||
settings.addChild(button('Toggle green / grayscale', () => previewColorSetting.set(previewColorSetting.get() === 'green' ? 'white' : 'green')))
|
||||
const help = new Label()
|
||||
|
||||
Reference in new issue
Block a user