fix: Google Font
feat: add a todo view
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { computed } from 'vue'
|
||||
|
||||
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||
import { computed } from "vue"
|
||||
import { useUserRepoStore } from "@/modules/repo/store/userRepo.store"
|
||||
|
||||
export const useFolderNotes = (folders: string[]) => {
|
||||
const store = useUserRepoStore()
|
||||
@@ -9,25 +8,25 @@ export const useFolderNotes = (folders: string[]) => {
|
||||
store.files.filter(
|
||||
(file) =>
|
||||
folders.some((folder) => file.path?.startsWith(folder)) &&
|
||||
file.path?.endsWith('.md')
|
||||
)
|
||||
file.path?.endsWith(".md"),
|
||||
),
|
||||
)
|
||||
|
||||
const content = computed(() =>
|
||||
filteredNotes.value?.length > 0
|
||||
? filteredNotes.value
|
||||
.map((note) => {
|
||||
const firstFolder = note.path?.split('/').shift()
|
||||
const firstFolder = note.path?.split("/").shift()
|
||||
|
||||
return `- [${note.path?.replace(`${firstFolder}/`, '')}](${
|
||||
return `- [${note.path?.replace(`${firstFolder}/`, "")}](${
|
||||
note.path
|
||||
})`
|
||||
})
|
||||
.join('\n')
|
||||
: ''
|
||||
.join("\n")
|
||||
: "",
|
||||
)
|
||||
|
||||
return {
|
||||
content
|
||||
content,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
import { computed } from 'vue'
|
||||
|
||||
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||
import { computed } from "vue"
|
||||
import { useUserRepoStore } from "@/modules/repo/store/userRepo.store"
|
||||
|
||||
export const useNotes = () => {
|
||||
const store = useUserRepoStore()
|
||||
|
||||
const notes = computed(() =>
|
||||
store.files.filter((file) => file.path?.endsWith('.md'))
|
||||
store.files.filter((file) => file.path?.endsWith(".md")),
|
||||
)
|
||||
|
||||
return {
|
||||
notes
|
||||
notes,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user