diff --git a/CHANGELOG.md b/CHANGELOG.md index 0618fc5..caa5c26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ Das Format basiert auf [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) automatisch mit [git-cliff](https://git-cliff.org) aus den Commit-Messages generiert – **nicht von Hand bearbeiten**. +## [0.9.1] - 2026-11-14 + +### Fixed + +- **admin**: Verwaltung am Handy ohne Zoom + ## [0.9.0] - 2026-11-14 ### Added diff --git a/web/index.html b/web/index.html index bc90ffa..19f93b7 100644 --- a/web/index.html +++ b/web/index.html @@ -2,7 +2,7 @@ - + MirrorNextGen diff --git a/web/src/app/base.css b/web/src/app/base.css index 9a985c5..af7a32f 100644 --- a/web/src/app/base.css +++ b/web/src/app/base.css @@ -10,3 +10,6 @@ ul, ol { padding-left: 2rem; margin-top: 0; margin-bottom: 1rem; } img, svg { vertical-align: middle; } .visually-hidden { border: 0; clip: rect(0, 0, 0, 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; } + +/* No double-tap zoom, and no font inflation when a phone rotates. */ +html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } diff --git a/web/src/app/noZoom.test.ts b/web/src/app/noZoom.test.ts new file mode 100644 index 0000000..ef1ff07 --- /dev/null +++ b/web/src/app/noZoom.test.ts @@ -0,0 +1,24 @@ +/// +import { readFileSync } from 'node:fs' +import { describe, expect, it } from 'vitest' + +const read = (rel: string) => readFileSync(new URL(rel, import.meta.url), 'utf8') + +describe('no zoom on phones', () => { + it('locks the viewport scale', () => { + const html = read('../../index.html') + const content = / { + expect(read('./base.css')).toContain('touch-action: manipulation') + }) + + it('raises admin inputs to 16px on narrow screens, and the admin chunk loads that file', () => { + const css = read('../features/admin/admin.css') + expect(css).toMatch(/@media \(max-width: 48em\)\s*\{[\s\S]*font-size: 16px/) + expect(read('../features/admin/AdminApp.tsx')).toContain("import './admin.css'") + }) +}) diff --git a/web/src/features/admin/AdminApp.tsx b/web/src/features/admin/AdminApp.tsx index e326333..1fd6b96 100644 --- a/web/src/features/admin/AdminApp.tsx +++ b/web/src/features/admin/AdminApp.tsx @@ -4,6 +4,7 @@ import { Suspense } from 'react' import { Route, Routes } from 'react-router-dom' import '@mantine/core/styles.css' import '@mantine/notifications/styles.css' +import './admin.css' import { ProtectedLayout } from './components/ProtectedLayout.tsx' import { PublicGate } from './components/PublicGate.tsx' import { LoginPage } from './pages/LoginPage.tsx' diff --git a/web/src/features/admin/admin.css b/web/src/features/admin/admin.css new file mode 100644 index 0000000..95ee65a --- /dev/null +++ b/web/src/features/admin/admin.css @@ -0,0 +1,10 @@ +/* iOS Safari zooms into a focused field whose text is smaller than 16px and never zooms back. Mantine's inputs + use 14px, so on phone widths (Mantine's `sm` breakpoint) every text-entry control is raised to 16px. */ +@media (max-width: 48em) { + .mantine-Input-input, + .mantine-InputWrapper-root input, + .mantine-InputWrapper-root textarea { + --input-fz: 16px; + font-size: 16px; + } +}