slight refactoring

This commit is contained in:
2023-05-28 22:23:41 +02:00
parent b4eab2d8e8
commit b3f740770a
3 changed files with 23 additions and 31 deletions

View File

@@ -1,9 +1,10 @@
<script setup lang="ts">
import { activeNote, updateNote, notes, activeNotesSource } from '@/composables/useNotes'
import { activeNote, updateNote, notes, activeNotesSource, getNotes } from '@/composables/useNotes'
import { viewModes, activeViewMode } from '@/composables/useViewMode'
import {
getClientKey,
getEncryptionKey,
encryptionKey,
setClientKey,
passphraseRequired
} from '@/composables/useEncryption'
@@ -30,12 +31,13 @@ const firebaseAuthUI =
provide('firebaseAuthUI', firebaseAuthUI)
watch(
activeNotesSource,
[activeNotesSource, encryptionKey],
() => {
if (activeNotesSource.value === 'firebase') {
getClientKey()
getEncryptionKey()
}
getNotes()
},
{ immediate: true }
)