mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 03:26:07 +00:00
fix(mobile): a plugin's page in the phone shell sits below the status bar and above the dock
The page took 100vh with no top inset inside the touch shell, so the plugin's header ran under the status bar and the frame reached past the screen and under the dock. It now takes the visible height (100dvh) less the dock, after the safe area and the rail, and the plugin's own document scrolls. TestFlight feedback, 5.1.3 (Trip Importer).
This commit is contained in:
@@ -664,6 +664,15 @@ html:has(.m-shell) {
|
||||
html:has(.m-shell) [data-desktop-navbar] {
|
||||
display: none;
|
||||
}
|
||||
/* A plugin's page inside the touch shell: below the status bar, above the dock,
|
||||
after the rail, and exactly the visible height (100dvh), so the plugin's own
|
||||
document is what scrolls instead of the app stretching past the screen. */
|
||||
html:has(.m-shell) [data-plugin-page] {
|
||||
--plugin-page-h: calc(100dvh - var(--bottom-nav-h, 0px));
|
||||
box-sizing: border-box;
|
||||
padding-top: env(safe-area-inset-top, 0px);
|
||||
padding-inline-start: var(--m-rail-w, 0px);
|
||||
}
|
||||
html:has(.m-shell) .leaflet-control-zoom {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,8 @@ export default function PluginPage(): React.ReactElement {
|
||||
return (
|
||||
<PageShell background="var(--bg-secondary)" navOffset="var(--nav-h, 56px)">
|
||||
<HelpAnchor id="settings-plugins" />
|
||||
<div style={{ height: 'calc(100vh - var(--nav-h, 56px))' }}>
|
||||
{/* The phone shell sets --plugin-page-h and its own insets (mobile.css). */}
|
||||
<div data-plugin-page style={{ height: 'var(--plugin-page-h, calc(100vh - var(--nav-h, 56px)))' }}>
|
||||
<PluginFrame pluginId={pluginId} title={plugin?.name} fill surface="plugin-page" className="w-full h-full" />
|
||||
</div>
|
||||
</PageShell>
|
||||
|
||||
Reference in New Issue
Block a user