mod: 修改关于页面

This commit is contained in:
guozhigq
2024-02-24 01:38:27 +08:00
parent 02cc164635
commit b1a05c5c27

View File

@ -53,29 +53,54 @@ class _AboutPageState extends State<AboutPage> {
style: Theme.of(context).textTheme.titleMedium, style: Theme.of(context).textTheme.titleMedium,
), ),
const SizedBox(height: 6), const SizedBox(height: 6),
Text(
'使用Flutter开发的哔哩哔哩第三方客户端',
style: TextStyle(color: Theme.of(context).colorScheme.outline),
),
const SizedBox(height: 20),
Obx( Obx(
() => ListTile( () => Badge(
title: const Text('当前版本'), isLabelVisible: _aboutController.isLoading.value
trailing: Text(_aboutController.currentVersion.value, ? false
style: subTitleStyle), : _aboutController.isUpdate.value,
label: const Text('New'),
child: Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 0, 30),
child: FilledButton.tonal(
onPressed: () {
showModalBottomSheet(
context: context,
builder: (context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
ListTile(
onTap: () => _aboutController.githubRelease(),
title: const Text('Github下载'),
),
ListTile(
onTap: () => _aboutController.panDownload(),
title: const Text('网盘下载'),
),
ListTile(
onTap: () => _aboutController.webSiteUrl(),
title: const Text('官网下载'),
),
ListTile(
onTap: () => _aboutController.qimiao(),
title: const Text('奇妙应用'),
),
SizedBox(
height:
MediaQuery.of(context).padding.bottom +
20)
],
);
},
);
},
child: Text(
'V${_aboutController.currentVersion.value}',
style: subTitleStyle.copyWith(
color: Theme.of(context).primaryColor,
),
), ),
), ),
Obx(
() => ListTile(
onTap: () => _aboutController.onUpdate(),
title: const Text('最新版本'),
trailing: Text(
_aboutController.isLoading.value
? '正在获取'
: _aboutController.isUpdate.value
? '有新版本 ❤️${_aboutController.remoteVersion.value}'
: '当前已是最新版',
style: subTitleStyle,
), ),
), ),
), ),
@ -87,14 +112,9 @@ class _AboutPageState extends State<AboutPage> {
// size: 16, // size: 16,
// ), // ),
// ), // ),
Divider(
thickness: 1,
height: 30,
color: Theme.of(context).colorScheme.outlineVariant,
),
ListTile( ListTile(
onTap: () => _aboutController.githubUrl(), onTap: () => _aboutController.githubUrl(),
title: const Text('Github'), title: const Text('开源地址'),
trailing: Text( trailing: Text(
'github.com/guozhigq/pilipala', 'github.com/guozhigq/pilipala',
style: subTitleStyle, style: subTitleStyle,
@ -128,19 +148,43 @@ class _AboutPageState extends State<AboutPage> {
color: outline, color: outline,
), ),
), ),
ListTile(
onTap: () {
showModalBottomSheet(
context: context,
builder: (context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
ListTile( ListTile(
onTap: () => _aboutController.qqChanel(), onTap: () => _aboutController.qqChanel(),
title: const Text('QQ群'), title: const Text('QQ群'),
trailing: Icon( trailing: Text(
Icons.arrow_forward_ios, '616150809',
size: 16, style: subTitleStyle,
color: outline,
), ),
), ),
ListTile( ListTile(
onTap: () => _aboutController.tgChanel(), onTap: () => _aboutController.tgChanel(),
title: const Text('TG频道'), title: const Text('TG频道'),
trailing: Icon(Icons.arrow_forward_ios, size: 16, color: outline), trailing: Text(
'https://t.me/+lm_oOVmF0RJiODk1',
style: subTitleStyle,
),
),
SizedBox(
height: MediaQuery.of(context).padding.bottom + 20)
],
);
},
);
},
title: const Text('交流社区'),
trailing: Icon(
Icons.arrow_forward_ios,
size: 16,
color: outline,
),
), ),
ListTile( ListTile(
onTap: () => _aboutController.aPay(), onTap: () => _aboutController.aPay(),
@ -163,6 +207,7 @@ class _AboutPageState extends State<AboutPage> {
subtitle: Text('图片及网络缓存 $cacheSize', style: subTitleStyle), subtitle: Text('图片及网络缓存 $cacheSize', style: subTitleStyle),
trailing: Icon(Icons.arrow_forward_ios, size: 16, color: outline), trailing: Icon(Icons.arrow_forward_ios, size: 16, color: outline),
), ),
SizedBox(height: MediaQuery.of(context).padding.bottom + 20)
], ],
), ),
), ),
@ -230,11 +275,26 @@ class AboutController extends GetxController {
); );
} }
githubRelease() {
launchUrl(
Uri.parse('https://github.com/guozhigq/pilipala/release'),
mode: LaunchMode.externalApplication,
);
}
// 从网盘下载 // 从网盘下载
panDownload() { panDownload() {
launchUrl( Clipboard.setData(
const ClipboardData(text: 'pili'),
);
SmartDialog.showToast(
'已复制提取码pili',
displayTime: const Duration(milliseconds: 500),
).then(
(value) => launchUrl(
Uri.parse('https://www.123pan.com/s/9sVqVv-flu0A.html'), Uri.parse('https://www.123pan.com/s/9sVqVv-flu0A.html'),
mode: LaunchMode.externalApplication, mode: LaunchMode.externalApplication,
),
); );
} }
@ -250,7 +310,7 @@ class AboutController extends GetxController {
// qq频道 // qq频道
qqChanel() { qqChanel() {
Clipboard.setData( Clipboard.setData(
const ClipboardData(text: '489981949'), const ClipboardData(text: '616150809'),
); );
SmartDialog.showToast('已复制QQ群号'); SmartDialog.showToast('已复制QQ群号');
} }
@ -291,6 +351,13 @@ class AboutController extends GetxController {
); );
} }
qimiao() {
launchUrl(
Uri.parse('https://www.magicalapk.com/home'),
mode: LaunchMode.externalApplication,
);
}
// 日志 // 日志
logs() { logs() {
Get.toNamed('/logs'); Get.toNamed('/logs');