Ghost/ghost/admin/app/components/settings/members-subscription-access.js
Kevin Ansfield cb3b01c020 Extracted individual members setting blocks into components
no issue

- the membership setting screen will be covering a lot of areas, having individual settings as discrete components allows for easier re-organisation and cleaner parent templates and controllers
2021-05-14 15:01:50 +01:00

22 lines
588 B
JavaScript

import Component from '@glimmer/component';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';
import {tracked} from '@glimmer/tracking';
export default class SettingsMembersSubscriptionAccess extends Component {
@service settings;
@tracked signupAccessOpen = false;
@action
toggleSignupAccess() {
this.signupAccessOpen = !this.signupAccessOpen;
}
@action
setSignupAccess(value) {
this.settings.set('membersSignupAccess', value);
this.settings.set('defaultContentVisibility', 'public');
}
}