fix: 全链路问题修复 — 编辑器返回/Tab导航/数据库编码/Token注入
修复内容:
- 编辑器返回按钮: 所有 context.go('/editor') 改为 context.push(),pop() 加安全守卫 fallback 到 /home
- Tab 导航: Web 平台强制使用移动端底部 TabBar 布局 (kIsWeb 守卫)
- 数据库编码: db.rs 自动追加 client_encoding=utf8 参数,修复中文 display_name 乱码
- AuthBloc token: 清理冗余 TODO,token 注入已在 AuthRepository 中正常工作
- 影响 9 个文件的编辑器导航调用点统一修改
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// 暖记响应式骨架 — 三级自适应布局
|
||||
// 手机: 底部 TabBar | 平板: 侧边导航 | 桌面: 三栏
|
||||
// Web 平台始终使用底部 TabBar(移动端布局)以保证导航交互正常
|
||||
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
import 'package:flutter/material.dart';
|
||||
import '../core/constants/breakpoints.dart';
|
||||
|
||||
@@ -31,7 +33,11 @@ class _ResponsiveScaffoldState extends State<ResponsiveScaffold> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final width = MediaQuery.sizeOf(context).width;
|
||||
final deviceType = Breakpoints.getDeviceType(width);
|
||||
// Web 平台:始终使用移动端底部 TabBar 布局
|
||||
// 原因:Web 上 NavigationRail 点击事件可能被 Flutter CanvasKit 拦截
|
||||
final deviceType = kIsWeb
|
||||
? DeviceType.mobile
|
||||
: Breakpoints.getDeviceType(width);
|
||||
|
||||
switch (deviceType) {
|
||||
case DeviceType.mobile:
|
||||
|
||||
Reference in New Issue
Block a user