Commit f8693af1 by Johannes Zellner

Add button to navigate back

1 parent 6ee80c94
Showing with 6 additions and 5 deletions
......@@ -40,6 +40,9 @@
<div style="padding: 7px;">
<span>Surfer</span>
</div>
<div>
<el-button type="primary" size="small" icon="el-icon-arrow-left" v-show="pathParts.slice(-1).length" @click="onUp"></el-button>
</div>
<div style="flex-grow: 2; padding: 0 7px;" v-show="session.valid">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item><a href="#/">Path /</a></el-breadcrumb-item>
......
......@@ -124,10 +124,6 @@ function open(row, event, column) {
window.open(encode(path));
}
function up() {
window.location.hash = sanitize(app.path.split('/').slice(0, -1).filter(function (p) { return !!p; }).join('/'));
}
function uploadFiles(files) {
if (!files || !files.length) return;
......@@ -328,7 +324,9 @@ var app = new Vue({
return filesize(cellValue);
},
loadDirectory: loadDirectory,
up: up,
onUp: function () {
window.location.hash = sanitize(app.path.split('/').slice(0, -1).filter(function (p) { return !!p; }).join('/'));
},
open: open,
drop: drop,
dragOver: dragOver
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!