Urgent correction of version v1.0.0-beta.14 due to crash issues when acting on the CDN.
All checks were successful
continuous-integration/drone/push Build is passing

We would like to apologize for the inconvenience caused and we would like to thank you for the quick report.
This commit is contained in:
2024-07-12 18:07:19 +02:00
parent 4b616e825a
commit aaff0ed4ea
15 changed files with 296 additions and 213 deletions

View File

@@ -122,46 +122,24 @@ body.dark-theme .navbar-toggler-icon {
filter: invert(1);
}
#logoutLink {
transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
color: #007BFF;
background-color: transparent;
padding: 8px 16px;
text-decoration: none;
display: inline-block;
font-size: 14px;
margin: 4px 2px;
border-radius: 50px;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0,0,0,0.25);
border: 2px solid #007BFF;
}
#logoutLink:hover {
transform: scale(1.15);
background-color: #007BFF;
color: #fff;
}
.custom-btn {
transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
color: #007BFF;
background-color: transparent;
padding: 8px 16px;
text-decoration: none;
display: inline-block;
font-size: 14px;
margin: 4px 2px;
border-radius: 50px;
display: inline-flex;
align-items: center;
justify-content: center;
font-family: inherit;
font-weight: 500;
font-size: 14px; /* réduit la taille de la police */
padding: 0.6em 1.2em; /* réduit le padding */
color: white;
background: linear-gradient(0deg, rgba(77,54,208,1) 0%, rgba(132,116,254,1) 100%);
border: none;
box-shadow: 0 0.7em 1.5em -0.5em #4d36d0be;
letter-spacing: 0.05em;
border-radius: 15em; /* réduit le rayon de la bordure */
cursor: pointer;
box-shadow: 0 2px 5px rgba(0,0,0,0.25);
border: 2px solid #007BFF;
}
.custom-btn:hover {
transform: scale(1.15);
background-color: #007BFF;
color: #fff;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.btn-icon {
@@ -171,30 +149,48 @@ body.dark-theme .navbar-toggler-icon {
.custom-dropdown,
.animated-button {
position: relative;
background: #1d2429;
display: inline-flex;
align-items: center;
justify-content: center;
font-family: inherit;
font-weight: 500;
font-size: 14px; /* réduit la taille de la police */
padding: 0.6em 1.2em; /* réduit le padding */
color: white;
background: linear-gradient(0deg, rgba(77,54,208,1) 0%, rgba(132,116,254,1) 100%);
border: none;
box-shadow: 0 0.7em 1.5em -0.5em #4d36d0be;
letter-spacing: 0.05em;
border-radius: 15em; /* réduit le rayon de la bordure */
cursor: pointer;
padding: 10px 20px;
font-size: 1em;
color: #17a2b8;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
body.white-theme .custom-dropdown,
body.white-theme .animated-button {
color: #6c757d;
background: #e9ecef;
body .custom-dropdown:focus,
body .animated-button:focus {
color: #ffffff !important; /* Change the text color to white */
background: linear-gradient(0deg, rgba(77,54,208,1) 0%, rgba(132,116,254,1) 100%) !important; /* Keep the background color as the button color */
}
.custom-dropdown:hover,
.animated-button:hover {
background: #343a40;
color: #fff;
body.white-theme .custom-dropdown:focus,
body.white-theme .animated-button:focus {
color: #ffffff !important; /* Change the text color to white */
background: linear-gradient(0deg, rgba(77,54,208,1) 0%, rgba(132,116,254,1) 100%) !important; /* Keep the background color as the button color */
}
body.white-theme .custom-dropdown:hover,
body.white-theme .animated-button:hover {
background: #343a40;
color: #fff;
@keyframes rainbowBorder {
0% { box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.7); }
14% { box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.7); }
28% { box-shadow: 0 0 0 3px rgba(255, 255, 0, 0.7); }
42% { box-shadow: 0 0 0 3px rgba(0, 255, 0, 0.7); }
57% { box-shadow: 0 0 0 3px rgba(0, 0, 255, 0.7); }
71% { box-shadow: 0 0 0 3px rgba(75, 0, 130, 0.7); }
85% { box-shadow: 0 0 0 3px rgba(143, 0, 255, 0.7); }
100% { box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.7); }
}
.rainbow-effect {
animation: rainbowBorder 2s linear infinite;
}

View File

@@ -337,4 +337,78 @@ async function showFileInfo(fileName) {
html: html,
confirmButtonText: 'Fermer'
});
}
}document.addEventListener('DOMContentLoaded', function () {
const moveFileForm = document.getElementById('moveFileForm');
moveFileForm.addEventListener('submit', function (event) {
event.preventDefault(); // Empêche la soumission par défaut du formulaire
const fileName = this.querySelector('input[name="fileName"]').value;
const userName = this.querySelector('input[name="userName"]').value;
const oldFolderName = this.querySelector('input[name="oldFolderName"]').value;
const newFolderName = this.querySelector('select[name="newFolderName"]').value;
if (!newFolderName || newFolderName === "Déplacer vers...") {
Swal.fire({
position: 'top',
icon: 'error',
title: 'Veuillez sélectionner un dossier de destination',
showConfirmButton: false,
timer: 1800,
toast: true
});
return;
}
Swal.fire({
title: 'Confirmer le déplacement du fichier',
text: `Voulez-vous déplacer le fichier ${fileName} vers ${newFolderName} ?`,
icon: 'warning',
showCancelButton: true,
confirmButtonText: 'Déplacer',
cancelButtonText: 'Annuler',
}).then((result) => {
if (result.isConfirmed) {
fetch(`/api/dpanel/dashboard/movefile/${oldFolderName}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ fileName, userName, newFolderName }),
})
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
})
.then(data => {
if (data.message === "File moved successfully") {
Swal.fire({
position: 'top',
icon: 'success',
title: 'Le fichier a été déplacé avec succès.',
showConfirmButton: false,
timer: 1800,
toast: true,
}).then(() => {
location.reload();
});
} else {
throw new Error(data.error || 'Une erreur est survenue');
}
})
.catch((error) => {
Swal.fire({
position: 'top',
icon: 'error',
title: 'Erreur lors du déplacement du fichier.',
showConfirmButton: false,
timer: 1800,
toast: true,
});
});
}
});
});
});