delete notes & sync to firebase
This commit is contained in:
@@ -20,8 +20,7 @@ const results = computed<Note[]>(() => {
|
||||
return query.value ? findNotes(query.value) : notes.value
|
||||
})
|
||||
|
||||
const goToNote = (note: Note, element?: HTMLElement) => {
|
||||
console.log(element)
|
||||
const goToNote = (note: Note) => {
|
||||
setActiveNote(note.id)
|
||||
active.value = false
|
||||
if (queryElem.value) queryElem.value.blur()
|
||||
@@ -75,7 +74,7 @@ const resultsRefs = ref<InstanceType<typeof SearchResult>[]>([])
|
||||
:key="result.id"
|
||||
:result="result"
|
||||
:active-result="activeResult"
|
||||
@go-to-note="(element) => goToNote(result, element)"
|
||||
@go-to-note="goToNote(result)"
|
||||
ref="resultsRefs"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -28,7 +28,7 @@ const setViewMode = (viewMode: ViewMode) => {
|
||||
<template>
|
||||
<div
|
||||
id="sidebar"
|
||||
class="fixed bottom-0 top-0 flex max-sm:w-sidebar-mobile sm:w-sidebar flex-col gap-4 overflow-y-auto px-2 py-3 text-[90%] max-sm:text-[120%]"
|
||||
class="fixed bottom-0 top-0 flex flex-col gap-4 overflow-y-auto px-2 py-3 text-[90%] max-sm:w-sidebar-mobile max-sm:gap-6 max-sm:text-[110%] sm:w-sidebar"
|
||||
>
|
||||
<SideBarMenu>
|
||||
<template #header>Root note</template>
|
||||
|
||||
@@ -6,7 +6,7 @@ const props = defineProps<{
|
||||
</script>
|
||||
<template>
|
||||
<a
|
||||
class="mt-1 block w-full cursor-pointer overflow-x-hidden text-ellipsis whitespace-nowrap rounded hover:bg-gray-200 active:bg-primary active:text-primary-content"
|
||||
class="max-sm:mt-2 mt-1 block w-full cursor-pointer overflow-x-hidden text-ellipsis whitespace-nowrap rounded hover:bg-gray-200 active:bg-primary active:text-primary-content"
|
||||
:class="props.active ? 'font-bold text-primary' : 'text-secondary'"
|
||||
>
|
||||
<i :class="props.icon" class="mr-2" v-if="props.icon"></i>
|
||||
|
||||
Reference in New Issue
Block a user