Support shared bid history and custom project opening
This commit is contained in:
+3
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user