diff --git a/app/fileManager.js b/app/fileManager.js index bd15a046..63043cc3 100644 --- a/app/fileManager.js +++ b/app/fileManager.js @@ -158,25 +158,6 @@ export default function(state, emitter) { emitter.emit('password', { password, file: ownedFile }); } state.modal = copyDialog(ownedFile.name, ownedFile.url); - state.animation = () => { - const x = document.querySelector('.foo'); - const y = x.previousElementSibling; - x.animate( - [ - { transform: `translateY(-${y.getBoundingClientRect().height}px)` }, - { transform: 'translateY(0)' } - ], - { - duration: 400, - easing: 'ease' - } - ); - y.animate([{ opacity: 0 }, { opacity: 1 }], { - delay: 300, - duration: 100, - fill: 'both' - }); - }; } catch (err) { if (err.message === '0') { //cancelled. do nothing diff --git a/app/routes.js b/app/routes.js index 4992df5c..cb616c42 100644 --- a/app/routes.js +++ b/app/routes.js @@ -32,7 +32,7 @@ function body(main) { module.exports = function() { const app = choo(); - app.route('/', body(require('./ui/welcome'))); + app.route('/', body(require('./ui/home'))); app.route('/download/:id', body(download)); app.route('/download/:id/:key', body(download)); app.route('/unsupported/:reason', body(require('./ui/unsupported'))); diff --git a/app/ui/archiveTile.js b/app/ui/archiveTile.js index 8c9bcd7f..528819ce 100644 --- a/app/ui/archiveTile.js +++ b/app/ui/archiveTile.js @@ -107,13 +107,22 @@ function fileInfo(file, action) { function archiveDetails(translate, archive) { if (archive.manifest.files.length > 1) { return html` -
+
${translate('fileCount', { num: archive.manifest.files.length })} - ${list(archive.manifest.files.map(f => fileInfo(f)), 'list-reset')} + ${list( + archive.manifest.files.map(f => fileInfo(f)), + 'list-reset h-full overflow-y-scroll' + )}
`; } + function toggled(event) { + event.stopPropagation(); + archive.open = event.target.open; + } } module.exports = function(state, emit, archive) { @@ -286,9 +295,12 @@ module.exports.empty = function(state, emit) { module.exports.preview = function(state, emit) { const archive = state.fileInfo; + if (archive.open === undefined) { + archive.open = true; + } return html` -
-

+

+

${archive.name}

${bytes(archive.size)}
@@ -296,7 +308,7 @@ module.exports.preview = function(state, emit) { ${archiveDetails(state.translate, archive)}