mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-03-03 10:36:47 +00:00
Improve: Verification badge for groups
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
This commit is contained in:
parent
e9ea0a7f16
commit
d04828b020
7 changed files with 29 additions and 14 deletions
|
|
@ -3,6 +3,7 @@
|
|||
## 0.0.95
|
||||
|
||||
Feature: Show link in chat if the saved media file contains one
|
||||
Improve: Verification badge for groups
|
||||
Fix: Problem with decrypting messages fixed
|
||||
|
||||
## 0.0.93
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#ffff00" class="bi bi-patch-check" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M10.354 6.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7 8.793l2.646-2.647a.5.5 0 0 1 .708 0"/>
|
||||
<path d="m10.273 2.513-.921-.944.715-.698.622.637.89-.011a2.89 2.89 0 0 1 2.924 2.924l-.01.89.636.622a2.89 2.89 0 0 1 0 4.134l-.637.622.011.89a2.89 2.89 0 0 1-2.924 2.924l-.89-.01-.622.636a2.89 2.89 0 0 1-4.134 0l-.622-.637-.89.011a2.89 2.89 0 0 1-2.924-2.924l.01-.89-.636-.622a2.89 2.89 0 0 1 0-4.134l.637-.622-.011-.89a2.89 2.89 0 0 1 2.924-2.924l.89.01.622-.636a2.89 2.89 0 0 1 4.134 0l-.715.698a1.89 1.89 0 0 0-2.704 0l-.92.944-1.32-.016a1.89 1.89 0 0 0-1.911 1.912l.016 1.318-.944.921a1.89 1.89 0 0 0 0 2.704l.944.92-.016 1.32a1.89 1.89 0 0 0 1.912 1.911l1.318-.016.921.944a1.89 1.89 0 0 0 2.704 0l.92-.944 1.32.016a1.89 1.89 0 0 0 1.911-1.912l-.016-1.318.944-.921a1.89 1.89 0 0 0 0-2.704l-.944-.92.016-1.32a1.89 1.89 0 0 0-1.912-1.911z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1 KiB |
|
|
@ -3,7 +3,8 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||
|
||||
class BetterListTile extends StatelessWidget {
|
||||
const BetterListTile({
|
||||
required this.text,
|
||||
this.text,
|
||||
this.textWidget,
|
||||
this.onTap,
|
||||
this.icon,
|
||||
this.leading,
|
||||
|
|
@ -17,7 +18,8 @@ class BetterListTile extends StatelessWidget {
|
|||
final IconData? icon;
|
||||
final Widget? leading;
|
||||
final Widget? trailing;
|
||||
final String text;
|
||||
final String? text;
|
||||
final Widget? textWidget;
|
||||
final Widget? subtitle;
|
||||
final Color? color;
|
||||
final VoidCallback? onTap;
|
||||
|
|
@ -40,10 +42,12 @@ class BetterListTile extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
trailing: trailing,
|
||||
title: Text(
|
||||
text,
|
||||
style: TextStyle(color: color),
|
||||
),
|
||||
title: text != null
|
||||
? Text(
|
||||
text!,
|
||||
style: TextStyle(color: color),
|
||||
)
|
||||
: textWidget,
|
||||
subtitle: subtitle,
|
||||
onTap: onTap,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import 'package:flutter_svg/flutter_svg.dart';
|
|||
|
||||
class SvgIcons {
|
||||
static const String verifiedGreen = 'assets/icons/verified_badge_green.svg';
|
||||
static const String verifiedYellow = 'assets/icons/verified_badge_yellow.svg';
|
||||
static const String verifiedRed = 'assets/icons/verified_badge_red.svg';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class _VerifiedShieldState extends State<VerifiedShield> {
|
|||
contact = contacts.first;
|
||||
}
|
||||
setState(() {
|
||||
isVerified = contacts.any((t) => t.verified);
|
||||
isVerified = contacts.every((t) => t.verified);
|
||||
});
|
||||
});
|
||||
} else if (widget.contact != null) {
|
||||
|
|
|
|||
|
|
@ -242,7 +242,18 @@ class _GroupViewState extends State<GroupView> {
|
|||
contactId: member.$1.userId,
|
||||
fontSize: 16,
|
||||
),
|
||||
text: getContactDisplayName(member.$1, maxLength: 25),
|
||||
textWidget: Row(
|
||||
children: [
|
||||
Text(getContactDisplayName(member.$1, maxLength: 25)),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 5),
|
||||
child: VerifiedShield(
|
||||
key: Key(member.$2.contactId.toString()),
|
||||
contact: member.$1,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
trailing: (member.$2.memberState == MemberState.admin)
|
||||
? Text(context.lang.admin)
|
||||
: null,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,11 @@ class _VerificationBadeFaqViewState extends State<VerificationBadeFaqView> {
|
|||
description: context.lang.verificationBadgeGreenDesc,
|
||||
),
|
||||
_buildItem(
|
||||
icon: const SvgIcon(assetPath: SvgIcons.verifiedYellow, size: 40),
|
||||
icon: const SvgIcon(
|
||||
assetPath: SvgIcons.verifiedGreen,
|
||||
size: 40,
|
||||
color: Color.fromARGB(255, 227, 227, 3),
|
||||
),
|
||||
description: context.lang.verificationBadgeYellowDesc,
|
||||
),
|
||||
_buildItem(
|
||||
|
|
|
|||
Loading…
Reference in a new issue