mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FEATURE: adds security tab to dashboard (#6768)
This commit also includes the new staff_logins report
This commit is contained in:
@ -276,9 +276,13 @@ const Report = Discourse.Model.extend({
|
||||
return this._numberLabel(value, opts);
|
||||
}
|
||||
if (type === "date") {
|
||||
const date = moment(value, "YYYY-MM-DD");
|
||||
const date = moment(value);
|
||||
if (date.isValid()) return this._dateLabel(value, date);
|
||||
}
|
||||
if (type === "precise_date") {
|
||||
const date = moment(value);
|
||||
if (date.isValid()) return this._dateLabel(value, date, "LLL");
|
||||
}
|
||||
if (type === "text") return this._textLabel(value);
|
||||
|
||||
return {
|
||||
@ -377,10 +381,10 @@ const Report = Discourse.Model.extend({
|
||||
};
|
||||
},
|
||||
|
||||
_dateLabel(value, date) {
|
||||
_dateLabel(value, date, format = "LL") {
|
||||
return {
|
||||
value,
|
||||
formatedValue: value ? date.format("LL") : "—"
|
||||
formatedValue: value ? date.format(format) : "—"
|
||||
};
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user