From 22fde6b400898bc1c8739ea8540c299815610af6 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 2 Mar 2025 21:19:28 +0800 Subject: [PATCH] :bento: Add more badges --- assets/translations/en-US.json | 7 ++++++- assets/translations/zh-CN.json | 5 +++++ assets/translations/zh-HK.json | 5 +++++ assets/translations/zh-TW.json | 5 +++++ lib/screens/account/badges.dart | 1 - lib/screens/account/profile_page.dart | 27 ++++++++++++++++++++++++++- 6 files changed, 47 insertions(+), 3 deletions(-) diff --git a/assets/translations/en-US.json b/assets/translations/en-US.json index 11f4a20..9e79500 100644 --- a/assets/translations/en-US.json +++ b/assets/translations/en-US.json @@ -517,8 +517,13 @@ "accountBirthday": "Born on {}", "accountBadge": "Badge", "accountCheckInNoRecords": "No check-in records", - "badgeCompanyStaff": "Solsynth Staff", + "badgeCompanyStaff": "Staff", "badgeSiteMigration": "Solar Network Native", + "badgeCommunitySurvey": "Survey Participant", + "badgeCommunityVerified": "Verified User", + "badgeCommunityContributor": "Great Contributor", + "badgeSiteAnniversary": "Anniversary", + "badgeUserBirthday": "Birthday", "accountStatus": "Status", "accountStatusOnline": "Online", "accountStatusOffline": "Offline", diff --git a/assets/translations/zh-CN.json b/assets/translations/zh-CN.json index 1287c50..7d34dc4 100644 --- a/assets/translations/zh-CN.json +++ b/assets/translations/zh-CN.json @@ -517,6 +517,11 @@ "accountCheckInNoRecords": "暂无运势记录", "badgeCompanyStaff": "工作人员", "badgeSiteMigration": "Solar Network 原住民", + "badgeCommunitySurvey": "调研参与者", + "badgeCommunityVerified": "认证用户", + "badgeCommunityContributor": "优秀社区贡献者", + "badgeSiteAnniversary": "周年纪念", + "badgeUserBirthday": "生日纪念", "accountStatus": "状态", "accountStatusOnline": "在线", "accountStatusOffline": "离线", diff --git a/assets/translations/zh-HK.json b/assets/translations/zh-HK.json index aab7e8d..b4b0c3d 100644 --- a/assets/translations/zh-HK.json +++ b/assets/translations/zh-HK.json @@ -517,6 +517,11 @@ "accountCheckInNoRecords": "暫無運勢記錄", "badgeCompanyStaff": "工作人員", "badgeSiteMigration": "Solar Network 原住民", + "badgeCommunitySurvey": "調研參與者", + "badgeCommunityVerified": "認證用户", + "badgeCommunityContributor": "優秀社區貢獻者", + "badgeSiteAnniversary": "週年紀念", + "badgeUserBirthday": "生日紀念", "accountStatus": "狀態", "accountStatusOnline": "在線", "accountStatusOffline": "離線", diff --git a/assets/translations/zh-TW.json b/assets/translations/zh-TW.json index 8f52c6e..eaa1247 100644 --- a/assets/translations/zh-TW.json +++ b/assets/translations/zh-TW.json @@ -517,6 +517,11 @@ "accountCheckInNoRecords": "暫無運勢記錄", "badgeCompanyStaff": "工作人員", "badgeSiteMigration": "Solar Network 原住民", + "badgeCommunitySurvey": "調研參與者", + "badgeCommunityVerified": "認證用戶", + "badgeCommunityContributor": "優秀社區貢獻者", + "badgeSiteAnniversary": "週年紀念", + "badgeUserBirthday": "生日紀念", "accountStatus": "狀態", "accountStatusOnline": "在線", "accountStatusOffline": "離線", diff --git a/lib/screens/account/badges.dart b/lib/screens/account/badges.dart index b3df0d6..bb6ec47 100644 --- a/lib/screens/account/badges.dart +++ b/lib/screens/account/badges.dart @@ -1,6 +1,5 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:material_symbols_icons/material_symbols_icons.dart'; import 'package:provider/provider.dart'; diff --git a/lib/screens/account/profile_page.dart b/lib/screens/account/profile_page.dart index 5fe9de9..161b026 100644 --- a/lib/screens/account/profile_page.dart +++ b/lib/screens/account/profile_page.dart @@ -22,7 +22,7 @@ import 'package:surface/widgets/dialog.dart'; import 'package:surface/widgets/universal_image.dart'; import 'package:surface/theme.dart'; -const Map kBadgesMeta = { +final Map kBadgesMeta = { 'company.staff': ( 'badgeCompanyStaff', Symbols.tools_wrench, @@ -33,6 +33,31 @@ const Map kBadgesMeta = { Symbols.flag, Colors.orange, ), + 'site.anniversary': ( + 'badgeSiteAnniversary', + Symbols.celebration, + Colors.orangeAccent, + ), + 'user.birthday': ( + 'badgeUserBirthday', + Symbols.cake, + Colors.red[400]!, + ), + 'community.survey': ( + 'badgeCommunitySurvey', + Symbols.star, + Colors.yellow[700]!, + ), + 'community.verified': ( + 'badgeCommunityVerified', + Symbols.verified, + Colors.blue, + ), + 'community.contributor': ( + 'badgeCommunityContributor', + Symbols.thumb_up, + Colors.lightGreen, + ), }; class UserScreen extends StatefulWidget {