File size: 5,659 Bytes
cca5d04 2590c3f cca5d04 2590c3f cca5d04 2590c3f cca5d04 2590c3f cca5d04 2590c3f cca5d04 2590c3f cca5d04 2590c3f cca5d04 2590c3f cca5d04 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web Uploader</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&family=Fira+Code:wght@400;500&display=swap"
rel="stylesheet">
<!-- Prism.js CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css" rel="stylesheet">
</head>
<body>
<div class="background-blobs">
<div class="blob blob-1"></div>
<div class="blob blob-2"></div>
<div class="blob blob-3"></div>
</div>
<main class="container">
<div class="upload-card">
<!-- Tabs -->
<div class="tabs">
<button class="tab-btn active" data-tab="upload">Upload</button>
<button class="tab-btn" data-tab="history">History</button>
</div>
<!-- Upload Tab Content -->
<div class="tab-content active" id="upload">
<div class="card-header">
<h1>File Upload</h1>
<p>Upload your files securely and fast</p>
</div>
<div class="drop-zone" id="dropZone">
<div class="icon-container">
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="upload-icon">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="17 8 12 3 7 8"></polyline>
<line x1="12" y1="3" x2="12" y2="15"></line>
</svg>
</div>
<h3>Drag & Drop files here</h3>
<p>or <button class="browse-btn" id="browseBtn" aria-label="Browse files to upload">Browse Files</button></p>
<input type="file" id="fileInput" multiple hidden>
</div>
<div class="upload-options" style="margin-top: 1.5rem; display: flex; align-items: center; gap: 1rem;">
<label for="expiration" style="font-weight: 500; color: var(--text-muted);">File Expiration:</label>
<select id="expiration" aria-label="Select file expiration time" style="padding: 0.5rem; border-radius: 8px; border: 1px solid #ccc; background: rgba(255,255,255,0.8); color: var(--text-color);">
<option value="1h">1 Hour</option>
<option value="24h" selected>24 Hours</option>
<option value="7d">7 Days</option>
<option value="permanent">Never (Permanent)</option>
</select>
</div>
<div class="progress-container" id="progressContainer" hidden>
<div class="file-info">
<span class="file-name" id="fileName">Uploading files...</span>
<span class="upload-status" id="uploadStatus">Uploading...</span>
</div>
<div class="progress-bar-bg">
<div class="progress-bar-fill" id="progressBar"></div>
</div>
</div>
<div class="results-container" id="resultsContainer" hidden></div>
<div class="status-message" id="statusMessage" hidden></div>
</div>
<!-- History Tab Content -->
<div class="tab-content" id="history">
<div class="card-header">
<h1>Upload History</h1>
<p>Your previously uploaded files</p>
</div>
<div class="history-actions" style="margin-bottom: 1rem; text-align: right;">
<button id="clearHistoryBtn" class="secondary-btn" style="padding: 0.6rem 1.2rem; border: 1px solid #ccc; border-radius: 8px; background: rgba(255, 255, 255, 0.9); color: var(--text-color); cursor: pointer; font-weight: 500; transition: all 0.2s ease;">Clear History</button>
</div>
<div id="historyList" class="history-list">
<p class="empty-state" style="text-align: center; color: var(--text-muted); padding: 2rem;">No upload history yet.</p>
</div>
</div>
</div>
</main>
<!-- Image Preview Modal -->
<div id="imageModal" class="modal" hidden>
<span class="close-modal">×</span>
<img class="modal-content" id="modalImage">
</div>
<!-- Confirmation Modal -->
<div id="confirmModal" class="modal" hidden>
<div class="confirm-content">
<h3>Clear History?</h3>
<p>Are you sure you want to clear your entire upload history? This action cannot be undone.</p>
<div class="confirm-actions">
<button id="cancelConfirmBtn" class="secondary-btn">Cancel</button>
<button id="confirmDeleteBtn" class="danger-btn">Delete History</button>
</div>
</div>
</div>
<!-- Toast Container -->
<div id="toastContainer" class="toast-container"></div>
<script src="app.js" type="module"></script>
</body>
</html> |