navigation dans favoris et correction edition dans sous dossiers
This commit is contained in:
parent
2e86a6c1dd
commit
0b30cf48bd
@ -254,7 +254,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const client = getClient();
|
const client = getClient();
|
||||||
let directoryItems;
|
let directoryItems;
|
||||||
if (this.currentTab === 'default'){
|
if (this.currentTab === 'default' || (this.currentTab === 'favorites' && this.current_dir !== '/')){
|
||||||
directoryItems = await client.getDirectoryContents(this.root_path + this.current_dir);
|
directoryItems = await client.getDirectoryContents(this.root_path + this.current_dir);
|
||||||
}
|
}
|
||||||
else if(this.currentTab === 'favorites'){
|
else if(this.currentTab === 'favorites'){
|
||||||
@ -264,6 +264,7 @@ export default {
|
|||||||
|
|
||||||
this.files = directoryItems.map(file => ({
|
this.files = directoryItems.map(file => ({
|
||||||
basename: file.basename,
|
basename: file.basename,
|
||||||
|
filename:file.filename,
|
||||||
size: file.size,
|
size: file.size,
|
||||||
href: client.getFileDownloadLink(file.filename),
|
href: client.getFileDownloadLink(file.filename),
|
||||||
type: file.type
|
type: file.type
|
||||||
@ -313,7 +314,19 @@ export default {
|
|||||||
async handleClickElem(file) {
|
async handleClickElem(file) {
|
||||||
if (this.isTransfering) return;
|
if (this.isTransfering) return;
|
||||||
if (file.type === 'directory') {
|
if (file.type === 'directory') {
|
||||||
|
if(this.currentTab === 'default'){
|
||||||
this.current_dir = this.current_dir === '/' ? '/' + file.basename : this.current_dir + '/' + file.basename;
|
this.current_dir = this.current_dir === '/' ? '/' + file.basename : this.current_dir + '/' + file.basename;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
let path = file.filename;
|
||||||
|
let pathSplited = path.split('/');
|
||||||
|
let result = pathSplited.slice(3);
|
||||||
|
let dir = '';
|
||||||
|
result.forEach(element => {
|
||||||
|
dir += '/' + element
|
||||||
|
});
|
||||||
|
this.current_dir = dir;
|
||||||
|
}
|
||||||
this.breadcrumbParts = this.getBreadcrumbParts()
|
this.breadcrumbParts = this.getBreadcrumbParts()
|
||||||
await this.fetchFiles();
|
await this.fetchFiles();
|
||||||
} else {
|
} else {
|
||||||
@ -596,9 +609,10 @@ export default {
|
|||||||
if (names.initialFileName !== names.newFileName) {
|
if (names.initialFileName !== names.newFileName) {
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
try {
|
try {
|
||||||
const oldName = this.root_path + this.current_dir + names.initialFileName;
|
const oldName = this.root_path + this.current_dir + '/' + names.initialFileName;
|
||||||
const newName = this.root_path + this.current_dir + names.newFileName;
|
const newName = this.root_path + this.current_dir + '/' + names.newFileName;
|
||||||
let alreadyExists = await this.elemtAlreadyExists(newName);
|
let alreadyExists = await this.elemtAlreadyExists(newName);
|
||||||
|
console.log(names)
|
||||||
if (!alreadyExists) {
|
if (!alreadyExists) {
|
||||||
await client.moveFile(oldName, newName);
|
await client.moveFile(oldName, newName);
|
||||||
}
|
}
|
||||||
|
@ -675,10 +675,6 @@ video {
|
|||||||
width: 16.666667%;
|
width: 16.666667%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.w-2\/6 {
|
|
||||||
width: 33.333333%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.w-24 {
|
.w-24 {
|
||||||
width: 6rem;
|
width: 6rem;
|
||||||
}
|
}
|
||||||
@ -695,6 +691,10 @@ video {
|
|||||||
width: 12rem;
|
width: 12rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-5\/6 {
|
||||||
|
width: 83.333333%;
|
||||||
|
}
|
||||||
|
|
||||||
.w-6 {
|
.w-6 {
|
||||||
width: 1.5rem;
|
width: 1.5rem;
|
||||||
}
|
}
|
||||||
@ -711,10 +711,6 @@ video {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.w-5\/6 {
|
|
||||||
width: 83.333333%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.max-w-64 {
|
.max-w-64 {
|
||||||
max-width: 16rem;
|
max-width: 16rem;
|
||||||
}
|
}
|
||||||
@ -737,22 +733,14 @@ video {
|
|||||||
animation: spin 1s linear infinite;
|
animation: spin 1s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cursor-not-allowed {
|
.\!cursor-no-drop {
|
||||||
cursor: not-allowed;
|
cursor: no-drop !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cursor-pointer {
|
.cursor-pointer {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cursor-no-drop {
|
|
||||||
cursor: no-drop;
|
|
||||||
}
|
|
||||||
|
|
||||||
.\!cursor-no-drop {
|
|
||||||
cursor: no-drop !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-row {
|
.flex-row {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user