Skip to content

Commit 09122de

Browse files
committed
refactor(user_management): replace indicator dots with tooltip icons
- Remove _IndicatorDot widget - Replace premium user dot with amber star icon - Replace privileged user dot with blue shield icon - Add tooltips for both premium and privileged user icons
1 parent 2f8d681 commit 09122de

File tree

1 file changed

+16
-22
lines changed

1 file changed

+16
-22
lines changed

lib/user_management/view/users_page.dart

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,25 @@ class _UsersDataSource extends DataTableSource {
244244
children: [
245245
// Premium subscription indicator dot (gold)
246246
if (user.appRole.isPremium)
247-
const _IndicatorDot(color: Colors.amber),
247+
Tooltip(
248+
message: l10n.premiumUserTooltip,
249+
child: const Icon(
250+
Icons.star,
251+
color: Colors.amber,
252+
size: 16,
253+
),
254+
),
248255
// Privileged dashboard role indicator dot (blue)
249256
if (user.dashboardRole.isPrivileged) ...[
250257
const SizedBox(width: AppSpacing.xs),
251-
const _IndicatorDot(color: Colors.blueAccent),
258+
Tooltip(
259+
message: l10n.privilegedUserTooltip,
260+
child: const Icon(
261+
Icons.shield,
262+
color: Colors.blueAccent,
263+
size: 16,
264+
),
265+
),
252266
],
253267
],
254268
),
@@ -283,26 +297,6 @@ class _UsersDataSource extends DataTableSource {
283297
int get selectedRowCount => 0;
284298
}
285299

286-
/// A small, colored dot used as a visual indicator.
287-
class _IndicatorDot extends StatelessWidget {
288-
const _IndicatorDot({required this.color});
289-
290-
/// The color of the dot.
291-
final Color color;
292-
293-
@override
294-
Widget build(BuildContext context) {
295-
return Container(
296-
width: 8,
297-
height: 8,
298-
decoration: BoxDecoration(
299-
color: color,
300-
shape: BoxShape.circle,
301-
),
302-
);
303-
}
304-
}
305-
306300
/// An extension to get the localized string for the authentication status
307301
/// derived from [AppUserRole].
308302
extension AuthenticationStatusL10n on AppUserRole {

0 commit comments

Comments
 (0)