Support shared bid history and custom project opening

This commit is contained in:
Sander Grootendorst
2026-12-03 12:09:17 +01:00
parent 7e3780e500
commit ebadebbd11
9 changed files with 56 additions and 18 deletions
+3 -2
View File
@@ -2,7 +2,7 @@ import { workspaceElements } from './workspace-elements.js';
// A row identifies a folder accessible through the current launch's grants. Private
// recents supply the activity order only, never the inventory or a grant.
export function mountOverview(target, {client, extensionName, text, locale, onImport, onOverview, showEmptyProjectMessage = true}) {
export function mountOverview(target, {client, extensionName, text, locale, onImport, onOverview, onOpen, showEmptyProjectMessage = true}) {
const document = target.ownerDocument;
const {icon} = workspaceElements(document);
function element(tag, label, className) {
@@ -172,7 +172,8 @@ export function mountOverview(target, {client, extensionName, text, locale, onIm
const row = container.querySelector('[data-project-id="' + CSS.escape(project.id) + '"]');
row?.setAttribute('aria-busy', 'true');
}
void run(() => client.openListed(project), alert, text.opening + ' ' + project.name);
if (onOpen) void run(() => onOpen(project), alert, '');
else void run(() => client.openListed(project), alert, text.opening + ' ' + project.name);
}
function refresh() {
if (pendingRefresh) return pendingRefresh;