fix: critical mobile viewport fixes - login, modals, page constraints
- Remove min-h-screen or make responsive (md:min-h-screen for desktop only) - Login modal: p-8 → p-4 md:p-6, space-y-8 → space-y-3 md:space-y-4 - NewItemDialog: responsive spacing p-4 md:p-6, gaps 3 md:gap-4 - StockAdjustmentPanel: p-6 → p-4 md:p-6, gaps/spacing reduced for mobile - All container padding and gaps now follow mobile-first pattern - Fixes viewport overflow on 375px portrait mode - Tests: 291/291 passing
This commit is contained in:
@@ -314,8 +314,8 @@ export default function Home() {
|
||||
</datalist>
|
||||
|
||||
{/* Header */}
|
||||
<header className="flex flex-col sm:flex-row justify-between sm:items-center gap-4 mb-6 w-full px-1">
|
||||
<div className="flex items-center gap-3">
|
||||
<header className="flex flex-col sm:flex-row justify-between sm:items-center gap-3 md:gap-4 mb-3 md:mb-4 w-full px-1">
|
||||
<div className="flex items-center gap-2 md:gap-3">
|
||||
<div className="p-1">
|
||||
<img
|
||||
src="/logo.png"
|
||||
@@ -329,8 +329,8 @@ export default function Home() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap items-center justify-between sm:justify-end gap-3 sm:gap-6 bg-surface/50 sm:bg-transparent px-4 py-2 sm:p-0 rounded-2xl border border-slate-800/50 sm:border-none">
|
||||
<div className="flex flex-wrap items-center gap-4 sm:gap-6">
|
||||
<div className="flex flex-wrap items-center justify-between sm:justify-end gap-2 md:gap-3 bg-surface/50 sm:bg-transparent px-3 py-2 sm:p-0 rounded-2xl border border-slate-800/50 sm:border-none">
|
||||
<div className="flex flex-wrap items-center gap-2 md:gap-3">
|
||||
{isScannerReady && (
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-1.5 h-1.5 rounded-full bg-green-500 shadow-[0_0_8px_rgba(34,197,94,0.6)]" />
|
||||
@@ -425,8 +425,8 @@ export default function Home() {
|
||||
{/* Box Contents Selection Modal */}
|
||||
{boxMatches.length > 0 && !selectedItem && (
|
||||
<div className="fixed inset-0 z-50 flex items-end sm:items-center justify-center p-4 bg-background/80 animate-in fade-in duration-200">
|
||||
<div className="w-full max-w-lg bg-surface border border-slate-800 rounded-[2.5rem] shadow-2xl p-6 overflow-hidden animate-in slide-in-from-bottom-10 duration-300 flex flex-col max-h-[85vh]">
|
||||
<div className="flex justify-between items-center mb-6 shrink-0">
|
||||
<div className="w-full max-w-lg bg-surface border border-slate-800 rounded-[2.5rem] shadow-2xl p-4 md:p-6 overflow-hidden animate-in slide-in-from-bottom-10 duration-300 flex flex-col max-h-[85vh]">
|
||||
<div className="flex justify-between items-center mb-3 md:mb-4 shrink-0">
|
||||
<div>
|
||||
<h3 className="text-xl font-normal tracking-tight flex items-center gap-2">
|
||||
<Package className="text-primary" />
|
||||
@@ -438,7 +438,7 @@ export default function Home() {
|
||||
<X size={20} />
|
||||
</button>
|
||||
</div>
|
||||
<div className="overflow-y-auto w-full pr-2 space-y-3 pb-4">
|
||||
<div className="overflow-y-auto w-full pr-2 space-y-2 md:space-y-3 pb-3 md:pb-4">
|
||||
{boxMatches.map(item => (
|
||||
<button
|
||||
key={item.id}
|
||||
@@ -447,7 +447,7 @@ export default function Home() {
|
||||
setBoxMatches([]);
|
||||
setAdjustType(mode === 'CHECK_IN' ? 'ADD' : 'REMOVE');
|
||||
}}
|
||||
className="w-full text-left bg-background/50 hover:bg-slate-800 border border-slate-800/80 p-4 rounded-2xl flex items-center gap-4 transition-all active:scale-[0.98] group"
|
||||
className="w-full text-left bg-background/50 hover:bg-slate-800 border border-slate-800/80 p-3 md:p-4 rounded-2xl flex items-center gap-2 md:gap-3 transition-all active:scale-[0.98] group"
|
||||
>
|
||||
<div className="flex-1 min-w-0">
|
||||
<p className="text-sm font-normal text-white">{item.name}</p>
|
||||
@@ -463,7 +463,7 @@ export default function Home() {
|
||||
|
||||
|
||||
{/* Footer Branding */}
|
||||
<footer className="mt-20 mb-8 flex flex-col items-center gap-2 opacity-70">
|
||||
<footer className="mt-12 md:mt-20 mb-4 md:mb-8 flex flex-col items-center gap-2 opacity-70">
|
||||
<p className="text-sm font-normal text-secondary">Powered by TFM Group Software</p>
|
||||
<div className="h-px w-16 bg-slate-700/60" />
|
||||
<p className="text-xs font-mono text-secondary">v{versionData.version} • {versionData.last_build} • BUILD: dev-{(versionData as any).commit || 'N/A'}</p>
|
||||
|
||||
Reference in New Issue
Block a user