diff --git a/ghost/admin/app/components/gh-members-lab-setting.hbs b/ghost/admin/app/components/gh-members-lab-setting.hbs index 71d53a7aa1..7c63b8be0b 100644 --- a/ghost/admin/app/components/gh-members-lab-setting.hbs +++ b/ghost/admin/app/components/gh-members-lab-setting.hbs @@ -291,19 +291,6 @@ {{/liquid-if}} - {{#if this.config.enableDeveloperExperiments}} - - - - Modal settings - Customize members modal signup flow - - - Customize - - - - {{/if}} {{#unless this.hasBulkEmailConfig}} @@ -366,14 +353,4 @@ {{/liquid-if}} {{/unless}} - - -{{#if this.showMembersModalSettings}} - -{{/if}} \ No newline at end of file + \ No newline at end of file diff --git a/ghost/admin/app/components/gh-members-lab-setting.js b/ghost/admin/app/components/gh-members-lab-setting.js index c54028fe2a..24d110e7e0 100644 --- a/ghost/admin/app/components/gh-members-lab-setting.js +++ b/ghost/admin/app/components/gh-members-lab-setting.js @@ -39,7 +39,6 @@ export default Component.extend({ currencies: null, showFromAddressConfirmation: false, - showMembersModalSettings: false, // passed in actions setMembersSubscriptionSettings() {}, @@ -140,10 +139,6 @@ export default Component.extend({ this.toggleProperty('showFromAddressConfirmation'); }, - closeMembersModalSettings() { - this.set('showMembersModalSettings', false); - }, - setDefaultContentVisibility(value) { this.setDefaultContentVisibility(value); }, diff --git a/ghost/admin/app/components/modal-members-modal-settings.hbs b/ghost/admin/app/components/modal-members-modal-settings.hbs deleted file mode 100644 index 656b8bd8e1..0000000000 --- a/ghost/admin/app/components/modal-members-modal-settings.hbs +++ /dev/null @@ -1,130 +0,0 @@ - - Members modal settings - -{{!-- disable mouseDown so it doesn't trigger focus-out validations --}} - - {{svg-jar "close"}} - - - - - - - - - Display name in signup form - - - - - - - - - - - - Plans available at signup - - - - - - Free - - - - - - - Monthly - - - - - - - Yearly - - - - - - - Show beacon - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ghost/admin/app/components/modal-members-modal-settings.js b/ghost/admin/app/components/modal-members-modal-settings.js deleted file mode 100644 index e053e0794a..0000000000 --- a/ghost/admin/app/components/modal-members-modal-settings.js +++ /dev/null @@ -1,83 +0,0 @@ -import ModalComponent from 'ghost-admin/components/modal-base'; -import {alias} from '@ember/object/computed'; -import {computed} from '@ember/object'; -import {inject as service} from '@ember/service'; -import {task} from 'ember-concurrency'; - -export default ModalComponent.extend({ - settings: service(), - confirm() {}, - - subscriptionSettings: alias('model.subscriptionSettings'), - stripeConnectIntegration: alias('model.stripeConnectIntegration'), - - isFreeChecked: computed('settings.{membersjsAllowedPlans.[],membersSubscriptionSettings}', function () { - const allowSelfSignup = this.subscriptionSettings.allowSelfSignup; - const allowedPlans = this.settings.get('membersjsAllowedPlans') || []; - return (allowSelfSignup && allowedPlans.includes('free')); - }), - - isStripeConfigured: computed('settings.{stripeConnectIntegration,membersSubscriptionSettings}', function () { - const stripeConfig = this.subscriptionSettings.stripeConfig; - const stripeIntegration = this.stripeConnectIntegration; - return (!!stripeConfig.public_token && !!stripeConfig.secret_token) || stripeIntegration; - }), - - isMonthlyChecked: computed('settings.membersjsAllowedPlans.[]', 'isStripeConfigured', function () { - const allowedPlans = this.settings.get('membersjsAllowedPlans') || []; - return (this.isStripeConfigured && allowedPlans.includes('monthly')); - }), - - isYearlyChecked: computed('settings.membersjsAllowedPlans.[]', 'isStripeConfigured', function () { - const allowedPlans = this.settings.get('membersjsAllowedPlans') || []; - return (this.isStripeConfigured && allowedPlans.includes('yearly')); - }), - - init() { - this._super(...arguments); - }, - - actions: { - toggleFreePlan(isChecked) { - this.updateAllowedPlan('free', isChecked); - }, - toggleMonthlyPlan(isChecked) { - this.updateAllowedPlan('monthly', isChecked); - }, - toggleYearlyPlan(isChecked) { - this.updateAllowedPlan('yearly', isChecked); - }, - toggleBeaconSetting(showBeacon) { - this.settings.set('membersjsShowBeacon', showBeacon); - }, - - toggleSignupName(showSignupName) { - this.settings.set('membersjsShowSignupName', showSignupName); - }, - - confirm() { - return this.saveTask.perform(); - }, - - isPlanSelected(plan) { - const allowedPlans = this.settings.get('membersjsAllowedPlans'); - return allowedPlans.includes(plan); - } - }, - - updateAllowedPlan(plan, isChecked) { - const allowedPlans = this.settings.get('membersjsAllowedPlans') || []; - - if (!isChecked) { - this.settings.set('membersjsAllowedPlans', allowedPlans.filter(p => p !== plan)); - } else { - allowedPlans.push(plan); - this.settings.set('membersjsAllowedPlans', [...allowedPlans]); - } - }, - - saveTask: task(function* () { - yield this.settings.save(); - this.closeModal(); - }).drop() -}); diff --git a/ghost/admin/app/models/setting.js b/ghost/admin/app/models/setting.js index f2e67b615c..58715f93b7 100644 --- a/ghost/admin/app/models/setting.js +++ b/ghost/admin/app/models/setting.js @@ -43,8 +43,5 @@ export default Model.extend(ValidationEngine, { ogDescription: attr('string'), ogImage: attr('string'), bulkEmailSettings: attr('json-string'), - membersjsShowSignupName: attr('boolean'), - membersjsShowBeacon: attr('boolean'), - membersjsAllowedPlans: attr('json-string'), sharedViews: attr('string') });
Customize members modal signup flow
Free
Monthly
Yearly