|
|
<!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"> |
|
|
|
|
|
<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"> |
|
|
|
|
|
<div class="tabs"> |
|
|
<button class="tab-btn active" data-tab="upload">Upload</button> |
|
|
<button class="tab-btn" data-tab="history">History</button> |
|
|
</div> |
|
|
|
|
|
|
|
|
<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> |
|
|
|
|
|
|
|
|
<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> |
|
|
|
|
|
<div id="imageModal" class="modal" hidden> |
|
|
<span class="close-modal">×</span> |
|
|
<img class="modal-content" id="modalImage"> |
|
|
</div> |
|
|
|
|
|
|
|
|
<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> |
|
|
|
|
|
|
|
|
<div id="toastContainer" class="toast-container"></div> |
|
|
|
|
|
<script src="app.js" type="module"></script> |
|
|
</body> |
|
|
|
|
|
</html> |