Ghost/ghost/admin/app/components/settings/members-default-post-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

23 lines
612 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 SettingsMembersDefaultPostAccess extends Component {
@service settings;
@tracked postAccessOpen = false;
@action
togglePostAccess() {
this.postAccessOpen = !this.postAccessOpen;
}
@action
setDefaultContentVisibility(value) {
if (this.settings.get('membersSignupAccess') !== 'none') {
this.settings.set('defaultContentVisibility', value);
}
}
}