mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 10:06:17 +08:00
chore: workspace name
This commit is contained in:
@@ -114,11 +114,6 @@ export class UserConfig extends ServiceBaseClass {
|
||||
return workspaceName;
|
||||
}
|
||||
|
||||
async getWorkspaceId(workspace: string): Promise<string> {
|
||||
const workspaceDbBlock = await this.getWorkspaceDbBlock(workspace);
|
||||
return workspaceDbBlock.id;
|
||||
}
|
||||
|
||||
async setWorkspaceName(workspace: string, workspaceName: string) {
|
||||
const workspaceDbBlock = await this.getWorkspaceDbBlock(workspace);
|
||||
workspaceDbBlock.setDecoration(WORKSPACE_CONFIG, workspaceName);
|
||||
|
||||
@@ -5,15 +5,6 @@ export function getUserDisplayName(user?: UserInfo) {
|
||||
return nickname || username || email || 'Unknown User';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get workspace_id from URL
|
||||
* @returns workspace_id
|
||||
*/
|
||||
export function getWorkspaceId() {
|
||||
const path = window.location.pathname.match(/\/(\w+)\//);
|
||||
return path ? path[1] : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get page_id from URL
|
||||
* @returns page_id
|
||||
|
||||
Reference in New Issue
Block a user