no issue
The `settings` service has been a source of confusion when writing with modern Ember patterns because it's use of the deprecated `ProxyMixin` forced all property access/setting to go via `.get()` and `.set()` whereas the rest of the system has mostly (there are a few other uses of ProxyObjects remaining) eliminated the use of the non-native get/set methods.
- removed use of `ProxyMixin` in the `settings` service by grabbing the attributes off the setting model after fetching and using `Object.defineProperty()` to add native getters/setters that pass through to the model's getters/setters. Ember's autotracking automatically works across the native getters/setters so we can then use the service as if it was any other native object
- updated all code to use `settings.{attrName}` directly for getting/setting instead of `.get()` and `.set()`
- removed use of observer in the `customViews` service because it was being set up before the native properties had been added on the settings service meaning autotracking wasn't able to set up properly
refs https://github.com/TryGhost/Team/issues/1650
- Some places only checked for Stripe being connected via the 'connect' method and ignored the 'direct' method
- Updated (where possible) admin to use the new calculated `paid_members_enabled` setting
closes https://github.com/TryGhost/Ghost/issues/13090
The `X` on stripe connect modal is not closing the popup as the updated modal changes was not wiring the close method.
Note: Clicking outside the popup to close it was still working
refs 909bd60db3
- The modal actions for glimmer modal components need to define `actions.confirm` separately and add confirmAction to handle both enter and manual confirmation
no issue
- enter key when a modal is displayed will always trigger the `confirm` action, if it's not provided then the base modal will throw a `You must override the "confirm" action ...` error
no refs
When disconnecting Stripe via the stripe connect modal, we were not resetting the `stripeConnectIntegrationToken` which is used by backend to calculate properties of `stripe_connect_*` settings. This resulted in `stripe_connect_*` properties being retained in settings even after Stripe is disconnected as we keep passing the old integration token to settings API which overrides all connect settings. This change resets the stripe integration token to empty again so as its not using the old value even after modal is closed or disconnected.
no issue
- updated `<GhFullscreenModal>` to pass `@modifier` and `@updateModifier` through to child modal components so they can adjust their own classes
- added an `updateSuccessModifier()` action to `<ModalStripeConnect>` to set the modal size when first opening and on `@onConnected/Disconnected` actions passed to the `<GhMembersPaymentsSetting>` component
- updated `<GhMembersPaymentsSetting>` to call passed in `onConnected/Disconnected` actions when connection or disconnection is finalised