This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/group-notifications-button.js.es6

16 lines
501 B
JavaScript

import NotificationOptionsComponent from "discourse/components/notifications-button";
import { observes } from "ember-addons/ember-computed-decorators";
export default NotificationOptionsComponent.extend({
classNames: ["group-notifications-button"],
value: Em.computed.alias("group.group_user.notification_level"),
i18nPrefix: "groups.notifications",
@observes("value")
_notificationLevelChanged() {
this.get("group").setNotification(this.get("value"), this.get("user.id"));
}
});