iOS porting: EvenHub app compatibility first pass

This commit is contained in:
James Babcock committed 2026-09-08 14:47:58 -07:00
1 parent 79b6c276f8
commit 44bd1d8a2d
24 files changed
+843 -24

No files matched your search

+4 -3
View File
@@ -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) || isFontFile(name) || (!global.isIOS && (isDecodableImageFile(name) || EHPK_FILE.test(name))),
isSupportedFile: (name) => TEXT_FILE.test(name) || isFontFile(name) || EHPK_FILE.test(name) || (!global.isIOS && isDecodableImageFile(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,7 +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) && !isFontFile(entry.name)) return [];
if (global.isIOS && !TEXT_FILE.test(entry.name) && !isFontFile(entry.name) && !EHPK_FILE.test(entry.name)) return [];
if (TEXT_FILE.test(entry.name)) {
return [
{
@@ -192,7 +192,7 @@ function fileOpenActions(entry: DirectoryEntry, options: FilesAppOptions): FileI
];
}
if (EHPK_FILE.test(entry.name)) {
return [
const actions: FileInfoAction[] = [
{
label: "Run app",
onSelect: (ctx) => {
@@ -210,6 +210,7 @@ function fileOpenActions(entry: DirectoryEntry, options: FilesAppOptions): FileI
},
},
];
return global.isIOS ? actions.slice(0, 1) : actions;
}
if (isDecodableImageFile(entry.name)) {
return [
+1
View File
@@ -64,6 +64,7 @@ const filesApp: AppDefinition = {
openEhpkApp: (path) => {
void openEvenHubPackage(ctx, path).catch((error) => {
ctx.appendLog(`evenhub launch failed: ${error}`);
openTextDocumentWindow(ctx, 'Could not run app', String(error));
});
},
installEhpkApp: async (path) => {