slight refactoring
This commit is contained in:
@@ -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 }
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user