opt: resCode, post panel

fix: bangumi panel

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-11-25 20:47:05 +08:00
parent bae395c5d0
commit 2fc4760269
12 changed files with 329 additions and 404 deletions

View File

@@ -76,7 +76,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
bangumiDetail: null,
cid: cid,
showEpisodes: widget.showEpisodes,
showIntroDetail: widget.showIntroDetail,
showIntroDetail: () {},
),
Success() => BangumiInfo(
heroTag: widget.heroTag,

View File

@@ -49,7 +49,7 @@ class IntroDetail extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
SelectableText(
bangumiDetail!.title,
style: const TextStyle(
fontSize: 16,
@@ -97,7 +97,7 @@ class IntroDetail extends StatelessWidget {
style: Theme.of(context).textTheme.titleMedium,
),
const SizedBox(height: 4),
Text(
SelectableText(
'${bangumiDetail!.evaluate!}',
style: smallTitle.copyWith(fontSize: 13),
),
@@ -107,7 +107,7 @@ class IntroDetail extends StatelessWidget {
style: Theme.of(context).textTheme.titleMedium,
),
const SizedBox(height: 4),
Text(
SelectableText(
bangumiDetail.actors,
style: smallTitle.copyWith(fontSize: 13),
),

View File

@@ -1,3 +1,4 @@
import 'package:PiliPalaX/utils/utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
@@ -129,8 +130,8 @@ class _BangumiPanelState extends State<BangumiPanel> {
),
child: Text(
widget.newEp?['desc']?.contains('连载') == true
? '连载中,更新至${widget.newEp?['title']}'
: '${widget.newEp?['title']}',
? '连载中,更新至${Utils.isStringNumeric(widget.newEp['title']) ? '${widget.newEp?['title']}' : '${widget.newEp?['title']}'}'
: '${widget.pages.length}',
style: const TextStyle(fontSize: 13),
),
),

View File

@@ -130,7 +130,6 @@ class _MemberVideoState extends State<MemberVideo>
}
return VideoCardHMemberVideo(
videoItem: loadingState.response[index],
showPubdate: true,
);
},
childCount: loadingState.response.length,

View File

@@ -7,6 +7,7 @@ import 'package:PiliPalaX/pages/video/detail/controller.dart'
show SegmentType, SegmentTypeExt, SkipType, SkipTypeExt;
import 'package:PiliPalaX/utils/storage.dart';
import 'package:PiliPalaX/utils/utils.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
@@ -57,7 +58,20 @@ class _SponsorBlockPageState extends State<SponsorBlockPage> {
);
_checkServerStatus() {
Request().get('$_blockServer/api/status').then((res) {
Request()
.get(
'$_blockServer/api/status',
options: Options(
headers: {
'env': '',
'app-key': '',
'x-bili-mid': '',
'x-bili-aurora-eid': '',
'x-bili-aurora-zone': '',
},
),
)
.then((res) {
if (res.data is Map) {
setState(() {
_serverStatus = res.data['uptime'] != null;

View File

@@ -3,6 +3,7 @@ import 'dart:io';
import 'dart:math';
import 'package:PiliPalaX/common/constants.dart';
import 'package:PiliPalaX/common/widgets/icon_button.dart';
import 'package:PiliPalaX/common/widgets/loading_widget.dart';
import 'package:PiliPalaX/common/widgets/pair.dart';
import 'package:PiliPalaX/common/widgets/segment_progress_bar.dart';
import 'package:PiliPalaX/http/danmaku.dart';
@@ -1045,7 +1046,7 @@ class VideoDetailController extends GetxController
iconButton(
context: context,
size: 26,
tooltip: '使用当前位置',
tooltip: '使用当前位置时间',
icon: Icons.my_location,
onPressed: () {
setState(() {
@@ -1204,6 +1205,7 @@ class VideoDetailController extends GetxController
iconButton(
context: context,
size: 26,
tooltip: '移除',
icon: Icons.clear,
onPressed: () {
setState(() {
@@ -1365,7 +1367,7 @@ class VideoDetailController extends GetxController
)
],
)
: null,
: errorWidget(),
);
},
);