2020-02-19 06:23:38 +08:00
|
|
|
import { action, computed } from "@ember/object";
|
2018-04-06 17:11:00 +08:00
|
|
|
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
|
2020-05-14 04:23:41 +08:00
|
|
|
import I18n from "I18n";
|
2018-04-06 17:11:00 +08:00
|
|
|
|
|
|
|
export default DropdownSelectBoxComponent.extend({
|
2020-02-03 21:22:14 +08:00
|
|
|
classNames: ["group-members-dropdown"],
|
2019-05-28 18:15:12 +08:00
|
|
|
|
2020-02-03 21:22:14 +08:00
|
|
|
selectKitOptions: {
|
|
|
|
icon: "bars",
|
|
|
|
showFullTitle: false,
|
2019-05-28 18:15:12 +08:00
|
|
|
},
|
|
|
|
|
2020-02-03 21:22:14 +08:00
|
|
|
content: computed(function () {
|
2018-04-06 17:11:00 +08:00
|
|
|
const items = [
|
|
|
|
{
|
|
|
|
id: "showAddMembersModal",
|
2020-08-15 09:03:41 +08:00
|
|
|
name: I18n.t("groups.add_members.title", {
|
|
|
|
group_name: this.groupName,
|
|
|
|
}),
|
2018-04-06 17:11:00 +08:00
|
|
|
icon: "user-plus",
|
|
|
|
},
|
|
|
|
];
|
|
|
|
return items;
|
2020-02-19 06:23:38 +08:00
|
|
|
}),
|
|
|
|
|
|
|
|
@action
|
|
|
|
onChange(id) {
|
|
|
|
this.attrs && this.attrs[id] && this.attrs[id]();
|
|
|
|
},
|
2018-04-06 17:11:00 +08:00
|
|
|
});
|