Commit Graph

1440 Commits

Author SHA1 Message Date
Kevin Ansfield
6c14e1ea71 Removed matchHelper labs flag toggle
refs 981f11da95

- `{{match}}` is GA now and the flag doesn't exist server-side so it was always auto-toggling off in Admin
2021-10-19 19:25:23 +01:00
Peter Zimon
7e28e2f173 Offer details screen refinements
- changed order of URL and description
- added "Read only" indication to discount info
- added default placeholder for URL field
2021-10-19 15:58:22 +02:00
Peter Zimon
552412d323 Added static prices to offers list 2021-10-19 14:11:22 +02:00
Kevin Ansfield
e9911d5e20 Added ctrl/cmd+s save on design settings screen
refs https://github.com/TryGhost/Team/issues/1149

- use ember-keyboard's `{{on-key}}` modifier to attach keyboard event listener when the design settings index screen is shown - ensures that ctrl/cmd+s on the change-theme screen won't trigger an unexpected save
- blur active element when saving so the preview is updated and reflects what has just been saved (text fields only update preview on blur)
2021-10-19 11:59:34 +01:00
Rishabh
21847b822c Fixed offer ui updating offer values directly on input change
no refs

- without marking input fields in template as `readonly` value, it updates the value directly on any change which is undesirable and causes side-effects in actual update of property
2021-10-19 13:39:16 +05:30
Rishabh
bab977c55c Fixed broken offer detail navigation on list screen
refs https://github.com/TryGhost/Team/issues/1162

- fixes link for offer detail on last column of offer row in list screen
2021-10-19 13:06:22 +05:30
Rishabh
eddeb07a52 Added error handling and validation for offer
closes https://github.com/TryGhost/Team/issues/1159

- validates offer fields before save client-side
2021-10-19 13:05:18 +05:30
Rishabh
b94bb836f5 Added redemption count for offers in list screen
closes https://github.com/TryGhost/Team/issues/1136
2021-10-18 23:46:45 +05:30
Sanne de Vries
e0842183c0 Updated design settings and theme directory
Refs https://github.com/TryGhost/Team/issues/1149
2021-10-18 17:43:06 +02:00
Peter Zimon
737db37175 Added Integrations as a subpage of Settings
- Restructured Admin so that Integrations becomes a subpage of Settings.
2021-10-18 14:47:59 +02:00
Kevin Ansfield
db0fc23dee Animated "advanced" table open/close on change themes screen
refs https://github.com/TryGhost/Team/issues/1149

- switched to using `{{liquid-if}}` to get our standard open/close animation when the `showAdvanced` property is changed
2021-10-18 13:05:18 +01:00
Kevin Ansfield
9a0a98e64a Added "active" indicator and list themes in "active, default, ...rest" order
refs https://github.com/TryGhost/Team/issues/1149

- built a secondary list of themes that's decorated and sorted for display purposes
2021-10-18 13:02:35 +01:00
Peter Zimon
a78afb5749 Added Staff as subpages of Settings
- The Admin is being restructured with Offers. This commit moves Staff under Settings.
2021-10-18 13:27:42 +02:00
Rishabh
bb575dbb87 Added portal preview to offer screen
refs https://github.com/TryGhost/Team/issues/1137

- adds new portal preview using portal offer url on offer screen
- adds new utility to calculate portal offer preview url from data
- fixed tiny bug with discount type currency not shown correctly
2021-10-18 14:31:29 +05:30
Sanne de Vries
9120f0d820 Updated design settings navigation 2021-10-15 17:59:52 +02:00
Peter Zimon
be5ef010a5 Offers archive/active refinements
- added empty archive screen
- added indication of archive offer on detail page
- set default dropdown style to non-selected
- removed archive button for new offers
2021-10-15 12:49:42 +02:00
Sanne de Vries
aeafe91ea1 Updated design settings page 2021-10-14 18:01:12 +02:00
Peter Zimon
7a26051439 Moved offers active/archive filter to view actions bar 2021-10-14 17:14:27 +02:00
Peter Zimon
2234b04a56 Fix form group bottom margins 2021-10-14 17:11:29 +02:00
Kevin Ansfield
94ca66cde5 Fixed design settings browser preview missing site title and icon
no issue

- when copying the template parts out of `<GhSitePreview>` the template was left pointing to passed in arguments rather than pulling the data from the settings service
2021-10-14 15:58:29 +01:00
Sanne de Vries
e4c10cbe6c Updated theme directory and theme preview 2021-10-14 12:39:54 +02:00
Rishabh
2645bb895c Updated copy for archive/reactivate offers
refs https://github.com/TryGhost/Team/issues/1148
2021-10-14 00:53:31 +05:30
Rishabh
88049f1692 Updated offers list to filter on archived offers
refs https://github.com/TryGhost/Team/issues/1136

- adds dropdown for active/archived offers selection
- wires active/archived offers on list screen to API
- filters offers list on archived/active based on selection
2021-10-13 21:23:30 +05:30
Rishabh
667a4b6e78 Added (un)archive button to offer detail screen
refs https://github.com/TryGhost/Team/issues/1136

- adds option to archive/unarchive an offer
- adds new modals for confirmation of archive or unarchive of offer
- wired (un)archiving of offers to API
2021-10-13 21:23:30 +05:30
Kevin Ansfield
24507ac5cc Added preview page selector to design settings screen
closes https://github.com/TryGhost/Team/issues/1103

Custom post settings can be grouped by homepage or post, when set to `'post'` it makes sense to be able to preview a post page rather than the homepage.

- added preview type selection to `themeManagement` service
  - `.availablePreviewTypes` is useful for populating selects or other page selection elements
  - `.previewType` is set to the currently selected preview type name
  - `.setPreviewType()` is for setting the preview type and re-generating the preview html if necessary
- updated `themeManagement.updatePreviewHtmlTask` to fetch the latest published post if we don't already have a published post reference in the store, that post's `url` is then used when fetching the preview html if the preview type is set to `'post'`
- added a select element to the design index header that uses the themeManagement properties/actions to list types and update the preview on change
- updated the design nav menu to switch preview types when different sections are opened so the preview automatically switches to the post preview when making changes to the "post" custom theme settings group
2021-10-13 16:07:01 +01:00
Sanne de Vries
ede7ef12fa Added footer link to Marketplace in theme directory 2021-10-13 16:40:46 +02:00
Kevin Ansfield
7c2ba1c242 Wired up desktop/mobile toggle on design settings screen
no issue

- ensured that we're only swapping classes on existing elements or inserting/removing elements around the iframe to avoid re-rendering and the associated loading+layout flash
2021-10-13 13:22:49 +01:00
Sanne de Vries
34e4add038 Updated advanced section on new themes page 2021-10-13 12:59:49 +02:00
Kevin Ansfield
3477be5974 Removed hardcoded style from design settings index
no issue

- by using flex display on the outer container we can get rid of the hardcoded height calc style and let the browser handle the layout more naturally
2021-10-12 15:23:55 +01:00
Kevin Ansfield
8ec5b83097 Fixed save button on design settings screen
refs https://github.com/TryGhost/Team/issues/1130

- when moving the design settings screen from a modal to normal routes the save process was misplaced and the template not updated
- moved all the design settings behaviour over to the index controller where it belongs and updated the template to use `this.saveTask` rather than `@data.saveTask` as was used in the modal
2021-10-12 15:19:27 +01:00
Kevin Ansfield
265a19f550 Added initial view-theme modal for installing from themes list
refs https://github.com/TryGhost/Team/issues/1130

- added new route for viewing themes so back/forward buttons can be used
  - takes theme name as a parameter
  - opens a fullscreen modal with an iframe containing the theme demo
- changed installable themes list to link to new route
- swapped `previewUrl` in theme data to point at the real demo rather than the ghost.org demo page
2021-10-12 14:28:05 +01:00
Sanne de Vries
87c3a0a359 Fixed upload theme button style 2021-10-12 15:01:20 +02:00
Kevin Ansfield
924da56c94 Moved theme table to change-theme screen and dropped advanced screen
refs https://github.com/TryGhost/Team/issues/1130

- match latest design where the theme table is under an "advanced" toggle on the change-theme screen rather than a completely separate screen
2021-10-12 10:18:55 +01:00
Kevin Ansfield
13f9cb85fa Refactored theme upload process and linked from design screens
refs https://github.com/TryGhost/Team/issues/1130

- copied theme upload modal to new modals system and refactored for Octane syntax
  -  updated to use `themeManagement` service rather than passed in actions so the modal-based process can be opened from any screen
  - added default `beforeClose()` for the modal to the modals service so it won't close if an upload is in-progress (defaults were moved directly into the class so it had access to services)
- added `themeManagement.upload` action for triggering the upload modal and providing a central place for limit checks
- added upload-triggering buttons to change-theme and advanced design screens
2021-10-11 19:30:58 +01:00
Kevin Ansfield
42e493bb81 Initial pass at new change theme screen
refs https://github.com/TryGhost/Team/issues/1130

- added link to design sidebar
- dropped change-theme modal and associated route behaviour
- copied basic themes marketplace list into the change-theme controller/template
2021-10-11 17:14:18 +01:00
Kevin Ansfield
595018098d Switched design screen from modals to standard routes
refs https://github.com/TryGhost/Team/issues/1130

- added `ui.contextualNavMenu` property that when set will switch the main nav menu between components, if it's not set then it will show the default "main" menu component
- added `design` menu sub-component of `gh-nav-menu` ready for use via `contextualNavMenu`
  - moved sidebar contents from the design modal into this component
- updated design route to set/reset `ui.contextualNavMenu` to `design` on entering/leaving the route
  - all other design routes are sub-routes so this works across all other design screens
- moved base design modal preview into the `settings/design/index` controller/template
  - using index means that it's the default screen for `/settings/design` but will be automatically replaced by any other `design.x` routes
- moved `design/advanced` modal content into the `settings.design.advanced` controller/template and removed the modal handling from the route
2021-10-11 15:24:46 +01:00
Rishabh
7ef2b08883 Fixed offer percentage amount not getting set
no refs
2021-10-08 19:15:56 +05:30
Rishabh
4bbbea29ed Refined fixed discount type amount UI
refs https://github.com/TryGhost/Team/issues/1084
refs https://github.com/TryGhost/Team/issues/1085

- uses price helper to show Stripe amount instead of manual calculation
2021-10-08 18:50:18 +05:30
Peter Zimon
7ac85a3c02 Formatting fixes on offers list 2021-10-08 12:55:25 +02:00
Peter Zimon
600edc0d60 Updated percentage/amount selector for offers 2021-10-08 12:48:41 +02:00
Rishabh
267889993f Updated shareable offer link UI on list screen
refs https://github.com/TryGhost/Team/issues/1084

- updates shareable offer link UI to to open directly instead of route
- calculates offer url from code and updates in link modal
- wires copy button on link modal
- removes route based link code for modal
2021-10-08 09:28:17 +05:30
Rishabh
bbaad743a3 Refined offer detail screen
refs https://github.com/TryGhost/Team/issues/1085

- adds unsaved changes modal for navigating away
- adds link url for offer redemption
- updated amount calculation for fixed amount offers (1000 for 10 USD)
- disabled discount info section for existing offers
2021-10-08 01:43:59 +05:30
Rishabh
43f5d7c621 Refined offers list screen
refs https://github.com/TryGhost/Team/issues/1084

- updates offer list to show fixed amount discounts
- cleans up offer list usage
2021-10-08 01:39:42 +05:30
Peter Zimon
fd5e009d29 Fixed Tags empty screen button bug 2021-10-07 12:25:37 +02:00
Peter Zimon
1861c8b4eb Copy update for offer details 2021-10-07 12:17:50 +02:00
Peter Zimon
b5d30ba92e Temporarily removed Archive option for offers 2021-10-07 12:16:30 +02:00
Naz
4f3e340c03 Promoted email-only feature to general availability
refs https://github.com/TryGhost/Team/issues/1125

-- Email-only is not considered a general availability feature and can be used without special flags.
- It allows to publish a new post type "email only" that only goes out as an email newletter and is available through an undescoverable URL (does not appear anywhere publicly similarly to preview posts) on the site.
- The new "send" option in the post publishing menu allows to send this new type of post.
2021-10-07 12:07:48 +02:00
Peter Zimon
e244304538 Offer list and detail improvements
- added icon to offer value
- added link popup to list
- renamed "Delete offer" to "Archive offer"
2021-10-07 11:21:53 +02:00
Peter Zimon
b942029cc9 Added dynamic currency to offers form 2021-10-06 17:49:45 +02:00
Rishabh
31e4b77525 Added initial wiring for offer screens
refs https://github.com/TryGhost/Team/issues/1084
refs https://github.com/TryGhost/Team/issues/1085

- adds model/validator/config and router for offers
- updates template for offer list and detail with dynamic values
- updated route handling for offer list and creation
- wires offer data from API to list and detail pages
2021-10-06 20:01:25 +05:30