mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -595,6 +595,23 @@ class PiliScheme {
|
||||
}
|
||||
launchURL();
|
||||
return false;
|
||||
// case 'opus':
|
||||
// String? id = uriDigitRegExp.firstMatch(path)?.group(1);
|
||||
// if (id != null) {
|
||||
// PageUtils.toDupNamed(
|
||||
// '/htmlRender',
|
||||
// parameters: {
|
||||
// 'url': 'https://www.bilibili.com/opus/$id',
|
||||
// 'title': '',
|
||||
// 'id': id,
|
||||
// 'dynamicType': 'opus'
|
||||
// },
|
||||
// off: off,
|
||||
// );
|
||||
// return true;
|
||||
// }
|
||||
// launchURL();
|
||||
// return false;
|
||||
case 'dynamic' || 'opus':
|
||||
bool hasMatch = await _onPushDynDetail(path, off);
|
||||
if (hasMatch.not) {
|
||||
|
||||
@@ -79,6 +79,24 @@ class DownloadUtils {
|
||||
PermissionStatus status = await Permission.photos.status;
|
||||
if (status == PermissionStatus.denied ||
|
||||
status == PermissionStatus.permanentlyDenied) {
|
||||
// SmartDialog.show(
|
||||
// useSystem: true,
|
||||
// animationType: SmartAnimationType.centerFade_otherSlide,
|
||||
// builder: (BuildContext context) {
|
||||
// return AlertDialog(
|
||||
// title: const Text('提示'),
|
||||
// content: const Text('相册权限未授权'),
|
||||
// actions: [
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// openAppSettings();
|
||||
// },
|
||||
// child: const Text('去授权'),
|
||||
// )
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
||||
@@ -30,5 +30,15 @@ class Em {
|
||||
|
||||
static String decodeHtmlEntities(String title) {
|
||||
return parse(title).body?.text ?? title;
|
||||
// return title
|
||||
// .replaceAll('<', '<')
|
||||
// .replaceAll('>', '>')
|
||||
// .replaceAll('"', '"')
|
||||
// .replaceAll(''', "'")
|
||||
// .replaceAll('"', '"')
|
||||
// .replaceAll(''', "'")
|
||||
// .replaceAll(' ', " ")
|
||||
// .replaceAll('&', "&")
|
||||
// .replaceAll(''', "'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,8 @@ class PageUtils {
|
||||
contentPadding: const EdgeInsets.only(),
|
||||
title: const Text("额外等待视频播放完毕", style: titleStyle),
|
||||
trailing: Transform.scale(
|
||||
alignment: Alignment.centerRight,
|
||||
alignment: Alignment
|
||||
.centerRight, // 缩放Switch的大小后保持右侧对齐, 避免右侧空隙过大
|
||||
scale: 0.8,
|
||||
child: Switch(
|
||||
thumbIcon: WidgetStateProperty.resolveWith<Icon?>(
|
||||
@@ -188,15 +189,18 @@ class PageUtils {
|
||||
onTap: () {
|
||||
shutdownTimerService.exitApp = false;
|
||||
setState(() {});
|
||||
// Get.back();
|
||||
},
|
||||
text: " 暂停视频 ",
|
||||
selectStatus: !shutdownTimerService.exitApp,
|
||||
),
|
||||
const Spacer(),
|
||||
// const SizedBox(width: 10),
|
||||
ActionRowLineItem(
|
||||
onTap: () {
|
||||
shutdownTimerService.exitApp = true;
|
||||
setState(() {});
|
||||
// Get.back();
|
||||
},
|
||||
text: " 退出APP ",
|
||||
selectStatus: shutdownTimerService.exitApp,
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:hive/hive.dart';
|
||||
import 'storage.dart';
|
||||
|
||||
class RecommendFilter {
|
||||
// static late int filterUnfollowedRatio;
|
||||
static late int minDurationForRcmd;
|
||||
static late int minPlayForRcmd;
|
||||
static late int minLikeRatioForRecommend;
|
||||
@@ -19,6 +20,8 @@ class RecommendFilter {
|
||||
static Box get setting => GStorage.setting;
|
||||
|
||||
static void update() {
|
||||
// filterUnfollowedRatio =
|
||||
// setting.get(SettingBoxKey.filterUnfollowedRatio, defaultValue: 0);
|
||||
minDurationForRcmd =
|
||||
setting.get(SettingBoxKey.minDurationForRcmd, defaultValue: 0);
|
||||
minPlayForRcmd = setting.get(SettingBoxKey.minPlayForRcmd, defaultValue: 0);
|
||||
|
||||
@@ -44,6 +44,10 @@ class GStorage {
|
||||
static late final Box<dynamic> setting;
|
||||
static late final Box<dynamic> video;
|
||||
|
||||
// static bool get isLogin => userInfo.get('userInfoCache') != null;
|
||||
|
||||
// static get ownerMid => userInfo.get('userInfoCache')?.mid;
|
||||
|
||||
static List<double> get speedList => List<double>.from(
|
||||
video.get(
|
||||
VideoBoxKey.speedsList,
|
||||
@@ -638,6 +642,7 @@ class SettingBoxKey {
|
||||
// ignore: constant_identifier_names
|
||||
CDNService = 'CDNService',
|
||||
disableAudioCDN = 'disableAudioCDN',
|
||||
// enableCDN = 'enableCDN',
|
||||
autoPiP = 'autoPiP',
|
||||
pipNoDanmaku = 'pipNoDanmaku',
|
||||
enableAutoLongPressSpeed = 'enableAutoLongPressSpeed',
|
||||
@@ -664,6 +669,7 @@ class SettingBoxKey {
|
||||
minLikeRatioForRecommend = 'minLikeRatioForRecommend',
|
||||
exemptFilterForFollowed = 'exemptFilterForFollowed',
|
||||
banWordForRecommend = 'banWordForRecommend',
|
||||
//filterUnfollowedRatio = 'filterUnfollowedRatio',
|
||||
applyFilterToRelatedVideos = 'applyFilterToRelatedVideos',
|
||||
|
||||
/// 其他
|
||||
@@ -800,6 +806,8 @@ class SettingBoxKey {
|
||||
displayMode = 'displayMode',
|
||||
smallCardWidth = 'smallCardWidth',
|
||||
videoPlayerRemoveSafeArea = 'videoPlayerRemoveSafeArea', // 视频播放器移除安全边距
|
||||
// videoPlayerShowStatusBarBackgroundColor =
|
||||
// 'videoPlayerShowStatusBarBackgroundColor', // 播放页状态栏显示为背景色
|
||||
dynamicsWaterfallFlow = 'dynamicsWaterfallFlow', // 动态瀑布流
|
||||
upPanelPosition = 'upPanelPosition', // up主面板位置
|
||||
dynamicsShowAllFollowedUp = 'dynamicsShowAllFollowedUp', // 动态显示全部关注up
|
||||
@@ -810,6 +818,7 @@ class SettingBoxKey {
|
||||
tabbarSort = 'tabbarSort', // 首页tabbar
|
||||
dynamicBadgeMode = 'dynamicBadgeMode',
|
||||
msgBadgeMode = 'msgBadgeMode',
|
||||
// msgUnReadType = 'msgUnReadType',
|
||||
msgUnReadTypeV2 = 'msgUnReadTypeV2',
|
||||
hiddenSettingUnlocked = 'hiddenSettingUnlocked',
|
||||
enableGradientBg = 'enableGradientBg',
|
||||
|
||||
@@ -81,6 +81,9 @@ class ThemeUtils {
|
||||
: null,
|
||||
shadowColor: Colors.transparent,
|
||||
),
|
||||
// dialogTheme: DialogTheme(
|
||||
// surfaceTintColor: isDark ? colorScheme.onSurfaceVariant : null,
|
||||
// ),
|
||||
progressIndicatorTheme: ProgressIndicatorThemeData(
|
||||
refreshBackgroundColor: colorScheme.onSecondary,
|
||||
),
|
||||
|
||||
@@ -147,6 +147,14 @@ class Utils {
|
||||
return base64Encoded;
|
||||
}
|
||||
|
||||
// static String genRandomString(int length) {
|
||||
// const characters = '0123456789abcdefghijklmnopqrstuvwxyz';
|
||||
// Random random = Random();
|
||||
// return List.generate(
|
||||
// length, (index) => characters[random.nextInt(characters.length)])
|
||||
// .join();
|
||||
// }
|
||||
|
||||
static String genTraceId() {
|
||||
String randomId = generateRandomString(32);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user