feat: use @affine/debug (#1244)

This commit is contained in:
Himself65
2023-03-01 20:13:45 -06:00
committed by GitHub
parent 1abab690af
commit a099ed5f29
15 changed files with 40 additions and 252 deletions

View File

@@ -1,3 +1,4 @@
import { DebugLogger } from '@affine/debug';
import { config } from '@affine/env';
import { assertEquals, nanoid } from '@blocksuite/store';
import React from 'react';
@@ -16,6 +17,8 @@ import {
import { createEmptyBlockSuiteWorkspace } from '../../utils';
import { WorkspacePlugin } from '..';
const logger = new DebugLogger('local-plugin');
export const kStoreKey = 'affine-local-workspace';
export const LocalPlugin: WorkspacePlugin<RemWorkspaceFlavour.LOCAL> = {
@@ -134,7 +137,7 @@ export const LocalPlugin: WorkspacePlugin<RemWorkspaceFlavour.LOCAL> = {
if (signal?.aborted) {
return;
}
console.info('no local workspace found, create a new one');
logger.info('no local workspace found, create a new one');
const workspaceId = nanoid();
const blockSuiteWorkspace = createEmptyBlockSuiteWorkspace(workspaceId);
blockSuiteWorkspace.meta.setName('Untitled Workspace');