Skip to content

Commit

Permalink
Merge pull request #356 from VillagerTom/opt/user_badge
Browse files Browse the repository at this point in the history
opt: 调整用户大会员/认证标识
  • Loading branch information
VillagerTom authored Jan 13, 2025
2 parents d3abce8 + ddac8d7 commit 4a49c6a
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 64 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
runs-on: ${{ matrix.build_os }}
strategy:
matrix:
target_platform: [android-arm, android-arm64, android-x64, android-universal, iOS]
target_platform: [android-split-per-abi, android-universal, iOS]
include:
- build_os: ubuntu-latest
- target_platform: iOS
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:

- name: flutter build apk (${{ matrix.target_platform }})
if: startsWith(matrix.target_platform, 'android') && matrix.target_platform != 'android-universal'
run: flutter build apk --release --split-per-abi --target-platform=${{ matrix.target_platform }}
run: flutter build apk --release --split-per-abi
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
Expand Down
Binary file modified assets/images/big-vip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
197 changes: 135 additions & 62 deletions lib/pages/video/reply/widgets/reply_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,76 +81,149 @@ class ReplyItem extends StatelessWidget {
);
}

Widget lfAvtar(BuildContext context, String heroTag) {
return Stack(
children: [
Hero(
tag: heroTag,
child: NetworkImgLayer(
Widget lfAvatar(BuildContext context, String heroTag) {
List<Widget> stackChildren = [
Hero(
tag: heroTag,
child: NetworkImgLayer(
src: replyItem!.member!.avatar,
width: 34,
height: 34,
type: 'avatar',
type: 'avatar'),
)
];
if (replyItem!.member!.vip!['vipStatus'] > 0) {
stackChildren.add(Positioned(
bottom: 0,
right: 0,
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: Theme.of(context).colorScheme.surface),
//color: Theme.of(context).colorScheme.surface,
),
child: Image.asset(
'assets/images/big-vip.png',
height: 12,
semanticLabel: "大会员",
),
),
if (replyItem!.member!.vip!['vipStatus'] > 0)
Positioned(
right: 0,
bottom: 0,
child: Container(
decoration: BoxDecoration(
//borderRadius: BorderRadius.circular(7),
shape: BoxShape.circle,
color: Theme.of(context).colorScheme.background,
),
child: Image.asset(
'assets/images/big-vip.png',
height: 14,
semanticLabel: "大会员",
),
),
));
}
if (replyItem!.member!.officialVerify != null &&
replyItem!.member!.officialVerify!['type'] == 0) {
stackChildren.add(Positioned(
right: stackChildren.length == 1 ? 0 : null,
left: stackChildren.length == 2 ? 0 : null,
bottom: 0,
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).colorScheme.surface,
),
//https://www.bilibili.com/blackboard/activity-whPrHsYJ2.html
if (replyItem!.member!.officialVerify != null &&
replyItem!.member!.officialVerify!['type'] == 0)
Positioned(
left: 0,
bottom: 0,
child: Container(
decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
shape: BoxShape.circle,
color: Theme.of(context).colorScheme.surface,
),
child: const Icon(
Icons.offline_bolt,
color: Colors.yellow,
size: 14,
semanticLabel: "认证个人",
),
),
child: const Icon(
Icons.offline_bolt,
color: Colors.yellow,
size: 14,
semanticLabel: "认证个人",
),
if (replyItem!.member!.officialVerify != null &&
replyItem!.member!.officialVerify!['type'] == 1)
Positioned(
left: 0,
bottom: 0,
child: Container(
decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
shape: BoxShape.circle,
color: Theme.of(context).colorScheme.surface,
),
child: const Icon(
Icons.offline_bolt,
color: Colors.lightBlueAccent,
size: 14,
semanticLabel: "认证机构",
),
),
),
));
}
if (replyItem!.member!.officialVerify != null &&
replyItem!.member!.officialVerify!['type'] == 1) {
stackChildren.add(Positioned(
right: stackChildren.length == 1 ? 0 : null,
left: stackChildren.length == 2 ? 0 : null,
bottom: 0,
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).colorScheme.surface,
),
],
child: const Icon(
Icons.offline_bolt,
color: Colors.lightBlueAccent,
size: 14,
semanticLabel: "认证个人",
),
),
));
}

return Stack(
children: stackChildren,
);
// return Stack(
// children: [
// Hero(
// tag: heroTag,
// child: NetworkImgLayer(
// src: replyItem!.member!.avatar,
// width: 34,
// height: 34,
// type: 'avatar',
// ),
// ),
// if (replyItem!.member!.vip!['vipStatus'] > 0)
// Positioned(
// right: 0,
// bottom: 0,
// child: Container(
// decoration: BoxDecoration(
// shape: BoxShape.circle,
// border:
// Border.all(color: Theme.of(context).colorScheme.surface),
// //color: Theme.of(context).colorScheme.surface,
// ),
// child: Image.asset(
// 'assets/images/big-vip.png',
// height: 12,
// semanticLabel: "大会员",
// ),
// ),
// ),
// //https://www.bilibili.com/blackboard/activity-whPrHsYJ2.html
// if (replyItem!.member!.officialVerify != null &&
// replyItem!.member!.officialVerify!['type'] == 0)
// Positioned(
// left: 0,
// bottom: 0,
// child: Container(
// decoration: BoxDecoration(
// // borderRadius: BorderRadius.circular(8),
// shape: BoxShape.circle,
// color: Theme.of(context).colorScheme.surface,
// ),
// child: const Icon(
// Icons.offline_bolt,
// color: Colors.yellow,
// size: 14,
// semanticLabel: "认证个人",
// ),
// ),
// ),
// if (replyItem!.member!.officialVerify != null &&
// replyItem!.member!.officialVerify!['type'] == 1)
// Positioned(
// left: 0,
// bottom: 0,
// child: Container(
// decoration: BoxDecoration(
// // borderRadius: BorderRadius.circular(8),
// shape: BoxShape.circle,
// color: Theme.of(context).colorScheme.surface,
// ),
// child: const Icon(
// Icons.offline_bolt,
// color: Colors.lightBlueAccent,
// size: 14,
// semanticLabel: "认证机构",
// ),
// ),
// ),
// ],
// );
}

Widget content(BuildContext context) {
Expand All @@ -173,7 +246,7 @@ class ReplyItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
lfAvtar(context, heroTag),
lfAvatar(context, heroTag),
const SizedBox(width: 12),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down

0 comments on commit 4a49c6a

Please sign in to comment.