mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-24 20:35:50 +08:00
opt share video link (#1835)
* feat: share video with current time position preference * simplify --------- Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
|
||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
||||
import 'package:PiliPlus/http/api.dart';
|
||||
import 'package:PiliPlus/http/constants.dart';
|
||||
@@ -299,8 +300,8 @@ class UgcIntroController extends CommonIntroController with ReloadMixin {
|
||||
@override
|
||||
void actionShareVideo(BuildContext context) {
|
||||
final videoDetail = this.videoDetail.value;
|
||||
String videoUrl =
|
||||
'${HttpString.baseUrl}/video/$bvid${videoDetailCtr.playedTimePos}';
|
||||
final playedTimePos = videoDetailCtr.playedTimePos;
|
||||
String videoUrl = '${HttpString.baseUrl}/video/$bvid';
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (_) => AlertDialog(
|
||||
@@ -319,6 +320,16 @@ class UgcIntroController extends CommonIntroController with ReloadMixin {
|
||||
Get.back();
|
||||
Utils.copyText(videoUrl);
|
||||
},
|
||||
trailing: playedTimePos.isNotEmpty
|
||||
? iconButton(
|
||||
tooltip: '精确分享',
|
||||
icon: const Icon(Icons.timer_outlined),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
Utils.copyText('$videoUrl$playedTimePos');
|
||||
},
|
||||
)
|
||||
: null,
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
|
||||
Reference in New Issue
Block a user