Skip to content

Commit 16767ab

Browse files
committed
fix(hub-ui): apply branding primaryColor to the popped-out dock
1 parent 9c13262 commit 16767ab

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • packages/hub-ui/src/client/state

packages/hub-ui/src/client/state/popup.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { DocksContext } from '@devframes/hub/client'
22
import { createEventEmitter } from 'devframe/utils/events'
33
import { shallowRef, watch } from 'vue'
4-
import { applyDocumentHead, useBranding } from './branding'
4+
import { applyDocumentHead, applyPrimaryColor, useBranding } from './branding'
55
import { isDark } from './color-mode'
66
import { setDocksOverflowPanel } from './floating-tooltip'
77

@@ -130,6 +130,10 @@ async function mountStandaloneApp(context: DocksContext, popup: Window) {
130130
popup.document.body.appendChild(appRoot)
131131

132132
const dockElement = new DockStandaloneElement({ context })
133+
// The popup is its own document, so the inline `--devframe-primary` on the
134+
// embedded host can't inherit across — apply it here too, or the `:host` ramp
135+
// falls back to the default palette.
136+
applyPrimaryColor(dockElement, useBranding().value.primaryColor)
133137
popupDockElement = dockElement
134138
appRoot.appendChild(dockElement)
135139
}

0 commit comments

Comments
 (0)