0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00

Fixed minor issues with AdminX Ember sync (#18359)

refs https://github.com/TryGhost/Product/issues/3832
This commit is contained in:
Jono M 2023-09-26 13:23:52 +01:00 committed by GitHub
parent 5836685d29
commit fb435cc115
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -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',

View file

@ -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) => {