Show extracted names in toast and new images
16
README.md
@@ -143,17 +143,23 @@ FileRise is a lightweight, secure, self-hosted web application for uploading, sy
|
||||
**Light mode:**
|
||||

|
||||
|
||||
**Dark mode default:**
|
||||

|
||||
|
||||
**Dark editor:**
|
||||

|
||||
|
||||
**Dark preview**
|
||||

|
||||
**Light preview**
|
||||

|
||||
|
||||
**Restore or Delete Trash:**
|
||||

|
||||

|
||||
|
||||
**Login page:**
|
||||

|
||||
**Dark Login page:**
|
||||

|
||||
|
||||
**Gallery view:**
|
||||

|
||||
|
||||
**iphone screenshots:**
|
||||
<p align="center">
|
||||
|
||||
@@ -80,8 +80,9 @@ $srcMetadata = file_exists($srcMetaFile) ? json_decode(file_get_contents($srcMet
|
||||
$destMetadata = file_exists($destMetaFile) ? json_decode(file_get_contents($destMetaFile), true) : [];
|
||||
|
||||
$errors = [];
|
||||
$safeFileNamePattern = '/^[A-Za-z0-9_\-\.\(\) ]+$/';
|
||||
$allSuccess = true;
|
||||
$extractedFiles = array(); // Array to collect names of extracted files
|
||||
$safeFileNamePattern = '/^[A-Za-z0-9_\-\.\(\) ]+$/';
|
||||
|
||||
// ---------- Process Each File ----------
|
||||
foreach ($files as $zipFileName) {
|
||||
@@ -115,6 +116,14 @@ foreach ($files as $zipFileName) {
|
||||
$errors[] = "Failed to extract $originalName.";
|
||||
$allSuccess = false;
|
||||
} else {
|
||||
// Collect extracted file names from this zip.
|
||||
for ($i = 0; $i < $zip->numFiles; $i++) {
|
||||
$entryName = $zip->getNameIndex($i);
|
||||
$extractedFileName = basename($entryName);
|
||||
if ($extractedFileName) {
|
||||
$extractedFiles[] = $extractedFileName;
|
||||
}
|
||||
}
|
||||
// Update metadata for each extracted file if the zip file has metadata.
|
||||
if (isset($srcMetadata[$originalName])) {
|
||||
$zipMeta = $srcMetadata[$originalName];
|
||||
@@ -138,7 +147,7 @@ if (file_put_contents($destMetaFile, json_encode($destMetadata, JSON_PRETTY_PRIN
|
||||
}
|
||||
|
||||
if ($allSuccess) {
|
||||
echo json_encode(["success" => true]);
|
||||
echo json_encode(["success" => true, "extractedFiles" => $extractedFiles]);
|
||||
} else {
|
||||
echo json_encode(["success" => false, "error" => implode(" ", $errors)]);
|
||||
}
|
||||
|
||||
@@ -756,7 +756,12 @@ export function handleExtractZipSelected(e) {
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
showToast("Zip file(s) extracted successfully!");
|
||||
// If the server returned a list of extracted files, join them into a string.
|
||||
let toastMessage = "Zip file(s) extracted successfully!";
|
||||
if (data.extractedFiles && Array.isArray(data.extractedFiles) && data.extractedFiles.length) {
|
||||
toastMessage = "Extracted: " + data.extractedFiles.join(", ");
|
||||
}
|
||||
showToast(toastMessage);
|
||||
loadFileList(window.currentFolder);
|
||||
} else {
|
||||
showToast("Error extracting zip: " + (data.error || "Unknown error"));
|
||||
|
||||
|
Before Width: | Height: | Size: 574 KiB After Width: | Height: | Size: 626 KiB |
BIN
resources/dark-gallery.png
Normal file
|
After Width: | Height: | Size: 662 KiB |
BIN
resources/dark-login.png
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
resources/dark-mode-default.png
Normal file
|
After Width: | Height: | Size: 346 KiB |
|
Before Width: | Height: | Size: 311 KiB After Width: | Height: | Size: 376 KiB |
|
Before Width: | Height: | Size: 3.7 MiB After Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 321 KiB After Width: | Height: | Size: 400 KiB |
BIN
resources/light-preview.png
Normal file
|
After Width: | Height: | Size: 3.2 MiB |
BIN
resources/light-share.png
Normal file
|
After Width: | Height: | Size: 412 KiB |
BIN
resources/light-trash.png
Normal file
|
After Width: | Height: | Size: 502 KiB |
|
Before Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 416 KiB |
61
styles.css
@@ -1051,30 +1051,6 @@ body.dark-mode .custom-prev-next-btn:hover:not(:disabled) {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
.folder-option:hover {
|
||||
background-color: #f0f0f0;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.folder-option.selected {
|
||||
background-color: #d0d0d0;
|
||||
border-radius: 4px;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
body.dark-mode .folder-option.selected {
|
||||
background-color: #444;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
body.dark-mode .folder-option:hover {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
#customToast {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
@@ -1279,15 +1255,38 @@ body.dark-mode #fileListContainer {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.folder-option {
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
#folderTreeContainer {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.folder-option {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.folder-option:hover {
|
||||
background-color: #f0f0f0;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.folder-option.selected {
|
||||
background-color: #d0d0d0;
|
||||
border-radius: 4px;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
body.dark-mode .folder-option.selected {
|
||||
background-color: #444;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
body.dark-mode .folder-option:hover {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
/* ===========================================================
|
||||
FILE MANAGER INLINE STYLE REMOVAL - New Classes
|
||||
=========================================================== */
|
||||
@@ -1958,6 +1957,9 @@ body.dark-mode #folderContextMenu {
|
||||
#uploadFolderRow {
|
||||
background-color: transparent;
|
||||
}
|
||||
#sidebarDropArea {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body.dark-mode #sidebarDropArea,
|
||||
body.dark-mode #uploadFolderRow {
|
||||
@@ -2009,4 +2011,5 @@ body.dark-mode .card {
|
||||
|
||||
.custom-folder-card-body {
|
||||
padding-top: 5px !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||