Skip to content

Commit 438d300

Browse files
committedApr 20, 2021
double click for navigation in and out of folders #62
1 parent f36095f commit 438d300

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed
 

‎src/components/FileBrowser.vue

+14-16
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ tbody {
4646
.div-responsive {
4747
min-height: 400px;
4848
}
49-
.back-route {
50-
padding-right: 100%;
51-
padding-top: 20px;
52-
padding-bottom: 15px;
53-
}
49+
5450
.back-route td {
5551
border-top: none;
5652
}
@@ -198,15 +194,15 @@ tbody {
198194
</tr>
199195

200196
<tr v-if="path.length > 0">
201-
<router-link to="../" class="back-route">
197+
<div class="back-route" @dblclick="exit">
202198
<td class="px-3">
203199
<a
204200
href="javascript:null"
205-
v-on:click="back"
201+
@dblclick="back"
206202
>..</a
207203
>
208204
</td>
209-
</router-link>
205+
</div>
210206
</tr>
211207

212208
<tr
@@ -316,8 +312,8 @@ import FileShareModal from "./FileShareModal";
316312
317313
// Computed property creators
318314
319-
const fromFilesStore = (prop) =>
320-
function () {
315+
const fromFilesStore = prop =>
316+
function() {
321317
return this.$store.state.files[prop];
322318
};
323319
@@ -339,13 +335,12 @@ export default {
339335
const noForwardSlashes = this.createFolderInput.indexOf("/") === -1;
340336
341337
const nameIsNotOnlyPeriods =
342-
[...this.createFolderInput.trim()].filter(
343-
(char) => char === "."
344-
).length !== this.createFolderInput.trim().length;
338+
[...this.createFolderInput.trim()].filter(char => char === ".")
339+
.length !== this.createFolderInput.trim().length;
345340
346341
const notDuplicate =
347342
this.files.filter(
348-
(file) => file.Key === this.createFolderInput.trim()
343+
file => file.Key === this.createFolderInput.trim()
349344
).length === 0;
350345
351346
return (
@@ -365,11 +360,11 @@ export default {
365360
},
366361
367362
singleFiles() {
368-
return this.files.filter((f) => f.type === "file");
363+
return this.files.filter(f => f.type === "file");
369364
},
370365
371366
folders() {
372-
return this.files.filter((f) => f.type === "folder");
367+
return this.files.filter(f => f.type === "folder");
373368
},
374369
375370
routePath() {
@@ -388,6 +383,9 @@ export default {
388383
}
389384
},
390385
methods: {
386+
exit() {
387+
this.$router.push("../");
388+
},
391389
closeModalDropdown() {
392390
if (this.$store.state.files.modalPath) {
393391
this.$store.commit("files/closeModal");

0 commit comments

Comments
 (0)
Please sign in to comment.