mirror of
https://github.com/timvisee/send.git
synced 2025-10-03 09:49:14 +02:00
Fix #896 Port Send Android to choo
This commit is contained in:
parent
071e283f87
commit
7a48c5201a
10 changed files with 195 additions and 206 deletions
33
android/pages/home.js
Normal file
33
android/pages/home.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
const html = require('choo/html');
|
||||
|
||||
export default function mainPage(state, emit) {
|
||||
function uploadFile(event) {
|
||||
event.preventDefault();
|
||||
const target = event.target;
|
||||
const file = target.files[0];
|
||||
if (file.size === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
emit('pushState', '/upload');
|
||||
emit('addFiles', { files: [file] });
|
||||
emit('upload', {});
|
||||
}
|
||||
return html`<body>
|
||||
<div id="white">
|
||||
<div id="centering">
|
||||
<img src=${state.getAsset('encrypted-envelope.png')} />
|
||||
<h4>Private, Encrypted File Sharing</h4>
|
||||
<div>
|
||||
Send files through a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever.
|
||||
</div>
|
||||
<div id="spacer">
|
||||
</div>
|
||||
<label id="label" for="input">
|
||||
<img src=${state.getAsset('cloud-upload.png')} />
|
||||
</label>
|
||||
<input id="input" name="input" type="file" onchange=${uploadFile} />
|
||||
</div>
|
||||
</div>
|
||||
</body>`;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue