fix stretch + default notes

This commit is contained in:
2023-05-22 10:02:52 +02:00
parent 833d1b34b7
commit 1b46687b6a
2 changed files with 5 additions and 6 deletions

View File

@@ -81,7 +81,7 @@ export const setRootNote = (noteId: string) => {
setActiveNote(noteId)
}
export const setDefaultNotes = (defaultNotes: BaseNote[]) => {
export const insertDefaultNotes = (defaultNotes: BaseNote[]) => {
defaultNotes.forEach((defaultNote) => {
baseNotes.value[defaultNote.id] = defaultNote
})
@@ -203,9 +203,8 @@ watch(
} else if (activeNotesSource.value === 'firebase') {
console.log('get notes from firebase')
}
if (Object.entries(baseNotes.value).length === 0) {
setDefaultNotes(defaultNotes)
}
if (!rootNote.value) insertDefaultNotes(defaultNotes)
setActiveNote(rootNote.value?.id)
},
{ immediate: true }

View File

@@ -5,12 +5,12 @@
@import '@fontsource/source-sans-pro/300';
html {
height: stretch;
height: -webkit-fill-available;
}
body {
min-height: 100vh;
min-height: stretch;
min-height: -webkit-fill-available;
font-family: 'Source Sans Pro', sans-serif;
overflow-y: scroll;
@apply flex flex-col bg-gray-100;