feat: allow peek view to be closed by the caller && bump bs (#8542)

depends on https://github.com/toeverything/blocksuite/pull/8558
fix BS-1570
This commit is contained in:
pengx17
2024-10-28 09:16:35 +00:00
parent 3f7752e261
commit 81029db6ce
34 changed files with 530 additions and 385 deletions

View File

@@ -152,19 +152,12 @@ const WorkspacePage = ({ meta }: { meta: WorkspaceMetadata }) => {
})
);
window.exportWorkspaceSnapshot = async (docs?: string[]) => {
const zip = await ZipTransformer.exportDocs(
await ZipTransformer.exportDocs(
workspace.docCollection,
Array.from(workspace.docCollection.docs.values())
.filter(doc => (docs ? docs.includes(doc.id) : true))
.map(doc => doc.getDoc())
);
const url = URL.createObjectURL(zip);
// download url
const a = document.createElement('a');
a.href = url;
a.download = `${workspace.docCollection.meta.name}.zip`;
a.click();
URL.revokeObjectURL(url);
};
window.importWorkspaceSnapshot = async () => {
const input = document.createElement('input');