Skip to content

Commit

Permalink
Merge pull request Hubs-Foundation#6189 from mozilla/fix-legacy-namet…
Browse files Browse the repository at this point in the history
…ag-color-customisation

Fix legacy nametag color customisation
  • Loading branch information
nikk15 authored Jul 27, 2023
2 parents 7c2ec8d + 3e9cf6d commit 2a325e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions admin/src/react-components/service-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ class ConfigurationEditor extends Component {
className={this.props.classes.button}
variant="contained"
color="primary"
disabled={this.state.warningMessage}
>
Save
</Button>
Expand Down
3 changes: 2 additions & 1 deletion src/utils/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ function getCurrentTheme() {

function getThemeColor(name) {
const theme = getCurrentTheme();
return theme?.variables?.[name] || DEFAULT_COLORS[name];
// config?.theme?.[name] ensures legacy variables for nametag colors are taken into account
return theme?.variables?.[name] || config?.theme?.[name] || DEFAULT_COLORS[name];
}

function updateTextButtonColors() {
Expand Down

0 comments on commit 2a325e3

Please sign in to comment.