diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 2e625bf..76ab0ce 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -18,8 +18,8 @@ - - + +
@@ -361,6 +361,20 @@ async function deleteItem(item) { await loadFiles() } +async function moveFile({ from, to }) { + const filename = from.split('/').pop() + const newPath = to + '/' + filename + try { + await api('/api/files/move', { from, to: newPath }) + if (currentFile.value === from) { + currentFile.value = newPath + } + await loadFiles() + } catch (e) { + alert('Move failed') + } +} + // ─── Shared ────────────────────────────────────────────────────────────────── async function loadShared() { diff --git a/frontend/src/components/FileTree.vue b/frontend/src/components/FileTree.vue index aff2688..5e0ba07 100644 --- a/frontend/src/components/FileTree.vue +++ b/frontend/src/components/FileTree.vue @@ -3,36 +3,67 @@
{{ item.isDir ? (expanded[item.path] ? '📂' : '📁') : '📄' }} {{ item.name }}
- +