mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-11 03:40:08 +08:00
@@ -455,6 +455,7 @@ class _ArticlePageState extends State<ArticlePage>
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => context.imageView(
|
||||
quality: 60,
|
||||
imgList: pics
|
||||
.map(
|
||||
(e) => SourceModel(url: e.url!))
|
||||
@@ -474,6 +475,10 @@ class _ArticlePageState extends State<ArticlePage>
|
||||
: null,
|
||||
imageUrl: Utils.thumbnailImgUrl(
|
||||
pic.url, 60),
|
||||
fadeInDuration: const Duration(
|
||||
milliseconds: 120),
|
||||
fadeOutDuration: const Duration(
|
||||
milliseconds: 120),
|
||||
),
|
||||
),
|
||||
if (pic.isLongPic == true)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/common/skeleton/video_card_h.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||
@@ -71,12 +70,7 @@ class _ArticleListPageState extends State<ArticleListPage> {
|
||||
),
|
||||
Success(:var response) => response?.isNotEmpty == true
|
||||
? SliverGrid(
|
||||
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
||||
mainAxisSpacing: 2,
|
||||
maxCrossAxisExtent: Grid.smallCardWidth * 2,
|
||||
childAspectRatio: StyleString.aspectRatio * 2.6,
|
||||
minHeight: MediaQuery.textScalerOf(context).scale(90),
|
||||
),
|
||||
gridDelegate: Grid.videoCardHDelegate(context),
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
return ArticleListItem(
|
||||
@@ -197,7 +191,8 @@ class _ArticleListPageState extends State<ArticleListPage> {
|
||||
onPressed: () => PageUtils.inAppWebview(
|
||||
'${HttpString.baseUrl}/read/mobile-readlist/rl${_controller.id}'),
|
||||
icon: const Icon(Icons.open_in_browser_outlined, size: 19),
|
||||
)
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_list/article.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -33,65 +34,10 @@ class ArticleListItem extends StatelessWidget {
|
||||
vertical: 5,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
spacing: 10,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
item.title!,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
height: 1.42,
|
||||
letterSpacing: 0.3,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const SizedBox(height: 3),
|
||||
if (item.summary != null)
|
||||
Text(
|
||||
item.summary!,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const Spacer(),
|
||||
Row(
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
value: item.stats?.view ?? 0,
|
||||
goto: 'picture',
|
||||
textColor: theme.colorScheme.outline,
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
StatView(
|
||||
context: context,
|
||||
goto: 'like',
|
||||
value: item.stats?.like ?? 0,
|
||||
textColor: theme.colorScheme.outline,
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
StatView(
|
||||
context: context,
|
||||
goto: 'reply',
|
||||
value: item.stats?.reply ?? 0,
|
||||
textColor: theme.colorScheme.outline,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (item.imageUrls?.isNotEmpty == true) ...[
|
||||
const SizedBox(width: 10),
|
||||
if (item.imageUrls?.isNotEmpty == true)
|
||||
AspectRatio(
|
||||
aspectRatio: StyleString.aspectRatio,
|
||||
child: LayoutBuilder(
|
||||
@@ -104,7 +50,56 @@ class ArticleListItem extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
item.title!,
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
height: 1.42,
|
||||
letterSpacing: 0.3,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const SizedBox(height: 3),
|
||||
if (item.summary != null)
|
||||
Text(
|
||||
item.summary!,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const Spacer(),
|
||||
Row(
|
||||
spacing: 16,
|
||||
children: [
|
||||
StatWidget(
|
||||
value: item.stats?.view,
|
||||
textColor: theme.colorScheme.outline,
|
||||
type: StatType.view,
|
||||
),
|
||||
StatWidget(
|
||||
type: StatType.like,
|
||||
value: item.stats?.like,
|
||||
textColor: theme.colorScheme.outline,
|
||||
),
|
||||
StatWidget(
|
||||
type: StatType.reply,
|
||||
value: item.stats?.reply,
|
||||
textColor: theme.colorScheme.outline,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -42,7 +42,7 @@ Widget livePanelSub(
|
||||
PBadge(
|
||||
text: content.watchedShow?.textLarge,
|
||||
top: 6,
|
||||
right: 70,
|
||||
right: 65,
|
||||
fontSize: 10.5,
|
||||
type: PBadgeType.gray,
|
||||
),
|
||||
|
||||
@@ -14,6 +14,7 @@ import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/http/video.dart';
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/episode_panel_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/episode.dart' as pgc;
|
||||
import 'package:PiliPlus/models_new/video/video_detail/episode.dart' as ugc;
|
||||
import 'package:PiliPlus/models_new/video/video_detail/page.dart';
|
||||
@@ -514,16 +515,14 @@ class _EpisodePanelState extends CommonSlidePageState<EpisodePanel> {
|
||||
Row(
|
||||
spacing: 8,
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
StatWidget(
|
||||
value: view,
|
||||
type: StatType.view,
|
||||
),
|
||||
if (danmaku != null)
|
||||
StatDanMu(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
StatWidget(
|
||||
value: danmaku,
|
||||
type: StatType.danmaku,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_article/item.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -74,35 +75,34 @@ class FavArticleItem extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
// StatView(
|
||||
// context: context,
|
||||
// value: item.stat!.view!,
|
||||
// goto: 'picture',
|
||||
// textColor: theme.colorScheme.outline,
|
||||
// ),
|
||||
// const SizedBox(width: 16),
|
||||
StatView(
|
||||
context: context,
|
||||
goto: 'like',
|
||||
value:
|
||||
item.stat!.like == '' ? 0 : item.stat!.like!,
|
||||
textColor: theme.colorScheme.outline,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 3),
|
||||
Text(
|
||||
'${item.author!.name} · ${item.pubTime}',
|
||||
item.author!.name!,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
height: 1,
|
||||
color: theme.colorScheme.outline,
|
||||
overflow: TextOverflow.clip,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 3),
|
||||
Row(
|
||||
children: [
|
||||
StatWidget(
|
||||
type: StatType.like,
|
||||
value: item.stat!.like,
|
||||
textColor: theme.colorScheme.outline,
|
||||
),
|
||||
Text(
|
||||
' · ${item.pubTime}',
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
height: 1,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -47,56 +47,14 @@ class FavNoteItem extends StatelessWidget {
|
||||
vertical: 5,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
spacing: 10,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
item.title ?? '',
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
height: 1.4,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
item.summary ?? '',
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
height: 1,
|
||||
color: theme.colorScheme.outline,
|
||||
overflow: TextOverflow.clip,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
item.message ?? '',
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
height: 1,
|
||||
color: theme.colorScheme.outline,
|
||||
overflow: TextOverflow.clip,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (item.pic?.isNotEmpty == true) ...[
|
||||
const SizedBox(width: 10),
|
||||
if (item.pic?.isNotEmpty == true)
|
||||
AspectRatio(
|
||||
aspectRatio: StyleString.aspectRatio,
|
||||
child: LayoutBuilder(
|
||||
builder:
|
||||
(BuildContext context, BoxConstraints boxConstraints) {
|
||||
builder: (context, boxConstraints) {
|
||||
return Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
@@ -161,7 +119,42 @@ class FavNoteItem extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
item.title ?? '',
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
height: 1.4,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
item.summary ?? '',
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
height: 1,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
item.message ?? '',
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
height: 1,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -51,7 +51,14 @@ class _FavTopicPageState extends State<FavTopicPage>
|
||||
Widget _buildBody(
|
||||
ThemeData theme, LoadingState<List<FavTopicItem>?> loadingState) {
|
||||
return switch (loadingState) {
|
||||
Loading() => const SliverToBoxAdapter(child: LinearProgressIndicator()),
|
||||
Loading() => const SliverToBoxAdapter(
|
||||
child: SizedBox(
|
||||
height: 125,
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
),
|
||||
),
|
||||
Success(:var response) => response?.isNotEmpty == true
|
||||
? SliverGrid(
|
||||
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
|
||||
@@ -91,7 +91,7 @@ class FavVideoItem extends StatelessWidget {
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
Utils.isPublicFavText(item.attr ?? 0),
|
||||
Utils.isPublicFavText(item.attr),
|
||||
style: TextStyle(
|
||||
fontSize: fontSize,
|
||||
color: color,
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:PiliPlus/models_new/fav/fav_detail/data.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/media.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_video/list.dart';
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
|
||||
import 'package:PiliPlus/pages/fav_sort/view.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
@@ -16,10 +17,10 @@ class FavDetailController
|
||||
extends MultiSelectController<FavDetailData, FavDetailItemModel> {
|
||||
late int mediaId;
|
||||
late String heroTag;
|
||||
Rx<FavVideoItemModel> item = FavVideoItemModel().obs;
|
||||
RxBool isOwner = false.obs;
|
||||
final Rx<FavVideoItemModel> item = FavVideoItemModel().obs;
|
||||
final Rx<bool?> isOwner = Rx<bool?>(null);
|
||||
|
||||
late int mid;
|
||||
final int mid = Accounts.main.mid;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
@@ -28,8 +29,6 @@ class FavDetailController
|
||||
mediaId = int.parse(Get.parameters['mediaId']!);
|
||||
heroTag = Get.parameters['heroTag']!;
|
||||
|
||||
mid = Accounts.main.mid;
|
||||
|
||||
queryData();
|
||||
}
|
||||
|
||||
@@ -159,7 +158,7 @@ class FavDetailController
|
||||
'favTitle': item.value.title,
|
||||
'count': item.value.mediaCount,
|
||||
'desc': true,
|
||||
'isOwner': isOwner.value,
|
||||
'isOwner': isOwner.value ?? false,
|
||||
},
|
||||
);
|
||||
break;
|
||||
@@ -175,6 +174,10 @@ class FavDetailController
|
||||
}
|
||||
|
||||
Future<void> onFav(bool isFav) async {
|
||||
if (mid == 0) {
|
||||
SmartDialog.showToast('账号未登录');
|
||||
return;
|
||||
}
|
||||
var res = isFav
|
||||
? await FavHttp.unfavFavFolder(mediaId)
|
||||
: await FavHttp.favFavFolder(mediaId);
|
||||
@@ -186,4 +189,27 @@ class FavDetailController
|
||||
}
|
||||
SmartDialog.showToast(res['msg']);
|
||||
}
|
||||
|
||||
Future<void> cleanFav() async {
|
||||
var res = await FavHttp.cleanFav(mediaId: mediaId);
|
||||
if (res['status']) {
|
||||
SmartDialog.showToast('清除成功');
|
||||
Future.delayed(const Duration(milliseconds: 200), () {
|
||||
onReload();
|
||||
});
|
||||
} else {
|
||||
SmartDialog.showToast(res['msg']);
|
||||
}
|
||||
}
|
||||
|
||||
void onSort() {
|
||||
if (loadingState.value.isSuccess &&
|
||||
loadingState.value.data?.isNotEmpty == true) {
|
||||
if ((item.value.mediaCount ?? 0) > 1000) {
|
||||
SmartDialog.showToast('内容太多啦!超过1000不支持排序');
|
||||
return;
|
||||
}
|
||||
Get.to(FavSortPage(favDetailController: this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/common/skeleton/video_card_h.dart';
|
||||
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
|
||||
import 'package:PiliPlus/common/widgets/dialog/dialog.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||
@@ -12,7 +13,6 @@ import 'package:PiliPlus/models_new/fav/fav_video/list.dart';
|
||||
import 'package:PiliPlus/pages/dynamics_repost/view.dart';
|
||||
import 'package:PiliPlus/pages/fav_detail/controller.dart';
|
||||
import 'package:PiliPlus/pages/fav_detail/widget/fav_video_card.dart';
|
||||
import 'package:PiliPlus/pages/fav_sort/view.dart';
|
||||
import 'package:PiliPlus/utils/grid.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/request_utils.dart';
|
||||
@@ -130,128 +130,96 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
'mediaId': int.parse(mediaId),
|
||||
'title': _favDetailController.item.value.title,
|
||||
'count': _favDetailController.item.value.mediaCount,
|
||||
'isOwner': _favDetailController.isOwner.value,
|
||||
'isOwner': _favDetailController.isOwner.value ?? false,
|
||||
},
|
||||
),
|
||||
icon: const Icon(Icons.search_outlined),
|
||||
),
|
||||
Obx(
|
||||
() => Utils.isPublicFav(_favDetailController.item.value.attr ?? 0)
|
||||
? IconButton(
|
||||
tooltip: '分享',
|
||||
() => _favDetailController.item.value.attr == null ||
|
||||
!Utils.isPublicFav(_favDetailController.item.value.attr!)
|
||||
? const SizedBox.shrink()
|
||||
: IconButton(
|
||||
iconSize: 22,
|
||||
onPressed: () => Utils.shareText(
|
||||
'https://www.bilibili.com/medialist/detail/ml${_favDetailController.mediaId}'),
|
||||
icon: const Icon(Icons.share),
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() => _favDetailController.isOwner.value
|
||||
? PopupMenuButton(
|
||||
icon: const Icon(Icons.more_vert),
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
onTap: () => Get.toNamed(
|
||||
'/createFav',
|
||||
parameters: {'mediaId': mediaId},
|
||||
)?.then((res) {
|
||||
if (res is FavVideoItemModel) {
|
||||
_favDetailController.item.value = res;
|
||||
}
|
||||
}),
|
||||
child: const Text('编辑信息'),
|
||||
PopupMenuButton(
|
||||
icon: const Icon(Icons.more_vert),
|
||||
itemBuilder: (context) => [
|
||||
if (_favDetailController.isOwner.value == true) ...[
|
||||
PopupMenuItem(
|
||||
onTap: _favDetailController.onSort,
|
||||
child: const Text('排序'),
|
||||
),
|
||||
PopupMenuItem(
|
||||
onTap: () => Get.toNamed(
|
||||
'/createFav',
|
||||
parameters: {'mediaId': mediaId},
|
||||
)?.then((res) {
|
||||
if (res is FavVideoItemModel) {
|
||||
_favDetailController.item.value = res;
|
||||
}
|
||||
}),
|
||||
child: const Text('编辑信息'),
|
||||
),
|
||||
] else
|
||||
PopupMenuItem(
|
||||
onTap: () => _favDetailController
|
||||
.onFav(_favDetailController.item.value.favState == 1),
|
||||
child: Text(
|
||||
'${_favDetailController.item.value.favState == 1 ? '取消' : ''}收藏'),
|
||||
),
|
||||
if (Utils.isPublicFav(_favDetailController.item.value.attr ?? 0))
|
||||
PopupMenuItem(
|
||||
onTap: () => showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
useSafeArea: true,
|
||||
builder: (context) => RepostPanel(
|
||||
rid: _favDetailController.mediaId,
|
||||
dynType: 4300,
|
||||
pic: _favDetailController.item.value.cover,
|
||||
title: _favDetailController.item.value.title,
|
||||
uname: _favDetailController.item.value.upper?.name,
|
||||
),
|
||||
),
|
||||
child: const Text('分享至动态'),
|
||||
),
|
||||
if (_favDetailController.isOwner.value == true) ...<PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: _favDetailController.cleanFav,
|
||||
child: const Text('清除失效内容'),
|
||||
),
|
||||
if (!Utils.isDefaultFav(
|
||||
_favDetailController.item.value.attr)) ...[
|
||||
const PopupMenuDivider(height: 12),
|
||||
PopupMenuItem(
|
||||
onTap: () => showConfirmDialog(
|
||||
context: context,
|
||||
title: '确定删除该收藏夹?',
|
||||
onConfirm: () =>
|
||||
FavHttp.deleteFolder(mediaIds: [mediaId]).then((data) {
|
||||
if (data['status']) {
|
||||
SmartDialog.showToast('删除成功');
|
||||
Get.back(result: true);
|
||||
} else {
|
||||
SmartDialog.showToast(data['msg']);
|
||||
}
|
||||
}),
|
||||
),
|
||||
child: Text(
|
||||
'删除',
|
||||
style: TextStyle(
|
||||
color: theme.colorScheme.error,
|
||||
),
|
||||
if (Utils.isPublicFav(
|
||||
_favDetailController.item.value.attr ?? 0))
|
||||
PopupMenuItem(
|
||||
onTap: () => showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
useSafeArea: true,
|
||||
builder: (context) => RepostPanel(
|
||||
rid: _favDetailController.mediaId,
|
||||
dynType: 4300,
|
||||
pic: _favDetailController.item.value.cover,
|
||||
title: _favDetailController.item.value.title,
|
||||
uname: _favDetailController.item.value.upper?.name,
|
||||
),
|
||||
),
|
||||
child: const Text('分享至动态'),
|
||||
),
|
||||
PopupMenuItem(
|
||||
onTap: () =>
|
||||
FavHttp.cleanFav(mediaId: mediaId).then((data) {
|
||||
if (data['status']) {
|
||||
SmartDialog.showToast('清除成功');
|
||||
Future.delayed(const Duration(milliseconds: 200), () {
|
||||
_favDetailController.onReload();
|
||||
});
|
||||
} else {
|
||||
SmartDialog.showToast(data['msg']);
|
||||
}
|
||||
}),
|
||||
child: const Text('清除失效内容'),
|
||||
),
|
||||
PopupMenuItem(
|
||||
onTap: () {
|
||||
if (_favDetailController.loadingState.value.isSuccess &&
|
||||
_favDetailController
|
||||
.loadingState.value.data?.isNotEmpty ==
|
||||
true) {
|
||||
if ((_favDetailController.item.value.mediaCount ??
|
||||
0) >
|
||||
1000) {
|
||||
SmartDialog.showToast('内容太多啦!超过1000不支持排序');
|
||||
return;
|
||||
}
|
||||
Get.to(
|
||||
FavSortPage(
|
||||
favDetailController: _favDetailController),
|
||||
);
|
||||
}
|
||||
},
|
||||
child: const Text('排序'),
|
||||
),
|
||||
if (!Utils.isDefaultFav(
|
||||
_favDetailController.item.value.attr ?? 0))
|
||||
PopupMenuItem(
|
||||
onTap: () => showConfirmDialog(
|
||||
context: context,
|
||||
title: '确定删除该收藏夹?',
|
||||
onConfirm: () =>
|
||||
FavHttp.deleteFolder(mediaIds: [mediaId])
|
||||
.then((data) {
|
||||
if (data['status']) {
|
||||
SmartDialog.showToast('删除成功');
|
||||
Get.back(result: true);
|
||||
} else {
|
||||
SmartDialog.showToast(data['msg']);
|
||||
}
|
||||
}),
|
||||
),
|
||||
child: Text(
|
||||
'删除',
|
||||
style: TextStyle(
|
||||
color: theme.colorScheme.error,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: _favDetailController.mid != 0
|
||||
? Builder(
|
||||
builder: (context) {
|
||||
bool isFav =
|
||||
_favDetailController.item.value.favState == 1;
|
||||
return IconButton(
|
||||
onPressed: () => _favDetailController.onFav(isFav),
|
||||
icon: isFav
|
||||
? const Icon(Icons.favorite)
|
||||
: const Icon(Icons.favorite_border),
|
||||
);
|
||||
},
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
],
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
];
|
||||
@@ -312,7 +280,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
style: TextStyle(color: theme.colorScheme.error),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const SizedBox(width: 10),
|
||||
];
|
||||
|
||||
Widget _flexibleSpace(ThemeData theme) {
|
||||
@@ -336,13 +304,41 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
spacing: 12,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Hero(
|
||||
tag: _favDetailController.heroTag,
|
||||
child: NetworkImgLayer(
|
||||
width: 176,
|
||||
height: 110,
|
||||
src: item.cover,
|
||||
),
|
||||
Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Hero(
|
||||
tag: _favDetailController.heroTag,
|
||||
child: NetworkImgLayer(
|
||||
width: 176,
|
||||
height: 110,
|
||||
src: item.cover,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 6,
|
||||
top: 6,
|
||||
child: Obx(() {
|
||||
if (_favDetailController.isOwner.value != false) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
bool isFav =
|
||||
_favDetailController.item.value.favState == 1;
|
||||
return iconButton(
|
||||
context: context,
|
||||
size: 28,
|
||||
iconSize: 18,
|
||||
tooltip: '${isFav ? '取消' : ''}收藏',
|
||||
onPressed: () => _favDetailController.onFav(isFav),
|
||||
icon: isFav ? Icons.favorite : Icons.favorite_border,
|
||||
bgColor:
|
||||
isFav ? null : theme.colorScheme.onInverseSurface,
|
||||
iconColor:
|
||||
isFav ? null : theme.colorScheme.onSurfaceVariant,
|
||||
);
|
||||
}),
|
||||
)
|
||||
],
|
||||
),
|
||||
if (item.title != null)
|
||||
Expanded(
|
||||
@@ -379,7 +375,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
'共${item.mediaCount}条视频 · ${Utils.isPublicFavText(item.attr ?? 0)}',
|
||||
'共${item.mediaCount}条视频 · ${Utils.isPublicFavText(item.attr)}',
|
||||
textAlign: TextAlign.end,
|
||||
style: style,
|
||||
),
|
||||
@@ -439,7 +435,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
Positioned.fill(
|
||||
child: FavVideoCardH(
|
||||
item: item,
|
||||
onDelFav: _favDetailController.isOwner.value
|
||||
onDelFav: _favDetailController.isOwner.value == true
|
||||
? () => _favDetailController.onCancelFav(
|
||||
index,
|
||||
item.id!,
|
||||
@@ -459,22 +455,24 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
_favDetailController.item.value.mediaCount,
|
||||
'desc': true,
|
||||
'isContinuePlaying': index != 0,
|
||||
'isOwner': _favDetailController.isOwner.value,
|
||||
'isOwner':
|
||||
_favDetailController.isOwner.value ?? false,
|
||||
},
|
||||
),
|
||||
onTap: _favDetailController.enableMultiSelect.value
|
||||
? () => _favDetailController.onSelect(index)
|
||||
: null,
|
||||
onLongPress: _favDetailController.isOwner.value
|
||||
? () {
|
||||
if (!_favDetailController
|
||||
.enableMultiSelect.value) {
|
||||
_favDetailController
|
||||
.enableMultiSelect.value = true;
|
||||
_favDetailController.onSelect(index);
|
||||
}
|
||||
}
|
||||
: null,
|
||||
onLongPress:
|
||||
_favDetailController.isOwner.value == true
|
||||
? () {
|
||||
if (!_favDetailController
|
||||
.enableMultiSelect.value) {
|
||||
_favDetailController
|
||||
.enableMultiSelect.value = true;
|
||||
_favDetailController.onSelect(index);
|
||||
}
|
||||
}
|
||||
: null,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/media.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
@@ -153,15 +154,13 @@ class FavVideoCardH extends StatelessWidget {
|
||||
Row(
|
||||
spacing: 8,
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(item.cntInfo?.play),
|
||||
StatWidget(
|
||||
type: StatType.play,
|
||||
value: item.cntInfo?.play,
|
||||
),
|
||||
StatDanMu(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(item.cntInfo?.danmaku),
|
||||
StatWidget(
|
||||
type: StatType.danmaku,
|
||||
value: item.cntInfo?.danmaku,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_video/list.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_video/data.dart';
|
||||
import 'package:PiliPlus/utils/feed_back.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -43,11 +43,10 @@ class _FavPanelState extends State<FavPanel> {
|
||||
title: const Text('添加到收藏夹'),
|
||||
actions: [
|
||||
TextButton.icon(
|
||||
onPressed: () =>
|
||||
Get.toNamed<FavVideoItemModel>('/createFav')?.then((data) {
|
||||
onPressed: () => Get.toNamed('/createFav')?.then((data) {
|
||||
if (data != null) {
|
||||
widget.ctr?.favFolderData
|
||||
..value.data?.list?.insert(1, data)
|
||||
(widget.ctr?.favFolderData as Rx<FavVideoData>)
|
||||
..value.list?.insert(1, data)
|
||||
..refresh();
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -142,8 +142,11 @@ class HistoryItem extends StatelessWidget {
|
||||
text: item.badge,
|
||||
top: 6.0,
|
||||
right: 6.0,
|
||||
bottom: null,
|
||||
left: null,
|
||||
type: item.history.business ==
|
||||
HistoryBusinessType.live.type &&
|
||||
item.liveStatus != 1
|
||||
? PBadgeType.gray
|
||||
: PBadgeType.primary,
|
||||
),
|
||||
if (item.duration != null &&
|
||||
item.duration != 0 &&
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:PiliPlus/common/widgets/progress_bar/video_progress_indicator.da
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/http/search.dart';
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models/search/result.dart';
|
||||
import 'package:PiliPlus/models_new/later/list.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
@@ -174,10 +175,9 @@ class VideoCardHLater extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const Spacer(),
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(videoItem.stat?.view),
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
value: videoItem.stat?.view,
|
||||
),
|
||||
] else ...[
|
||||
Expanded(
|
||||
@@ -206,15 +206,13 @@ class VideoCardHLater extends StatelessWidget {
|
||||
Row(
|
||||
spacing: 8,
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(videoItem.stat?.view),
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
value: videoItem.stat?.view,
|
||||
),
|
||||
StatDanMu(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(videoItem.stat?.danmaku),
|
||||
StatWidget(
|
||||
type: StatType.danmaku,
|
||||
value: videoItem.stat?.danmaku,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
|
||||
import 'package:PiliPlus/common/widgets/dialog/dialog.dart';
|
||||
import 'package:PiliPlus/models_new/later/data.dart';
|
||||
import 'package:PiliPlus/models_new/later/list.dart';
|
||||
import 'package:PiliPlus/pages/common/common_search_page.dart';
|
||||
@@ -64,10 +65,15 @@ class _LaterSearchPageState
|
||||
child: iconButton(
|
||||
tooltip: '移除',
|
||||
context: context,
|
||||
onPressed: () => controller.toViewDel(
|
||||
context,
|
||||
index,
|
||||
item.aid,
|
||||
onPressed: () => showConfirmDialog(
|
||||
context: context,
|
||||
title: '提示',
|
||||
content: '即将移除该视频,确定是否移除',
|
||||
onConfirm: () => controller.toViewDel(
|
||||
context,
|
||||
index,
|
||||
item.aid,
|
||||
),
|
||||
),
|
||||
icon: Icons.clear,
|
||||
iconColor: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
|
||||
@@ -76,7 +76,7 @@ class FavFolderItem extends StatelessWidget {
|
||||
maxLines: 1,
|
||||
),
|
||||
Text(
|
||||
' 共${item.mediaCount}条视频 · ${Utils.isPublicFavText(item.attr ?? 0)}',
|
||||
' 共${item.mediaCount}条视频 · ${Utils.isPublicFavText(item.attr)}',
|
||||
style: theme.textTheme.labelSmall!
|
||||
.copyWith(color: theme.colorScheme.outline),
|
||||
)
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_article/item.dart';
|
||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -81,18 +82,16 @@ class MemberArticleItem extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 3),
|
||||
Row(
|
||||
spacing: 16,
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
value: item.stats?.view ?? 0,
|
||||
goto: 'picture',
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
value: item.stats?.view,
|
||||
textColor: outline,
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
StatView(
|
||||
context: context,
|
||||
goto: 'reply',
|
||||
value: item.stats?.reply ?? 0,
|
||||
StatWidget(
|
||||
type: StatType.play,
|
||||
value: item.stats?.reply,
|
||||
textColor: outline,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/http/search.dart';
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models/member/coin.dart';
|
||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
@@ -91,16 +92,14 @@ class MemberCoinsItem extends StatelessWidget {
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
value: coinItem.stat.viewStr,
|
||||
theme: 'gray',
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
value: coinItem.stat.view,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
StatDanMu(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: coinItem.stat.danmuStr,
|
||||
StatWidget(
|
||||
type: StatType.danmaku,
|
||||
value: coinItem.stat.danmu,
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
|
||||
@@ -128,7 +128,7 @@ class MemberFavItem extends StatelessWidget {
|
||||
const Spacer(),
|
||||
Text(
|
||||
item.type == 0
|
||||
? '${item.mediaCount}个内容 · ${Utils.isPublicFavText(item.attr ?? 0)}'
|
||||
? '${item.mediaCount}个内容 · ${Utils.isPublicFavText(item.attr)}'
|
||||
: item.type == 11
|
||||
? '${item.mediaCount}个内容 · ${item.upper?.name}'
|
||||
: item.type == 21
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/common/image_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_opus/item.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -57,10 +58,9 @@ class SpaceOpusItem extends StatelessWidget {
|
||||
colors: [Colors.transparent, Colors.black54],
|
||||
),
|
||||
),
|
||||
child: StatView(
|
||||
context: context,
|
||||
value: item.stat?.like ?? 0,
|
||||
goto: 'like',
|
||||
child: StatWidget(
|
||||
type: StatType.like,
|
||||
value: item.stat?.like,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -79,10 +79,9 @@ class SpaceOpusItem extends StatelessWidget {
|
||||
if (!hasPic)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8, bottom: 8, right: 8),
|
||||
child: StatView(
|
||||
context: context,
|
||||
value: item.stat?.like ?? 0,
|
||||
goto: 'like',
|
||||
child: StatWidget(
|
||||
type: StatType.like,
|
||||
value: item.stat?.like,
|
||||
textColor: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:PiliPlus/common/widgets/progress_bar/video_progress_indicator.da
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/common/widgets/video_popup_menu.dart';
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/item.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
@@ -223,15 +224,13 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
||||
Row(
|
||||
spacing: 8,
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: videoItem.stat.viewStr,
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
value: videoItem.stat.view,
|
||||
),
|
||||
StatDanMu(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: videoItem.stat.danmuStr,
|
||||
StatWidget(
|
||||
type: StatType.danmaku,
|
||||
value: videoItem.stat.danmu,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_rank/pgc_rank_item_model.dart';
|
||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -69,17 +70,14 @@ class PgcRankItem extends StatelessWidget {
|
||||
],
|
||||
Row(
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: item.stat!.view!,
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
value: item.stat!.view,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
goto: 'follow',
|
||||
value: item.stat!.follow!,
|
||||
StatWidget(
|
||||
type: StatType.follow,
|
||||
value: item.stat!.follow,
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/http/search.dart';
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/search_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/sub/sub_detail/media.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
@@ -111,15 +112,13 @@ class SubVideoCardH extends StatelessWidget {
|
||||
Row(
|
||||
spacing: 8,
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(videoItem.cntInfo?.play),
|
||||
StatWidget(
|
||||
type: StatType.play,
|
||||
value: videoItem.cntInfo?.play,
|
||||
),
|
||||
StatDanMu(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(videoItem.cntInfo?.danmaku),
|
||||
StatWidget(
|
||||
type: StatType.danmaku,
|
||||
value: videoItem.cntInfo?.danmaku,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:PiliPlus/common/widgets/dialog/dialog.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/common/image_preview_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/result.dart';
|
||||
import 'package:PiliPlus/pages/video/controller.dart';
|
||||
import 'package:PiliPlus/pages/video/introduction/pgc/controller.dart';
|
||||
@@ -202,15 +203,13 @@ class _PgcIntroPageState extends State<PgcIntroPage>
|
||||
Row(
|
||||
spacing: 6,
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(item.stat!.views),
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
value: item.stat!.views,
|
||||
),
|
||||
StatDanMu(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(item.stat!.danmakus),
|
||||
StatWidget(
|
||||
type: StatType.danmaku,
|
||||
value: item.stat!.danmakus,
|
||||
),
|
||||
if (isLandscape) ...[
|
||||
areasAndPubTime(theme, item),
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:PiliPlus/common/widgets/keep_alive_wrapper.dart';
|
||||
import 'package:PiliPlus/common/widgets/page/tabs.dart';
|
||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/result.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_tag/data.dart';
|
||||
import 'package:PiliPlus/pages/common/common_collapse_slide_page.dart';
|
||||
@@ -108,15 +109,13 @@ class _IntroDetailState extends CommonCollapseSlidePageState<PgcIntroPanel> {
|
||||
Row(
|
||||
spacing: 6,
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(widget.item.stat!.views),
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
value: widget.item.stat!.views,
|
||||
),
|
||||
StatDanMu(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(widget.item.stat!.danmakus),
|
||||
StatWidget(
|
||||
type: StatType.danmaku,
|
||||
value: widget.item.stat!.danmakus,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -118,7 +118,7 @@ class _PgcPanelState extends State<PgcPanel> {
|
||||
),
|
||||
child: Text(
|
||||
widget.newEp?.desc?.contains('连载') == true
|
||||
? '连载中,更新至${Utils.isStringNumeric(widget.newEp!.title) ? '第${widget.newEp!.title}话' : '${widget.newEp!.title}'}'
|
||||
? '连载中,更新至${Utils.isStringNumeric(widget.newEp!.title!) ? '第${widget.newEp!.title}话' : '${widget.newEp!.title}'}'
|
||||
: widget.newEp?.desc ?? '',
|
||||
style: const TextStyle(fontSize: 13),
|
||||
),
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:PiliPlus/common/widgets/pendant_avatar.dart';
|
||||
import 'package:PiliPlus/common/widgets/self_sized_horizontal_list.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/common/image_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_detail/data.dart';
|
||||
import 'package:PiliPlus/pages/mine/controller.dart';
|
||||
import 'package:PiliPlus/pages/search/widgets/search_text.dart';
|
||||
@@ -553,20 +554,18 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
Row(
|
||||
spacing: 10,
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(!widget.isLoading
|
||||
? videoDetail.stat?.view ?? '-'
|
||||
: videoItem['stat']?.view ?? '-'),
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
value: !widget.isLoading
|
||||
? videoDetail.stat?.view
|
||||
: videoItem['stat']?.view,
|
||||
textColor: theme.colorScheme.outline,
|
||||
),
|
||||
StatDanMu(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(!widget.isLoading
|
||||
? videoDetail.stat?.danmaku ?? '-'
|
||||
: videoItem['stat']?.danmu ?? '-'),
|
||||
StatWidget(
|
||||
type: StatType.danmaku,
|
||||
value: !widget.isLoading
|
||||
? videoDetail.stat?.danmaku
|
||||
: videoItem['stat']?.danmu,
|
||||
textColor: theme.colorScheme.outline,
|
||||
),
|
||||
Text(
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/http/search.dart';
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/media_list/media_list.dart';
|
||||
import 'package:PiliPlus/pages/common/common_collapse_slide_page.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
@@ -264,17 +265,13 @@ class _MediaListPanelState
|
||||
Row(
|
||||
spacing: 8,
|
||||
children: [
|
||||
StatView(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(
|
||||
item.cntInfo!.play!),
|
||||
StatWidget(
|
||||
type: StatType.play,
|
||||
value: item.cntInfo!.play,
|
||||
),
|
||||
StatDanMu(
|
||||
context: context,
|
||||
theme: 'gray',
|
||||
value: Utils.numFormat(
|
||||
item.cntInfo!.danmaku!),
|
||||
StatWidget(
|
||||
type: StatType.danmaku,
|
||||
value: item.cntInfo!.danmaku,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user