fix(client): 外壳两处对齐修正(顶栏右组靠右 + 用户菜单与侧栏等宽)
- 顶栏:左组(品牌+门店)改 Expanded 占满,主题器+通知铃挤到最右; 原 Flexible(flex1) 与 Spacer(flex1) 平分剩余空间导致右组浮在中右 - 侧栏底部用户菜单:constraints 固定 218 宽 + offset 左对齐侧栏左缘,与侧栏等宽 - 状态栏操作员显示 realName(王经理)而非 username Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX
This commit is contained in:
@@ -160,6 +160,10 @@ class _AppShellState extends ConsumerState<AppShell> {
|
|||||||
border: Border(bottom: BorderSide(color: t.topBorder)),
|
border: Border(bottom: BorderSide(color: t.topBorder)),
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.only(top: topInset, left: isMobile ? 6 : 18, right: 14),
|
padding: EdgeInsets.only(top: topInset, left: isMobile ? 6 : 18, right: 14),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
// 左组(占满剩余空间,靠左):把右组(主题器+铃)挤到最右
|
||||||
|
Expanded(
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
if (isMobile) ...[
|
if (isMobile) ...[
|
||||||
@@ -180,13 +184,17 @@ class _AppShellState extends ConsumerState<AppShell> {
|
|||||||
margin: const EdgeInsets.symmetric(horizontal: 8),
|
margin: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
// 门店品牌(鼎晟酒行)——点开门店信息
|
// 门店品牌(御品轩名酒坊)——点开门店信息;过长省略
|
||||||
Flexible(child: _ShopBrand(user: user)),
|
Flexible(child: _ShopBrand(user: user)),
|
||||||
if (WriteGuard.isReadonly(ref)) ...[
|
if (WriteGuard.isReadonly(ref)) ...[
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
_readonlyBadge(t.topControl),
|
_readonlyBadge(t.topControl),
|
||||||
],
|
],
|
||||||
const Spacer(),
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 右组:主题器 + 通知铃,紧贴右侧
|
||||||
|
const SizedBox(width: 12),
|
||||||
const ThemePickerPill(),
|
const ThemePickerPill(),
|
||||||
const SizedBox(width: 14),
|
const SizedBox(width: 14),
|
||||||
const NotificationBell(),
|
const NotificationBell(),
|
||||||
@@ -281,7 +289,9 @@ class _AppShellState extends ConsumerState<AppShell> {
|
|||||||
child: PopupMenuButton<String>(
|
child: PopupMenuButton<String>(
|
||||||
tooltip: '账号菜单',
|
tooltip: '账号菜单',
|
||||||
position: PopupMenuPosition.over,
|
position: PopupMenuPosition.over,
|
||||||
offset: const Offset(0, -8),
|
// 菜单与侧栏等宽(218),左对齐到侧栏左缘(抵消侧栏 12 内边距)
|
||||||
|
offset: const Offset(-12, -8),
|
||||||
|
constraints: const BoxConstraints.tightFor(width: 218),
|
||||||
shape:
|
shape:
|
||||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)),
|
RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)),
|
||||||
color: t.menuUserBg,
|
color: t.menuUserBg,
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 105 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 105 KiB |
Reference in New Issue
Block a user