83 lines
2.6 KiB
HTML
83 lines
2.6 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>File Whizz</title>
|
|
<link rel="stylesheet" href="style.css" />
|
|
<link rel="stylesheet" href="material-colors.css" />
|
|
<script src="https://cdn.jsdelivr.net/npm/peerjs@1.5.4/dist/peerjs.min.js"></script>
|
|
<script type="importmap">
|
|
{
|
|
"imports": {
|
|
"vue": "https://cdn.jsdelivr.net/npm/vue@3/dist/vue.esm-browser.js",
|
|
"lucide": "https://cdn.jsdelivr.net/npm/lucide@0/dist/esm/lucide.js"
|
|
}
|
|
}
|
|
</script>
|
|
<script type="module" src="main.js"></script>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta property="og:title" content="File Whizz">
|
|
<meta property="og:description" content="Make that file buzzing through air">
|
|
</head>
|
|
|
|
<body>
|
|
<main id="app" style="display: none">
|
|
<h1>
|
|
<i icon="file-volume-2"></i>
|
|
File Whizz
|
|
</h1>
|
|
<br />
|
|
<div>
|
|
<label>Status</label><br>
|
|
<input :value="statusText" disabled />
|
|
<br>
|
|
<br>
|
|
<template v-if="serverIsReady">
|
|
<input disabled :value="server.url" />
|
|
<input type="submit" @click.prevent="onShare" :value="shareText" />
|
|
<br>
|
|
<br>
|
|
</template>
|
|
<template v-if="isServer">
|
|
<input type="file" @change="onFileChange" :disabled="server.data" />
|
|
<br>
|
|
<br>
|
|
<template v-for="client in server.clients">
|
|
<label>{{ client.userAgent ?? client.id }} - {{ client.status }}</label><br>
|
|
<progress :value="client.sent" :max="downloadTotal" aria-busy="!client.connected"></progress>
|
|
<br>
|
|
<br>
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<label v-if="fileName">{{ prettyFileSize }} - "{{ fileName }}"</label><br>
|
|
<template v-if="readyToDownload">
|
|
<input type="submit" @click.prevent="onDownload" value="Download" />
|
|
<br>
|
|
<br>
|
|
</template>
|
|
<template v-if="downloading">
|
|
<progress :value="downloadProgress" :max="downloadTotal"></progress><br>
|
|
<label>{{ prettyDownloadSpeed }}</label><label v-if="!client.downloadEnd"> - {{ prettyRemainingTime }}</label>
|
|
<br>
|
|
<br>
|
|
</template>
|
|
</template>
|
|
<template v-if="error">
|
|
<span class="red">{{error}}</span>
|
|
<br>
|
|
<br>
|
|
</template>
|
|
</div>
|
|
<br>
|
|
<small class="footer">
|
|
<i icon="at-sign"></i> <a href="https://github.com/klemek" target="_blank">klemek</a>
|
|
-
|
|
<i icon="github"></i> <a href="https://github.com/klemek/file-whizz" target="_blank">Repository</a>
|
|
- 2025
|
|
</small>
|
|
</main>
|
|
</body>
|
|
|
|
</html> |