mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-04 02:49:57 +08:00
feat: add clear all workspaces
This commit is contained in:
@@ -279,6 +279,16 @@ export class DataCenter {
|
||||
return await this._transWorkspaceProvider(workspace, 'affine');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* clear all workspaces and data
|
||||
*/
|
||||
public async clear() {
|
||||
for (const provider of this.providerMap.values()) {
|
||||
await provider.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Select a file to import the workspace
|
||||
* @param {File} file file of workspace.
|
||||
|
||||
Reference in New Issue
Block a user