mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
d0d97d1aa2
requires https://github.com/TryGhost/Ghost/pull/8114 - adds "(Un-)Suspend User" options on user profile page with a modal confirmation screen - separates team index into "active" and "suspended" users - adds "suspended" badge to user profile when suspended
29 lines
661 B
JavaScript
29 lines
661 B
JavaScript
import Controller from 'ember-controller';
|
|
import injectService from 'ember-service/inject';
|
|
import {sort} from 'ember-computed';
|
|
|
|
export default Controller.extend({
|
|
|
|
showInviteUserModal: false,
|
|
|
|
activeUsers: null,
|
|
suspendedUsers: null,
|
|
invites: null,
|
|
|
|
session: injectService(),
|
|
|
|
inviteOrder: ['email'],
|
|
sortedInvites: sort('invites', 'inviteOrder'),
|
|
|
|
userOrder: ['name', 'email'],
|
|
|
|
sortedActiveUsers: sort('activeUsers', 'userOrder'),
|
|
sortedSuspendedUsers: sort('suspendedUsers', 'userOrder'),
|
|
|
|
actions: {
|
|
toggleInviteUserModal() {
|
|
this.toggleProperty('showInviteUserModal');
|
|
}
|
|
}
|
|
});
|