diff --git a/manage/updater-ui.js b/manage/updater-ui.js index 216f6cee..e936bc26 100644 --- a/manage/updater-ui.js +++ b/manage/updater-ui.js @@ -171,14 +171,72 @@ function renderUpdatesOnlyFilter({show, check} = {}) { function showUpdateHistory() { + const log = $create('.update-history-log'); + let logText, scroller, toggler; + let deleted = false; BG.chromeLocal.getValue('updateLog').then((lines = []) => { + logText = lines.join('\n'); messageBox({ title: t('updateCheckHistory'), - contents: $create('.update-history-log', lines.join('\n')), - buttons: [t('confirmOK')], - onshow: () => ($('#message-box-contents').scrollTop = 1e9), + contents: log, + buttons: [ + t('confirmOK'), + logText && {textContent: t('confirmDelete'), onclick: deleteHistory}, + ], + onshow: logText && (() => { + scroller = $('#message-box-contents'); + scrollToBottom(); + $('#message-box-buttons button').insertAdjacentElement('afterend', + // TODO: add a global class for our labels + // TODO: add a