mirror of
https://github.com/colanode/colanode.git
synced 2025-12-29 00:25:03 +01:00
Minor changes
This commit is contained in:
@@ -200,16 +200,11 @@ export class WorkspaceManager {
|
||||
|
||||
public async executeServerMutation(mutation: ServerMutation): Promise<void> {
|
||||
if (mutation.table === 'nodes') {
|
||||
if (
|
||||
mutation.after &&
|
||||
(mutation.action === 'insert' || mutation.action === 'update')
|
||||
) {
|
||||
if (mutation.action === 'insert' && mutation.after) {
|
||||
await this.syncNodeFromServer(mutation.after);
|
||||
} else if (
|
||||
mutation.before &&
|
||||
mutation.action === 'delete' &&
|
||||
mutation.before.id
|
||||
) {
|
||||
} else if (mutation.action === 'update' && mutation.after) {
|
||||
await this.syncNodeFromServer(mutation.after);
|
||||
} else if (mutation.action === 'delete' && mutation.before) {
|
||||
await this.database
|
||||
.deleteFrom('nodes')
|
||||
.where('id', '=', mutation.before.id)
|
||||
|
||||
@@ -4,7 +4,7 @@ export const TodoCommand: EditorCommand = {
|
||||
key: 'todo',
|
||||
name: 'To-do',
|
||||
description: 'Insert a to-do item',
|
||||
keywords: ['to-do', 'todo', 'checklist', 'action'],
|
||||
keywords: ['to-do', 'todo', 'checklist', 'action', 'task'],
|
||||
icon: 'task-line',
|
||||
disabled: false,
|
||||
handler: ({ editor, range }) => {
|
||||
|
||||
Reference in New Issue
Block a user