mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-20 18:40:13 +08:00
tweaks (#2426)
* opt: danmaku weight
* opt: cache clean
* opt: level img
* opt: play icon
* opt: svg big-vip
* opt: webview ua
* opt: simple dialog
* feat: export vtt
* tweak
* opt: mapIndexed
* feat: more subtitle
* refa: settings page
* feat: codec list options
* drawPath
Signed-off-by: dom <githubaccount56556@proton.me>
* custom dialog option
Signed-off-by: dom <githubaccount56556@proton.me>
* update
Signed-off-by: dom <githubaccount56556@proton.me>
* Revert "drawPath"
This reverts commit e8a4b19f0f.
* opt: _initStreamIndex
* fix: avoid gap
* fix: scale [skip ci]
* fix: hide repost menu not login
* tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
---------
Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
3dee6a85e5
commit
9d94c72e95
@@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
import 'dart:math' show max;
|
||||
|
||||
import 'package:PiliPlus/common/widgets/dialog/simple_dialog_option.dart';
|
||||
import 'package:PiliPlus/http/constants.dart';
|
||||
import 'package:PiliPlus/http/fav.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
@@ -123,59 +124,42 @@ class PgcIntroController extends CommonIntroController {
|
||||
'${HttpString.baseUrl}/bangumi/play/ep$epId${videoDetailCtr.playedTimePos}';
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (_) => AlertDialog(
|
||||
builder: (_) => SimpleDialog(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 12),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'复制链接',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
onTap: () {
|
||||
children: [
|
||||
DialogOption(
|
||||
child: const Text('复制链接', style: TextStyle(fontSize: 14)),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
Utils.copyText(videoUrl);
|
||||
},
|
||||
),
|
||||
DialogOption(
|
||||
child: const Text('其它app打开', style: TextStyle(fontSize: 14)),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
PageUtils.launchURL(videoUrl);
|
||||
},
|
||||
),
|
||||
if (PlatformUtils.isMobile)
|
||||
DialogOption(
|
||||
child: const Text('分享视频', style: TextStyle(fontSize: 14)),
|
||||
onPressed: () {
|
||||
final item = pgcItem.episodes?.firstWhereOrNull(
|
||||
(item) => item.epId == epId,
|
||||
);
|
||||
Get.back();
|
||||
Utils.copyText(videoUrl);
|
||||
ShareUtils.shareText(
|
||||
'${pgcItem.title}${item != null ? ' ${item.showTitle}' : ''}'
|
||||
' - $videoUrl',
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'其它app打开',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
onTap: () {
|
||||
Get.back();
|
||||
PageUtils.launchURL(videoUrl);
|
||||
},
|
||||
),
|
||||
if (PlatformUtils.isMobile)
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'分享视频',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
onTap: () {
|
||||
final item = pgcItem.episodes?.firstWhereOrNull(
|
||||
(item) => item.epId == epId,
|
||||
);
|
||||
Get.back();
|
||||
ShareUtils.shareText(
|
||||
'${pgcItem.title}${item != null ? ' ${item.showTitle}' : ''}'
|
||||
' - $videoUrl',
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'分享至动态',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
onTap: () {
|
||||
if (isLogin)
|
||||
DialogOption(
|
||||
child: const Text('分享至动态', style: TextStyle(fontSize: 14)),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
final item = pgcItem.episodes?.firstWhereOrNull(
|
||||
(item) => item.epId == epId,
|
||||
@@ -186,15 +170,15 @@ class PgcIntroController extends CommonIntroController {
|
||||
useSafeArea: true,
|
||||
builder: (context) => RepostPanel(
|
||||
rid: epId,
|
||||
/**
|
||||
* 1:番剧 // 4097
|
||||
2:电影 // 4098
|
||||
3:纪录片 // 4101
|
||||
4:国创 // 4100
|
||||
5:电视剧 // 4099
|
||||
6:漫画
|
||||
7:综艺 // 4099
|
||||
*/
|
||||
/*
|
||||
1:番剧 // 4097
|
||||
2:电影 // 4098
|
||||
3:纪录片 // 4101
|
||||
4:国创 // 4100
|
||||
5:电视剧 // 4099
|
||||
6:漫画
|
||||
7:综艺 // 4099
|
||||
*/
|
||||
dynType: switch (pgcItem.type) {
|
||||
1 => 4097,
|
||||
2 => 4098,
|
||||
@@ -211,16 +195,16 @@ class PgcIntroController extends CommonIntroController {
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text(
|
||||
if (isLogin)
|
||||
DialogOption(
|
||||
child: const Text(
|
||||
'分享至消息',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
onTap: () {
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
try {
|
||||
EpisodeItem item = pgcItem.episodes!.firstWhere(
|
||||
final item = pgcItem.episodes!.firstWhere(
|
||||
(item) => item.epId == epId,
|
||||
);
|
||||
final title =
|
||||
@@ -252,8 +236,7 @@ class PgcIntroController extends CommonIntroController {
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class PgcPanel extends StatefulWidget {
|
||||
@@ -213,11 +214,10 @@ class _PgcPanelState extends State<PgcPanel> {
|
||||
if (item.badge?.isNotEmpty == true) ...[
|
||||
const SizedBox(width: 2),
|
||||
if (item.badge == '会员')
|
||||
Image.asset(
|
||||
SvgPicture.asset(
|
||||
Assets.vipIcon,
|
||||
height: 16,
|
||||
cacheHeight: 16.cacheSize(context),
|
||||
semanticLabel: "大会员",
|
||||
semanticsLabel: "大会员",
|
||||
)
|
||||
else
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user