discourse/app/assets/javascripts/select-kit/addon/components/group-members-dropdown.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
682 B
JavaScript
Raw Normal View History

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