Kumi
93704705c8
Enhanced the file upload feature by replacing the progress bar with a dynamic stats display showing the total amount uploaded and number of peers. Also introduced better differentiation between upload and download sections, improving UI clarity. Added a utility function for generating peer ID hashes. Refactoring ensures users can more easily monitor file sharing progress and understand network interactions.
33 lines
1.1 KiB
Text
33 lines
1.1 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>
|
|
</div>
|
|
<div class="section" id="downloadSection">
|
|
<h2>Receive File</h2>
|
|
<input type="text" id="mnemonicInput" placeholder="Enter mnemonic" />
|
|
<button 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>
|
|
</div>
|
|
<script>
|
|
const trackerUrl = "<%= trackerUrl %>";
|
|
</script>
|
|
<script src="/js/index.js"></script>
|
|
</body>
|
|
</html>
|