mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-29 22:00:16 +08:00
mod: handle http2https
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPalaX/common/widgets/image_save.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -72,7 +73,17 @@ class FavVideoCardH extends StatelessWidget {
|
||||
epId != null ? SearchType.media_bangumi : SearchType.video,
|
||||
});
|
||||
},
|
||||
onLongPress: onLongPress,
|
||||
onLongPress: () {
|
||||
if (onLongPress != null) {
|
||||
onLongPress!();
|
||||
} else {
|
||||
imageSaveDialog(
|
||||
context: context,
|
||||
title: videoItem.title,
|
||||
cover: videoItem.pic,
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: StyleString.safeSpace,
|
||||
|
||||
@@ -84,12 +84,14 @@ class _FavSearchPageState extends State<FavSearchPage> {
|
||||
return FavVideoCardH(
|
||||
videoItem: loadingState.response[index],
|
||||
searchType: _favSearchCtr.type,
|
||||
callFn: () => _favSearchCtr.type != 1
|
||||
? _favSearchCtr.onCancelFav(
|
||||
loadingState.response[index].id!,
|
||||
loadingState.response[index].type,
|
||||
)
|
||||
: {},
|
||||
callFn: _favSearchCtr.type != 1
|
||||
? () {
|
||||
_favSearchCtr.onCancelFav(
|
||||
loadingState.response[index].id!,
|
||||
loadingState.response[index].type,
|
||||
);
|
||||
}
|
||||
: null,
|
||||
);
|
||||
},
|
||||
childCount: loadingState.response.length,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPalaX/common/widgets/image_save.dart';
|
||||
import 'package:PiliPalaX/pages/common/multi_select_controller.dart';
|
||||
import 'package:PiliPalaX/pages/fav_search/controller.dart';
|
||||
import 'package:PiliPalaX/utils/app_scheme.dart';
|
||||
@@ -152,6 +153,11 @@ class HistoryItem extends StatelessWidget {
|
||||
},
|
||||
onLongPress: () {
|
||||
if (ctr is FavSearchController) {
|
||||
imageSaveDialog(
|
||||
context: context,
|
||||
title: videoItem.title,
|
||||
cover: videoItem.cover,
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (!ctr!.enableMultiSelect.value) {
|
||||
|
||||
@@ -3,7 +3,6 @@ import 'dart:async';
|
||||
import 'package:PiliPalaX/http/loading_state.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:PiliPalaX/common/widgets/network_img_layer.dart';
|
||||
import 'package:PiliPalaX/models/user/fav_folder.dart';
|
||||
|
||||
@@ -110,7 +110,8 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
||||
padding: const EdgeInsets.symmetric(vertical: 5),
|
||||
child: ClipOval(
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: loadingState.response['face'],
|
||||
imageUrl:
|
||||
(loadingState.response['face'] as String).http2https,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -78,7 +78,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: imgUrl ?? '',
|
||||
imageUrl: imgUrl?.http2https ?? '',
|
||||
width: double.infinity,
|
||||
height: 135,
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
@@ -128,14 +128,14 @@ class UserInfoCard extends StatelessWidget {
|
||||
if (card.vip?.vipStatus == 1) ...[
|
||||
const SizedBox(width: 8),
|
||||
Image.network(
|
||||
card.vip!.label!.image!,
|
||||
card.vip!.label!.image!.http2https,
|
||||
height: 20,
|
||||
),
|
||||
],
|
||||
if (card.nameplate?.image?.isNotEmpty == true) ...[
|
||||
const SizedBox(width: 8),
|
||||
Image.network(
|
||||
card.nameplate!.image!,
|
||||
card.nameplate!.image!.http2https,
|
||||
height: 20,
|
||||
),
|
||||
],
|
||||
@@ -191,7 +191,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
child: CachedNetworkImage(
|
||||
width: 18,
|
||||
height: 18,
|
||||
imageUrl: card.officialVerify!.icon!,
|
||||
imageUrl: card.officialVerify!.icon!.http2https,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:PiliPalaX/http/member.dart';
|
||||
import 'package:PiliPalaX/utils/extension.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -434,8 +433,9 @@ class _MemberPageState extends State<MemberPage>
|
||||
.memberInfo.value.vip?.label?['img_label_uri_hans'] !=
|
||||
'')
|
||||
CachedNetworkImage(
|
||||
imageUrl: _memberController
|
||||
.memberInfo.value.vip!.label!['img_label_uri_hans'],
|
||||
imageUrl: (_memberController.memberInfo.value.vip!
|
||||
.label!['img_label_uri_hans'] as String)
|
||||
.http2https,
|
||||
height: 20,
|
||||
// semanticLabel:
|
||||
// _memberController.memberInfo.value.vip!.label!['text'],
|
||||
@@ -444,8 +444,9 @@ class _MemberPageState extends State<MemberPage>
|
||||
?.label?['img_label_uri_hans_static'] !=
|
||||
'')
|
||||
CachedNetworkImage(
|
||||
imageUrl: _memberController.memberInfo.value.vip!
|
||||
.label!['img_label_uri_hans_static'],
|
||||
imageUrl: (_memberController.memberInfo.value.vip!
|
||||
.label!['img_label_uri_hans_static'] as String)
|
||||
.http2https,
|
||||
height: 20,
|
||||
// semanticLabel:
|
||||
// _memberController.memberInfo.value.vip!.label!['text'],
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:PiliPalaX/http/loading_state.dart';
|
||||
import 'package:PiliPalaX/utils/utils.dart';
|
||||
import 'package:expandable/expandable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_navigation/src/dialog/dialog_route.dart';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:PiliPalaX/common/widgets/http_error.dart';
|
||||
import 'package:PiliPalaX/http/msg.dart';
|
||||
import 'package:PiliPalaX/http/user.dart';
|
||||
import 'package:PiliPalaX/utils/extension.dart';
|
||||
import 'package:PiliPalaX/utils/utils.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:easy_debounce/easy_throttle.dart';
|
||||
@@ -235,7 +236,7 @@ class _CreateFavPageState extends State<CreateFavPage> {
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: _cover!,
|
||||
imageUrl: _cover!.http2https,
|
||||
height: constraints.maxHeight,
|
||||
width: constraints.maxHeight * 16 / 9,
|
||||
fit: BoxFit.cover,
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:PiliPalaX/utils/extension.dart';
|
||||
import 'package:PiliPalaX/utils/global_data.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:PiliPalaX/common/widgets/badge.dart';
|
||||
@@ -761,7 +760,8 @@ class ReplyItem extends StatelessWidget {
|
||||
if (content.jumpUrl[matchStr]?['prefix_icon'] != null) ...[
|
||||
WidgetSpan(
|
||||
child: Image.network(
|
||||
content.jumpUrl[matchStr]['prefix_icon'],
|
||||
(content.jumpUrl[matchStr]['prefix_icon'] as String)
|
||||
.http2https,
|
||||
height: 19,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
@@ -907,7 +907,8 @@ class ReplyItem extends StatelessWidget {
|
||||
if (content.jumpUrl[patternStr]?['prefix_icon'] != null) ...[
|
||||
WidgetSpan(
|
||||
child: Image.network(
|
||||
content.jumpUrl[patternStr]['prefix_icon'],
|
||||
(content.jumpUrl[patternStr]['prefix_icon'] as String)
|
||||
.http2https,
|
||||
height: 19,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
|
||||
@@ -9,7 +9,6 @@ import 'package:PiliPalaX/utils/extension.dart';
|
||||
import 'package:PiliPalaX/utils/global_data.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:PiliPalaX/common/widgets/network_img_layer.dart';
|
||||
@@ -788,7 +787,7 @@ class ReplyItemGrpc extends StatelessWidget {
|
||||
if (content.url[matchStr]?.hasPrefixIcon() == true) ...[
|
||||
WidgetSpan(
|
||||
child: Image.network(
|
||||
content.url[matchStr]!.prefixIcon,
|
||||
content.url[matchStr]!.prefixIcon.http2https,
|
||||
height: 19,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
@@ -948,7 +947,7 @@ class ReplyItemGrpc extends StatelessWidget {
|
||||
if (content.url[patternStr]?.hasPrefixIcon() == true) ...[
|
||||
WidgetSpan(
|
||||
child: Image.network(
|
||||
content.url[patternStr]!.prefixIcon,
|
||||
content.url[patternStr]!.prefixIcon.http2https,
|
||||
height: 19,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user