diff --git a/www/convert/app-convert.less b/www/convert/app-convert.less index c5813641a..2815230da 100644 --- a/www/convert/app-convert.less +++ b/www/convert/app-convert.less @@ -13,4 +13,8 @@ flex-flow: column; background-color: @cp_app-bg; + input[type="file"] { + padding: 5px !important; + margin-bottom: 5px; + } } diff --git a/www/convert/inner.js b/www/convert/inner.js index a3b244a8a..08ac8a7fc 100644 --- a/www/convert/inner.js +++ b/www/convert/inner.js @@ -120,8 +120,10 @@ define([ type: 'file' }); APP.$rightside.append([hint, picker]); + Messages.convert_unsupported = "UNSUPPORTED FILE TYPE :("; // XXX $(picker).on('change', function () { + APP.$rightside.find('button, div.notice').remove(); var file = picker.files[0]; var name = file && file.name; var reader = new FileReader(); @@ -140,6 +142,9 @@ define([ }).appendTo(APP.$rightside); }); + } else { + var notice = h('div.notice', Messages.convert_unsupported); + APP.$rightside.append(notice); } }; reader.readAsArrayBuffer(file, 'application/octet-stream');