From 464dfc2fa209d119ae6c49e8e1a13d067a71feb7 Mon Sep 17 00:00:00 2001 From: YarikMix <43493788+YarikMix@users.noreply.github.com> Date: Sat, 25 May 2024 18:12:02 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D0=BE=D1=82=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=BE=D0=B4=20=D1=83=D0=B2=D0=B5=D0=B4?= =?UTF-8?q?=D0=BE=D0=BC=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BE=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=D0=B3=D0=BB=D0=B0=D1=88=D0=B5=D0=BD=D0=B8=D0=B8=20?= =?UTF-8?q?=D0=B2=20=D0=B7=D0=B0=D0=BC=D0=B5=D1=82=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/src/modules/stores/NotesStore.ts | 9 ++++++--- public/src/utils/types.ts | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/public/src/modules/stores/NotesStore.ts b/public/src/modules/stores/NotesStore.ts index 449a2bd6..a6cdbadb 100644 --- a/public/src/modules/stores/NotesStore.ts +++ b/public/src/modules/stores/NotesStore.ts @@ -8,6 +8,7 @@ import {WebSocketConnection} from "../websocket"; import {insertBlockPlugin} from "../../components/Editor/Plugin"; import {AppNoteStore, NoteStoreActions} from "./NoteStore"; import {downloadFile, parseNoteTitle} from "../utils"; +import {Note} from '../../components/Note/Note'; export type NotesStoreState = { notes: NoteType[], @@ -118,10 +119,12 @@ class NotesStore extends BaseStore { const title = data.note_title.replace("\\", "").replace('"', "") AppToasts.info(owner + " пригласил вас в свою заметку!") - const note = { + const note:NoteType = { "id": data.note_id, - "data": null, - "create_time": data.created, + "data": { + "title": data.note_title, + "content": [] + }, "update_time": data.created, "owner_id": null, "parent": "00000000-0000-0000-0000-000000000000", diff --git a/public/src/utils/types.ts b/public/src/utils/types.ts index 30ebaf44..afd6748a 100644 --- a/public/src/utils/types.ts +++ b/public/src/utils/types.ts @@ -9,6 +9,7 @@ export type NoteType = { }, update_time: string, owner_id: string, + collaborators: string[], icon: string, header: string, favorite: boolean,