diff --git a/apps/admin-x-settings/src/components/settings/membership/tiers/TierDetailModal.tsx b/apps/admin-x-settings/src/components/settings/membership/tiers/TierDetailModal.tsx index 7e734bd01f..47673a11d5 100644 --- a/apps/admin-x-settings/src/components/settings/membership/tiers/TierDetailModal.tsx +++ b/apps/admin-x-settings/src/components/settings/membership/tiers/TierDetailModal.tsx @@ -141,14 +141,14 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => { let leftButtonProps: ButtonProps = {}; if (tier) { - if (tier.active) { + if (tier.active && tier.type !== 'free') { leftButtonProps = { label: 'Archive tier', color: 'red', link: true, onClick: confirmTierStatusChange }; - } else { + } else if (!tier.active) { leftButtonProps = { label: 'Reactivate tier', color: 'green', diff --git a/ghost/admin/app/components/admin-x/settings.js b/ghost/admin/app/components/admin-x/settings.js index 392e8984f5..ed3bfe1e37 100644 --- a/ghost/admin/app/components/admin-x/settings.js +++ b/ghost/admin/app/components/admin-x/settings.js @@ -279,6 +279,7 @@ export default class AdminXSettings extends Component { @service settings; @service router; @service membersUtils; + @service themeManagement; @inject config; @@ -329,6 +330,14 @@ export default class AdminXSettings extends Component { // membersUtils has local state which needs to be updated this.membersUtils.reload(); } + + if (dataType === 'ThemesResponseType') { + const activated = response.themes.find(theme => theme.active); + + if (activated) { + this.themeManagement.activeTheme = this.store.peekAll('theme').filterBy('name', activated.name).firstObject; + } + } }; onInvalidate = (dataType) => {