fix stretch + default notes

This commit is contained in:
Marco Crapts
2023-05-22 10:02:52 +02:00
parent dd2a3d91ca
commit 24dc9482da
2 changed files with 5 additions and 6 deletions

View File

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

View File

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