mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-19 19:01:24 +08:00
@@ -43,7 +43,7 @@ class BlackListController
|
|||||||
..value.data!.removeAt(index)
|
..value.data!.removeAt(index)
|
||||||
..refresh();
|
..refresh();
|
||||||
total.value -= 1;
|
total.value -= 1;
|
||||||
SmartDialog.showToast('操作成功');
|
SmartDialog.showToast('移除成功');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ mixin FavMixin on TripleMixin {
|
|||||||
if (result.isSuccess) {
|
if (result.isSuccess) {
|
||||||
updateFavCount(hasFav ? -1 : 1);
|
updateFavCount(hasFav ? -1 : 1);
|
||||||
this.hasFav.value = !hasFav;
|
this.hasFav.value = !hasFav;
|
||||||
SmartDialog.showToast('✅ 快速收藏/取消收藏成功');
|
SmartDialog.showToast('${hasFav ? '取消' : ''}收藏成功');
|
||||||
} else {
|
} else {
|
||||||
res.toast();
|
res.toast();
|
||||||
}
|
}
|
||||||
@@ -283,7 +283,7 @@ mixin FavMixin on TripleMixin {
|
|||||||
updateFavCount(newVal ? 1 : -1);
|
updateFavCount(newVal ? 1 : -1);
|
||||||
hasFav.value = newVal;
|
hasFav.value = newVal;
|
||||||
}
|
}
|
||||||
SmartDialog.showToast('操作成功');
|
SmartDialog.showToast('${newVal ? '' : '取消'}收藏成功');
|
||||||
} else {
|
} else {
|
||||||
result.toast();
|
result.toast();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ abstract class CommonWhisperController<R>
|
|||||||
if (res.isSuccess) {
|
if (res.isSuccess) {
|
||||||
item.isMuted = !isMuted;
|
item.isMuted = !isMuted;
|
||||||
loadingState.refresh();
|
loadingState.refresh();
|
||||||
SmartDialog.showToast('操作成功');
|
SmartDialog.showToast('设置成功');
|
||||||
} else {
|
} else {
|
||||||
res.toast();
|
res.toast();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class _GroupPanelState extends State<GroupPanel> {
|
|||||||
tags.isEmpty ? '0' : tags.join(','),
|
tags.isEmpty ? '0' : tags.join(','),
|
||||||
);
|
);
|
||||||
if (res.isSuccess) {
|
if (res.isSuccess) {
|
||||||
SmartDialog.showToast('操作成功');
|
SmartDialog.showToast('保存成功');
|
||||||
Get.back(result: tags);
|
Get.back(result: tags);
|
||||||
} else {
|
} else {
|
||||||
res.toast();
|
res.toast();
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ class LaterController extends MultiSelectController<LaterData, LaterItemModel>
|
|||||||
Get.find<LaterController>(tag: item.type.toString()).onReload();
|
Get.find<LaterController>(tag: item.type.toString()).onReload();
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
}
|
}
|
||||||
SmartDialog.showToast('操作成功');
|
SmartDialog.showToast('已清空');
|
||||||
} else {
|
} else {
|
||||||
res.toast();
|
res.toast();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -393,7 +393,9 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
Scaffold(
|
Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: _buildAppBar(isFullScreen),
|
appBar: isFullScreen && !isPortrait
|
||||||
|
? null
|
||||||
|
: _buildAppBar(isFullScreen),
|
||||||
body: isPortrait
|
body: isPortrait
|
||||||
? Obx(
|
? Obx(
|
||||||
() {
|
() {
|
||||||
@@ -412,7 +414,9 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
|
|
||||||
Widget _buildPH(bool isFullScreen) {
|
Widget _buildPH(bool isFullScreen) {
|
||||||
final height = maxWidth / Style.aspectRatio16x9;
|
final height = maxWidth / Style.aspectRatio16x9;
|
||||||
final videoHeight = isFullScreen ? maxHeight - padding.top : height;
|
final videoHeight = isFullScreen
|
||||||
|
? maxHeight - (isPortrait ? padding.top : 0)
|
||||||
|
: height;
|
||||||
final bottomHeight = maxHeight - padding.top - height - kToolbarHeight;
|
final bottomHeight = maxHeight - padding.top - height - kToolbarHeight;
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
@@ -440,7 +444,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
Widget _buildPP(bool isFullScreen) {
|
Widget _buildPP(bool isFullScreen) {
|
||||||
final bottomHeight = 70 + padding.bottom;
|
final bottomHeight = 70 + padding.bottom;
|
||||||
final videoHeight = isFullScreen
|
final videoHeight = isFullScreen
|
||||||
? maxHeight - padding.top
|
? maxHeight - (isPortrait ? padding.top : 0)
|
||||||
: maxHeight - bottomHeight;
|
: maxHeight - bottomHeight;
|
||||||
return Stack(
|
return Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
@@ -655,7 +659,9 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
videoWidth = maxWidth - rightWidth - padding.horizontal;
|
videoWidth = maxWidth - rightWidth - padding.horizontal;
|
||||||
final videoHeight = maxHeight - padding.top - kToolbarHeight;
|
final videoHeight = maxHeight - padding.top - kToolbarHeight;
|
||||||
final width = isFullScreen ? maxWidth : videoWidth;
|
final width = isFullScreen ? maxWidth : videoWidth;
|
||||||
final height = isFullScreen ? maxHeight - padding.top : videoHeight;
|
final height = isFullScreen
|
||||||
|
? maxHeight - (isPortrait ? padding.top : 0)
|
||||||
|
: videoHeight;
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: isFullScreen
|
padding: isFullScreen
|
||||||
? EdgeInsets.zero
|
? EdgeInsets.zero
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class LikeMeController
|
|||||||
if (res.isSuccess) {
|
if (res.isSuccess) {
|
||||||
item.noticeState = noticeState;
|
item.noticeState = noticeState;
|
||||||
loadingState.refresh();
|
loadingState.refresh();
|
||||||
SmartDialog.showToast('操作成功');
|
SmartDialog.showToast('设置成功');
|
||||||
} else {
|
} else {
|
||||||
res.toast();
|
res.toast();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -515,42 +515,47 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
final isFullScreen = this.isFullScreen;
|
final isFullScreen = this.isFullScreen;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
appBar: PreferredSize(
|
appBar: isFullScreen && !isPortrait
|
||||||
preferredSize: const Size.fromHeight(0),
|
? null
|
||||||
child: Obx(
|
: PreferredSize(
|
||||||
() {
|
preferredSize: const Size.fromHeight(0),
|
||||||
final scrollRatio = videoDetailController.scrollRatio.value;
|
child: Obx(
|
||||||
final flag =
|
() {
|
||||||
isPortrait && videoDetailController.scrollCtr.offset != 0;
|
final scrollRatio =
|
||||||
return AppBar(
|
videoDetailController.scrollRatio.value;
|
||||||
backgroundColor: flag && scrollRatio > 0
|
final flag =
|
||||||
? Color.lerp(
|
isPortrait &&
|
||||||
Colors.black,
|
videoDetailController.scrollCtr.offset != 0;
|
||||||
themeData.colorScheme.surface,
|
return AppBar(
|
||||||
scrollRatio,
|
backgroundColor: flag && scrollRatio > 0
|
||||||
)
|
? Color.lerp(
|
||||||
: Colors.black,
|
Colors.black,
|
||||||
toolbarHeight: 0,
|
themeData.colorScheme.surface,
|
||||||
systemOverlayStyle: Platform.isAndroid
|
scrollRatio,
|
||||||
? SystemUiOverlayStyle(
|
)
|
||||||
statusBarIconBrightness: flag && scrollRatio >= 0.5
|
: Colors.black,
|
||||||
? themeData.brightness.reverse
|
toolbarHeight: 0,
|
||||||
: Brightness.light,
|
systemOverlayStyle: Platform.isAndroid
|
||||||
systemNavigationBarIconBrightness:
|
? SystemUiOverlayStyle(
|
||||||
themeData.brightness.reverse,
|
statusBarIconBrightness:
|
||||||
)
|
flag && scrollRatio >= 0.5
|
||||||
: null,
|
? themeData.brightness.reverse
|
||||||
);
|
: Brightness.light,
|
||||||
},
|
systemNavigationBarIconBrightness:
|
||||||
),
|
themeData.brightness.reverse,
|
||||||
),
|
)
|
||||||
|
: null,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
body: ExtendedNestedScrollView(
|
body: ExtendedNestedScrollView(
|
||||||
key: videoDetailController.scrollKey,
|
key: videoDetailController.scrollKey,
|
||||||
controller: videoDetailController.scrollCtr,
|
controller: videoDetailController.scrollCtr,
|
||||||
onlyOneScrollInBody: true,
|
onlyOneScrollInBody: true,
|
||||||
pinnedHeaderSliverHeightBuilder: () {
|
pinnedHeaderSliverHeightBuilder: () {
|
||||||
double pinnedHeight = this.isFullScreen || !isPortrait
|
double pinnedHeight = this.isFullScreen || !isPortrait
|
||||||
? maxHeight - padding.top
|
? maxHeight - (isPortrait ? padding.top : 0)
|
||||||
: videoDetailController.isExpanding ||
|
: videoDetailController.isExpanding ||
|
||||||
videoDetailController.isCollapsing
|
videoDetailController.isCollapsing
|
||||||
? animHeight
|
? animHeight
|
||||||
@@ -576,7 +581,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
},
|
},
|
||||||
headerSliverBuilder: (context, innerBoxIsScrolled) {
|
headerSliverBuilder: (context, innerBoxIsScrolled) {
|
||||||
final height = isFullScreen || !isPortrait
|
final height = isFullScreen || !isPortrait
|
||||||
? maxHeight - padding.top
|
? maxHeight - (isPortrait ? padding.top : 0)
|
||||||
: videoDetailController.isExpanding ||
|
: videoDetailController.isExpanding ||
|
||||||
videoDetailController.isCollapsing
|
videoDetailController.isCollapsing
|
||||||
? animHeight
|
? animHeight
|
||||||
@@ -812,7 +817,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
final isFullScreen = this.isFullScreen;
|
final isFullScreen = this.isFullScreen;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
appBar: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
|
appBar: isFullScreen && !isPortrait
|
||||||
|
? null
|
||||||
|
: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: !isFullScreen
|
padding: !isFullScreen
|
||||||
? padding.copyWith(top: 0, bottom: 0)
|
? padding.copyWith(top: 0, bottom: 0)
|
||||||
@@ -945,7 +952,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
}
|
}
|
||||||
final videoWidth = isFullScreen ? maxWidth : width;
|
final videoWidth = isFullScreen ? maxWidth : width;
|
||||||
final double height = width / Style.aspectRatio16x9;
|
final double height = width / Style.aspectRatio16x9;
|
||||||
final videoHeight = isFullScreen ? maxHeight - padding.top : height;
|
final videoHeight = isFullScreen
|
||||||
|
? maxHeight - (isPortrait ? padding.top : 0)
|
||||||
|
: height;
|
||||||
if (height > maxHeight) {
|
if (height > maxHeight) {
|
||||||
return childSplit(Style.aspectRatio16x9);
|
return childSplit(Style.aspectRatio16x9);
|
||||||
}
|
}
|
||||||
@@ -1038,7 +1047,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
final isFullScreen = this.isFullScreen;
|
final isFullScreen = this.isFullScreen;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
appBar: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
|
appBar: isFullScreen && !isPortrait
|
||||||
|
? null
|
||||||
|
: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: !isFullScreen
|
padding: !isFullScreen
|
||||||
? padding.copyWith(top: 0, bottom: 0)
|
? padding.copyWith(top: 0, bottom: 0)
|
||||||
@@ -1061,7 +1072,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
}
|
}
|
||||||
final shouldShowSeasonPanel = _shouldShowSeasonPanel;
|
final shouldShowSeasonPanel = _shouldShowSeasonPanel;
|
||||||
final double height = maxHeight / 2.5;
|
final double height = maxHeight / 2.5;
|
||||||
final videoHeight = isFullScreen ? maxHeight - padding.top : height;
|
final videoHeight = isFullScreen
|
||||||
|
? maxHeight - (isPortrait ? padding.top : 0)
|
||||||
|
: height;
|
||||||
final bottomHeight = maxHeight - height - padding.top;
|
final bottomHeight = maxHeight - height - padding.top;
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -1514,6 +1527,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
Obx(() {
|
Obx(() {
|
||||||
if (!videoDetailController.autoPlay) {
|
if (!videoDetailController.autoPlay) {
|
||||||
return Positioned.fill(
|
return Positioned.fill(
|
||||||
|
bottom: -1,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: handlePlay,
|
onTap: handlePlay,
|
||||||
behavior: .opaque,
|
behavior: .opaque,
|
||||||
|
|||||||
@@ -538,19 +538,21 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
case .portraitUp:
|
case .portraitUp:
|
||||||
if (!_isVertical && controlsLock.value) return;
|
if (!_isVertical && controlsLock.value) return;
|
||||||
if (!horizontalScreen && !_isVertical && isFullScreen) {
|
if (!horizontalScreen && !_isVertical && isFullScreen) {
|
||||||
triggerFullScreen(status: false, orientation: orientation);
|
if (!isManualFS) {
|
||||||
|
triggerFullScreen(status: false, orientation: orientation);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
portraitUpMode();
|
portraitUpMode();
|
||||||
}
|
}
|
||||||
case .landscapeLeft:
|
case .landscapeLeft:
|
||||||
if (!horizontalScreen && !isFullScreen) {
|
if (!horizontalScreen && !isFullScreen) {
|
||||||
triggerFullScreen(orientation: orientation);
|
triggerFullScreen(orientation: orientation, isManualFS: false);
|
||||||
} else {
|
} else {
|
||||||
landscapeLeftMode();
|
landscapeLeftMode();
|
||||||
}
|
}
|
||||||
case .landscapeRight:
|
case .landscapeRight:
|
||||||
if (!horizontalScreen && !isFullScreen) {
|
if (!horizontalScreen && !isFullScreen) {
|
||||||
triggerFullScreen(orientation: orientation);
|
triggerFullScreen(orientation: orientation, isManualFS: false);
|
||||||
} else {
|
} else {
|
||||||
landscapeRightMode();
|
landscapeRightMode();
|
||||||
}
|
}
|
||||||
@@ -1413,6 +1415,7 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
double screenRatio = 0.0;
|
double screenRatio = 0.0;
|
||||||
|
bool isManualFS = true;
|
||||||
late final FullScreenMode mode = Pref.fullScreenMode;
|
late final FullScreenMode mode = Pref.fullScreenMode;
|
||||||
late final horizontalScreen = Pref.horizontalScreen;
|
late final horizontalScreen = Pref.horizontalScreen;
|
||||||
|
|
||||||
@@ -1422,6 +1425,7 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
bool status = true,
|
bool status = true,
|
||||||
bool inAppFullScreen = false,
|
bool inAppFullScreen = false,
|
||||||
DeviceOrientation? orientation,
|
DeviceOrientation? orientation,
|
||||||
|
bool isManualFS = true,
|
||||||
}) async {
|
}) async {
|
||||||
if (isDesktopPip) return;
|
if (isDesktopPip) return;
|
||||||
if (isFullScreen.value == status) return;
|
if (isFullScreen.value == status) return;
|
||||||
@@ -1429,6 +1433,7 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
if (_fsProcessing) return;
|
if (_fsProcessing) return;
|
||||||
_fsProcessing = true;
|
_fsProcessing = true;
|
||||||
toggleFullScreen(status);
|
toggleFullScreen(status);
|
||||||
|
this.isManualFS = isManualFS;
|
||||||
try {
|
try {
|
||||||
if (status) {
|
if (status) {
|
||||||
if (PlatformUtils.isMobile) {
|
if (PlatformUtils.isMobile) {
|
||||||
|
|||||||
@@ -190,13 +190,15 @@ abstract final class Pref {
|
|||||||
defaultValue: UpPanelPosition.leftFixed.index,
|
defaultValue: UpPanelPosition.leftFixed.index,
|
||||||
)];
|
)];
|
||||||
|
|
||||||
static FullScreenMode get fullScreenMode =>
|
static FullScreenMode get fullScreenMode {
|
||||||
FullScreenMode.values[_setting.get(
|
int? index = _setting.get(SettingBoxKey.fullScreenMode);
|
||||||
SettingBoxKey.fullScreenMode,
|
if (index == null) {
|
||||||
defaultValue: horizontalScreen
|
final FullScreenMode mode = horizontalScreen && isTablet ? .none : .auto;
|
||||||
? FullScreenMode.none.index
|
_setting.put(SettingBoxKey.fullScreenMode, mode.index);
|
||||||
: FullScreenMode.auto.index,
|
return mode;
|
||||||
)];
|
}
|
||||||
|
return FullScreenMode.values[index];
|
||||||
|
}
|
||||||
|
|
||||||
static BtmProgressBehavior get btmProgressBehavior =>
|
static BtmProgressBehavior get btmProgressBehavior =>
|
||||||
BtmProgressBehavior.values[_setting.get(
|
BtmProgressBehavior.values[_setting.get(
|
||||||
|
|||||||
@@ -219,9 +219,9 @@ Win32Window::MessageHandler(HWND hwnd,
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_DWMCOLORIZATIONCOLORCHANGED:
|
// case WM_DWMCOLORIZATIONCOLORCHANGED:
|
||||||
UpdateTheme(hwnd);
|
// UpdateTheme(hwnd);
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return DefWindowProc(window_handle_, message, wparam, lparam);
|
return DefWindowProc(window_handle_, message, wparam, lparam);
|
||||||
|
|||||||
Reference in New Issue
Block a user