mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -22,7 +22,7 @@ Widget iconButton({
|
||||
color: iconColor ?? Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
),
|
||||
style: IconButton.styleFrom(
|
||||
padding: EdgeInsets.all(0),
|
||||
padding: EdgeInsets.zero,
|
||||
backgroundColor:
|
||||
bgColor ?? Theme.of(context).colorScheme.secondaryContainer,
|
||||
),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/common/widgets/icon_button.dart';
|
||||
import 'package:PiliPlus/common/widgets/network_img_layer.dart';
|
||||
import 'package:PiliPlus/utils/download.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -72,18 +73,19 @@ void imageSaveDialog({
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
IconButton(
|
||||
iconButton(
|
||||
context: context,
|
||||
tooltip: '分享',
|
||||
onPressed: () {
|
||||
DownloadUtils.onShareImg(cover ?? '');
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.share,
|
||||
size: 20,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
iconSize: 20,
|
||||
icon: Icons.share,
|
||||
bgColor: Colors.transparent,
|
||||
iconColor: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
iconButton(
|
||||
context: context,
|
||||
tooltip: '保存封面图',
|
||||
onPressed: () async {
|
||||
bool saveStatus = await DownloadUtils.downloadImg(
|
||||
@@ -95,11 +97,10 @@ void imageSaveDialog({
|
||||
SmartDialog.dismiss();
|
||||
}
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.download,
|
||||
size: 20,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
iconSize: 20,
|
||||
icon: Icons.download,
|
||||
bgColor: Colors.transparent,
|
||||
iconColor: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -15,6 +15,7 @@ class RetryInterceptor extends Interceptor {
|
||||
case DioExceptionType.connectionError:
|
||||
case DioExceptionType.connectionTimeout:
|
||||
case DioExceptionType.sendTimeout:
|
||||
case DioExceptionType.unknown:
|
||||
if ((err.requestOptions.extra['_rt'] ??= 0) < _count) {
|
||||
Future.delayed(
|
||||
Duration(
|
||||
|
||||
@@ -112,11 +112,13 @@ class _BangumiPageState extends State<BangumiPage>
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
Obx(() => _bangumiController.isLogin.value
|
||||
Obx(
|
||||
() => _bangumiController.isLogin.value
|
||||
? Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10),
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
'/fav',
|
||||
@@ -126,6 +128,9 @@ class _BangumiPageState extends State<BangumiPage>
|
||||
: 2,
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@@ -149,8 +154,10 @@ class _BangumiPageState extends State<BangumiPage>
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink()),
|
||||
: const SizedBox.shrink(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -183,6 +190,7 @@ class _BangumiPageState extends State<BangumiPage>
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
if (widget.tabType == TabType.bangumi) {
|
||||
Get.to(PgcIndexPage());
|
||||
@@ -214,6 +222,8 @@ class _BangumiPageState extends State<BangumiPage>
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 2),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@@ -232,6 +242,7 @@ class _BangumiPageState extends State<BangumiPage>
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -88,12 +88,20 @@ class _FavNoteChildPageState extends State<FavNoteChildPage>
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
_favNoteController.handleSelect(
|
||||
!_favNoteController.allSelected.value);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 14,
|
||||
bottom: 14,
|
||||
right: 12,
|
||||
),
|
||||
child: const Text('全选'),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
FilledButton.tonal(
|
||||
style: TextButton.styleFrom(
|
||||
|
||||
@@ -95,12 +95,20 @@ class _FavPgcChildPageState extends State<FavPgcChildPage>
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
_favPgcController.handleSelect(
|
||||
!_favPgcController.allSelected.value);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 14,
|
||||
bottom: 14,
|
||||
right: 12,
|
||||
),
|
||||
child: const Text('全选'),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
...[
|
||||
{'followStatus': 1, 'title': '想看'},
|
||||
@@ -113,6 +121,7 @@ class _FavPgcChildPageState extends State<FavPgcChildPage>
|
||||
(Map item) => Padding(
|
||||
padding: const EdgeInsets.only(left: 25),
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
if (_favPgcController.checkedCount.value !=
|
||||
0) {
|
||||
@@ -120,6 +129,9 @@ class _FavPgcChildPageState extends State<FavPgcChildPage>
|
||||
.onUpdate(item['followStatus']);
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 14, horizontal: 5),
|
||||
child: Text(
|
||||
'标记为${item['title']}',
|
||||
style: TextStyle(
|
||||
@@ -131,6 +143,7 @@ class _FavPgcChildPageState extends State<FavPgcChildPage>
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user