diff --git a/apps/client/src/widgets/mobile_widgets/TabSwitcher.css b/apps/client/src/widgets/mobile_widgets/TabSwitcher.css index 47736a72f6..4518d76c2c 100644 --- a/apps/client/src/widgets/mobile_widgets/TabSwitcher.css +++ b/apps/client/src/widgets/mobile_widgets/TabSwitcher.css @@ -27,6 +27,9 @@ border-radius: 1em; min-width: 0; overflow: hidden; + height: 200px; + display: flex; + flex-direction: column; &.with-hue { background-color: hsl(var(--bg-hue), 8.8%, 11.2%); @@ -49,6 +52,11 @@ overflow: hidden; align-items: center; color: var(--custom-color, inherit); + flex-shrink: 0; + + &:not(:first-of-type) { + border-top: 1px solid rgba(150, 150, 150, 0.1); + } >.tn-icon { margin-inline-end: 0.4em; @@ -68,7 +76,8 @@ } .tab-preview { - height: 180px; + flex-grow: 1; + height: 100%; overflow: hidden; font-size: 0.5em; user-select: none; @@ -100,6 +109,12 @@ h5 { font-size: 1.05em} h6 { font-size: 1em; } } + + &.with-split { + .preview-placeholder { + font-size: 250%; + } + } } } diff --git a/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx b/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx index 78107ec810..c3d32129cc 100644 --- a/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx +++ b/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx @@ -1,7 +1,7 @@ import "./TabSwitcher.css"; import clsx from "clsx"; -import { createPortal } from "preact/compat"; +import { createPortal, Fragment } from "preact/compat"; import { useCallback, useEffect, useRef, useState } from "preact/hooks"; import appContext, { CommandNames } from "../../components/app_context"; @@ -141,35 +141,41 @@ function Tab({ noteContext, containerRef, selectTab, activeNtxId }: { const iconClass = useNoteIcon(note); const colorClass = note?.getColorClass() || ''; const workspaceTabBackgroundColorHue = getWorkspaceTabBackgroundColorHue(noteContext); + const subContexts = noteContext.getSubContexts(); return (