diff --git a/index.js b/index.js index 09b6f88..277cd94 100644 --- a/index.js +++ b/index.js @@ -94,7 +94,7 @@ app.listen(config.port, () => logger.success('express', `Express server started try { const res = await fetch('https://raw.githubusercontent.com/Wingysam/Christmas-Community/master/package.json') const data = await res.json() - _CC.updateNotice = data.version === _CC.package.version + _CC.updateNotice = (data.version === _CC.package.version) ? false : { current: _CC.package.version, latest: data.version } } catch (_) {} } checkUpdates() diff --git a/views/layout.pug b/views/layout.pug index 213ed92..a52f5ff 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -49,4 +49,9 @@ html(lang='en') span.has-text-danger.is-size-4.has-text-weight-bold Christmas Community is out of date. There may be new features or bug fixes. Consider updating! :) br span (you can turn this off with UPDATE_CHECK=false) + br + br + span Current: #{_CC.updateNotice.current} + br + span Latest: #{_CC.updateNotice.latest} span.has-text-info(style='float: right;') This message is only visible to admins \ No newline at end of file