Add options to load an app from a URL or a QR code

(The QR code reading does not work yet)
This commit is contained in:
James Babcock committed 2026-08-21 12:03:24 -07:00
1 parent 6e4ece5dc7
commit 92cd05b6ca
22 files changed
+685 -93

No files matched your search

+15 -1
View File
@@ -10,7 +10,7 @@
import { type AppContext, type AppDefinition } from "../app-definition";
import { shell } from "../../ui/shell/shell";
import { EvenHubStoreLayer } from "./store-layer";
import { launchPackage } from "./manager";
import { launchPackage, launchUrl, normalizeAppUrl } from "./manager";
import { createInProcessWindow, type InProcessWindow } from "../../ui/shell/in-process-window";
import { renderEvenRealitiesLogo } from "../../graphics/even-realities-logo";
import { makeImageWindowIcon, windowIcon } from "../../ui/shell/chrome-layer";
@@ -26,6 +26,20 @@ export function openEvenHubPackage(ctx: AppContext, ehpkPath: string): Promise<v
return launchPackage(ctx, ehpkPath);
}
/**
* Launch an app straight from a live web server instead of an .ehpk — the
* Developer app's "Load app from URL" / "Load app from QR code" entries, for
* running an app off a dev server without packaging it first.
*/
export function openEvenHubUrl(ctx: AppContext, url: string): Promise<void> {
return launchUrl(ctx, url);
}
/** Whether a string can be loaded by openEvenHubUrl, for validating input. */
export function isLoadableAppUrl(url: string): boolean {
return normalizeAppUrl(url) !== null;
}
const evenhubApp: AppDefinition = {
appId: "evenhub",
title: "EvenHub",