opt: bangumi intro

This commit is contained in:
bggRGjQaUbCoE
2024-09-19 10:29:22 +08:00
parent 7e83856615
commit 1d50eb0724
5 changed files with 34 additions and 15 deletions

View File

@@ -29,6 +29,7 @@ class ActionItem extends StatelessWidget {
child: Semantics(
label: (text ?? "") + (selectStatus ? "" : "") + semanticsLabel,
child: InkWell(
borderRadius: BorderRadius.circular(6),
onTap: () => {
feedBack(),
onTap!(),

View File

@@ -26,7 +26,7 @@ class _FavPanelState extends State<FavPanel> {
Widget build(BuildContext context) {
return Container(
height: Utils.getSheetHeight(context),
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: Column(
children: [
AppBar(

View File

@@ -75,7 +75,7 @@ class IntroDetail extends StatelessWidget {
),
],
),
const SizedBox(height: 20),
const SizedBox(height: 10),
SizedBox(
width: double.infinity,
child: SelectableRegion(
@@ -86,9 +86,12 @@ class IntroDetail extends StatelessWidget {
children: <Widget>[
Text(
videoDetail!.bvid!,
style: const TextStyle(fontSize: 13),
style: TextStyle(
fontSize: 13,
color: Theme.of(context).colorScheme.primary,
),
),
const SizedBox(height: 4),
const SizedBox(height: 10),
Text.rich(
style: const TextStyle(
height: 1.4,

View File

@@ -5,8 +5,12 @@ import 'dart:math';
import 'package:PiliPalaX/common/constants.dart';
import 'package:PiliPalaX/common/widgets/list_sheet.dart';
import 'package:PiliPalaX/http/loading_state.dart';
import 'package:PiliPalaX/models/bangumi/info.dart';
import 'package:PiliPalaX/models/common/reply_type.dart';
import 'package:PiliPalaX/pages/video/detail/introduction/widgets/intro_detail.dart';
import 'package:PiliPalaX/pages/bangumi/introduction/widgets/intro_detail.dart'
as bangumi;
import 'package:PiliPalaX/pages/video/detail/introduction/widgets/intro_detail.dart'
as video;
import 'package:PiliPalaX/pages/video/detail/reply_reply/view.dart';
import 'package:PiliPalaX/pages/video/detail/widgets/ai_detail.dart';
import 'package:PiliPalaX/utils/extension.dart';
@@ -423,6 +427,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
String introText = '简介',
bool isSingle = false,
]) {
if (videoDetailController.tabCtr.length != (isSingle ? 1 : 2)) {
videoDetailController.tabCtr =
TabController(length: isSingle ? 1 : 2, vsync: this);
}
return Container(
width: double.infinity,
height: 45,
@@ -735,6 +743,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
cid:
videoDetailController.cid.value,
showEpisodes: showEpisodes,
showIntroDetail: showIntroDetail,
)),
],
SliverToBoxAdapter(
@@ -855,6 +864,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
heroTag: heroTag,
cid: videoDetailController.cid.value,
showEpisodes: showEpisodes,
showIntroDetail: showIntroDetail,
)),
],
SliverToBoxAdapter(
@@ -970,6 +980,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
heroTag: heroTag,
cid: videoDetailController.cid.value,
showEpisodes: showEpisodes,
showIntroDetail: showIntroDetail,
)),
]
],
@@ -1013,6 +1024,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
heroTag: heroTag,
cid: videoDetailController.cid.value,
showEpisodes: showEpisodes,
showIntroDetail: showIntroDetail,
)),
]
],
@@ -1200,6 +1212,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
heroTag: heroTag,
cid: videoDetailController.cid.value,
showEpisodes: showEpisodes,
showIntroDetail: showIntroDetail,
)),
]
],
@@ -1442,7 +1455,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
showIntroDetail(videoDetail) {
scaffoldKey.currentState?.showBottomSheet(
enableDrag: true, (context) => IntroDetail(videoDetail: videoDetail));
enableDrag: true,
(context) => videoDetail is BangumiInfoModel
? bangumi.IntroDetail(bangumiDetail: videoDetail)
: video.IntroDetail(videoDetail: videoDetail));
}
showEpisodes(episodes, bvid, aid, cid) {