Do theme name concversion

This commit is contained in:
Neil MacDougall 2021-04-30 13:18:30 +01:00
parent 3d768b6b7d
commit 213f40613b
1 changed files with 3 additions and 2 deletions

View File

@ -24,7 +24,6 @@ export default {
}, },
data() { data() {
return { return {
iframeEl: null, iframeEl: null,
loaded: true, loaded: true,
@ -106,10 +105,12 @@ export default {
const iframeEl = document.getElementById(EMBER_FRAME); const iframeEl = document.getElementById(EMBER_FRAME);
if (iframeEl) { if (iframeEl) {
const emberTheme = theme === 'light' ? 'ui-light' : 'ui-dark';
// Ensure the embedded UI uses the correct theme // Ensure the embedded UI uses the correct theme
iframeEl.contentWindow.postMessage({ iframeEl.contentWindow.postMessage({
action: 'set-theme', action: 'set-theme',
name: theme name: emberTheme
}); });
} }
}, },