mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 15:46:16 +08:00
parent
fb01d767c7
commit
400a9a6267
|
@ -16,7 +16,7 @@ export default class SuspendUserModal extends Modal {
|
|||
}
|
||||
|
||||
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() {
|
||||
|
@ -88,7 +88,7 @@ export default class SuspendUserModal extends Modal {
|
|||
break;
|
||||
|
||||
case 'limited':
|
||||
suspendedUntil = moment().add(this.daysRemaining(), 'days').toDate();
|
||||
suspendedUntil = dayjs().add(this.daysRemaining(), 'days').toDate();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -12,7 +12,7 @@ export default class UserSuspendedNotification extends Notification {
|
|||
content() {
|
||||
const notification = this.props.notification;
|
||||
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', {
|
||||
user: notification.fromUser(),
|
||||
|
|
Loading…
Reference in New Issue
Block a user