Skip to content

Commit

Permalink
Update to support providing title to views added to a specific layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnman committed Sep 10, 2024
1 parent 87a2878 commit 1f17e26
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { OpenFin } from "@openfin/core";
import type { PlatformApp, PlatformAppIdentifier } from "../../shapes/app-shapes";
import type { PlatformLayoutSnapshot } from "../../shapes/layout-shapes";
import { isEmpty, randomUUID } from "../../utils";
Expand Down Expand Up @@ -69,8 +70,9 @@ export async function launch(
if (target?.layout) {
await window?.fin?.Platform.Layout.getCurrentSync().addView({
name,
url: appToLaunch.details.url
});
url: appToLaunch.details.url,
title: appToLaunch.title // right now this title is read by the layout but it is not exposed by the type which is why it is cast.
} as unknown as OpenFin.ViewOptions);
} else {
const currentLayout = window.fin?.Platform.Layout.getCurrentLayoutManagerSync();
const layoutId = `tab-${randomUUID()}`;
Expand Down

0 comments on commit 1f17e26

Please sign in to comment.