fix(client): iOS 顶栏避开状态栏,修复菜单按钮被遮挡退不出登录
顶栏 Container 原从 y=0 起绘,iOS 状态栏盖住左上角菜单按钮,窄屏无法 打开抽屉菜单/退出登录。顶栏高度加上 MediaQuery.padding.top,内容下移 一个状态栏高度,蓝色仍铺满到屏幕顶。桌面/Web 状态栏高度为 0 不受影响。 todo #53。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -155,6 +155,8 @@ class _AppShellState extends ConsumerState<AppShell> {
|
||||
final isOnline = ref.watch(connectivityProvider);
|
||||
final location = GoRouterState.of(context).matchedLocation;
|
||||
final isMobile = context.isMobile;
|
||||
// iOS/刘海屏状态栏高度:顶栏需下移此距离,避免菜单按钮被状态栏遮挡
|
||||
final topInset = MediaQuery.of(context).padding.top;
|
||||
final sidebarWidth = _sidebarExpanded ? 200.0 : 56.0;
|
||||
final updateNotifier = ref.watch(updateProvider.notifier);
|
||||
final updateInfo = ref.watch(updateProvider).valueOrNull;
|
||||
@@ -169,11 +171,11 @@ class _AppShellState extends ConsumerState<AppShell> {
|
||||
drawerEnableOpenDragGesture: !kIsWeb && isMobile,
|
||||
body: Column(
|
||||
children: [
|
||||
// Top Bar
|
||||
// Top Bar(高度含状态栏内边距,蓝色铺满到屏幕顶,内容下移避开状态栏)
|
||||
Container(
|
||||
height: 56,
|
||||
height: 56 + topInset,
|
||||
color: AppTheme.primary,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
padding: EdgeInsets.only(top: topInset, left: 8, right: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
|
||||
+31
-3
@@ -223,10 +223,10 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; }
|
||||
<h1>酒库管理系统 — 项目 TODO</h1>
|
||||
<div class="header-meta">生成于 2026-06-16 · 真相源 todo/todo.json</div>
|
||||
<div class="stats">
|
||||
<div class="stat-pill"><strong>48</strong>全部</div>
|
||||
<div class="stat-pill"><strong>49</strong>全部</div>
|
||||
<div class="stat-pill"><strong>1</strong>待开始</div>
|
||||
<div class="stat-pill"><strong>0</strong>开发中</div>
|
||||
<div class="stat-pill"><strong>33</strong>待验收</div>
|
||||
<div class="stat-pill"><strong>34</strong>待验收</div>
|
||||
<div class="stat-pill"><strong>14</strong>已验收</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -318,7 +318,7 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; }
|
||||
</div>
|
||||
<div class="section-block" id="section-done">
|
||||
<div class="section-title st-done" data-toggle="done">
|
||||
🔍 待验收 <span class="s-count">33</span>
|
||||
🔍 待验收 <span class="s-count">34</span>
|
||||
<span class="s-arrow">▴ 收起</span>
|
||||
</div>
|
||||
<div class="section-list-wrap " id="list-wrap-done">
|
||||
@@ -847,6 +847,34 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; }
|
||||
|
||||
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="tag-row"></div>
|
||||
<div class="item-meta">
|
||||
<span class="meta-date">🕐 2026-06-16</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="todo-card s-done"
|
||||
data-id="53"
|
||||
data-level="mid"
|
||||
data-status="done"
|
||||
data-tier=""
|
||||
data-tags="">
|
||||
<div class="card-header">
|
||||
<span class="item-title">iOS 顶栏被状态栏遮挡,菜单按钮点不到(SafeArea)</span>
|
||||
<div class="card-badges">
|
||||
<span class="tag status-badge s-done">待验收</span>
|
||||
<span class="tag t-high">重要</span>
|
||||
|
||||
|
||||
<button class="reject-btn" data-id="53" data-title="iOS 顶栏被状态栏遮挡,菜单按钮点不到(SafeArea)">拒绝验收</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="tag-row"></div>
|
||||
<div class="item-meta">
|
||||
|
||||
+15
-2
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"meta": {
|
||||
"title": "酒库管理系统 — 项目 TODO",
|
||||
"updated_at": "2026-06-16T06:42:15.640Z"
|
||||
"updated_at": "2026-06-16T14:20:07.674Z"
|
||||
},
|
||||
"seq": 52,
|
||||
"seq": 53,
|
||||
"items": [
|
||||
{
|
||||
"id": 1,
|
||||
@@ -829,6 +829,19 @@
|
||||
"done": false,
|
||||
"completed_at": null,
|
||||
"version": null
|
||||
},
|
||||
{
|
||||
"id": 53,
|
||||
"title": "iOS 顶栏被状态栏遮挡,菜单按钮点不到(SafeArea)",
|
||||
"desc": null,
|
||||
"level": "mid",
|
||||
"tier": null,
|
||||
"tags": [],
|
||||
"status": "done",
|
||||
"created_at": "2026-06-16T14:19:56.340Z",
|
||||
"done": false,
|
||||
"completed_at": null,
|
||||
"version": null
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user