From 5c3119d427d41a33277b36a3e2788349a792b166 Mon Sep 17 00:00:00 2001 From: Guilherme_F Date: Tue, 14 May 2024 02:38:21 +0100 Subject: [PATCH] Fixes on editor and workspace management --- .../src/domain/editor/slate/plugins/markdown/shortcuts.ts | 4 ++-- code/client/src/ui/pages/home/Home.tsx | 2 +- .../ui/pages/home/components/CreateWorkspaceDialog.tsx | 8 ++++---- code/client/src/ui/pages/workspace/Workspace.tsx | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/client/src/domain/editor/slate/plugins/markdown/shortcuts.ts b/code/client/src/domain/editor/slate/plugins/markdown/shortcuts.ts index 716e9647..efab2a82 100644 --- a/code/client/src/domain/editor/slate/plugins/markdown/shortcuts.ts +++ b/code/client/src/domain/editor/slate/plugins/markdown/shortcuts.ts @@ -16,8 +16,8 @@ export const shortcuts = [ blockRules(BlockStyles.hr, '---'), blockRules(BlockStyles.checked, '-[x]'), blockRules(BlockStyles.unchecked, '-[]'), - inlineRules(InlineStyles.bold, '**', '__'), + inlineRules(InlineStyles.bold, '**'), + inlineRules(InlineStyles.underline, '__'), inlineRules(InlineStyles.italic, '*', '_'), inlineRules(InlineStyles.strikethrough, '~~'), - inlineRules(InlineStyles.underline, '=='), ]; diff --git a/code/client/src/ui/pages/home/Home.tsx b/code/client/src/ui/pages/home/Home.tsx index ec34d81d..2aaf3860 100644 --- a/code/client/src/ui/pages/home/Home.tsx +++ b/code/client/src/ui/pages/home/Home.tsx @@ -22,7 +22,7 @@ function Home() { key={workspace.id} workspace={workspace} onDelete={() => deleteWorkspace(workspace.id).catch(publishError)} - onRename={name => updateWorkspace({ ...workspace, name }).catch(publishError)} + onRename={name => updateWorkspace(workspace.id, {...workspace, name: name + "-copy" }).catch(publishError)} onInvite={() => {}} /> ))} diff --git a/code/client/src/ui/pages/home/components/CreateWorkspaceDialog.tsx b/code/client/src/ui/pages/home/components/CreateWorkspaceDialog.tsx index 548178d3..c25014c2 100644 --- a/code/client/src/ui/pages/home/components/CreateWorkspaceDialog.tsx +++ b/code/client/src/ui/pages/home/components/CreateWorkspaceDialog.tsx @@ -11,10 +11,10 @@ function CreateWorkspaceDialog({ onCreate }: CreateWorkspaceDialogProps) { title="Create a new workspace" fields={[ { name: 'name', label: 'Workspace Name' }, - { name: 'description', label: 'Workspace Description' }, - { name: 'visibility', label: 'Workspace Visibility' }, - { name: 'tags', label: 'Workspace Tags' }, - { name: 'members', label: 'Workspace Members' }, + // { name: 'description', label: 'Workspace Description' }, + // { name: 'visibility', label: 'Workspace Visibility' }, + // { name: 'tags', label: 'Workspace Tags' }, + // { name: 'members', label: 'Workspace Members' }, ]} onSubmit={onCreate} > diff --git a/code/client/src/ui/pages/workspace/Workspace.tsx b/code/client/src/ui/pages/workspace/Workspace.tsx index b9892dd8..bc1e710c 100644 --- a/code/client/src/ui/pages/workspace/Workspace.tsx +++ b/code/client/src/ui/pages/workspace/Workspace.tsx @@ -23,7 +23,7 @@ function Workspace() { key={resource.id} document={resource as DocumentResourceMetadata} onDelete={() => operations?.deleteResource(resource.id).catch(publishError)} - onDuplicate={() => operations?.createResource(resource.name, ResourceType.DOCUMENT).catch(publishError)} + onDuplicate={() => operations?.createResource(resource.name + "-copy", ResourceType.DOCUMENT).catch(publishError)} onRename={name => operations?.updateResource(resource.id, { name }).catch(publishError)} /> ))}