bring directory back

This commit is contained in:
nicwands
2026-04-06 11:36:21 -04:00
parent 2a9e0ef9be
commit fc33a9c051

View File

@@ -1,9 +1,5 @@
<template> <template>
<main> <main v-if="loaded" class="directory layout-block">
<h1>Test</h1>
<p>{{ environment }}</p>
</main>
<!-- <main v-if="loaded" class="directory layout-block">
<category-row <category-row
v-for="(category, i) in categories" v-for="(category, i) in categories"
:index="i" :index="i"
@@ -22,58 +18,54 @@
<decryption-warning :failedIds="decryptionFailures" /> <decryption-warning :failedIds="decryptionFailures" />
</main> </main>
<page-loading v-else /> --> <page-loading v-else />
</template> </template>
<script setup> <script setup>
import { useEnvironment } from '@/composables/useEnvironment' import DecryptionWarning from '@/components/DecryptionWarning.vue'
import { onMounted, ref, watchEffect, watch } from 'vue'
import CategoryRow from '@/components/CategoryRow.vue'
import PageLoading from '@/components/PageLoading.vue'
import NoteRow from '@/components/NoteRow.vue'
import useNotes from '@/composables/useNotes'
import NewNote from '@/components/NewNote.vue'
import { useMagicKeys } from '@vueuse/core'
import { useRouter } from 'vue-router'
const environment = useEnvironment() const router = useRouter()
const {
categories,
loadCategories,
loadCategoryNotes,
changeCount,
decryptionFailures,
} = useNotes()
// import DecryptionWarning from '@/components/DecryptionWarning.vue' const notes = ref()
// import { onMounted, ref, watchEffect, watch } from 'vue' const loaded = ref(false)
// import CategoryRow from '@/components/CategoryRow.vue'
// import PageLoading from '@/components/PageLoading.vue'
// import NoteRow from '@/components/NoteRow.vue'
// import useNotes from '@/composables/useNotes'
// import NewNote from '@/components/NewNote.vue'
// import { useMagicKeys } from '@vueuse/core'
// import { useRouter } from 'vue-router'
// const router = useRouter() const refreshNotes = async () => {
// const { loaded.value = false
// categories, await loadCategories()
// loadCategories, notes.value = await loadCategoryNotes()
// loadCategoryNotes, loaded.value = true
// changeCount, }
// decryptionFailures,
// } = useNotes()
// const notes = ref() onMounted(async () => {
// const loaded = ref(false) await refreshNotes()
})
// const refreshNotes = async () => { watch(changeCount, async () => {
// loaded.value = false await refreshNotes()
// await loadCategories() })
// notes.value = await loadCategoryNotes()
// loaded.value = true
// }
// onMounted(async () => { // New category keyboard shortcut
// await refreshNotes() const { ctrl, t } = useMagicKeys()
// }) watchEffect(() => {
if (ctrl.value && t.value) {
// watch(changeCount, async () => { router.push('/category')
// await refreshNotes() }
// }) })
// // New category keyboard shortcut
// const { ctrl, t } = useMagicKeys()
// watchEffect(() => {
// if (ctrl.value && t.value) {
// router.push('/category')
// }
// })
</script> </script>
<style lang="scss"> <style lang="scss">