推进 INI 面板 launcher link view-model helper
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
INI_PANEL_ENTRIES,
|
||||
getIniPanelEntryByHref,
|
||||
getIniPanelEntryManifest,
|
||||
} from "./entry-manifest.js";
|
||||
export {
|
||||
INI_PANEL_ENTRIES,
|
||||
getIniPanelEntryByHref,
|
||||
@@ -9,3 +14,15 @@ export {
|
||||
export {
|
||||
renderMachineSessionControlView,
|
||||
} from "./control-view-renderer.js";
|
||||
|
||||
export function getVisibleIniPanelEntries() {
|
||||
return getIniPanelEntryManifest();
|
||||
}
|
||||
|
||||
export function createIniPanelLauncherLinkViewModel(entries = getVisibleIniPanelEntries()) {
|
||||
return entries.map(({ id, href, title }) => ({
|
||||
entryId: id,
|
||||
href,
|
||||
label: title,
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user