diff --git a/apps/web/src/components/editor/index.tsx b/apps/web/src/components/editor/index.tsx index 36eaed2657..72172c2d43 100644 --- a/apps/web/src/components/editor/index.tsx +++ b/apps/web/src/components/editor/index.tsx @@ -811,7 +811,7 @@ function UnlockNoteView(props: UnlockNoteViewProps) { throw new Error("note with this id does not exist."); useEditorStore.getState().addSession({ - type: "default", + type: session.note.readonly ? "readonly" : "default", locked: true, id: session.id, note: session.note, diff --git a/apps/web/src/stores/editor-store.ts b/apps/web/src/stores/editor-store.ts index 6981533d3f..7d05540d42 100644 --- a/apps/web/src/stores/editor-store.ts +++ b/apps/web/src/stores/editor-store.ts @@ -90,6 +90,7 @@ export type ReadonlyEditorSession = BaseEditorSession & { content?: NoteContent; color?: string; tags?: Tag[]; + locked?: boolean; }; export type DeletedEditorSession = BaseEditorSession & {