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
@@ -58,18 +58,24 @@ function debugTestsMenu(): MenuLayer {
|
||||
},
|
||||
{
|
||||
label: "Buzzer demo",
|
||||
disabled: global.isIOS,
|
||||
description: global.isIOS ? "Glasses sound playback is not available on iOS yet." : undefined,
|
||||
onSelect: (ctx) => {
|
||||
ctx.stack.push(new BuzzerDemoLayer());
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Accelerometer demo",
|
||||
disabled: global.isIOS,
|
||||
description: global.isIOS ? "Not available on iOS yet." : undefined,
|
||||
onSelect: (ctx) => {
|
||||
ctx.stack.push(new AccelerometerDemoLayer(DEVELOPER_WINDOW_ID, ctx.actions.requestRender));
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Light sensor",
|
||||
disabled: global.isIOS,
|
||||
description: global.isIOS ? "Not available on iOS yet." : undefined,
|
||||
onSelect: (ctx) => {
|
||||
ctx.stack.push(new LightSensorDemoLayer(DEVELOPER_WINDOW_ID, ctx.actions.requestRender));
|
||||
},
|
||||
@@ -91,6 +97,8 @@ export function createDeveloperAppWindow(appContext: AppContext, options: InProc
|
||||
[
|
||||
{
|
||||
label: "Load app from URL",
|
||||
disabled: global.isIOS,
|
||||
description: global.isIOS ? "Not available on iOS yet." : undefined,
|
||||
onSelect: (ctx) => {
|
||||
const layer = new LoadAppFromUrlLayer(appContext);
|
||||
ctx.stack.push(layer);
|
||||
@@ -99,6 +107,8 @@ export function createDeveloperAppWindow(appContext: AppContext, options: InProc
|
||||
},
|
||||
{
|
||||
label: "Load app from QR code",
|
||||
disabled: global.isIOS,
|
||||
description: global.isIOS ? "Not available on iOS yet." : undefined,
|
||||
onSelect: (ctx) => {
|
||||
const layer = new LoadAppFromQrLayer(appContext);
|
||||
ctx.stack.push(layer);
|
||||
@@ -107,6 +117,8 @@ export function createDeveloperAppWindow(appContext: AppContext, options: InProc
|
||||
},
|
||||
{
|
||||
label: "Show resource usage",
|
||||
disabled: global.isIOS,
|
||||
description: global.isIOS ? "Not available on iOS yet." : undefined,
|
||||
onSelect: (ctx) => {
|
||||
ctx.stack.push(new ResourceUsageLayer(DEVELOPER_WINDOW_ID, ctx.actions.requestRender));
|
||||
},
|
||||
|
||||
@@ -585,8 +585,8 @@ export class FileBrowserLayer implements Layer {
|
||||
for (const path of getBookmarkedPaths()) {
|
||||
rows.push(this.bookmarkItem(path));
|
||||
}
|
||||
rows.push(this.placeItem("Internal storage", externalStorageRootPath()));
|
||||
rows.push(this.placeItem("/", "/"));
|
||||
rows.push(this.placeItem(global.isIOS ? "Faceclaw documents" : "Internal storage", externalStorageRootPath()));
|
||||
if (!global.isIOS) rows.push(this.placeItem("/", "/"));
|
||||
return rows;
|
||||
}
|
||||
this.loadEntries();
|
||||
|
||||
@@ -45,7 +45,7 @@ export type FilesAppOptions = InProcessAppOptions & {
|
||||
export function createFilesAppWindow(options: FilesAppOptions): InProcessWindow {
|
||||
let created: InProcessWindow | null = null;
|
||||
const browser = new FileBrowserLayer({
|
||||
isSupportedFile: (name) => TEXT_FILE.test(name) || isDecodableImageFile(name) || EHPK_FILE.test(name) || isFontFile(name),
|
||||
isSupportedFile: (name) => TEXT_FILE.test(name) || (!global.isIOS && (isDecodableImageFile(name) || EHPK_FILE.test(name) || isFontFile(name))),
|
||||
// The browser handles double-click itself (up a level), so it is not
|
||||
// wrapped in YieldAtRootLayer; it yields explicitly from the top level.
|
||||
onLeave: () => shell.yieldFocusToSidebar(),
|
||||
@@ -170,6 +170,7 @@ function confirmEhpkPermissions(ctx: LayerContext, entry: DirectoryEntry, procee
|
||||
* window for viewable types, empty for everything else (metadata only).
|
||||
*/
|
||||
function fileOpenActions(entry: DirectoryEntry, options: FilesAppOptions): FileInfoAction[] {
|
||||
if (global.isIOS && !TEXT_FILE.test(entry.name)) return [];
|
||||
if (TEXT_FILE.test(entry.name)) {
|
||||
return [
|
||||
{
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/** Native services still outside the current iOS app-screen milestone. */
|
||||
const unavailable: Record<string, string> = {
|
||||
music: 'Media-player integration is not available on iOS yet.',
|
||||
notifications: 'Phone notification integration is not available on iOS yet.',
|
||||
transcribe: 'Voice capture and transcription are not available on iOS yet.',
|
||||
microphones: 'Glasses microphone capture is not available on iOS yet.',
|
||||
compass: 'Glasses compass streaming is not available on iOS yet.',
|
||||
navigate: 'Navigation location tracking is not available on iOS yet.',
|
||||
weather: 'Weather location access is not available on iOS yet.',
|
||||
calendar: 'Calendar access is not available on iOS yet.',
|
||||
evenhub: 'The EvenHub store and app runtime are not available on iOS yet.',
|
||||
}
|
||||
export function iosAppUnavailableReason(appId: string): string | null {
|
||||
return unavailable[appId] ?? null
|
||||
}
|
||||
Reference in new issue
Block a user