mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: intro panel
opt: pgc page Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -265,7 +265,7 @@ class _BangumiInfoState extends State<BangumiInfo>
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: showIntroDetail,
|
||||
behavior: HitTestBehavior.translucent,
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: SizedBox(
|
||||
height: isLandscape ? 115 : 115 / 0.75,
|
||||
child: Column(
|
||||
|
||||
@@ -82,9 +82,8 @@ class _BangumiPageState extends State<BangumiPage>
|
||||
slivers: [
|
||||
SliverToBoxAdapter(
|
||||
child: Obx(
|
||||
() => Visibility(
|
||||
visible: _bangumiController.isLogin.value,
|
||||
child: Column(
|
||||
() => _bangumiController.isLogin.value
|
||||
? Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 16),
|
||||
@@ -94,7 +93,8 @@ class _BangumiPageState extends State<BangumiPage>
|
||||
Obx(
|
||||
() => Text(
|
||||
'最近${widget.tabType == TabType.bangumi ? '追番' : '追剧'}${_bangumiController.followCount.value == -1 ? '' : ' ${_bangumiController.followCount.value}'}',
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
style:
|
||||
Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
@@ -122,8 +122,8 @@ class _BangumiPageState extends State<BangumiPage>
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
|
||||
@@ -127,7 +127,7 @@ class _MinePageState extends State<MinePage> {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: _mineController.onLogin,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@@ -310,12 +310,19 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
padding: const EdgeInsets.only(
|
||||
left: StyleString.safeSpace,
|
||||
right: StyleString.safeSpace,
|
||||
top: 10),
|
||||
top: 10,
|
||||
),
|
||||
sliver: SliverToBoxAdapter(
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: showIntroDetail,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {},
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: videoItem['staff'] == null
|
||||
@@ -343,7 +350,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
children: [
|
||||
Text(
|
||||
widget.loadingStatus
|
||||
? videoItem['owner']?.name ?? ""
|
||||
? videoItem['owner']?.name ??
|
||||
""
|
||||
: videoDetail.owner!.name,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -378,7 +386,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
int? ownerMid = !widget.loadingStatus
|
||||
? videoDetail.owner?.mid
|
||||
: videoItem['owner']?.mid;
|
||||
if (videoItem['staff'][index].mid == ownerMid &&
|
||||
if (videoItem['staff'][index].mid ==
|
||||
ownerMid &&
|
||||
context.orientation ==
|
||||
Orientation.landscape &&
|
||||
_horizontalMemberPage) {
|
||||
@@ -421,7 +430,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
.vip
|
||||
.status >
|
||||
0 &&
|
||||
videoItem['staff'][index]
|
||||
videoItem['staff']
|
||||
[index]
|
||||
.vip
|
||||
.type ==
|
||||
2
|
||||
@@ -447,50 +457,14 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
),
|
||||
if (isHorizontal) ...[
|
||||
const SizedBox(width: 10),
|
||||
Expanded(child: actionGrid(context, videoIntroController)),
|
||||
Expanded(
|
||||
child: actionGrid(context, videoIntroController)),
|
||||
]
|
||||
],
|
||||
),
|
||||
if (videoIntroController.videoDetail.value.argueMsg?.isNotEmpty ==
|
||||
true &&
|
||||
videoIntroController.showArgueMsg) ...[
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
color: Theme.of(context).colorScheme.secondaryContainer,
|
||||
),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
|
||||
child: Text.rich(
|
||||
TextSpan(children: [
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: Icon(
|
||||
size: 17,
|
||||
Icons.warning_rounded,
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSecondaryContainer,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text:
|
||||
' ${videoIntroController.videoDetail.value.argueMsg}')
|
||||
]),
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
const SizedBox(height: 8),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: showIntroDetail,
|
||||
child: ExpandablePanel(
|
||||
ExpandablePanel(
|
||||
controller: videoIntroController.expandableCtr,
|
||||
collapsed: GestureDetector(
|
||||
onLongPress: () {
|
||||
@@ -516,15 +490,10 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
sizeCurve: Curves.linear,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Stack(
|
||||
children: [
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: showIntroDetail,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: Row(
|
||||
Row(
|
||||
children: <Widget>[
|
||||
statView(
|
||||
context: context,
|
||||
@@ -577,8 +546,6 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (videoIntroController.enableAi)
|
||||
Positioned(
|
||||
right: 10,
|
||||
@@ -595,18 +562,44 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
widget.showAiBottomSheet();
|
||||
}
|
||||
},
|
||||
child:
|
||||
Image.asset('assets/images/ai.png', height: 22),
|
||||
child: Image.asset('assets/images/ai.png',
|
||||
height: 22),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: showIntroDetail,
|
||||
child: ExpandablePanel(
|
||||
if (videoIntroController
|
||||
.videoDetail.value.argueMsg?.isNotEmpty ==
|
||||
true &&
|
||||
videoIntroController.showArgueMsg) ...[
|
||||
const SizedBox(height: 2),
|
||||
Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: Icon(
|
||||
size: 13,
|
||||
Icons.error_outline,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
),
|
||||
WidgetSpan(child: SizedBox(width: 2)),
|
||||
TextSpan(
|
||||
text:
|
||||
'${videoIntroController.videoDetail.value.argueMsg}',
|
||||
)
|
||||
],
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
ExpandablePanel(
|
||||
controller: videoIntroController.expandableCtr,
|
||||
collapsed: const SizedBox.shrink(),
|
||||
expanded: Column(
|
||||
@@ -675,16 +668,16 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
sizeCurve: Curves.linear,
|
||||
),
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() => videoIntroController.queryVideoIntroData.value["status"]
|
||||
() =>
|
||||
videoIntroController.queryVideoIntroData.value["status"]
|
||||
? const SizedBox.shrink()
|
||||
: Center(
|
||||
child: TextButton.icon(
|
||||
icon: const Icon(Icons.refresh),
|
||||
onPressed: () {
|
||||
videoIntroController
|
||||
.queryVideoIntroData.value["status"] = true;
|
||||
videoIntroController.queryVideoIntroData
|
||||
.value["status"] = true;
|
||||
videoIntroController.queryVideoIntro();
|
||||
if (videoDetailCtr.videoUrl.isNullOrEmpty &&
|
||||
videoDetailCtr.isQuerying.not) {
|
||||
@@ -739,7 +732,9 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
),
|
||||
],
|
||||
],
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -6,8 +6,10 @@ import 'package:PiliPlus/http/constants.dart';
|
||||
import 'package:PiliPlus/http/init.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models/common/dynamics_type.dart';
|
||||
import 'package:PiliPlus/models/common/tab_type.dart' hide tabsConfig;
|
||||
import 'package:PiliPlus/models/user/info.dart';
|
||||
import 'package:PiliPlus/models/user/stat.dart';
|
||||
import 'package:PiliPlus/pages/bangumi/controller.dart';
|
||||
import 'package:PiliPlus/pages/dynamics/tab/controller.dart';
|
||||
import 'package:PiliPlus/pages/live/controller.dart';
|
||||
import 'package:PiliPlus/pages/main/controller.dart';
|
||||
@@ -113,6 +115,18 @@ class LoginUtils {
|
||||
..isLogin.value = true
|
||||
..fetchLiveFollowing();
|
||||
} catch (_) {}
|
||||
|
||||
try {
|
||||
Get.find<BangumiController>(tag: TabType.bangumi.name)
|
||||
..isLogin.value = true
|
||||
..queryBangumiFollow();
|
||||
} catch (_) {}
|
||||
|
||||
try {
|
||||
Get.find<BangumiController>(tag: TabType.cinema.name)
|
||||
..isLogin.value = true
|
||||
..queryBangumiFollow();
|
||||
} catch (_) {}
|
||||
} else {
|
||||
// 获取用户信息失败
|
||||
SmartDialog.showNotify(
|
||||
@@ -170,6 +184,18 @@ class LoginUtils {
|
||||
Get.find<DynamicsTabController>(tag: tabsConfig[i]['tag']).onRefresh();
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
try {
|
||||
Get.find<BangumiController>(tag: TabType.bangumi.name)
|
||||
..isLogin.value = false
|
||||
..followState.value = LoadingState.loading();
|
||||
} catch (_) {}
|
||||
|
||||
try {
|
||||
Get.find<BangumiController>(tag: TabType.cinema.name)
|
||||
..isLogin.value = false
|
||||
..followState.value = LoadingState.loading();
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
static String buvid() {
|
||||
|
||||
Reference in New Issue
Block a user