mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
c9f1a6bc48
refs https://github.com/TryGhost/Team/issues/1026 Tiers is being released as a beta feature with an early-access opt-in flow. Site owners can now opt-in for early access to Tiers feature in Ghost by enabling it from the Beta features section, but note it's a one way door and its not possible to switch it off once enabled. This is to ensure that sites don't break in any unexpected ways once the tiers feature is enabled by switching it off.
24 lines
556 B
JavaScript
24 lines
556 B
JavaScript
import ModalComponent from 'ghost-admin/components/modal-base';
|
|
import {inject as service} from '@ember/service';
|
|
import {task} from 'ember-concurrency';
|
|
|
|
export default ModalComponent.extend({
|
|
feature: service(),
|
|
// Allowed actions
|
|
confirm: () => {},
|
|
|
|
actions: {
|
|
confirm() {
|
|
this.enableTiers.perform();
|
|
}
|
|
},
|
|
|
|
enableTiers: task(function* () {
|
|
try {
|
|
yield this.feature.set('multipleProducts', true);
|
|
} finally {
|
|
this.send('closeModal');
|
|
}
|
|
}).drop()
|
|
});
|