@@ -845,6 +873,47 @@ export default function mount(el, ctx) {
if (state.search && !state.eventPopover && !state.composing && !state.confirm) focusSearch();
}
+ // Compact single-column layout for Mail's right panel. Reuses miniMonth/agenda/
+ // searchPanelHtml + the form/popover/confirm overlays exactly as the full app.
+ function renderEmbed() {
+ el.innerHTML = `
+ ${panelBar()}
+
+ ${state.search ? searchPanelHtml() : `
${miniMonth()}
${agenda()}`}
+
+ ${panelFoot()}
+ ${state.composing ? formHtml() : ""}
+ ${state.eventPopover ? eventPopoverHtml() : ""}
+ ${state.confirm ? confirmHtml() : ""}
+
`;
+ wire();
+ if (state.eventPopover) positionPopover();
+ if (state.search && !state.eventPopover && !state.composing && !state.confirm) focusSearch();
+ }
+
+ function panelBar() {
+ const cur = state.hidden.size && state.calendars.length - state.hidden.size === 1
+ ? state.calendars.find((c) => !state.hidden.has(c.id))
+ : null;
+ return `
+
+
+
+
+
+ ${state.panelCalOpen ? `
+
+ ${state.calendars.map((c) => ``).join("")}
+
` : ""}
+
+
+ ${state.searchOpen || state.search ? `
` : ""}`;
+ }
+
+ function panelFoot() {
+ return ``;
+ }
+
function focusSearch() {
const si = el.querySelector(".cal-search");
if (si && document.activeElement !== si) {
@@ -982,7 +1051,7 @@ export default function mount(el, ctx) {
const chev = `
`;
const colorItems = COLORS.map((cc) => `
`).join("");
const tz0 = c.tz || browserTz;
- const formLeft = state.leftCollapsed ? 12 : state.leftW + 12; // clear the full-height sidebar
+ const formLeft = state.embed ? 8 : (state.leftCollapsed ? 12 : state.leftW + 12); // clear the full-height sidebar
return `