mirror of https://github.com/rancher/dashboard.git
Send primary color to ember UI
This commit is contained in:
parent
9909ed9c97
commit
10bf88a0ed
|
|
@ -366,6 +366,16 @@ export default {
|
||||||
if (this.loaded) {
|
if (this.loaded) {
|
||||||
if (this.iframeEl) {
|
if (this.iframeEl) {
|
||||||
this.iframeEl.classList.remove(EMBER_FRAME_HIDE_CLASS);
|
this.iframeEl.classList.remove(EMBER_FRAME_HIDE_CLASS);
|
||||||
|
|
||||||
|
// Notify the embedded UI of the primary and primary text colors
|
||||||
|
const primary = window.getComputedStyle(document.body).getPropertyValue('--primary');
|
||||||
|
const primaryText = window.getComputedStyle(document.body).getPropertyValue('--primary-text');
|
||||||
|
|
||||||
|
this.iframeEl.contentWindow.postMessage({
|
||||||
|
action: 'colors',
|
||||||
|
primary,
|
||||||
|
primaryText,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue