FileServer/html/main.html
2025-10-12 15:25:44 +03:00

51 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Das File Server</title>
<!--<link rel="stylesheet" href="/main.css">-->
<style>
#$STYLE$#
</style>
</head>
<body>
<h1>🔐 Secure File Server by -=:dAs:=-</h1>
<div class="section" id="authSection">
<h2>API Key Management</h2>
<div id="noKeySection">
<!-- Remove it section in prod!
<button onclick="generateKey()">Generate New API Key</button>
<p>or</p>
-->
<input type="text" id="existingKey" placeholder="Enter your existing API key">
<button onclick="useExistingKey()">Use This Key</button>
</div>
<div id="hasKeySection" class="hidden">
<div class="message info">
<strong>Your API Key:</strong>
<div class="api-key-display" id="apiKeyDisplay"></div>
<small>⚠️ Save this key securely!</small>
</div>
<button onclick="clearKey()" style="background: #dc3545;">Logout</button>
</div>
<div id="authMessage"></div>
</div>
<div class="section hidden" id="uploadSection">
<h2>Upload Files</h2>
<input type="file" id="fileInput" multiple>
<button onclick="uploadFiles()">Upload</button>
<div id="uploadMessage"></div>
</div>
<div class="section hidden" id="filesSection">
<h2>Your Files</h2>
<button onclick="loadFiles()">Refresh List</button>
<ul class="file-list" id="fileList"></ul>
</div>
<script>
#$SCRIPT$#
</script>
</body>
</html>