feat: 完善芽说英语品牌Logo与图标配置,完成跨平台云端同步服务开发与自动化部署
This commit is contained in:
@@ -7,6 +7,8 @@ import '../../core/app_theme.dart';
|
||||
import '../../core/models.dart';
|
||||
import '../../core/voice_service.dart';
|
||||
import '../../widgets/app_widgets.dart';
|
||||
import '../../core/sync/sync_coordinator.dart';
|
||||
import 'sync_settings_sheet.dart';
|
||||
|
||||
class ProgressPage extends StatelessWidget {
|
||||
const ProgressPage({
|
||||
@@ -93,6 +95,46 @@ class ProgressPage extends StatelessWidget {
|
||||
'进入下一阶段条件:60 项固定核心内容中至少 48 项可使用、30 项已掌握,且两套不同题组的听说读写评估都通过并间隔至少 24 小时。',
|
||||
),
|
||||
),
|
||||
AnimatedBuilder(
|
||||
animation: SyncCoordinator.instance,
|
||||
builder: (context, _) {
|
||||
final loggedIn = SyncCoordinator.instance.isLoggedIn;
|
||||
return SectionCard(
|
||||
onTap: () => SyncSettingsSheet.show(context, state),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
loggedIn
|
||||
? Icons.cloud_done_outlined
|
||||
: Icons.cloud_queue_outlined,
|
||||
color: loggedIn ? AppColors.green : AppColors.muted,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
loggedIn
|
||||
? '云同步:${SyncCoordinator.instance.username}'
|
||||
: '云端同步与多端备份',
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
Text(
|
||||
loggedIn
|
||||
? '多端学习进度与复习状态已连接 · 点击管理'
|
||||
: '未登录 · 点击配置自建服务器,在手机与电脑间同步',
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Icon(Icons.chevron_right, color: AppColors.muted),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
if (state.a0Passed)
|
||||
const SectionCard(
|
||||
tint: AppColors.softGreen,
|
||||
@@ -279,6 +321,27 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
onTap: () => _confirmDeleteRecordings(context),
|
||||
),
|
||||
const Divider(height: 28),
|
||||
const Text(
|
||||
'云同步与多端备份',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||
),
|
||||
const Text(
|
||||
'支持通过自建服务器在 Android / iOS / macOS 之间同步学习进度与复习掌握度。离线自动缓存,联网自动双向合并。',
|
||||
style: TextStyle(fontSize: 12, color: AppColors.muted),
|
||||
),
|
||||
AnimatedBuilder(
|
||||
animation: SyncCoordinator.instance,
|
||||
builder: (context, _) => _SettingTile(
|
||||
title: SyncCoordinator.instance.isLoggedIn
|
||||
? '同步账号:${SyncCoordinator.instance.username}'
|
||||
: '配置云端同步账号',
|
||||
subtitle: SyncCoordinator.instance.isLoggedIn
|
||||
? '已连接自建服务器 · 点击管理同步'
|
||||
: '未登录 · 点击配置自建服务器并登录',
|
||||
onTap: () => SyncSettingsSheet.show(context, widget.state),
|
||||
),
|
||||
),
|
||||
const Divider(height: 28),
|
||||
const Text(
|
||||
'AI 对话服务',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||
|
||||
Reference in New Issue
Block a user