mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 16:41:21 +01:00
fix: show local time for ban
This commit is contained in:
@@ -212,15 +212,20 @@ socket = window.socket;
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onEventBanned(data) {
|
function onEventBanned(data) {
|
||||||
var message = data.until ? '[[error:user-banned-reason-until, ' + utils.toISOString(data.until) + ', ' + data.reason + ']]' : '[[error:user-banned-reason, ' + data.reason + ']]';
|
require(['translator'], function (translator) {
|
||||||
|
var message = data.until ?
|
||||||
bootbox.alert({
|
translator.compile('error:user-banned-reason-until', (new Date(data.until).toLocaleString()), data.reason) :
|
||||||
title: '[[error:user-banned]]',
|
'[[error:user-banned-reason, ' + data.reason + ']]';
|
||||||
message: message,
|
translator.translate(message, function (message) {
|
||||||
closeButton: false,
|
bootbox.alert({
|
||||||
callback: function () {
|
title: '[[error:user-banned]]',
|
||||||
window.location.href = config.relative_path + '/';
|
message: message,
|
||||||
},
|
closeButton: false,
|
||||||
|
callback: function () {
|
||||||
|
window.location.href = config.relative_path + '/';
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user