Browse Source

feat(home): 新增精简布局,隐藏 AI 全能助手时使用

按 AppConfig.hideAiAssistant 分发:true 时显示翻译/会议助手左右等宽双卡,
不包裹新手引导 IntroStepBuilder(order:3),引导走完唤醒后自然结束。
newdev_shunjiawei
lxm 6 months ago
parent
commit
8387b854ee
  1. 61
      lib/modules/home/views/home_view.dart

61
lib/modules/home/views/home_view.dart

@ -7,6 +7,7 @@ import '../controllers/home_controller.dart';
import '../../../routes/app_routes.dart'; import '../../../routes/app_routes.dart';
import '../../../core/widgets/common_bottom_nav.dart'; import '../../../core/widgets/common_bottom_nav.dart';
import '../../../data/models/appconfig_model.dart'; import '../../../data/models/appconfig_model.dart';
import '../../../data/models/appconfig.dart';
// 呼吸灯动画组件 // 呼吸灯动画组件
class AnimatedPulsing extends StatefulWidget { class AnimatedPulsing extends StatefulWidget {
@ -144,7 +145,9 @@ class HomeView extends GetView<HomeController> {
// 热门AI体验 // 热门AI体验
_buildSectionTitle(isDarkMode), _buildSectionTitle(isDarkMode),
SizedBox(height: 16.h), SizedBox(height: 16.h),
_buildPremiumAILayout(), AppConfig.hideAiAssistant
? _buildSimplifiedAILayout()
: _buildPremiumAILayout(),
], ],
), ),
@ -1040,4 +1043,60 @@ class HomeView extends GetView<HomeController> {
), ),
); );
} }
// 精简布局:隐藏"AI全能助手",仅保留翻译 + 会议助手,左右等宽
// 注意:本布局不包裹 IntroStepBuilder(order: 3),新手引导走完唤醒后自然结束
Widget _buildSimplifiedAILayout() {
final bool isDarkMode = Get.isDarkMode;
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// 左侧:翻译
Expanded(
flex: 1,
child: _buildFeatureCard(
title: 'interpretation'.tr,
description: 'simultaneousInterpretationInfo'.tr,
icon: Icons.translate,
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
const Color(0xFF4CAF50).withOpacity(0.3),
const Color(0xFF009688).withOpacity(0.3),
],
),
onTap: controller.openTranslation,
iconOnTop: true,
height: 140.h,
isDarkMode: isDarkMode,
iconColor: const Color(0xFF4CAF50),
),
),
SizedBox(width: 16.w),
// 右侧:会议助手
Expanded(
flex: 1,
child: _buildFeatureCard(
title: 'conferenceAssistant'.tr,
description: 'conferenceAssistantInfo'.tr,
icon: Icons.people,
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
const Color(0xFFab47bc).withOpacity(0.3),
const Color(0xFFec407a).withOpacity(0.3),
],
),
onTap: () => controller.openMeet(),
iconOnTop: true,
height: 140.h,
isDarkMode: isDarkMode,
iconColor: const Color(0xFFd81b60),
),
),
],
);
}
} }

Loading…
Cancel
Save