diff --git a/cista-front/package.json b/cista-front/package.json
index 3d14f6e..7d7c3fa 100644
--- a/cista-front/package.json
+++ b/cista-front/package.json
@@ -13,6 +13,7 @@
"format": "prettier --write src/"
},
"dependencies": {
+ "@imengyu/vue3-context-menu": "^1.3.3",
"@vueuse/core": "^10.4.1",
"esbuild": "^0.19.5",
"lodash": "^4.17.21",
diff --git a/cista-front/src/components/FileExplorer.vue b/cista-front/src/components/FileExplorer.vue
index c430a94..9c4bc4c 100644
--- a/cista-front/src/components/FileExplorer.vue
+++ b/cista-front/src/components/FileExplorer.vue
@@ -57,9 +57,9 @@
-
+
|
@@ -188,6 +188,12 @@ const rename = (doc: Document, newName: string) => {
}
doc.name = newName // We should get an update from watch but this is quicker
}
+const sortedDocuments = computed(() => sorted(props.documents as Document[]))
+const showFolderBreadcrumb = (i: number) => {
+ const docs = sortedDocuments.value
+ const docloc = docs[i].loc
+ return i === 0 ? docloc !== loc.value : docloc !== docs[i - 1].loc
+}
defineExpose({
newFolder() {
const now = Date.now() / 1000
@@ -230,7 +236,7 @@ defineExpose({
},
cursorMove(d: number, select = false) {
// Move cursor up or down (keyboard navigation)
- const documents = sorted(props.documents as Document[])
+ const documents = sortedDocuments.value
if (documents.length === 0) {
cursor.value = null
return
@@ -358,8 +364,6 @@ const allSelected = computed({
})
const loc = computed(() => props.path.join('/'))
-let prevloc = ''
-onBeforeUpdate(() => { prevloc = loc.value })
const contextMenu = (ev: Event, doc: Document) => {
cursor.value = doc
diff --git a/cista-front/src/components/HeaderMain.vue b/cista-front/src/components/HeaderMain.vue
index fb6f3b8..8350fdb 100644
--- a/cista-front/src/components/HeaderMain.vue
+++ b/cista-front/src/components/HeaderMain.vue
@@ -20,14 +20,26 @@
/>
-
+
+
+
+
+
+
+
+
+
+
+
+