mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
feat: add types for all entities
This commit is contained in:
@@ -43,6 +43,7 @@ class Database {
|
|||||||
.slice(0, 3)
|
.slice(0, 3)
|
||||||
.join(" ");
|
.join(" ");
|
||||||
this.notes[timestamp] = {
|
this.notes[timestamp] = {
|
||||||
|
type: "note",
|
||||||
title,
|
title,
|
||||||
content: note.content,
|
content: note.content,
|
||||||
pinned: note.pinned || false,
|
pinned: note.pinned || false,
|
||||||
@@ -113,6 +114,7 @@ class Database {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.notebooks[id] = {
|
this.notebooks[id] = {
|
||||||
|
type: "notebook",
|
||||||
title: notebook.title,
|
title: notebook.title,
|
||||||
description: notebook.description,
|
description: notebook.description,
|
||||||
dateCreated: id,
|
dateCreated: id,
|
||||||
@@ -286,6 +288,7 @@ function getItem(id, key) {
|
|||||||
|
|
||||||
function makeTopic(topic) {
|
function makeTopic(topic) {
|
||||||
return {
|
return {
|
||||||
|
type: "topic",
|
||||||
title: topic,
|
title: topic,
|
||||||
dateCreated: Date.now(),
|
dateCreated: Date.now(),
|
||||||
totalNotes: 0,
|
totalNotes: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user