Implement send resources modal (#2146)

## Description:
Fixes https://github.com/openfrontio/OpenFrontIO/issues/2015
Implemented a new interactive modal component for sending troops/gold
between players, replacing the previous automatic troop donation system.

Screenshots
<img width="388" height="569" alt="s1"
src="https://github.com/user-attachments/assets/b5b5cfce-972e-474c-848a-4ea0dc7dde8f"
/>

<img width="383" height="534" alt="s2"
src="https://github.com/user-attachments/assets/4c467fa2-7631-4e7b-ab17-898778b08ea6"
/>

<img width="377" height="548" alt="s3"
src="https://github.com/user-attachments/assets/9359ee06-18af-48ea-a47c-586198e26f57"
/>

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

abodcraft1

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
This commit is contained in:
Abdallah Bahrawi
2025-10-09 23:19:05 +03:00
committed by GitHub
parent d070c5810c
commit 0076996dce
4 changed files with 704 additions and 54 deletions
+29 -6
View File
@@ -6,7 +6,18 @@
"lang_code": "en"
},
"common": {
"close": "Close"
"close": "Close",
"available": "Available",
"preset_max": "Max",
"summary_send": "Send",
"summary_keep": "Keep",
"cancel": "Cancel",
"send": "Send",
"cap_label": "Cap",
"cap_tooltip": "Recipients remaining capacity",
"target_dead": "Target eliminated",
"target_dead_note": "You can't send resources to an eliminated player.",
"none": "None"
},
"main": {
"title": "OpenFront (ALPHA)",
@@ -590,8 +601,6 @@
"troops": "Troops",
"betrayals": "Betrayals",
"traitor": "Traitor",
"stable": "Stable",
"trust": "Trust",
"trading": "Trading",
"active": "Active",
"stopped": "Stopped",
@@ -600,9 +609,6 @@
"nuke": "Nukes sent by them to you",
"start_trade": "Start Trading",
"stop_trade": "Stop Trading",
"yes": "Yes",
"no": "No",
"none": "None",
"alliances": "Alliances",
"flag": "Flag",
"chat": "Chat",
@@ -615,6 +621,23 @@
"send_gold": "Send Gold",
"emotes": "Emojis"
},
"send_troops_modal": {
"title_with_name": "Send Troops to {name}",
"available_tooltip": "Your current available troops",
"min_keep": "Min keep",
"min_keep_pct": "(30%)",
"slider_tooltip": "{{percent}}% • {{amount}}",
"toggle_attack_bar_mode": "Use attack bar to send troops",
"warning_attackbar": "Once enabled, you can't open this modal directly. You'll only send troops via the attack bar.",
"aria_slider": "Troops slider",
"capacity_note": "Receiver can accept only {{amount}} right now."
},
"send_gold_modal": {
"title_with_name": "Send Gold to {name}",
"available_tooltip": "Your current available gold",
"aria_slider": "Amount slider",
"slider_tooltip": "{{percent}}% • {{amount}}"
},
"replay_panel": {
"replay_speed": "Replay speed",
"game_speed": "Game speed",