mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
cdb87e5112
refs 80f7e0b19e
- Added visibility input in PSM to control content access level for members
- Added default post visibility in editor. To be changed (moved to server-side) once `defaultContentVisibility` is available in settings service
- Added `visibility` property to post model & mirage
25 lines
529 B
JavaScript
25 lines
529 B
JavaScript
import Component from '@ember/component';
|
|
|
|
const VISIBILITIES = [
|
|
{label: 'Everyone', name: 'public'},
|
|
{label: 'Free and paying members', name: 'members'},
|
|
{label: 'Only paying members', name: 'paid'}
|
|
];
|
|
|
|
export default Component.extend({
|
|
|
|
// public attrs
|
|
post: null,
|
|
|
|
init() {
|
|
this._super(...arguments);
|
|
this.availableVisibilities = VISIBILITIES;
|
|
},
|
|
|
|
actions: {
|
|
updateVisibility(newVisibility) {
|
|
this.post.set('visibility', newVisibility);
|
|
}
|
|
}
|
|
});
|