get color from app
CI/CD / test_and_check_app (push) Successful in 3m30s
CI/CD / Publish immutable image (push) Skipped

This commit is contained in:
2026-09-03 11:18:49 +02:00
parent e58a398c07
commit e30d2e61aa
@@ -16,6 +16,20 @@ const props = withDefaults(defineProps<RoomExperienceProps>(), {
const page = usePage(); const page = usePage();
const presenterMode = ref(false); const presenterMode = ref(false);
const roomNotice = computed(() => page.props.roomNotice); const roomNotice = computed(() => page.props.roomNotice);
const embeddedBackgroundColor = computed(() => {
if (!props.embedded) {
return undefined;
}
const backgroundColor = new URL(
page.url,
'https://embedded.invalid',
).searchParams.get('background_color');
return backgroundColor && /^#[0-9a-f]{6}$/i.test(backgroundColor)
? backgroundColor
: undefined;
});
const canFavorite = computed( const canFavorite = computed(
() => !props.embedded && page.props.auth.user?.id != props.room.owner_id, () => !props.embedded && page.props.auth.user?.id != props.room.owner_id,
); );
@@ -35,6 +49,11 @@ const {
<main <main
class="min-h-svh bg-slate-900 px-3 py-6 text-white sm:px-6 md:flex md:min-h-0 md:flex-col md:overflow-hidden lg:px-10" class="min-h-svh bg-slate-900 px-3 py-6 text-white sm:px-6 md:flex md:min-h-0 md:flex-col md:overflow-hidden lg:px-10"
:style="
embeddedBackgroundColor
? { backgroundColor: embeddedBackgroundColor }
: undefined
"
:class=" :class="
embedded embedded
? 'md:h-dvh' ? 'md:h-dvh'