Kumi
847073333d
- Standardized quote style across all files to be consistent - Added functionality to generate TURN credentials dynamically - Improved UI feedback for upload and download processes - Introduced a copy URL button for easier sharing - Implemented progress feedback during file download - Disabled buttons during ongoing operations to prevent duplicate actions - Ensured default mnemonic handling for smoother user interaction These changes enhance the reliability and usability of file transfers.
39 lines
1.4 KiB
Text
39 lines
1.4 KiB
Text
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Transfer.coffee</title>
|
|
<link rel="stylesheet" href="/css/style.css" />
|
|
<script src="/js/webtorrent.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Transfer.coffee</h1>
|
|
<div class="section" id="uploadSection">
|
|
<h2>Share File</h2>
|
|
<input type="file" id="fileInput" />
|
|
<button onclick="uploadFile()">Share</button>
|
|
<div class="result" id="uploadResult"></div>
|
|
<div class="result" id="uploadStats"></div>
|
|
<button id="copyButton" style="display: none;" onclick="copyToClipboard()">Copy URL</button>
|
|
</div>
|
|
<div class="section" id="downloadSection">
|
|
<h2>Receive File</h2>
|
|
<input type="text" id="mnemonicInput" placeholder="Enter mnemonic" />
|
|
<button id="downloadButton" onclick="downloadFile()">Receive</button>
|
|
<div class="progress" id="downloadProgress">
|
|
<div class="progress-bar" id="downloadProgressBar">0%</div>
|
|
</div>
|
|
<div class="result" id="downloadResult"></div>
|
|
<div class="result" id="downloadStats"></div>
|
|
|
|
</div>
|
|
</div>
|
|
<script>
|
|
const trackerUrl = "<%= trackerUrl %>";
|
|
<% if (typeof mnemonic !== 'undefined') { %>
|
|
const mnemonic = "<%= mnemonic %>";
|
|
<% } %>
|
|
</script>
|
|
<script src="/js/index.js"></script>
|
|
</body>
|
|
</html>
|