generated from dellevin/template
优化备份逻辑,连同头像一起备份
This commit is contained in:
@@ -65,29 +65,36 @@ class BookTabPage extends StatelessWidget {
|
||||
|
||||
/// 构建空状态提示
|
||||
Widget _buildEmptyState(BuildContext context, int statusIndex) {
|
||||
final statusText = ['读完', '在读', '准备读'][statusIndex];
|
||||
final statusText = ['已读', '在读', '想读'][statusIndex];
|
||||
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.menu_book_outlined,
|
||||
size: 80,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant.withValues(alpha: 0.3),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'暂无$statusText的书籍',
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
Container(
|
||||
width: 80,
|
||||
height: 80,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF5F5F5),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.menu_book_outlined,
|
||||
size: 40,
|
||||
color: Color(0xFFCCCCCC),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
ElevatedButton.icon(
|
||||
icon: const Icon(Icons.add),
|
||||
label: const Text('添加记录'),
|
||||
onPressed: () {
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
'暂无$statusText的书籍',
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
color: Color(0xFF999999),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
final statusMap = {
|
||||
0: 'read',
|
||||
1: 'reading',
|
||||
@@ -100,6 +107,21 @@ class BookTabPage extends StatelessWidget {
|
||||
arguments: {'initialStatus': currentStatus},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF1A1A1A),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: const Text(
|
||||
'添加记录',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -71,22 +71,30 @@ class MovieTabPage extends StatelessWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.movie_outlined,
|
||||
size: 48,
|
||||
color: Color(0xFFCCCCCC),
|
||||
Container(
|
||||
width: 80,
|
||||
height: 80,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF5F5F5),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.movie_outlined,
|
||||
size: 40,
|
||||
color: Color(0xFFCCCCCC),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
'暂无$statusText的影片',
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontSize: 16,
|
||||
color: Color(0xFF999999),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
InkWell(
|
||||
onTap: () {
|
||||
final statusMap = {
|
||||
0: 'watched',
|
||||
1: 'watching',
|
||||
@@ -99,7 +107,21 @@ class MovieTabPage extends StatelessWidget {
|
||||
arguments: {'initialStatus': currentStatus},
|
||||
);
|
||||
},
|
||||
child: const Text('添加记录'),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF1A1A1A),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: const Text(
|
||||
'添加记录',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -213,14 +213,6 @@ class _NoteTabPageState extends State<NoteTabPage> {
|
||||
color: Color(0xFF999999),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const Text(
|
||||
'记录你的想法和灵感',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Color(0xFFBBBBBB),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
@@ -233,7 +225,7 @@ class _NoteTabPageState extends State<NoteTabPage> {
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: const Text(
|
||||
'添加笔记',
|
||||
'添加记录',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
||||
@@ -438,7 +438,10 @@ class _ProfilePageState extends State<ProfilePage> {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const BackupPage()),
|
||||
);
|
||||
).then((_) {
|
||||
// 返回时刷新用户数据
|
||||
_loadUserData();
|
||||
});
|
||||
},
|
||||
),
|
||||
const Divider(height: 1, indent: 72, endIndent: 16, color: Color(0xFFE8E8E8)),
|
||||
|
||||
@@ -477,7 +477,7 @@ class _BackupPageState extends State<BackupPage> {
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
'每2分钟自动备份,保留最近10个备份',
|
||||
'每2分钟自动备份,保留最近5个备份',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Color(0xFF666666),
|
||||
|
||||
Reference in New Issue
Block a user