feat(upload): add dynamic expiry options and modern UI theme
- Implement dynamic expiry options on the upload page based on user roles and retention policies. - Add helper functions to build and format expiry options into human-readable labels. - Introduce a new modern theme featuring glassmorphism, gradients, and frosted glass cards.
This commit is contained in:
@@ -18,6 +18,28 @@
|
||||
return;
|
||||
}
|
||||
|
||||
// Remember the last-chosen expiry across uploads (per browser).
|
||||
const expirySelect = form.querySelector("[data-expiry-select]");
|
||||
if (expirySelect) {
|
||||
const EXPIRY_KEY = "warpbox-expiry";
|
||||
let saved = null;
|
||||
try {
|
||||
saved = localStorage.getItem(EXPIRY_KEY);
|
||||
} catch (e) {
|
||||
saved = null;
|
||||
}
|
||||
if (saved && expirySelect.querySelector('option[value="' + saved + '"]')) {
|
||||
expirySelect.value = saved;
|
||||
}
|
||||
expirySelect.addEventListener("change", () => {
|
||||
try {
|
||||
localStorage.setItem(EXPIRY_KEY, expirySelect.value);
|
||||
} catch (e) {
|
||||
/* ignore persistence failures */
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let latestBoxURL = "";
|
||||
let selectedFiles = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user