mirror of
https://github.com/flarum/core.git
synced 2025-08-03 23:17:43 +02:00
@@ -16,7 +16,7 @@ export default class SuspendUserModal extends Modal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.status = m.prop(status);
|
this.status = m.prop(status);
|
||||||
this.daysRemaining = m.prop(status === 'limited' && -moment().diff(until, 'days') + 1);
|
this.daysRemaining = m.prop(status === 'limited' && -dayjs().diff(until, 'days') + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
className() {
|
className() {
|
||||||
@@ -88,7 +88,7 @@ export default class SuspendUserModal extends Modal {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'limited':
|
case 'limited':
|
||||||
suspendedUntil = moment().add(this.daysRemaining(), 'days').toDate();
|
suspendedUntil = dayjs().add(this.daysRemaining(), 'days').toDate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@@ -12,7 +12,7 @@ export default class UserSuspendedNotification extends Notification {
|
|||||||
content() {
|
content() {
|
||||||
const notification = this.props.notification;
|
const notification = this.props.notification;
|
||||||
const suspendedUntil = notification.content();
|
const suspendedUntil = notification.content();
|
||||||
const timeReadable = moment(suspendedUntil.date).from(notification.createdAt(), true);
|
const timeReadable = dayjs(suspendedUntil.date).from(notification.createdAt(), true);
|
||||||
|
|
||||||
return app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {
|
return app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {
|
||||||
user: notification.fromUser(),
|
user: notification.fromUser(),
|
||||||
|
Reference in New Issue
Block a user