summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/extra.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index 0ba09388..a6b01a91 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -36,7 +36,8 @@ const ui = getUIElements()
window.createtime = null
window.lastchangetime = null
window.lastchangeui = {
- status: $('.ui-status-lastchange'),
+ statusChanged: $('.ui-status-lastchange.changed'),
+ statusCreated: $('.ui-status-lastchange.created'),
time: $('.ui-lastchange'),
user: $('.ui-lastchangeuser'),
nouser: $('.ui-no-lastchangeuser')
@@ -48,9 +49,11 @@ export function updateLastChange () {
if (!window.lastchangeui) return
if (window.createtime) {
if (window.createtime && !window.lastchangetime) {
- window.lastchangeui.status.text('created')
+ window.lastchangeui.statusChanged.hide()
+ window.lastchangeui.statusCreated.show()
} else {
- window.lastchangeui.status.text('changed')
+ window.lastchangeui.statusChanged.show()
+ window.lastchangeui.statusCreated.hide()
}
const time = window.lastchangetime || window.createtime
window.lastchangeui.time.html(moment(time).fromNow())