fix: Embed Issues: Logo causing scroll, Logo text color, mobile view with layout configuration (#9826)
* Fixes scroll and logo text color * Add a month_view scenario * Fix false alarm in logs when namespace is empty string * In mobile view, we only support mobile layout * Check for embed mode
This commit is contained in:
1 parent
723b754703
commit
15692374c6
4 files changed
+43
-6
No files matched your search
@@ -255,8 +255,12 @@
|
||||
<i>Note that one of the embeds would stay in loading state as they are using the same namespace and it is not supported to have more than 1 embeds using same namespace</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline-embed-container" id="cal-booking-place-monthView">
|
||||
<h3><a href="?only=ns:monthView">Test Month View</a></h3>
|
||||
<div class="place" style="width: 100%"></div>
|
||||
</div>
|
||||
<div class="inline-embed-container" id="cal-booking-place-weekView">
|
||||
<h3><a href="?only=ns:weekView">Test Weekly View</a></h3>
|
||||
<h3><a href="?only=ns:weekView">Test Week View</a></h3>
|
||||
<div class="place" style="width: 100%"></div>
|
||||
</div>
|
||||
<div class="inline-embed-container" id="cal-booking-place-columnView">
|
||||
|
||||
@@ -345,6 +345,34 @@ if (only === "all" || only == "ns:floatingButton") {
|
||||
});
|
||||
}
|
||||
|
||||
if (only === "all" || only == "ns:monthView") {
|
||||
// Create a namespace "second". It can be accessed as Cal.ns.second with the exact same API as Cal
|
||||
Cal("init", "monthView", {
|
||||
debug: true,
|
||||
origin: "http://localhost:3000",
|
||||
});
|
||||
|
||||
Cal.ns.monthView(
|
||||
"inline",
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
//@ts-ignore
|
||||
{
|
||||
elementOrSelector: "#cal-booking-place-monthView .place",
|
||||
calLink: "pro/paid",
|
||||
config: {
|
||||
iframeAttrs: {
|
||||
id: "cal-booking-place-monthView-iframe",
|
||||
},
|
||||
layout: "month_view",
|
||||
},
|
||||
}
|
||||
);
|
||||
Cal.ns.monthView("on", {
|
||||
action: "*",
|
||||
callback,
|
||||
});
|
||||
}
|
||||
|
||||
if (only === "all" || only == "ns:weekView") {
|
||||
// Create a namespace "second". It can be accessed as Cal.ns.second with the exact same API as Cal
|
||||
Cal("init", "weekView", {
|
||||
|
||||
@@ -257,7 +257,7 @@ function getNamespace() {
|
||||
return embedStore.namespace;
|
||||
}
|
||||
if (isBrowser) {
|
||||
const namespace = window?.getEmbedNamespace?.() || null;
|
||||
const namespace = window?.getEmbedNamespace?.() ?? null;
|
||||
embedStore.namespace = namespace;
|
||||
return namespace;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user