mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-26 10:45:57 +08:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user