♻️ (folder notes)
This commit is contained in:
@@ -7,7 +7,7 @@ import { Card } from '@/modules/card/models/Card'
|
|||||||
import { RepetitionCard } from '@/modules/card/models/RepetitionCard'
|
import { RepetitionCard } from '@/modules/card/models/RepetitionCard'
|
||||||
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||||
import { asyncComputed } from '@vueuse/core'
|
import { asyncComputed } from '@vueuse/core'
|
||||||
import { isAfter, isBefore } from 'date-fns'
|
import { isAfter } from 'date-fns'
|
||||||
import { computed, nextTick, watch } from 'vue'
|
import { computed, nextTick, watch } from 'vue'
|
||||||
|
|
||||||
interface Repetition {
|
interface Repetition {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { computed } from 'vue'
|
|||||||
export const useFolderNotes = (folders: string[]) => {
|
export const useFolderNotes = (folders: string[]) => {
|
||||||
const store = useUserRepoStore()
|
const store = useUserRepoStore()
|
||||||
|
|
||||||
const fleetingNotes = computed(() =>
|
const filteredNotes = computed(() =>
|
||||||
store.files.filter(
|
store.files.filter(
|
||||||
(file) =>
|
(file) =>
|
||||||
folders.some((folder) => file.path?.startsWith(folder)) &&
|
folders.some((folder) => file.path?.startsWith(folder)) &&
|
||||||
@@ -13,8 +13,8 @@ export const useFolderNotes = (folders: string[]) => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const content = computed(() =>
|
const content = computed(() =>
|
||||||
fleetingNotes.value?.length > 0
|
filteredNotes.value?.length > 0
|
||||||
? fleetingNotes.value
|
? filteredNotes.value
|
||||||
.map((note) => {
|
.map((note) => {
|
||||||
const firstFolder = note.path?.split('/').shift()
|
const firstFolder = note.path?.split('/').shift()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user