From f3f0f64e4ded867f37b6559510c025067884ec08 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Wed, 2 Aug 2023 11:31:32 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E4=BC=9A=E5=91=98=E6=A0=87=E8=AF=86?= =?UTF-8?q?=EF=BC=8C=E5=9B=9E=E5=A4=8D=E6=8C=89=E9=92=AE/=E9=AB=98?= =?UTF-8?q?=E5=BA=A6=EF=BC=8C=E6=90=9C=E7=B4=A2=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/images/big-vip.png | Bin 0 -> 2622 bytes lib/common/skeleton/video_reply.dart | 9 +- lib/models/dynamics/result.dart | 4 +- lib/pages/dynamics/deatil/view.dart | 2 +- lib/pages/dynamics/widgets/author_panel.dart | 102 +++++++++--------- lib/pages/dynamics/widgets/dynamic_panel.dart | 5 +- lib/pages/search/widgets/hot_keyword.dart | 45 ++++---- lib/pages/video/detail/introduction/view.dart | 2 +- .../introduction/widgets/intro_detail.dart | 12 ++- .../detail/reply/widgets/reply_item.dart | 40 +++++-- lib/pages/video/detail/replyNew/view.dart | 12 ++- .../video/detail/widgets/header_control.dart | 36 ++----- 12 files changed, 146 insertions(+), 123 deletions(-) create mode 100644 assets/images/big-vip.png diff --git a/assets/images/big-vip.png b/assets/images/big-vip.png new file mode 100644 index 0000000000000000000000000000000000000000..bb009154668fb7ca30e2f7a9531f621cfb22f264 GIT binary patch literal 2622 zcmV-E3c>Y>P)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H13Cl@D zK~#90&6|60R96|mf4e5x&6|V}2+&G{2@oQM@Rmw=6oK++skGKIf;1LqECY#Z zopF@ffp#3NwzjkmDne1FU@aDTlt6Y(k z^FVDATx*4<8_>}OzMImP5D&>N$V`F317KJNq$Y+lp2NT@;8Hj@L1a_l31kkYno4OJ zoUesXE<u0KCL z4IZ7QH*5;;f#R{z_1)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n4cq6@Z0ypd-*_il}XW+8Af9?F^Ieo==Ky}TqahD`k>_F3C%R%EX{c%N&(&N)0QE6OlBB0K=|LV0FxURcpY918j z248#sq&O;pboWRu@r4~wt?wo(I=t}O2U3m~$faxgkl3V=Fj*OVsYhyzZ=b7mAd$B$%8l&drqu_~>Hr&XS!DKVD|!{jCDt z3cR3FfCI4(XXtLPYmraeECPEsNpZvTOQqge&p}`o7D{9^L{s`OYR&*yyFj*=|2JH5 zGB)+gw;<&)%7Q2rmw<06TXM7EyGx9mi@QUz3)U}^$}=@3z-3i~nF+TYDLmFQVh}vL zR0^K%HreU${fA-XU?YiN0*0Y$E2Xk;AX7q**C(Exk#iGkCX9fUv&>=%TY+y7MX4-E zvGh*hAw!AM3$VQu+H5SPF(W-moG|rP=jUDEQNT3DA5OXa8>k8?{CIq@r(9xucIOrR zxZ|ak@S*YMl_u~uGVenUB%A{i4qzkjtf^Fo7xq<1Wk!=tHbG`e-+_r_lPs{T@*9C4 zU@>zU$&s1mh%Id%In^|&%qXvx{Cr)r^<=6831f{OD)q#9L#!N`X+a9Tc3OOjJSxIN zQzMac1P@rgqum>DXsR7Le0@{J6%WY?keLcY(qU+(m7_6%97Ohc 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 692049ef..129494c9 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 0e2e51dc..d95766e6 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 444aa3c0..ef0bc8cc 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 17bb5661..66d01b1d 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 9bad6f02..0f2b1bf7 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 d45b6d47..ab07e456 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 db9ed6be..62c2d8ec 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 122cc652..86eb113b 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 b4a50749..54eecc4b 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('选择音质'))),