mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: btn to view all fav pgc
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -90,7 +90,6 @@ class _BangumiPageState extends State<BangumiPage>
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 16),
|
padding: const EdgeInsets.only(left: 16),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
children: [
|
||||||
Obx(
|
Obx(
|
||||||
() => Text(
|
() => Text(
|
||||||
@@ -99,6 +98,7 @@ class _BangumiPageState extends State<BangumiPage>
|
|||||||
Theme.of(context).textTheme.titleMedium,
|
Theme.of(context).textTheme.titleMedium,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const Spacer(),
|
||||||
IconButton(
|
IconButton(
|
||||||
tooltip: '刷新',
|
tooltip: '刷新',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -112,6 +112,45 @@ class _BangumiPageState extends State<BangumiPage>
|
|||||||
size: 20,
|
size: 20,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Obx(() => _bangumiController.isLogin.value
|
||||||
|
? Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10),
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(
|
||||||
|
'/fav',
|
||||||
|
arguments: widget.tabType ==
|
||||||
|
TabType.bangumi
|
||||||
|
? 1
|
||||||
|
: 2,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'查看全部',
|
||||||
|
strutStyle: StrutStyle(
|
||||||
|
leading: 0, height: 1),
|
||||||
|
style: TextStyle(
|
||||||
|
height: 1,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.secondary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
Icons.chevron_right,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.secondary,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: const SizedBox.shrink()),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -102,11 +102,13 @@ class _FavNoteChildPageState extends State<FavNoteChildPage>
|
|||||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showConfirmDialog(
|
if (_favNoteController.checkedCount.value != 0) {
|
||||||
context: context,
|
showConfirmDialog(
|
||||||
title: '确定删除已选中的笔记吗?',
|
context: context,
|
||||||
onConfirm: _favNoteController.onRemove,
|
title: '确定删除已选中的笔记吗?',
|
||||||
);
|
onConfirm: _favNoteController.onRemove,
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: const Text('删除'),
|
child: const Text('删除'),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -114,8 +114,11 @@ class _FavPgcChildPageState extends State<FavPgcChildPage>
|
|||||||
padding: const EdgeInsets.only(left: 25),
|
padding: const EdgeInsets.only(left: 25),
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_favPgcController
|
if (_favPgcController.checkedCount.value !=
|
||||||
.onUpdate(item['followStatus']);
|
0) {
|
||||||
|
_favPgcController
|
||||||
|
.onUpdate(item['followStatus']);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'标记为${item['title']}',
|
'标记为${item['title']}',
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class _FavPageState extends State<FavPage> with SingleTickerProviderStateMixin {
|
|||||||
late final TabController _tabController = TabController(
|
late final TabController _tabController = TabController(
|
||||||
length: _FavType.values.length,
|
length: _FavType.values.length,
|
||||||
vsync: this,
|
vsync: this,
|
||||||
|
initialIndex: Get.arguments is int ? Get.arguments : 0,
|
||||||
);
|
);
|
||||||
final FavController _favController = Get.put(FavController());
|
final FavController _favController = Get.put(FavController());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user