DEV: Remove group-members-dropdown (#11948)

It was introduced in c82b2dcc24, but since b76731d722 and 58ee947b35 it's a single-option dropdown, so there's no need to show it (and keep it) instead of a button. We use a button for non-admins already.
This commit is contained in:
Jarek Radosz 2021-02-03 17:42:12 +01:00 committed by GitHub
parent 39a9651847
commit 155ae06f62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 43 deletions

View File

@ -8,19 +8,12 @@
<div class="group-members-manage">
{{#if canManageGroup}}
{{#if currentUser.admin}}
{{group-members-dropdown
groupName=model.full_name
showAddMembersModal=(route-action "showAddMembersModal")
}}
{{else}}
{{d-button
icon="plus"
label="groups.manage.add_members"
class="group-members-add"
action=(route-action "showAddMembersModal")
}}
{{/if}}
{{d-button
icon="plus"
label="groups.manage.add_members"
class="group-members-add"
action=(route-action "showAddMembersModal")
}}
{{/if}}
</div>

View File

@ -1,30 +0,0 @@
import { action, computed } from "@ember/object";
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
import I18n from "I18n";
export default DropdownSelectBoxComponent.extend({
classNames: ["group-members-dropdown"],
selectKitOptions: {
icon: "bars",
showFullTitle: false,
},
content: computed(function () {
const items = [
{
id: "showAddMembersModal",
name: I18n.t("groups.add_members.title", {
group_name: this.groupName,
}),
icon: "user-plus",
},
];
return items;
}),
@action
onChange(id) {
this.attrs && this.attrs[id] && this.attrs[id]();
},
});