feat: add infra code (#2718)

This commit is contained in:
Himself65
2023-06-08 09:41:20 +08:00
committed by GitHub
parent 4958d096b0
commit f3fd5ff76b
22 changed files with 283 additions and 16 deletions

View File

@@ -102,11 +102,9 @@ export const CRUD: WorkspaceCRUD<WorkspaceFlavour.LOCAL> = {
// workspaces in desktop
if (window.apis && environment.isDesktop) {
// @ts-expect-error
const desktopIds = (await window.apis.workspace.list()).map(([id]) => id);
// the ids maybe a subset of the local storage
const moreWorkspaces = desktopIds.filter(
// @ts-expect-error
id => !allWorkspaceIDs.includes(id)
);
allWorkspaceIDs = [...allWorkspaceIDs, ...moreWorkspaces];