Fixed renames and breadcrumbs for gallery.

This commit is contained in:
2023-11-21 05:47:41 +00:00
parent dd95e5a858
commit 27aefc50d4
7 changed files with 39 additions and 18 deletions
+5 -2
View File
@@ -1,5 +1,8 @@
import { useMainStore } from '@/stores/main'
const store = useMainStore()
export const exists = (path: string[]) => store.document.some(doc => (doc.loc ? `${doc.loc}/${doc.name}` : doc.name) === path.join('/'))
export const exists = (path: string[]) => {
const store = useMainStore()
const p = path.join('/')
return store.document.some(doc => (doc.loc ? `${doc.loc}/${doc.name}` : doc.name) === p)
}