2026-04-08 10:33:22 -05:00
<!doctype html>
< html lang = "en" class = "dark" >
< head >
< meta charset = "UTF-8" />
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" />
2026-05-08 15:36:24 -05:00
< script src = "/assets/nav-prelude.js" ></ script >
< link rel = "modulepreload" href = "/assets/nav.js" />
< link rel = "stylesheet" href = "/vendor/inter/400.css" />
< link rel = "stylesheet" href = "/vendor/inter/600.css" />
< link rel = "stylesheet" href = "/vendor/inter/700.css" />
2026-04-08 10:33:22 -05:00
< title > File Share - Overlord</ title >
< link rel = "icon" type = "image/x-icon" href = "/assets/favicon.ico" />
< link rel = "stylesheet" href = "/assets/tailwind.css" />
< link rel = "stylesheet" href = "/assets/main.css" />
2026-04-08 19:47:38 -05:00
< link rel = "stylesheet" href = "/assets/custom.css" />
2026-04-18 21:16:29 -05:00
< link rel = "stylesheet" href = "/vendor/fontawesome/css/all.min.css" />
2026-04-08 14:37:03 -05:00
< script defer src = "/assets/toast.js" ></ script >
< script defer src = "/assets/ripple.js" ></ script >
2026-04-08 10:33:22 -05:00
</ head >
< body class = "min-h-screen bg-slate-950 text-slate-100" >
< header id = "top-nav" ></ header >
< main class = "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8" >
< div class = "flex items-center justify-between mb-6" >
< h1 class = "text-2xl font-bold text-slate-100" >
< i class = "fa-solid fa-share-nodes text-rose-400 mr-2" ></ i > File Share
</ h1 >
</ div >
<!-- Upload Section (hidden until user info loaded) -->
< div id = "upload-section" class = "hidden mb-8" >
< div class = "bg-slate-900/60 border border-slate-800 rounded-xl p-6" >
< h2 class = "text-lg font-semibold text-slate-200 mb-4" >
< i class = "fa-solid fa-cloud-arrow-up text-teal-400 mr-2" ></ i > Upload File
</ h2 >
< form id = "upload-form" class = "space-y-4" >
< div >
< label class = "block text-sm font-medium text-slate-300 mb-1" > File</ label >
< input type = "file" id = "upload-file" required
2026-08-19 11:40:36 -05:00
class = "block h-10 w-full rounded-lg border border-slate-700 text-sm text-slate-300 cursor-pointer" />
2026-04-08 10:33:22 -05:00
</ div >
< div class = "grid grid-cols-1 md:grid-cols-3 gap-4" >
2026-07-13 21:54:21 -05:00
< div data-controller = "toggle" >
2026-04-08 10:33:22 -05:00
< div class = "flex items-center gap-1.5 mb-1" >
2026-07-15 10:34:43 -05:00
< label for = "upload-password" class = "block text-sm font-medium text-slate-300" > Password (optional)</ label >
2026-07-13 21:54:21 -05:00
< button type = "button" id = "password-info-btn" data-action = "toggle#toggle" aria-expanded = "false" aria-controls = "password-info-panel"
2026-04-08 10:33:22 -05:00
class = "inline-flex items-center justify-center w-5 h-5 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 text-xs transition-colors"
title = "How to download with a password" >
< i class = "fa-solid fa-question" ></ i >
</ button >
</ div >
2026-07-13 21:54:21 -05:00
< div class = "relative" data-controller = "reveal" >
2026-07-15 10:34:43 -05:00
< input type = "password" id = "upload-password" name = "password" autocomplete = "new-password" placeholder = "Leave empty for no password" data-reveal-target = "input"
2026-07-13 21:54:21 -05:00
class = "w-full pr-10 px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-rose-500/50" />
< button type = "button" data-action = "reveal#toggle" aria-label = "Show value" aria-pressed = "false" class = "absolute inset-y-0 right-0 px-3 text-slate-400 hover:text-slate-200" >
< i class = "fa-solid fa-eye" data-reveal-target = "icon" ></ i >
</ button >
</ div >
< div id = "password-info-panel" data-toggle-target = "content" class = "hidden mt-2 p-3 bg-slate-800/80 border border-slate-700 rounded-lg text-xs text-slate-400" >
2026-04-08 10:33:22 -05:00
< p class = "mb-1.5 text-slate-300 font-medium" > Downloading password-protected files:</ p >
< p class = "mb-1" > Use the < code class = "px-1 py-0.5 bg-slate-900 rounded text-rose-300" > X-Download-Password</ code > header:</ p >
< pre class = "mt-1 mb-2 p-2 bg-slate-900 rounded text-emerald-300 overflow-x-auto select-all" > curl -H "X-Download-Password: yourpass" https://host/api/file-share/< id> /download -o file.ext</ pre >
2026-08-24 09:35:03 -05:00
< p > Do not put the password in the URL; URLs can be retained in browser history and access logs.</ p >
2026-04-08 10:33:22 -05:00
</ div >
</ div >
< div >
< label class = "block text-sm font-medium text-slate-300 mb-1" > Max Downloads</ label >
< div class = "flex items-center gap-2" >
< input type = "number" id = "upload-max-downloads" min = "1" placeholder = "Unlimited"
class = "flex-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-rose-500/50" />
< label class = "flex items-center gap-1.5 text-sm text-slate-400 whitespace-nowrap" >
< input type = "checkbox" id = "upload-infinite" checked
class = "w-4 h-4 rounded accent-rose-500" />
< span > ∞</ span >
</ label >
</ div >
</ div >
< div >
< label class = "block text-sm font-medium text-slate-300 mb-1" > Expiry Date (optional)</ label >
< input type = "datetime-local" id = "upload-expiry"
class = "w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-rose-500/50" />
</ div >
</ div >
< div >
< label class = "block text-sm font-medium text-slate-300 mb-1" > Description (optional)</ label >
< input type = "text" id = "upload-description" placeholder = "Short note about this file"
class = "w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-rose-500/50" />
</ div >
< button type = "submit" id = "upload-btn"
class = "inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-rose-600 hover:bg-rose-500 text-white font-medium text-sm transition-colors" >
< i class = "fa-solid fa-upload" ></ i > Upload
</ button >
</ form >
</ div >
</ div >
<!-- File List -->
< div class = "bg-slate-900/60 border border-slate-800 rounded-xl overflow-hidden" >
< div class = "overflow-x-auto" >
< table class = "w-full text-sm" >
< thead >
< tr class = "border-b border-slate-800 bg-slate-900/80" >
< th class = "px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider" > File</ th >
< th class = "px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider" > Size</ th >
< th class = "px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider" > Uploader</ th >
< th class = "px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider" > Downloads</ th >
< th class = "px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider" > Status</ th >
< th class = "px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider" > Uploaded</ th >
< th class = "px-6 py-3 text-right text-xs font-medium text-slate-400 uppercase tracking-wider" > Actions</ th >
</ tr >
</ thead >
< tbody id = "file-list" class = "divide-y divide-slate-800" >
< tr >
< td colspan = "7" class = "px-6 py-12 text-center text-slate-500" >
< i class = "fa-solid fa-spinner fa-spin mr-2" ></ i > Loading...
</ td >
</ tr >
</ tbody >
</ table >
</ div >
</ div >
</ main >
<!-- Edit Modal -->
< div id = "edit-modal" class = "hidden fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm" >
2026-07-15 10:34:43 -05:00
< form id = "edit-form" class = "bg-slate-900 border border-slate-700 rounded-2xl shadow-2xl w-full max-w-md mx-4 p-6" >
2026-04-08 10:33:22 -05:00
< h3 class = "text-lg font-semibold text-slate-100 mb-4" >
< i class = "fa-solid fa-pen-to-square text-rose-400 mr-2" ></ i > Edit File Settings
</ h3 >
< input type = "hidden" id = "edit-file-id" />
< div class = "space-y-4" >
< div >
2026-07-15 10:34:43 -05:00
< label for = "edit-password" class = "block text-sm font-medium text-slate-300 mb-1" > Password</ label >
2026-07-13 21:54:21 -05:00
< div class = "relative" data-controller = "reveal" >
2026-07-15 10:34:43 -05:00
< input type = "password" id = "edit-password" name = "password" autocomplete = "new-password" placeholder = "Leave empty to remove password" data-reveal-target = "input"
2026-07-13 21:54:21 -05:00
class = "w-full pr-10 px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-rose-500/50" />
< button type = "button" data-action = "reveal#toggle" aria-label = "Show value" aria-pressed = "false" class = "absolute inset-y-0 right-0 px-3 text-slate-400 hover:text-slate-200" >
< i class = "fa-solid fa-eye" data-reveal-target = "icon" ></ i >
</ button >
</ div >
2026-04-08 10:33:22 -05:00
< p class = "text-xs text-slate-500 mt-1" > Enter new password or leave blank to remove</ p >
</ div >
< div >
< label class = "block text-sm font-medium text-slate-300 mb-1" > Max Downloads</ label >
< div class = "flex items-center gap-2" >
< input type = "number" id = "edit-max-downloads" min = "1" placeholder = "Unlimited"
class = "flex-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-rose-500/50" />
< label class = "flex items-center gap-1.5 text-sm text-slate-400 whitespace-nowrap" >
< input type = "checkbox" id = "edit-infinite"
class = "w-4 h-4 rounded accent-rose-500" />
< span > ∞</ span >
</ label >
</ div >
</ div >
< div >
< label class = "block text-sm font-medium text-slate-300 mb-1" > Expiry Date</ label >
< input type = "datetime-local" id = "edit-expiry"
class = "w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-rose-500/50" />
< p class = "text-xs text-slate-500 mt-1" > Clear to remove expiry</ p >
</ div >
< div >
< label class = "block text-sm font-medium text-slate-300 mb-1" > Description</ label >
< input type = "text" id = "edit-description"
class = "w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-rose-500/50" />
</ div >
</ div >
< div class = "flex justify-end gap-3 mt-6" >
2026-07-15 10:34:43 -05:00
< button id = "edit-cancel" type = "button"
2026-04-08 10:33:22 -05:00
class = "px-4 py-2 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 text-sm transition-colors" >
Cancel
</ button >
2026-07-15 10:34:43 -05:00
< button id = "edit-save" type = "submit"
2026-04-08 10:33:22 -05:00
class = "px-4 py-2 rounded-lg bg-rose-600 hover:bg-rose-500 text-white text-sm font-medium transition-colors" >
Save Changes
</ button >
</ div >
2026-07-15 10:34:43 -05:00
</ form >
2026-04-08 10:33:22 -05:00
</ div >
< script src = "/assets/nav.js" type = "module" ></ script >
< script src = "/assets/file-share.js" type = "module" ></ script >
</ body >
</ html >