refactor: add workspace unit

This commit is contained in:
alt0
2023-01-10 18:37:24 +08:00
parent 5723117cb8
commit e13d27ad9c
16 changed files with 386 additions and 268 deletions
@@ -5,6 +5,9 @@ import { getDefaultHeadImgBlob } from '../utils/index.js';
export const setDefaultAvatar = async (
blocksuiteWorkspace: BlocksuiteWorkspace
) => {
if (typeof document === 'undefined') {
return;
}
const blob = await getDefaultHeadImgBlob(blocksuiteWorkspace.meta.name);
const blobStorage = await blocksuiteWorkspace.blobs;
assert(blobStorage, 'No blob storage');