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(
|
Expanded(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: showIntroDetail,
|
onTap: showIntroDetail,
|
||||||
behavior: HitTestBehavior.translucent,
|
behavior: HitTestBehavior.opaque,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: isLandscape ? 115 : 115 / 0.75,
|
height: isLandscape ? 115 : 115 / 0.75,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
@@ -82,9 +82,8 @@ class _BangumiPageState extends State<BangumiPage>
|
|||||||
slivers: [
|
slivers: [
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: Obx(
|
child: Obx(
|
||||||
() => Visibility(
|
() => _bangumiController.isLogin.value
|
||||||
visible: _bangumiController.isLogin.value,
|
? Column(
|
||||||
child: Column(
|
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 16),
|
padding: const EdgeInsets.only(left: 16),
|
||||||
@@ -94,7 +93,8 @@ class _BangumiPageState extends State<BangumiPage>
|
|||||||
Obx(
|
Obx(
|
||||||
() => Text(
|
() => Text(
|
||||||
'最近${widget.tabType == TabType.bangumi ? '追番' : '追剧'}${_bangumiController.followCount.value == -1 ? '' : ' ${_bangumiController.followCount.value}'}',
|
'最近${widget.tabType == TabType.bangumi ? '追番' : '追剧'}${_bangumiController.followCount.value == -1 ? '' : ' ${_bangumiController.followCount.value}'}',
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
style:
|
||||||
|
Theme.of(context).textTheme.titleMedium,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
@@ -122,8 +122,8 @@ class _BangumiPageState extends State<BangumiPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
)
|
||||||
),
|
: const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ class _MinePageState extends State<MinePage> {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.translucent,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: _mineController.onLogin,
|
onTap: _mineController.onLogin,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|||||||
@@ -310,12 +310,19 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
left: StyleString.safeSpace,
|
left: StyleString.safeSpace,
|
||||||
right: StyleString.safeSpace,
|
right: StyleString.safeSpace,
|
||||||
top: 10),
|
top: 10,
|
||||||
|
),
|
||||||
sliver: SliverToBoxAdapter(
|
sliver: SliverToBoxAdapter(
|
||||||
|
child: GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: showIntroDetail,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {},
|
||||||
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: videoItem['staff'] == null
|
child: videoItem['staff'] == null
|
||||||
@@ -343,7 +350,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
widget.loadingStatus
|
widget.loadingStatus
|
||||||
? videoItem['owner']?.name ?? ""
|
? videoItem['owner']?.name ??
|
||||||
|
""
|
||||||
: videoDetail.owner!.name,
|
: videoDetail.owner!.name,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
@@ -378,7 +386,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
int? ownerMid = !widget.loadingStatus
|
int? ownerMid = !widget.loadingStatus
|
||||||
? videoDetail.owner?.mid
|
? videoDetail.owner?.mid
|
||||||
: videoItem['owner']?.mid;
|
: videoItem['owner']?.mid;
|
||||||
if (videoItem['staff'][index].mid == ownerMid &&
|
if (videoItem['staff'][index].mid ==
|
||||||
|
ownerMid &&
|
||||||
context.orientation ==
|
context.orientation ==
|
||||||
Orientation.landscape &&
|
Orientation.landscape &&
|
||||||
_horizontalMemberPage) {
|
_horizontalMemberPage) {
|
||||||
@@ -421,7 +430,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
.vip
|
.vip
|
||||||
.status >
|
.status >
|
||||||
0 &&
|
0 &&
|
||||||
videoItem['staff'][index]
|
videoItem['staff']
|
||||||
|
[index]
|
||||||
.vip
|
.vip
|
||||||
.type ==
|
.type ==
|
||||||
2
|
2
|
||||||
@@ -447,50 +457,14 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
if (isHorizontal) ...[
|
if (isHorizontal) ...[
|
||||||
const SizedBox(width: 10),
|
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),
|
const SizedBox(height: 8),
|
||||||
Container(
|
ExpandablePanel(
|
||||||
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(
|
|
||||||
controller: videoIntroController.expandableCtr,
|
controller: videoIntroController.expandableCtr,
|
||||||
collapsed: GestureDetector(
|
collapsed: GestureDetector(
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
@@ -516,15 +490,10 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
sizeCurve: Curves.linear,
|
sizeCurve: Curves.linear,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 8),
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
Row(
|
||||||
behavior: HitTestBehavior.translucent,
|
|
||||||
onTap: showIntroDetail,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 8),
|
|
||||||
child: Row(
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
statView(
|
statView(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -577,8 +546,6 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
if (videoIntroController.enableAi)
|
if (videoIntroController.enableAi)
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 10,
|
right: 10,
|
||||||
@@ -595,18 +562,44 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
widget.showAiBottomSheet();
|
widget.showAiBottomSheet();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child:
|
child: Image.asset('assets/images/ai.png',
|
||||||
Image.asset('assets/images/ai.png', height: 22),
|
height: 22),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
GestureDetector(
|
if (videoIntroController
|
||||||
behavior: HitTestBehavior.translucent,
|
.videoDetail.value.argueMsg?.isNotEmpty ==
|
||||||
onTap: showIntroDetail,
|
true &&
|
||||||
child: ExpandablePanel(
|
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,
|
controller: videoIntroController.expandableCtr,
|
||||||
collapsed: const SizedBox.shrink(),
|
collapsed: const SizedBox.shrink(),
|
||||||
expanded: Column(
|
expanded: Column(
|
||||||
@@ -675,16 +668,16 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
sizeCurve: Curves.linear,
|
sizeCurve: Curves.linear,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
Obx(
|
Obx(
|
||||||
() => videoIntroController.queryVideoIntroData.value["status"]
|
() =>
|
||||||
|
videoIntroController.queryVideoIntroData.value["status"]
|
||||||
? const SizedBox.shrink()
|
? const SizedBox.shrink()
|
||||||
: Center(
|
: Center(
|
||||||
child: TextButton.icon(
|
child: TextButton.icon(
|
||||||
icon: const Icon(Icons.refresh),
|
icon: const Icon(Icons.refresh),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
videoIntroController
|
videoIntroController.queryVideoIntroData
|
||||||
.queryVideoIntroData.value["status"] = true;
|
.value["status"] = true;
|
||||||
videoIntroController.queryVideoIntro();
|
videoIntroController.queryVideoIntro();
|
||||||
if (videoDetailCtr.videoUrl.isNullOrEmpty &&
|
if (videoDetailCtr.videoUrl.isNullOrEmpty &&
|
||||||
videoDetailCtr.isQuerying.not) {
|
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/init.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/models/common/dynamics_type.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/info.dart';
|
||||||
import 'package:PiliPlus/models/user/stat.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/dynamics/tab/controller.dart';
|
||||||
import 'package:PiliPlus/pages/live/controller.dart';
|
import 'package:PiliPlus/pages/live/controller.dart';
|
||||||
import 'package:PiliPlus/pages/main/controller.dart';
|
import 'package:PiliPlus/pages/main/controller.dart';
|
||||||
@@ -113,6 +115,18 @@ class LoginUtils {
|
|||||||
..isLogin.value = true
|
..isLogin.value = true
|
||||||
..fetchLiveFollowing();
|
..fetchLiveFollowing();
|
||||||
} catch (_) {}
|
} 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 {
|
} else {
|
||||||
// 获取用户信息失败
|
// 获取用户信息失败
|
||||||
SmartDialog.showNotify(
|
SmartDialog.showNotify(
|
||||||
@@ -170,6 +184,18 @@ class LoginUtils {
|
|||||||
Get.find<DynamicsTabController>(tag: tabsConfig[i]['tag']).onRefresh();
|
Get.find<DynamicsTabController>(tag: tabsConfig[i]['tag']).onRefresh();
|
||||||
} catch (_) {}
|
} 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() {
|
static String buvid() {
|
||||||
|
|||||||
Reference in New Issue
Block a user