fix(ios): PERMANENT native safe-area + keyboard via Capacitor 7 + safe-area plugin
Device screenshots proved the WebView reports env(safe-area-inset-*)=0, so no web/CSS/JS trick can move content off the Dynamic Island — it must be fixed natively. Upgrade the Capacitor shell to v7 and add @capacitor-community/safe-area (populates env() with real per-device insets, edge-to-edge) and @capacitor/keyboard (resize:native so the composer sits directly on the keyboard, like Teams). - mobile: Capacitor 6 -> 7 for all plugins; add safe-area + keyboard; SafeArea/Keyboard config. - codemagic: npm ci -> npm install (dependency set changed); drop stale Cap6 lockfile. - web: remove the temporary StatusBar/34px hacks (env() now works); keep var(--sat)/var(--sab) padding. - share/connect: back link now respects env(safe-area-inset-top/left). - add native-style slide in/out (push/pop) animation when opening/closing a chat on mobile. Build marker -> 2026-07-17-batch92. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -4,14 +4,6 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<title>Biz Connect — Agent Console</title>
|
||||
<script>
|
||||
// Native shell: push content below the status bar/notch (the Capacitor WebView reports safe-area insets
|
||||
// as 0, so the back button/header would otherwise slide under the Dynamic Island).
|
||||
(function(){ try{ var C=window.Capacitor; if(!C||!C.isNativePlatform||!C.isNativePlatform()) return;
|
||||
var p=(C.getPlatform&&C.getPlatform())||''; var r=document.documentElement; r.classList.add('native-app'); if(p) r.classList.add('native-'+p);
|
||||
var SB=C.Plugins&&C.Plugins.StatusBar; if(SB){ try{ SB.setOverlaysWebView({overlay:false}); }catch(_){}; try{ SB.setStyle({style:'DARK'}); }catch(_){}; try{ SB.setBackgroundColor({color:'#ffffff'}); }catch(_){} }
|
||||
}catch(_){} })();
|
||||
</script>
|
||||
<meta name="theme-color" content="#1F3B73">
|
||||
<link rel="icon" href="/favicon.ico?v=3" sizes="any">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png?v=3">
|
||||
@@ -71,7 +63,7 @@
|
||||
.pwwrap input{padding-right:2.7rem;}
|
||||
.eye{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);background:none;border:none;padding:.3rem;width:auto;color:var(--muted);display:inline-flex;align-items:center;cursor:pointer;margin:0;}
|
||||
.eye:hover{color:var(--blue);}
|
||||
#homeLink{position:fixed;top:14px;left:16px;z-index:50;display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.92);color:#1F3B73;text-decoration:none;font-weight:600;font-size:.86rem;padding:.45rem .8rem;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,.15);}
|
||||
#homeLink{position:fixed;top:calc(14px + env(safe-area-inset-top,0px));left:calc(16px + env(safe-area-inset-left,0px));z-index:50;display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.92);color:#1F3B73;text-decoration:none;font-weight:600;font-size:.86rem;padding:.45rem .8rem;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,.15);}
|
||||
.formerr{color:#b91c1c;font-weight:600;font-size:.88rem;margin-top:.9rem;min-height:1.1em;text-align:left;}
|
||||
.formerr.show{display:flex;align-items:center;gap:.5rem;background:#fee2e2;border:1px solid #fca5a5;border-radius:9px;padding:.6rem .75rem;animation:errShake .35s;}
|
||||
.formerr.show::before{content:"⚠";font-size:1rem;}
|
||||
|
||||
Reference in New Issue
Block a user