There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
chore: workspace name
DarkSky8b239cd29287
diff --git a/README.md b/README.mdindex f7c168ad7f..50c429c533 100644--- a/README.md+++ b/README.md@@ -47,6 +47,7 @@ See https://github.com/all-?/all-contributors/issues/361#issuecomment-637166066# How to use+<h3 align="center">🥳🥳🥳 Our web live demo is ready! 🥳🥳🥳</h3>@@ -63,7 +64,7 @@ Start to play with <a href="https://affine.pro"><b>AFFiNE web version</b></a> on/></a></p>-If you have experience in front-end development, you may wish to refer to our [documentation](https://docs.affine.pro/affine/basic-documentation/contribute-to-affine) to learn more about deploying your own version or contributing further to development.+If you have experience in front-end development, you may wish to refer to our [documentation](https://docs.affine.pro/affine/basic-documentation/contribute-to-affine) to learn more about deploying your own version or contributing further to development.Also, thanks to Lee who has made a [desktop build with Tauri](https://github.com/m1911star/affine-client) for you to try out.Please notice that AFFiNE is still under Alpha stage and is not ready for production use.diff --git a/apps/ligo-virgo/src/pages/workspace/docs/workspace-name.tsx b/apps/ligo-virgo/src/pages/workspace/docs/workspace-name.tsxindex 67a36e1cee..6769ed2889 100644--- a/apps/ligo-virgo/src/pages/workspace/docs/workspace-name.tsx+++ b/apps/ligo-virgo/src/pages/workspace/docs/workspace-name.tsx@@ -92,18 +92,16 @@ export const WorkspaceName = () => {const { fixedDisplay, toggleSpaceSidebar } = useShowSpaceSidebar();const [inRename, setInRename] = useState(false);const [workspaceName, setWorkspaceName] = useState('');- const [workspaceId, setWorkspaceId] = useState('');const fetchWorkspaceName = useCallback(async () => {if (!currentSpaceId) {return;}- const [name, workspaceId] = await Promise.all([- services.api.userConfig.getWorkspaceName(currentSpaceId),- services.api.userConfig.getWorkspaceId(currentSpaceId),- ]);+ const name = await services.api.userConfig.getWorkspaceName(+ currentSpaceId+ );+setWorkspaceName(name);- setWorkspaceId(workspaceId);}, [currentSpaceId]);useEffect(() => {@@ -180,7 +178,7 @@ export const WorkspaceName = () => {) : (<WorkspaceNameContainer><span onClick={() => setInRename(true)}>- {workspaceName || workspaceId}+ {workspaceName || currentSpaceId}</span></WorkspaceNameContainer>)}diff --git a/libs/datasource/db-service/src/services/workspace/user-config.ts b/libs/datasource/db-service/src/services/workspace/user-config.tsindex 887bb1ec2a..277c3473c7 100644--- a/libs/datasource/db-service/src/services/workspace/user-config.ts+++ b/libs/datasource/db-service/src/services/workspace/user-config.ts@@ -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);diff --git a/libs/utils/src/utils.ts b/libs/utils/src/utils.tsindex 4388128e92..28adc6c4d8 100644--- a/libs/utils/src/utils.ts+++ b/libs/utils/src/utils.ts@@ -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