release
This commit is contained in:
@@ -23,6 +23,7 @@ class _AppDiyPageState extends State<AppDiyPage> {
|
||||
bool _showGuideOnStartup = true;
|
||||
int _cardSizeIndex = 1; // 0: 小, 1: 中, 2: 大
|
||||
bool _enableSystemNavigation = false;
|
||||
bool _showDevNotice = true; // 是否显示开发中提示对话框
|
||||
|
||||
// 滚动控制
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
@@ -50,12 +51,16 @@ class _AppDiyPageState extends State<AppDiyPage> {
|
||||
_startScrolling();
|
||||
// 延迟显示开发中提示对话框
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_showDevNoticeDialog();
|
||||
if (_showDevNotice) {
|
||||
_showDevNoticeDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 显示开发中提示对话框
|
||||
void _showDevNoticeDialog() {
|
||||
bool doNotShowAgain = false;
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
@@ -63,81 +68,119 @@ class _AppDiyPageState extends State<AppDiyPage> {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return AlertDialog(
|
||||
backgroundColor: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
title: Row(
|
||||
children: [
|
||||
Icon(Icons.construction, color: primaryColor),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'开发中',
|
||||
style: TextStyle(color: isDark ? Colors.white : Colors.black),
|
||||
return StatefulBuilder(
|
||||
builder: (context, setState) {
|
||||
return AlertDialog(
|
||||
backgroundColor: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
],
|
||||
),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'个性化设置开发中',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16,
|
||||
color: isDark ? Colors.white : Colors.black,
|
||||
title: Row(
|
||||
children: [
|
||||
Icon(Icons.construction, color: primaryColor),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'开发中',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.white : Colors.black,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'个性化设置开发中',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16,
|
||||
color: isDark ? Colors.white : Colors.black,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'• ✅ 深色模式(已支持)',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.grey[300] : Colors.black87,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'• ✅ 主题色彩(已支持)',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.grey[300] : Colors.black87,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'• ⏳ 其他设置仅当前页面生效',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.grey[300] : Colors.black87,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'• ⏳ 后续版本将陆续支持',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.grey[300] : Colors.black87,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'感谢您的耐心等待!',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.grey[400] : Colors.grey[600],
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
Row(
|
||||
children: [
|
||||
Checkbox(
|
||||
value: doNotShowAgain,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
doNotShowAgain = value ?? false;
|
||||
});
|
||||
},
|
||||
activeColor: primaryColor,
|
||||
),
|
||||
Text(
|
||||
'不再提醒',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.grey[300] : Colors.black87,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
if (doNotShowAgain) {
|
||||
await _themeController.prefs?.setBool(
|
||||
'showDevNotice',
|
||||
false,
|
||||
);
|
||||
setState(() {
|
||||
_showDevNotice = false;
|
||||
});
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: const Text('我知道了'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'• ✅ 深色模式(已支持)',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.grey[300] : Colors.black87,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'• ✅ 主题色彩(已支持)',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.grey[300] : Colors.black87,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'• ⏳ 其他设置仅当前页面生效',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.grey[300] : Colors.black87,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'• ⏳ 后续版本将陆续支持',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.grey[300] : Colors.black87,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'感谢您的耐心等待!',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.grey[400] : Colors.grey[600],
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
ElevatedButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: const Text('我知道了'),
|
||||
),
|
||||
],
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -187,6 +230,7 @@ class _AppDiyPageState extends State<AppDiyPage> {
|
||||
_cardSizeIndex = _themeController.prefs?.getInt('cardSizeIndex') ?? 1;
|
||||
_enableSystemNavigation =
|
||||
_themeController.prefs?.getBool('enableSystemNavigation') ?? false;
|
||||
_showDevNotice = _themeController.prefs?.getBool('showDevNotice') ?? true;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -218,6 +262,16 @@ class _AppDiyPageState extends State<AppDiyPage> {
|
||||
),
|
||||
backgroundColor: isDark ? Colors.grey[900] : Colors.white,
|
||||
elevation: 0,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.info_outline,
|
||||
color: _themeController.currentThemeColor,
|
||||
),
|
||||
onPressed: () => _showDevNoticeDialog(),
|
||||
tooltip: '显示开发中提示',
|
||||
),
|
||||
],
|
||||
),
|
||||
backgroundColor: isDark ? Colors.grey[900] : Colors.grey[50],
|
||||
body: ListView(
|
||||
|
||||
Reference in New Issue
Block a user