mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-21 16:48:43 +00:00
@@ -12,6 +12,7 @@ import 'package:PiliPlus/models_new/dynamic/dyn_topic_top/top_details.dart';
|
||||
import 'package:PiliPlus/pages/dynamics/widgets/dynamic_panel.dart';
|
||||
import 'package:PiliPlus/pages/dynamics_create/view.dart';
|
||||
import 'package:PiliPlus/pages/dynamics_topic/controller.dart';
|
||||
import 'package:PiliPlus/utils/extension/theme_ext.dart';
|
||||
import 'package:PiliPlus/utils/global_data.dart';
|
||||
import 'package:PiliPlus/utils/num_utils.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
@@ -325,9 +326,8 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
SmartDialog.showToast('账号未登录');
|
||||
return;
|
||||
}
|
||||
final isDark = Get.isDarkMode;
|
||||
PageUtils.inAppWebview(
|
||||
'https://www.bilibili.com/h5/topic-active/topic-report?topic_id=${_controller.topicId}&topic_name=${_controller.topicName}&native.theme=${isDark ? 2 : 1}&night=${isDark ? 1 : 0}',
|
||||
'https://www.bilibili.com/h5/topic-active/topic-report?topic_id=${_controller.topicId}&topic_name=${_controller.topicName}&${Utils.themeUrl(theme.colorScheme.isDark)}',
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -8,6 +8,8 @@ import 'package:PiliPlus/models/common/image_type.dart';
|
||||
import 'package:PiliPlus/models_new/emote/emote.dart';
|
||||
import 'package:PiliPlus/models_new/emote/package.dart';
|
||||
import 'package:PiliPlus/pages/emote/controller.dart';
|
||||
import 'package:PiliPlus/utils/extension/theme_ext.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -175,16 +177,13 @@ class _EmotePanelState extends State<EmotePanel>
|
||||
iconSize: 20,
|
||||
iconColor: theme.colorScheme.onSurfaceVariant
|
||||
.withValues(alpha: 0.8),
|
||||
onPressed: () {
|
||||
final isDark = Get.isDarkMode;
|
||||
Get.toNamed(
|
||||
'/webview',
|
||||
parameters: {
|
||||
'url':
|
||||
'https://www.bilibili.com/h5/mall/emoji-package/home?navhide=1&native.theme=${isDark ? 2 : 1}&night=${isDark ? 1 : 0}',
|
||||
},
|
||||
);
|
||||
},
|
||||
onPressed: () => Get.toNamed(
|
||||
'/webview',
|
||||
parameters: {
|
||||
'url':
|
||||
'https://www.bilibili.com/h5/mall/emoji-package/home?navhide=1&${Utils.themeUrl(theme.colorScheme.isDark)}',
|
||||
},
|
||||
),
|
||||
icon: const Icon(Icons.settings),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -87,7 +87,9 @@ class FollowItem extends StatelessWidget {
|
||||
callback: callback,
|
||||
),
|
||||
style: FilledButton.styleFrom(
|
||||
padding: const EdgeInsets.fromLTRB(15, 0, 15, 0),
|
||||
visualDensity: .compact,
|
||||
tapTargetSize: .shrinkWrap,
|
||||
padding: const .symmetric(horizontal: 15),
|
||||
foregroundColor: item.attribute == -1
|
||||
? null
|
||||
: colorScheme.outline,
|
||||
|
||||
@@ -21,6 +21,7 @@ import 'package:PiliPlus/utils/extension/theme_ext.dart';
|
||||
import 'package:PiliPlus/utils/grid.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/platform_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -132,17 +133,14 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
context: context,
|
||||
tooltip: '游戏赛事',
|
||||
icon: const Icon(Icons.gamepad),
|
||||
onPressed: () {
|
||||
final isDark = theme.brightness.isDark;
|
||||
Get.toNamed(
|
||||
'/webview',
|
||||
parameters: {
|
||||
'uaType': 'mob',
|
||||
'url':
|
||||
'https://www.bilibili.com/h5/match/data/home?navhide=1&native.theme=${isDark ? 2 : 1}&night=${isDark ? 1 : 0}',
|
||||
},
|
||||
);
|
||||
},
|
||||
onPressed: () => Get.toNamed(
|
||||
'/webview',
|
||||
parameters: {
|
||||
'uaType': 'mob',
|
||||
'url':
|
||||
'https://www.bilibili.com/h5/match/data/home?navhide=1&${Utils.themeUrl(theme.brightness.isDark)}',
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
iconButton(
|
||||
|
||||
@@ -520,13 +520,14 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
||||
type: ImageType.avatar,
|
||||
src: roomInfoH5.anchorInfo!.baseInfo!.face,
|
||||
),
|
||||
Expanded(
|
||||
Flexible(
|
||||
child: Column(
|
||||
spacing: 1,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
spacing: 10,
|
||||
mainAxisSize: .min,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Flexible(
|
||||
@@ -543,6 +544,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
||||
),
|
||||
Row(
|
||||
spacing: 10,
|
||||
mainAxisSize: .min,
|
||||
children: [
|
||||
_liveRoomController.watchedWidget,
|
||||
_liveRoomController.timeWidget,
|
||||
|
||||
@@ -5,7 +5,9 @@ import 'package:PiliPlus/grpc/bilibili/app/im/v1.pb.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/pages/whisper/controller.dart';
|
||||
import 'package:PiliPlus/pages/whisper/widgets/item.dart';
|
||||
import 'package:PiliPlus/utils/extension/theme_ext.dart';
|
||||
import 'package:PiliPlus/utils/extension/three_dot_ext.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -22,16 +24,29 @@ class _WhisperPageState extends State<WhisperPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final padding = MediaQuery.viewPaddingOf(context);
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
title: const Text('消息'),
|
||||
actions: [
|
||||
IconButton(
|
||||
tooltip: '新增粉丝',
|
||||
onPressed: () => Get.toNamed(
|
||||
'/webview',
|
||||
parameters: {
|
||||
'url':
|
||||
'https://www.bilibili.com/h5/follow/newFans?navhide=1&${Utils.themeUrl(theme.colorScheme.isDark)}',
|
||||
},
|
||||
),
|
||||
icon: const Icon(Icons.account_circle_outlined),
|
||||
),
|
||||
Obx(() {
|
||||
final outsideItem = _controller.outsideItem.value;
|
||||
if (outsideItem != null && outsideItem.isNotEmpty) {
|
||||
return Row(
|
||||
mainAxisSize: .min,
|
||||
children: outsideItem.map((e) {
|
||||
return IconButton(
|
||||
tooltip: e.hasTitle() ? e.title : null,
|
||||
@@ -74,6 +89,7 @@ class _WhisperPageState extends State<WhisperPage> {
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
}),
|
||||
const SizedBox(width: 5),
|
||||
],
|
||||
),
|
||||
body: refreshIndicator(
|
||||
@@ -81,7 +97,7 @@ class _WhisperPageState extends State<WhisperPage> {
|
||||
child: CustomScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
_buildTopItems(padding),
|
||||
_buildTopItems(theme, padding),
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(bottom: padding.bottom + 100),
|
||||
sliver: Obx(() => _buildBody(_controller.loadingState.value)),
|
||||
@@ -133,8 +149,7 @@ class _WhisperPageState extends State<WhisperPage> {
|
||||
};
|
||||
}
|
||||
|
||||
Widget _buildTopItems(EdgeInsets padding) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
Widget _buildTopItems(ThemeData theme, EdgeInsets padding) {
|
||||
return SliverPadding(
|
||||
padding: EdgeInsets.only(left: padding.left, right: padding.right),
|
||||
sliver: SliverToBoxAdapter(
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/pages/whisper/widgets/item.dart';
|
||||
import 'package:PiliPlus/pages/whisper_secondary/controller.dart';
|
||||
import 'package:PiliPlus/utils/extension/three_dot_ext.dart';
|
||||
import 'package:PiliPlus/utils/extension/widget_ext.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -79,7 +78,7 @@ class _WhisperSecPageState extends State<WhisperSecPage> {
|
||||
),
|
||||
],
|
||||
),
|
||||
).constraintWidth(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user