feat: 添加清除结果功能到检查提供者
refactor: 更新URL哈希处理逻辑 feat: 添加聊天消息存储支持 docs: 更新API控制器基类文档 chore: 删除无用脚本文件 fix: 修复分类模型返回类型问题 feat: 添加回执登录功能 build: 更新依赖项配置 style: 统一HTML模板中的哈希ID引用格式 ci: 添加部署和检查脚本
This commit is contained in:
@@ -1,30 +1,34 @@
|
||||
/// ============================================================
|
||||
/// 闲言APP — 应用布局壳
|
||||
/// 创建时间: 2026-04-20
|
||||
/// 更新时间: 2026-04-20
|
||||
/// 作用: ShellRoute 布局壳,包含底部 GlassBottomBar 导航
|
||||
/// 上次更新: 添加AnnotatedRegion包裹Scaffold,强制黑色系统UI覆盖层
|
||||
/// ============================================================
|
||||
// ============================================================
|
||||
// 闲言APP — 应用布局壳
|
||||
// 创建时间: 2026-04-20
|
||||
// 更新时间: 2026-04-30
|
||||
// 作用: ShellRoute 布局壳,包含底部 GlassBottomBar 导航 + 灵感小红点
|
||||
// 上次更新: 灵感Tab接入badges小红点,显示未读推送数
|
||||
// ============================================================
|
||||
|
||||
import 'package:badges/badges.dart' as badges;
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:liquid_glass_widgets/liquid_glass_widgets.dart';
|
||||
|
||||
import '../theme/app_theme.dart';
|
||||
import '../utils/interaction_animations.dart';
|
||||
import '../../features/inspiration/presentation/widgets/tool_panel.dart';
|
||||
import '../../features/inspiration/providers/chat_provider.dart';
|
||||
|
||||
class AppShell extends StatelessWidget {
|
||||
class AppShell extends ConsumerWidget {
|
||||
const AppShell({super.key, required this.child});
|
||||
|
||||
final StatefulNavigationShell child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final ext = AppTheme.ext(context);
|
||||
final int currentIndex = child.currentIndex;
|
||||
final unreadCount = ref.watch(chatProvider).unreadCount;
|
||||
|
||||
return CelebrationOverlay(
|
||||
child: AnnotatedRegion<SystemUiOverlayStyle>(
|
||||
@@ -45,8 +49,8 @@ class AppShell extends StatelessWidget {
|
||||
extendBody: true,
|
||||
body: Stack(children: [child, const ToolPanel()]),
|
||||
bottomNavigationBar: GlassBottomBar(
|
||||
tabs: const [
|
||||
GlassBottomBarTab(
|
||||
tabs: [
|
||||
const GlassBottomBarTab(
|
||||
label: '首页',
|
||||
icon: Icon(CupertinoIcons.house),
|
||||
activeIcon: Icon(CupertinoIcons.house_fill),
|
||||
@@ -54,11 +58,43 @@ class AppShell extends StatelessWidget {
|
||||
),
|
||||
GlassBottomBarTab(
|
||||
label: '灵感',
|
||||
icon: Icon(CupertinoIcons.sparkles),
|
||||
activeIcon: Icon(CupertinoIcons.sparkles),
|
||||
glowColor: Color(0xFFE8E8ED),
|
||||
icon: badges.Badge(
|
||||
showBadge: unreadCount > 0,
|
||||
badgeContent: Text(
|
||||
'$unreadCount',
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 9,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
badgeStyle: badges.BadgeStyle(
|
||||
badgeColor: CupertinoColors.systemRed,
|
||||
padding: const EdgeInsets.all(3),
|
||||
),
|
||||
position: badges.BadgePosition.topEnd(top: -4, end: -6),
|
||||
child: const Icon(CupertinoIcons.sparkles),
|
||||
),
|
||||
activeIcon: badges.Badge(
|
||||
showBadge: unreadCount > 0,
|
||||
badgeContent: Text(
|
||||
'$unreadCount',
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 9,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
badgeStyle: badges.BadgeStyle(
|
||||
badgeColor: CupertinoColors.systemRed,
|
||||
padding: const EdgeInsets.all(3),
|
||||
),
|
||||
position: badges.BadgePosition.topEnd(top: -4, end: -6),
|
||||
child: const Icon(CupertinoIcons.sparkles),
|
||||
),
|
||||
glowColor: const Color(0xFFE8E8ED),
|
||||
),
|
||||
GlassBottomBarTab(
|
||||
const GlassBottomBarTab(
|
||||
label: '我的',
|
||||
icon: Icon(CupertinoIcons.person),
|
||||
activeIcon: Icon(CupertinoIcons.person_fill),
|
||||
@@ -71,50 +107,45 @@ class AppShell extends StatelessWidget {
|
||||
selectedIconColor: ext.isDark ? Colors.white : ext.accent,
|
||||
unselectedIconColor: ext.isDark
|
||||
? Colors.white38
|
||||
: const Color(0xFFAEAEB2), // 未选中图标: 暗白38% / 浅灰
|
||||
barHeight: 56, // 底栏高度
|
||||
barBorderRadius: 28, // 底栏圆角 (药丸形)
|
||||
horizontalPadding: 16, // 水平内边距
|
||||
verticalPadding: 16, // 垂直内边距
|
||||
: const Color(0xFFAEAEB2),
|
||||
barHeight: 56,
|
||||
barBorderRadius: 28,
|
||||
horizontalPadding: 16,
|
||||
verticalPadding: 16,
|
||||
indicatorColor:
|
||||
ext
|
||||
.isDark // 指示器底色 (极淡)
|
||||
? Colors.white.withValues(alpha: 0.08)
|
||||
: Colors.black.withValues(alpha: 0.04),
|
||||
ext.isDark
|
||||
? Colors.white.withValues(alpha: 0.08)
|
||||
: Colors.black.withValues(alpha: 0.04),
|
||||
indicatorSettings: LiquidGlassSettings(
|
||||
// 选中项磨砂透镜
|
||||
thickness: 40, // 玻璃厚度 → 边框曲折线粗细
|
||||
blur: 25, // 模糊强度 → 磨砂质感
|
||||
refractiveIndex: 1.8, // 折射率 → 光线弯曲程度
|
||||
chromaticAberration: 1.2, // 色散 → 彩虹边缘宽度
|
||||
lightIntensity: 3.5, // 光照强度 → 边缘高光亮度
|
||||
ambientStrength: 1.2, // 环境光 → 整体亮度
|
||||
thickness: 40,
|
||||
blur: 25,
|
||||
refractiveIndex: 1.8,
|
||||
chromaticAberration: 1.2,
|
||||
lightIntensity: 3.5,
|
||||
ambientStrength: 1.2,
|
||||
glassColor:
|
||||
ext
|
||||
.isDark // 玻璃底色 → 静态可见度
|
||||
? const Color.from(alpha: 0.18, red: 1, green: 1, blue: 1)
|
||||
: const Color.from(alpha: 0.12, red: 1, green: 1, blue: 1),
|
||||
ext.isDark
|
||||
? const Color.from(alpha: 0.18, red: 1, green: 1, blue: 1)
|
||||
: const Color.from(alpha: 0.12, red: 1, green: 1, blue: 1),
|
||||
),
|
||||
glassSettings: LiquidGlassSettings(
|
||||
// 底板透明玻璃
|
||||
thickness: 30, // 玻璃厚度 → 边框曲折线粗细
|
||||
blur: 1.5, // 模糊强度 → 近透明
|
||||
refractiveIndex: 1.5, // 折射率 → 边缘弯曲
|
||||
chromaticAberration: 0.8, // 色散 → 彩虹边缘
|
||||
lightIntensity: 1.2, // 光照强度 → 边缘高光
|
||||
saturation: 1.0, // 饱和度 → 保持原色
|
||||
ambientStrength: 0.6, // 环境光 → 微弱
|
||||
thickness: 30,
|
||||
blur: 1.5,
|
||||
refractiveIndex: 1.5,
|
||||
chromaticAberration: 0.8,
|
||||
lightIntensity: 1.2,
|
||||
saturation: 1.0,
|
||||
ambientStrength: 0.6,
|
||||
glassColor:
|
||||
ext
|
||||
.isDark // 玻璃底色 → 极淡
|
||||
? const Color.from(alpha: 0.08, red: 1, green: 1, blue: 1)
|
||||
: const Color.from(alpha: 0.05, red: 1, green: 1, blue: 1),
|
||||
ext.isDark
|
||||
? const Color.from(alpha: 0.08, red: 1, green: 1, blue: 1)
|
||||
: const Color.from(alpha: 0.05, red: 1, green: 1, blue: 1),
|
||||
),
|
||||
magnification: 1.12, // 选中放大倍率 → 透镜感
|
||||
innerBlur: 1.5, // 选中内容内模糊 → 磨砂质感
|
||||
glowOpacity: 0.4, // 发光透明度 → 选中光晕
|
||||
glowBlurRadius: 24, // 发光模糊半径 → 光晕扩散
|
||||
glowSpreadRadius: 4, // 发光扩散半径 → 光晕范围
|
||||
magnification: 1.12,
|
||||
innerBlur: 1.5,
|
||||
glowOpacity: 0.4,
|
||||
glowBlurRadius: 24,
|
||||
glowSpreadRadius: 4,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user