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:
parent
5836685d29
commit
fb435cc115
2 changed files with 11 additions and 2 deletions
|
@ -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',
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue