chore: workspace name

This commit is contained in:
DarkSky committed 2022-08-12 19:30:22 +08:00
1 parent 8358c66702
commit 8b239cd292
4 files changed
+7 -22

No files matched your search

@@ -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);
-9
View File
@@ -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