edit: remplacement du bouton menu par retour (remonter de 1 element dans l'arboresence) dans link pannel
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 123.81 117.86">
|
||||||
|
<path d="M116.98,39.88c-4.56-7.84-10.78-14.04-18.67-18.59-7.83-4.52-16.53-6.79-26.11-6.83h0s-31.02,0-31.02,0V0L0,26.5v.2l41.18,26.4v-15.82h30.79c5.45,0,10.38,1.27,14.79,3.81,4.41,2.54,7.89,6.01,10.42,10.42,2.54,4.41,3.8,9.3,3.8,14.65s-1.27,10.24-3.8,14.65c-2.54,4.41-6.01,7.89-10.42,10.42-4.41,2.54-9.34,3.8-14.79,3.8h0s-67.74,0-67.74,0v22.82h67.79c9.66,0,18.42-2.29,26.3-6.83,7.89-4.56,14.11-10.75,18.67-18.59,4.56-7.84,6.83-16.6,6.83-26.27s-2.28-18.43-6.83-26.27Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 620 B |
@@ -3,6 +3,7 @@
|
|||||||
import FolderIcon from '../assets/icons/folder.svg'
|
import FolderIcon from '../assets/icons/folder.svg'
|
||||||
import FileIcon from '../assets/icons/file.svg'
|
import FileIcon from '../assets/icons/file.svg'
|
||||||
import ReloadIcon from '../assets/icons/reload.svg'
|
import ReloadIcon from '../assets/icons/reload.svg'
|
||||||
|
import BackIcon from '../assets/icons/back.svg'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -18,8 +19,8 @@
|
|||||||
<div class="titleContent">
|
<div class="titleContent">
|
||||||
<p>./{{fileName}}</p>
|
<p>./{{fileName}}</p>
|
||||||
<div class="multiBtnContainer">
|
<div class="multiBtnContainer">
|
||||||
<button type="button" class="titleBtn" id="rootBtn" v-show="isNotRoot" @mousedown.stop @touchstart="dataFirstLoad" @click="dataFirstLoad">
|
<button type="button" class="titleBtn" id="rootBtn" v-show="isNotRoot" @mousedown.stop @touchstart="backToRoot" @click="backToRoot">
|
||||||
<ReloadIcon name="close" class="icon"/>
|
<BackIcon name="backwoods" class="icon"/>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="titleBtn" @mousedown.stop @touchstart="$emit('close')" @click="closeClicked">
|
<button type="button" class="titleBtn" @mousedown.stop @touchstart="$emit('close')" @click="closeClicked">
|
||||||
<CloseIcon name="close" class="icon"/>
|
<CloseIcon name="close" class="icon"/>
|
||||||
@@ -299,6 +300,7 @@
|
|||||||
openFile(e){
|
openFile(e){
|
||||||
this.$emit('focus');
|
this.$emit('focus');
|
||||||
if(e.type === 'folder'){
|
if(e.type === 'folder'){
|
||||||
|
this.rootFolderContent.push({content:[...this.displayedItems], directory:this.fileName});
|
||||||
this.displayedItems = [...e.children];
|
this.displayedItems = [...e.children];
|
||||||
this.checkEmptyFolder();
|
this.checkEmptyFolder();
|
||||||
this.isNotRoot = true;
|
this.isNotRoot = true;
|
||||||
@@ -345,6 +347,17 @@
|
|||||||
this.emptyFolder = false;
|
this.emptyFolder = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
backToRoot(){
|
||||||
|
let rootDepth = this.rootFolderContent.length-1;
|
||||||
|
this.displayedItems = this.rootFolderContent[rootDepth].content;
|
||||||
|
this.fileName = this.rootFolderContent[rootDepth].directory;
|
||||||
|
this.rootFolderContent.splice(rootDepth,1);
|
||||||
|
rootDepth = this.rootFolderContent.length
|
||||||
|
if (rootDepth === 0){
|
||||||
|
this.isNotRoot = false;
|
||||||
|
}
|
||||||
|
this.checkEmptyFolder();
|
||||||
|
},
|
||||||
closeClicked(){
|
closeClicked(){
|
||||||
this.dataFirstLoad();
|
this.dataFirstLoad();
|
||||||
this.$emit('close');
|
this.$emit('close');
|
||||||
@@ -359,6 +372,7 @@
|
|||||||
coordX:0,
|
coordX:0,
|
||||||
coordY:0,
|
coordY:0,
|
||||||
displayedItems: null,
|
displayedItems: null,
|
||||||
|
rootFolderContent: [],
|
||||||
emptyFolder: false,
|
emptyFolder: false,
|
||||||
displayedDescription: "",
|
displayedDescription: "",
|
||||||
fileName: "",
|
fileName: "",
|
||||||
|
|||||||
Reference in New Issue
Block a user