推进 INI 面板 launch API manifest
This commit is contained in:
@@ -61,6 +61,27 @@ export function createIniPanelLauncherLinkViewModel(entries = getVisibleIniPanel
|
||||
}));
|
||||
}
|
||||
|
||||
export function createIniPanelLaunchApiManifest(entries = getVisibleIniPanelEntries()) {
|
||||
return {
|
||||
apiName: "ini-panel-launch",
|
||||
methods: [
|
||||
"getLaunchApiManifest",
|
||||
"getLauncherLinks",
|
||||
"getControlPageApiMethods",
|
||||
],
|
||||
visibleEntries: entries.map(({ id, href, title }) => ({
|
||||
id,
|
||||
href,
|
||||
title,
|
||||
})),
|
||||
targetPages: entries.map(({ id, href }) => ({
|
||||
entryId: id,
|
||||
href,
|
||||
})),
|
||||
controlPageApiMethods: createControlPageBrowserApiMethods(),
|
||||
};
|
||||
}
|
||||
|
||||
export function createIniPanelShellControlPageContract() {
|
||||
const readonlyStatusApiManifest = createMachineSessionReadonlyStatusApiManifest();
|
||||
return {
|
||||
@@ -99,6 +120,7 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
|
||||
title,
|
||||
})),
|
||||
launcherLinks: createIniPanelLauncherLinkViewModel(entries),
|
||||
launchApiManifest: createIniPanelLaunchApiManifest(entries),
|
||||
controlPage: {
|
||||
browserApiMethods: createControlPageBrowserApiMethods(),
|
||||
contract: createIniPanelShellControlPageContract(),
|
||||
|
||||
Reference in New Issue
Block a user