feat(profile): "set your city" gamification box → one-time 500-coin reward
- New searchable city picker (src/lib/iran-cities.ts, ~60 Iranian cities, fa/en search) shown as a gold reward card at the top of the profile Basic tab. - First time a non-empty city is set, the player earns 500 coins (CITY_REWARD), granted server-authoritatively. Collapses to a compact summary afterwards with a "change city" option (no re-reward). - Frontend: UserProfile.city + cityRewardClaimed; mock-service grants on first set; session/service updateProfile accept `city`; celebratory toast + sfx. - Backend (.NET): ProfileDto.City/CityRewardClaimed (JSON blob → no migration); ProfileService.Update grants +500 once and writes a "city" ledger entry. - i18n: city.* keys (fa + en). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -152,6 +152,15 @@ const fa: Dict = {
|
||||
"chat.placeholder": "پیام بنویسید…",
|
||||
"chat.send": "ارسال",
|
||||
"chat.emoji": "ایموجی",
|
||||
"city.rewardTitle": "شهرت را انتخاب کن!",
|
||||
"city.rewardSub": "{n} سکه هدیه بگیر",
|
||||
"city.search": "جستجوی شهر…",
|
||||
"city.none": "شهری پیدا نشد",
|
||||
"city.claim": "ثبت و دریافت {n} سکه",
|
||||
"city.saveCity": "ذخیره: {city}",
|
||||
"city.claimed": "جایزهٔ شهر دریافت شد ✓",
|
||||
"city.change": "تغییر",
|
||||
"city.unknown": "نامشخص",
|
||||
"chat.empty": "گفتگو را شروع کنید",
|
||||
"friends.message": "پیام",
|
||||
|
||||
@@ -503,6 +512,15 @@ const en: Dict = {
|
||||
"chat.placeholder": "Type a message…",
|
||||
"chat.send": "Send",
|
||||
"chat.emoji": "Emoji",
|
||||
"city.rewardTitle": "Set your city!",
|
||||
"city.rewardSub": "Earn {n} coins",
|
||||
"city.search": "Search city…",
|
||||
"city.none": "No city found",
|
||||
"city.claim": "Save & get {n} coins",
|
||||
"city.saveCity": "Save: {city}",
|
||||
"city.claimed": "City reward claimed ✓",
|
||||
"city.change": "Change",
|
||||
"city.unknown": "Unknown",
|
||||
"chat.empty": "Start the conversation",
|
||||
"friends.message": "Message",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user