diff --git a/assets/images/big-vip.png b/assets/images/big-vip.png new file mode 100644 index 000000000..bb0091546 Binary files /dev/null and b/assets/images/big-vip.png differ diff --git a/lib/common/skeleton/video_reply.dart b/lib/common/skeleton/video_reply.dart index adfba431a..be632ee4e 100644 --- a/lib/common/skeleton/video_reply.dart +++ b/lib/common/skeleton/video_reply.dart @@ -60,7 +60,14 @@ class VideoReplySkeleton extends StatelessWidget { ), const Spacer(), Container( - width: 40, + width: 30, + height: 14, + margin: const EdgeInsets.only(bottom: 4), + color: bgColor, + ), + const SizedBox(width: 8), + Container( + width: 30, height: 14, margin: const EdgeInsets.only(bottom: 4), color: bgColor, diff --git a/lib/models/dynamics/result.dart b/lib/models/dynamics/result.dart index abf42af49..53cee9d58 100644 --- a/lib/models/dynamics/result.dart +++ b/lib/models/dynamics/result.dart @@ -117,7 +117,7 @@ class ModuleAuthorModel { this.pubTime, this.pubTs, this.type, - // this.vip, + this.vip, }); String? face; @@ -130,6 +130,7 @@ class ModuleAuthorModel { String? pubTime; int? pubTs; String? type; + Map? vip; ModuleAuthorModel.fromJson(Map json) { face = json['face']; @@ -142,6 +143,7 @@ class ModuleAuthorModel { pubTime = json['pub_time']; pubTs = json['pub_ts'] == 0 ? null : json['pub_ts']; type = json['type']; + vip = json['vip']; } } diff --git a/lib/pages/dynamics/deatil/view.dart b/lib/pages/dynamics/deatil/view.dart index 692049ef1..129494c9c 100644 --- a/lib/pages/dynamics/deatil/view.dart +++ b/lib/pages/dynamics/deatil/view.dart @@ -100,7 +100,7 @@ class _DynamicDetailPageState extends State { return Scaffold( appBar: AppBar( elevation: 0, - scrolledUnderElevation: 0, + scrolledUnderElevation: 1, centerTitle: false, titleSpacing: 0, title: StreamBuilder( diff --git a/lib/pages/dynamics/widgets/author_panel.dart b/lib/pages/dynamics/widgets/author_panel.dart index 0e2e51dc8..d95766e61 100644 --- a/lib/pages/dynamics/widgets/author_panel.dart +++ b/lib/pages/dynamics/widgets/author_panel.dart @@ -6,59 +6,59 @@ import 'package:pilipala/utils/utils.dart'; Widget author(item, context) { String heroTag = Utils.makeHeroTag(item.modules.moduleAuthor.mid); - return Container( - padding: const EdgeInsets.fromLTRB(12, 12, 12, 8), - child: Row( - children: [ - GestureDetector( - onTap: () { - feedBack(); - Get.toNamed( - '/member?mid=${item.modules.moduleAuthor.mid}', - arguments: { - 'face': item.modules.moduleAuthor.face, - 'heroTag': heroTag - }, - ); - }, - child: Hero( - tag: heroTag, - child: NetworkImgLayer( - width: 40, - height: 40, - type: 'avatar', - src: item.modules.moduleAuthor.face, - ), + return Row( + children: [ + GestureDetector( + onTap: () { + feedBack(); + Get.toNamed( + '/member?mid=${item.modules.moduleAuthor.mid}', + arguments: { + 'face': item.modules.moduleAuthor.face, + 'heroTag': heroTag + }, + ); + }, + child: Hero( + tag: heroTag, + child: NetworkImgLayer( + width: 40, + height: 40, + type: 'avatar', + src: item.modules.moduleAuthor.face, ), ), - const SizedBox(width: 10), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - item.modules.moduleAuthor.name, - style: TextStyle( - fontSize: Theme.of(context).textTheme.titleSmall!.fontSize, - ), + ), + const SizedBox(width: 10), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + item.modules.moduleAuthor.name, + style: TextStyle( + color: item.modules.moduleAuthor!.vip!['status'] > 0 + ? const Color.fromARGB(255, 251, 100, 163) + : Theme.of(context).colorScheme.onBackground, + fontSize: Theme.of(context).textTheme.titleSmall!.fontSize, ), - DefaultTextStyle.merge( - style: TextStyle( - color: Theme.of(context).colorScheme.outline, - fontSize: Theme.of(context).textTheme.labelSmall!.fontSize, - ), - child: Row( - children: [ - Text(item.modules.moduleAuthor.pubTime), - if (item.modules.moduleAuthor.pubTime != '' && - item.modules.moduleAuthor.pubAction != '') - const Text(' '), - Text(item.modules.moduleAuthor.pubAction), - ], - ), - ) - ], - ), - ], - ), + ), + DefaultTextStyle.merge( + style: TextStyle( + color: Theme.of(context).colorScheme.outline, + fontSize: Theme.of(context).textTheme.labelSmall!.fontSize, + ), + child: Row( + children: [ + Text(item.modules.moduleAuthor.pubTime), + if (item.modules.moduleAuthor.pubTime != '' && + item.modules.moduleAuthor.pubAction != '') + const Text(' '), + Text(item.modules.moduleAuthor.pubAction), + ], + ), + ) + ], + ), + ], ); } diff --git a/lib/pages/dynamics/widgets/dynamic_panel.dart b/lib/pages/dynamics/widgets/dynamic_panel.dart index 444aa3c01..ef0bc8cc2 100644 --- a/lib/pages/dynamics/widgets/dynamic_panel.dart +++ b/lib/pages/dynamics/widgets/dynamic_panel.dart @@ -37,7 +37,10 @@ class DynamicPanel extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.start, children: [ - author(item, context), + Padding( + padding: const EdgeInsets.fromLTRB(12, 12, 12, 8), + child: author(item, context), + ), if (item!.modules!.moduleDynamic!.desc != null) content(item, context, source), forWard(item, context, _dynamicsController, source), diff --git a/lib/pages/search/widgets/hot_keyword.dart b/lib/pages/search/widgets/hot_keyword.dart index 17bb56614..66d01b1d5 100644 --- a/lib/pages/search/widgets/hot_keyword.dart +++ b/lib/pages/search/widgets/hot_keyword.dart @@ -21,34 +21,37 @@ class HotKeyword extends StatelessWidget { children: [ for (var i in hotSearchList!) SizedBox( - width: width! / 2 - 8, + width: width! / 2 - 4, child: Material( borderRadius: BorderRadius.circular(3), clipBehavior: Clip.hardEdge, child: InkWell( onTap: () => onClick!(i.keyword), - child: Row( - children: [ - SizedBox( - width: width! / 2 - - (i.icon != null && i.icon != '' ? 50 : 12), - child: Padding( - padding: const EdgeInsets.fromLTRB(6, 5, 0, 5), - child: Text( - i.keyword!, - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: const TextStyle(fontSize: 14), + child: Padding( + padding: EdgeInsets.only( + left: 2, + right: hotSearchList!.indexOf(i) % 2 == 1 ? 10 : 0), + child: Row( + children: [ + Flexible( + child: Padding( + padding: const EdgeInsets.fromLTRB(6, 5, 4, 5), + child: Text( + i.keyword!, + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: const TextStyle(fontSize: 14), + ), ), ), - ), - if (i.icon != null && i.icon != '') - SizedBox( - width: 40, - child: - CachedNetworkImage(imageUrl: i.icon!, height: 15.0), - ), - ], + if (i.icon != null && i.icon != '') + SizedBox( + height: 15, + child: CachedNetworkImage( + imageUrl: i.icon!, height: 15.0), + ), + ], + ), ), ), ), diff --git a/lib/pages/video/detail/introduction/view.dart b/lib/pages/video/detail/introduction/view.dart index 9bad6f02f..0f2b1bf7a 100644 --- a/lib/pages/video/detail/introduction/view.dart +++ b/lib/pages/video/detail/introduction/view.dart @@ -142,7 +142,7 @@ class _VideoInfoState extends State with TickerProviderStateMixin { ThemeData t = Theme.of(context); return SliverPadding( padding: const EdgeInsets.only( - left: StyleString.safeSpace, right: StyleString.safeSpace, top: 13), + left: StyleString.safeSpace, right: StyleString.safeSpace, top: 10), sliver: SliverToBoxAdapter( child: !widget.loadingStatus || videoItem.isNotEmpty ? Column( diff --git a/lib/pages/video/detail/introduction/widgets/intro_detail.dart b/lib/pages/video/detail/introduction/widgets/intro_detail.dart index d45b6d47d..ab07e456b 100644 --- a/lib/pages/video/detail/introduction/widgets/intro_detail.dart +++ b/lib/pages/video/detail/introduction/widgets/intro_detail.dart @@ -55,7 +55,7 @@ class IntroDetail extends StatelessWidget { fontWeight: FontWeight.w500, ), ), - const SizedBox(height: 4), + const SizedBox(height: 6), Row( children: [ StatView( @@ -91,10 +91,16 @@ class IntroDetail extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(videoDetail!.bvid!), + Text( + videoDetail!.bvid!, + style: const TextStyle(fontSize: 13), + ), const SizedBox(height: 4), Text.rich( - style: const TextStyle(height: 1.4), + style: const TextStyle( + height: 1.4, + fontSize: 13, + ), TextSpan( children: [ buildContent(context, videoDetail!), diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index db9ed6bec..62c2d8ec0 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -79,6 +79,22 @@ class ReplyItem extends StatelessWidget { ), ), ), + if (replyItem!.member!.vip!['vipStatus'] > 0 && + replyItem!.member!.vip!['vipType'] == 2) + Positioned( + right: 0, + bottom: 0, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(7), + color: Theme.of(context).colorScheme.background, + ), + child: Image.asset( + 'assets/images/big-vip.png', + height: 14, + ), + ), + ), ], ), ); @@ -111,9 +127,8 @@ class ReplyItem extends StatelessWidget { Text( replyItem!.member!.uname!, style: TextStyle( - color: replyItem!.isUp! || - replyItem!.member!.vip!['vipStatus'] > 0 - ? Theme.of(context).colorScheme.primary + color: replyItem!.member!.vip!['vipStatus'] > 0 + ? const Color.fromARGB(255, 251, 100, 163) : Theme.of(context).colorScheme.outline, fontSize: 13, ), @@ -257,16 +272,21 @@ class ReplyItem extends StatelessWidget { Icon(Icons.favorite, color: Colors.red[400], size: 18), SizedBox( height: 28, - width: 42, - child: TextButton( + width: 28, + child: IconButton( style: ButtonStyle( padding: MaterialStateProperty.all(EdgeInsets.zero), ), - child: Text('回复', - style: Theme.of(context) - .textTheme - .labelMedium! - .copyWith(color: Theme.of(context).colorScheme.outline)), + icon: Icon( + Icons.reply_outlined, + size: 18, + color: Theme.of(context).colorScheme.outline, + ), + // child: Text('回复', + // style: Theme.of(context) + // .textTheme + // .labelMedium! + // .copyWith(color: Theme.of(context).colorScheme.outline)), onPressed: () { feedBack(); showModalBottomSheet( diff --git a/lib/pages/video/detail/replyNew/view.dart b/lib/pages/video/detail/replyNew/view.dart index 122cc6525..86eb113b1 100644 --- a/lib/pages/video/detail/replyNew/view.dart +++ b/lib/pages/video/detail/replyNew/view.dart @@ -117,12 +117,12 @@ class _VideoReplyNewDialogState extends State @override Widget build(BuildContext context) { return Container( - height: sheetHeight, + height: 400, clipBehavior: Clip.hardEdge, decoration: BoxDecoration( borderRadius: const BorderRadius.only( - topLeft: Radius.circular(16), - topRight: Radius.circular(16), + topLeft: Radius.circular(12), + topRight: Radius.circular(12), ), color: Theme.of(context).colorScheme.background, ), @@ -143,7 +143,11 @@ class _VideoReplyNewDialogState extends State autofocus: false, focusNode: replyContentFocusNode, decoration: const InputDecoration( - hintText: "输入回复内容", border: InputBorder.none), + hintText: "输入回复内容", + border: InputBorder.none, + hintStyle: TextStyle( + fontSize: 14, + )), style: Theme.of(context).textTheme.bodyLarge, ), ), diff --git a/lib/pages/video/detail/widgets/header_control.dart b/lib/pages/video/detail/widgets/header_control.dart index b4a50749f..54eecc4b1 100644 --- a/lib/pages/video/detail/widgets/header_control.dart +++ b/lib/pages/video/detail/widgets/header_control.dart @@ -27,7 +27,7 @@ class HeaderControl extends StatefulWidget implements PreferredSizeWidget { class _HeaderControlState extends State { late PlayUrlModel videoInfo; List playSpeed = PlaySpeed.values; - + TextStyle subTitleStyle = const TextStyle(fontSize: 12); Size get preferredSize => const Size(double.infinity, kToolbarHeight); @override @@ -38,25 +38,20 @@ class _HeaderControlState extends State { /// 设置面板 void showSettingSheet() { - TextStyle subTitleStyle = - TextStyle(fontSize: 12, color: Theme.of(context).colorScheme.outline); showModalBottomSheet( + elevation: 0, context: context, backgroundColor: Colors.transparent, builder: (_) { return Container( width: double.infinity, - height: 420, + height: 400, clipBehavior: Clip.hardEdge, decoration: BoxDecoration( color: Theme.of(context).colorScheme.background, borderRadius: const BorderRadius.all(Radius.circular(12)), ), - margin: EdgeInsets.only( - left: 12, - right: 12, - bottom: MediaQuery.of(context).padding.bottom + 23, - ), + margin: const EdgeInsets.all(12), child: Column( children: [ SizedBox( @@ -174,11 +169,7 @@ class _HeaderControlState extends State { color: Theme.of(context).colorScheme.background, borderRadius: const BorderRadius.all(Radius.circular(12)), ), - margin: EdgeInsets.only( - left: 12, - right: 12, - bottom: MediaQuery.of(context).padding.bottom, - ), + margin: const EdgeInsets.all(12), child: Material( child: ListView( physics: const NeverScrollableScrollPhysics(), @@ -234,8 +225,6 @@ class _HeaderControlState extends State { } } - TextStyle subTitleStyle = - TextStyle(fontSize: 12, color: Theme.of(context).colorScheme.outline); showModalBottomSheet( context: context, elevation: 0, @@ -249,11 +238,7 @@ class _HeaderControlState extends State { color: Theme.of(context).colorScheme.background, borderRadius: const BorderRadius.all(Radius.circular(12)), ), - margin: EdgeInsets.only( - left: 12, - right: 12, - bottom: MediaQuery.of(context).padding.bottom, - ), + margin: const EdgeInsets.all(12), child: Column( children: [ SizedBox( @@ -279,7 +264,6 @@ class _HeaderControlState extends State { Expanded( child: Material( child: Scrollbar( - thumbVisibility: true, child: ListView( children: [ for (var i = 0; i < totalQaSam; i++) ...[ @@ -329,8 +313,6 @@ class _HeaderControlState extends State { AudioQuality currentAudioQa = widget.videoDetailCtr!.currentAudioQa; List audio = videoInfo.dash!.audio!; - TextStyle subTitleStyle = - TextStyle(fontSize: 12, color: Theme.of(context).colorScheme.outline); showModalBottomSheet( context: context, elevation: 0, @@ -344,11 +326,7 @@ class _HeaderControlState extends State { color: Theme.of(context).colorScheme.background, borderRadius: const BorderRadius.all(Radius.circular(12)), ), - margin: EdgeInsets.only( - left: 12, - right: 12, - bottom: MediaQuery.of(context).padding.bottom, - ), + margin: const EdgeInsets.all(12), child: Column( children: [ const SizedBox(height: 45, child: Center(child: Text('选择音质'))),