From ae89f1964fb39b081f4c6a9b852eae58de307913 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Mon, 5 Nov 2018 16:43:45 -0800 Subject: [PATCH] fixes #994. add new files to top of upload area --- app/ui/archiveTile.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/ui/archiveTile.js b/app/ui/archiveTile.js index f1f37c92..881f4462 100644 --- a/app/ui/archiveTile.js +++ b/app/ui/archiveTile.js @@ -174,11 +174,13 @@ module.exports = function(state, emit, archive) { module.exports.wip = function(state, emit) { return html` -
+
${list( - state.archive.files.map(f => fileInfo(f, remove(f))), - 'list-reset h-full overflow-y-scroll p-4 bg-blue-lightest md:max-h-half-screen', - 'bg-white px-2 mb-3 border border-grey-light rounded' + Array.from(state.archive.files) + .reverse() + .map(f => fileInfo(f, remove(f))), + 'list-reset h-full overflow-y-scroll px-4 bg-blue-lightest md:max-h-half-screen', + 'bg-white px-2 mt-3 border border-grey-light rounded' )}
{ + document + .querySelector('#wip > ul > li:first-child') + .scrollIntoView({ block: 'center' }); + }); } function remove(file) {