clear settings after removing last file from wip

This commit is contained in:
Danny Coates 2019-03-06 10:43:58 -08:00
parent 7f9674f494
commit fb9f35413c
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
2 changed files with 4 additions and 1 deletions

View File

@ -55,6 +55,9 @@ export default function(state, emitter) {
emitter.on('removeUpload', file => { emitter.on('removeUpload', file => {
state.archive.remove(file); state.archive.remove(file);
if (state.archive.numFiles === 0) {
state.archive.clear();
}
render(); render();
}); });

View File

@ -446,7 +446,7 @@ module.exports.empty = function(state, emit) {
for="file-upload" for="file-upload"
role="button" role="button"
class="btn rounded-lg flex items-center mt-4" class="btn rounded-lg flex items-center mt-4"
title="${state.translate('addFilesButtonWithSizeUpdate', { title="${state.translate('addFilesButton', {
size: bytes(state.user.maxSize) size: bytes(state.user.maxSize)
})}" })}"
> >