2017-08-24 21:54:02 +00:00
|
|
|
const html = require('choo/html');
|
|
|
|
const progress = require('./progress');
|
|
|
|
const { bytes } = require('../utils');
|
|
|
|
|
2017-12-05 22:06:40 +00:00
|
|
|
module.exports = function(state) {
|
2017-08-24 21:54:02 +00:00
|
|
|
const transfer = state.transfer;
|
|
|
|
const div = html`
|
2017-11-07 23:54:42 +00:00
|
|
|
<div id="page-one">
|
2018-01-16 21:52:09 +00:00
|
|
|
<div id="download">
|
|
|
|
<div id="download-progress" class="fadeIn">
|
|
|
|
<div id="dl-title" class="title">${state.translate(
|
|
|
|
'downloadingPageProgress',
|
|
|
|
{
|
|
|
|
filename: state.fileInfo.name,
|
|
|
|
size: bytes(state.fileInfo.size)
|
|
|
|
}
|
|
|
|
)}</div>
|
|
|
|
<div class="description">${state.translate(
|
|
|
|
'downloadingPageMessage'
|
|
|
|
)}</div>
|
|
|
|
${progress(transfer.progressRatio)}
|
|
|
|
<div class="upload">
|
|
|
|
<div class="progress-text">${state.translate(
|
|
|
|
transfer.msg,
|
|
|
|
transfer.sizes
|
|
|
|
)}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-11-07 23:54:42 +00:00
|
|
|
</div>
|
2017-08-24 21:54:02 +00:00
|
|
|
</div>
|
|
|
|
`;
|
|
|
|
|
|
|
|
return div;
|
|
|
|
};
|