edit: link pannel methode navigation, 1 click = selection, 2x click = ouvrir + réglages associés + gradient fond plus sombre
This commit is contained in:
@@ -53,8 +53,10 @@
|
|||||||
inset:0;
|
inset:0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background: #002613;
|
background: #002613;
|
||||||
background: linear-gradient(200deg,var(--dark-color) 0%, var(--darker-color) 100%);
|
background: linear-gradient(200deg,var(--dark-color) 0%, var(--darker-color) 77%);
|
||||||
cursor:cell;
|
cursor:cell;
|
||||||
|
scrollbar-color: var(--light-color) transparent;
|
||||||
|
scrollbar-width: thin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===================Desact. Default*/
|
/*===================Desact. Default*/
|
||||||
@@ -113,6 +115,7 @@ p{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.titleContent{
|
.titleContent{
|
||||||
|
position:absolute;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-left: 16.1px;
|
padding-left: 16.1px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -215,6 +218,8 @@ p{
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
opacity: 0.0333;
|
opacity: 0.0333;
|
||||||
z-index:333;
|
z-index:333;
|
||||||
|
margin-top:-5px;
|
||||||
|
margin-left:-13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#denimOver{
|
#denimOver{
|
||||||
|
|||||||
+156
-40
@@ -16,34 +16,51 @@
|
|||||||
<!--TITRE-->
|
<!--TITRE-->
|
||||||
<div class="windowTitle">
|
<div class="windowTitle">
|
||||||
<div class="titleContent">
|
<div class="titleContent">
|
||||||
<p>./ExternalLinks.333</p>
|
<p>./{{fileName}}</p>
|
||||||
<button type="button" class="titleBtn" id="rootBtn" v-show="isNotRoot" @mousedown.stop @touchstart="dataFirstLoad" @click="dataFirstLoad">
|
<div class="multiBtnContainer">
|
||||||
<ReloadIcon name="close" class="icon"/>
|
<button type="button" class="titleBtn" id="rootBtn" v-show="isNotRoot" @mousedown.stop @touchstart="dataFirstLoad" @click="dataFirstLoad">
|
||||||
</button>
|
<ReloadIcon name="close" class="icon"/>
|
||||||
<button type="button" class="titleBtn" @mousedown.stop @touchstart="$emit('close')" @click="closeClicked">
|
</button>
|
||||||
<CloseIcon name="close" class="icon"/>
|
<button type="button" class="titleBtn" @mousedown.stop @touchstart="$emit('close')" @click="closeClicked">
|
||||||
</button>
|
<CloseIcon name="close" class="icon"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--CONTENU-->
|
<!--CONTENU-->
|
||||||
<p id="emptyFolderText" class="itemCaption" v-show="emptyFolder">Oops! There is nothing to display here...</p>
|
<p id="emptyFolderText" v-show="emptyFolder">Oops! There is nothing to display here...</p>
|
||||||
<div class="theMatrix" @mousedown.stop @touchstart.stop @reload="dataFirstLoad">
|
<div v-show="displayedItems" class="theMatrix" @mousedown.stop @touchstart.stop @reload="dataFirstLoad">
|
||||||
<div class="itemStyle" v-for="item in displayedItems" :key="item.caption" @click="openClickedFile(item)">
|
<div class="itemStyle" v-for="item in displayedItems" :class="{selectedStyle:item.isSelected, displayStyle: !item.isSelected}" :key="item.caption" @click="itemIsClicked(item)">
|
||||||
<component :is="item.type==='folder'? FolderIcon : FileIcon" class="icon"/>
|
<component :is="item.type==='folder'? FolderIcon : FileIcon" class="icon"/>
|
||||||
<p class="itemCaption">{{item.caption}}</p>
|
<p class="itemCaption">{{item.caption}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-show="displayedItems" class="itemDesc" @touchstart.stop>
|
||||||
|
<p>{{displayedDescription}}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/*=====================LinkPannel CSS*/
|
/*=====================LinkPannel CSS*/
|
||||||
#rootBtn{
|
.multiBtnContainer{
|
||||||
margin-left: 60%;
|
align-self: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
|
height: 100%;
|
||||||
|
align-items: center;
|
||||||
|
width:auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#emptyFolderText{
|
#emptyFolderText{
|
||||||
|
align-self:center;
|
||||||
|
margin-top: 33px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
color: var(--accent-color);
|
||||||
|
font-family: 'lineal';
|
||||||
|
font-weight: lighter;
|
||||||
|
font-size: 16.1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.theMatrix{
|
.theMatrix{
|
||||||
@@ -51,11 +68,33 @@
|
|||||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||||
grid-auto-rows: 180px;
|
grid-auto-rows: 180px;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
width: 100%;
|
width: 97%;
|
||||||
height: 100%;
|
height: 70%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-left: 10px;
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemDesc{
|
||||||
|
width: 90%;
|
||||||
|
height: 21%;
|
||||||
|
border-radius: 16.1px;
|
||||||
|
border-color: var(--accent-color);
|
||||||
|
border-style: solid;
|
||||||
|
border-width: thin;
|
||||||
|
margin-top: 2%;
|
||||||
|
|
||||||
|
color: var(--light-color);
|
||||||
|
font-family: 'velvelyne';
|
||||||
|
font-weight: lighter;
|
||||||
|
font-size: 16.1px;
|
||||||
|
pointer-events: all;
|
||||||
|
cursor:inherit;
|
||||||
|
|
||||||
|
align-self: center;
|
||||||
|
padding-left: 2%;
|
||||||
|
padding-right: 3.33%;
|
||||||
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemStyle{
|
.itemStyle{
|
||||||
@@ -66,34 +105,61 @@
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
width:90%;
|
width:90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
color: var(--light-color);
|
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: thin;
|
border-width: thin;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
}
|
|
||||||
|
|
||||||
.itemStyle .icon{
|
|
||||||
height:auto;
|
|
||||||
width:50%;
|
|
||||||
fill: currentColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemStyle:hover{
|
|
||||||
color: var(--accent-color);
|
|
||||||
border-color: var(--accent-color);
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.itemStyle:hover{
|
||||||
|
border-color: var(--accent-color);
|
||||||
|
}
|
||||||
|
/*===============Not selected Item*/
|
||||||
|
.displayStyle{
|
||||||
|
color: var(--light-color);
|
||||||
|
border-style: solid;
|
||||||
|
border-width: thin;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.displayStyle .icon{
|
||||||
|
height:auto;
|
||||||
|
width:50%;
|
||||||
|
fill: currentColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*===============Seleted Item*/
|
||||||
|
.selectedStyle{
|
||||||
|
color: var(--accent-color);
|
||||||
|
border-style: solid;
|
||||||
|
border-width: thin;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectedStyle .icon{
|
||||||
|
height:auto;
|
||||||
|
width:50%;
|
||||||
|
fill: currentColor;
|
||||||
|
}
|
||||||
|
|
||||||
.itemCaption{
|
.itemCaption{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--light-color);
|
|
||||||
font-family: 'velvelyne';
|
|
||||||
font-weight: lighter;
|
font-weight: lighter;
|
||||||
font-size: 16.1px;
|
font-size: 16.1px;
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
cursor:inherit;
|
cursor:inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.displayStyle .itemCaption{
|
||||||
|
color: var(--light-color);
|
||||||
|
font-family: 'velvelyne';
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectedStyle .itemCaption{
|
||||||
|
color: var(--accent-color);
|
||||||
|
font-family: 'lineal'
|
||||||
|
}
|
||||||
|
|
||||||
.itemCaption:hover{
|
.itemCaption:hover{
|
||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
}
|
}
|
||||||
@@ -102,8 +168,9 @@
|
|||||||
background-color: var(--dark-color);
|
background-color: var(--dark-color);
|
||||||
cursor:grab;
|
cursor:grab;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
justify-content: space-around;
|
align-items: flex-start;
|
||||||
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*=====================format pc*/
|
/*=====================format pc*/
|
||||||
@@ -113,9 +180,6 @@
|
|||||||
height:666px;
|
height:666px;
|
||||||
margin-left: -333px;
|
margin-left: -333px;
|
||||||
}
|
}
|
||||||
#rootBtn{
|
|
||||||
margin-left: 390px;
|
|
||||||
}
|
|
||||||
.theMatrix{
|
.theMatrix{
|
||||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||||
grid-auto-rows: 180px;
|
grid-auto-rows: 180px;
|
||||||
@@ -129,9 +193,6 @@
|
|||||||
width:333px;
|
width:333px;
|
||||||
height:666px;
|
height:666px;
|
||||||
}
|
}
|
||||||
#rootBtn{
|
|
||||||
margin-left: 59px;
|
|
||||||
}
|
|
||||||
.theMatrix{
|
.theMatrix{
|
||||||
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
||||||
grid-auto-rows: 180px;
|
grid-auto-rows: 180px;
|
||||||
@@ -144,36 +205,50 @@
|
|||||||
const linksData = [
|
const linksData = [
|
||||||
{
|
{
|
||||||
type: "folder",
|
type: "folder",
|
||||||
|
isSelected: false,
|
||||||
caption: "Folder001",
|
caption: "Folder001",
|
||||||
|
description: "Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.",
|
||||||
children: [{
|
children: [{
|
||||||
type: "folder",
|
type: "folder",
|
||||||
|
isSelected: false,
|
||||||
caption: "test-open",
|
caption: "test-open",
|
||||||
|
description: "Nothing for now x333",
|
||||||
children: []
|
children: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "file",
|
type: "file",
|
||||||
|
isSelected: false,
|
||||||
caption: "READ-ME002.txt",
|
caption: "READ-ME002.txt",
|
||||||
|
description: "Nothing for now x333",
|
||||||
src: ""
|
src: ""
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "folder",
|
type: "folder",
|
||||||
|
isSelected: false,
|
||||||
caption: "Folder002",
|
caption: "Folder002",
|
||||||
|
description: "Nothing for now x333",
|
||||||
children: []
|
children: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "folder",
|
type: "folder",
|
||||||
|
isSelected: false,
|
||||||
caption: "Folder333",
|
caption: "Folder333",
|
||||||
|
description: "Nothing for now x333",
|
||||||
children: []
|
children: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "folder",
|
type: "folder",
|
||||||
|
isSelected: false,
|
||||||
caption: "test",
|
caption: "test",
|
||||||
|
description: "Nothing for now x333",
|
||||||
children: []
|
children: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "file",
|
type: "file",
|
||||||
|
isSelected: false,
|
||||||
caption: "READ-ME.txt",
|
caption: "READ-ME.txt",
|
||||||
|
description: "Nothing for now x333",
|
||||||
src: ""
|
src: ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -215,19 +290,57 @@
|
|||||||
console.log(this.displayedItems);
|
console.log(this.displayedItems);
|
||||||
this.isNotRoot = false;
|
this.isNotRoot = false;
|
||||||
this.checkEmptyFolder();
|
this.checkEmptyFolder();
|
||||||
|
this.displayedItems.forEach(it => {
|
||||||
|
it.isSelected = false;
|
||||||
|
});
|
||||||
|
this.displayedDescription = "Click an item to get more info !";
|
||||||
|
this.fileName = "ExternalLinks.333";
|
||||||
},
|
},
|
||||||
openClickedFile(e){
|
openFile(e){
|
||||||
|
this.$emit('focus');
|
||||||
if(e.type === 'folder'){
|
if(e.type === 'folder'){
|
||||||
this.displayedItems = [...e.children];
|
this.displayedItems = [...e.children];
|
||||||
this.checkEmptyFolder();
|
this.checkEmptyFolder();
|
||||||
this.isNotRoot = true;
|
this.isNotRoot = true;
|
||||||
|
this.displayedDescription = e.description
|
||||||
|
if (this.bodyWidth>this.bodyHeight){
|
||||||
|
console.log('container dimensions:', this.bodyWidth, this.bodyHeight);
|
||||||
|
this.fileName =".../"+ e.caption;
|
||||||
|
}else{
|
||||||
|
this.fileName += "/" + e.caption;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
selectFile(e){
|
||||||
|
this.$emit('focus');
|
||||||
|
this.displayedItems.forEach(it => {
|
||||||
|
it.isSelected = false;
|
||||||
|
})
|
||||||
|
e.isSelected = true;
|
||||||
|
this.displayedDescription = e.description;
|
||||||
|
},
|
||||||
|
itemIsClicked(e){
|
||||||
|
if (!this.dblClickTimer || this.lastClickedItem !== e){
|
||||||
|
clearTimeout(this.dblClickTimer);
|
||||||
|
this.lastClickedItem = e;
|
||||||
|
this.dblClickTimer = setTimeout(() => {
|
||||||
|
this.selectFile(e);
|
||||||
|
this.dblClickTimer = null;
|
||||||
|
this.lastClickedItem = null;
|
||||||
|
}, 200);
|
||||||
|
}else{
|
||||||
|
clearTimeout(this.dblClickTimer);
|
||||||
|
this.dblClickTimer = null;
|
||||||
|
this.lastClickedItem = null;
|
||||||
|
this.openFile(e);
|
||||||
|
}
|
||||||
|
},
|
||||||
checkEmptyFolder(){
|
checkEmptyFolder(){
|
||||||
if (this.displayedItems.length === 0){
|
if (this.displayedItems.length === 0){
|
||||||
this.emptyFolder = true;
|
this.emptyFolder = true;
|
||||||
|
this.displayedItems = null;
|
||||||
}else{
|
}else{
|
||||||
this.emptyFolder = false;
|
this.emptyFolder = false;
|
||||||
}
|
}
|
||||||
@@ -239,12 +352,16 @@
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
lastClickedItem: null,
|
||||||
|
dblClickTimer: null,
|
||||||
bodyHeight:0,
|
bodyHeight:0,
|
||||||
bodyWidth:0,
|
bodyWidth:0,
|
||||||
coordX:0,
|
coordX:0,
|
||||||
coordY:0,
|
coordY:0,
|
||||||
displayedItems:[],
|
displayedItems: null,
|
||||||
emptyFolder: false,
|
emptyFolder: false,
|
||||||
|
displayedDescription: "",
|
||||||
|
fileName: "",
|
||||||
isNotRoot : false
|
isNotRoot : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -252,7 +369,6 @@
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.observeContainer()
|
this.observeContainer()
|
||||||
});
|
});
|
||||||
console.log('coord:', this.coordX, this.coordY);
|
|
||||||
this.dataFirstLoad();
|
this.dataFirstLoad();
|
||||||
console.log("Contact pannel is loaded!");
|
console.log("Contact pannel is loaded!");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user