Commit Graph

9 Commits

Author SHA1 Message Date
Kevin Ansfield
060d791a63 Removed need for .get() with settings service
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
2022-10-07 16:14:57 +01:00
Sanne de Vries
72d3d6debc Hid email related ui when subscription access is set to 'Nobody' 2022-02-11 09:29:11 +01:00
Peter Zimon
efb036f9f1 Refined icon color 2021-05-25 14:00:22 +02:00
Sanne de Vries
dce8d77cf0 Updated access settings dropdowns and icons 2021-05-18 15:10:42 +02:00
Kevin Ansfield
8a1ae88192 Added portal preview to memberships screen
no issue

- fixed styling issues
    - fixed portal preview taking over the screen by adding `position: relative` to the container
    - fixed portal preview being interactive by disabling pointer events
- added portal preview URL generation to memberships controller
    - moved much of the preview params knowledge/calculations from the `<ModalPortalSettings>` component into the `members-utils` service so that a portal preview URL can be generated from anywhere using current settings values rather than the method consumer needing to have knowledge of all params and how to generate them
    - updated actions in controller that modify settings to also update the preview url
    - added `onChange` event to the `<Settings/MembersSubscriptionAccess>` component so the controller can react and update preview
- used `<GhSiteIframe>` with generated portal preview URL for live display of portal changes on memberships screen
2021-05-18 13:59:57 +01:00
Sanne de Vries
a237dc73d9 Refined membership access settings 2021-05-17 19:36:36 +02:00
Kevin Ansfield
51536fb2ef Added icons to membership dropdown options
no issue

- add icon + icon color to the subscription access and default post access option lists
- updated templates to use icon in trigger and option display
- fixed ember-power-select styles overriding svgs in trigger
2021-05-17 09:42:44 +01:00
Kevin Ansfield
42ef8df7ca Switched signup and default post access settings to dropdowns
no issue

- provides clearer indication of current setting without having to expand anything
- has more minimal UI which helps when settings screen has multiple areas
2021-05-14 15:44:10 +01:00
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