diff --git a/lib/pages/about/index.dart b/lib/pages/about/index.dart index 0f159ce7..41ee1516 100644 --- a/lib/pages/about/index.dart +++ b/lib/pages/about/index.dart @@ -53,29 +53,54 @@ class _AboutPageState extends State { style: Theme.of(context).textTheme.titleMedium, ), const SizedBox(height: 6), - Text( - '使用Flutter开发的哔哩哔哩第三方客户端', - style: TextStyle(color: Theme.of(context).colorScheme.outline), - ), - const SizedBox(height: 20), Obx( - () => ListTile( - title: const Text('当前版本'), - trailing: Text(_aboutController.currentVersion.value, - style: subTitleStyle), - ), - ), - Obx( - () => ListTile( - onTap: () => _aboutController.onUpdate(), - title: const Text('最新版本'), - trailing: Text( - _aboutController.isLoading.value - ? '正在获取' - : _aboutController.isUpdate.value - ? '有新版本 ❤️${_aboutController.remoteVersion.value}' - : '当前已是最新版', - style: subTitleStyle, + () => Badge( + isLabelVisible: _aboutController.isLoading.value + ? false + : _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, + ), + ), + ), ), ), ), @@ -87,14 +112,9 @@ class _AboutPageState extends State { // size: 16, // ), // ), - Divider( - thickness: 1, - height: 30, - color: Theme.of(context).colorScheme.outlineVariant, - ), ListTile( onTap: () => _aboutController.githubUrl(), - title: const Text('Github'), + title: const Text('开源地址'), trailing: Text( 'github.com/guozhigq/pilipala', style: subTitleStyle, @@ -129,19 +149,43 @@ class _AboutPageState extends State { ), ), ListTile( - onTap: () => _aboutController.qqChanel(), - title: const Text('QQ群'), + onTap: () { + showModalBottomSheet( + context: context, + builder: (context) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + ListTile( + onTap: () => _aboutController.qqChanel(), + title: const Text('QQ群'), + trailing: Text( + '616150809', + style: subTitleStyle, + ), + ), + ListTile( + onTap: () => _aboutController.tgChanel(), + title: const Text('TG频道'), + 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( - onTap: () => _aboutController.tgChanel(), - title: const Text('TG频道'), - trailing: Icon(Icons.arrow_forward_ios, size: 16, color: outline), - ), ListTile( onTap: () => _aboutController.aPay(), title: const Text('赞助'), @@ -163,6 +207,7 @@ class _AboutPageState extends State { subtitle: Text('图片及网络缓存 $cacheSize', style: subTitleStyle), 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() { - launchUrl( - Uri.parse('https://www.123pan.com/s/9sVqVv-flu0A.html'), - mode: LaunchMode.externalApplication, + 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'), + mode: LaunchMode.externalApplication, + ), ); } @@ -250,7 +310,7 @@ class AboutController extends GetxController { // qq频道 qqChanel() { Clipboard.setData( - const ClipboardData(text: '489981949'), + const ClipboardData(text: '616150809'), ); SmartDialog.showToast('已复制QQ群号'); } @@ -291,6 +351,13 @@ class AboutController extends GetxController { ); } + qimiao() { + launchUrl( + Uri.parse('https://www.magicalapk.com/home'), + mode: LaunchMode.externalApplication, + ); + } + // 日志 logs() { Get.toNamed('/logs');