save download count changes to localStorage. fixes #1080
This commit is contained in:
parent
6e175dd5ca
commit
783d7bfa03
3 changed files with 22 additions and 17 deletions
|
@ -157,6 +157,9 @@ class Storage {
|
|||
const workingFiles = this.files.slice();
|
||||
for (const f of workingFiles) {
|
||||
const cc = await f.updateDownloadCount();
|
||||
if (cc) {
|
||||
await this.writeFile(f);
|
||||
}
|
||||
downloadCount = downloadCount || cc;
|
||||
outgoing = outgoing || f.expired;
|
||||
if (f.expired) {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
const html = require('choo/html');
|
||||
const archiveTile = require('./archiveTile');
|
||||
const intro = require('./intro');
|
||||
const modal = require('./modal');
|
||||
const notFound = require('./notFound');
|
||||
|
||||
function password(state, emit) {
|
||||
|
@ -122,6 +123,7 @@ module.exports = function(state, emit) {
|
|||
}
|
||||
return html`
|
||||
<main class="main container">
|
||||
${state.modal && modal(state, emit)}
|
||||
<section class="relative h-full w-full p-6 md:flex md:flex-row">
|
||||
<div class="md:mr-6 md:w-1/2">${content}</div>
|
||||
<div class="md:w-1/2 mt-6 md:mt-0">${intro(state)}</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue