2202 Commits

Author SHA1 Message Date
evanpelle 06fca98b91 create cla.md 2025-07-16 18:46:32 -07:00
evanpelle 9d480a3816 update cc nc license 2025-07-16 18:31:27 -07:00
evanpelle 712e824ffc Revert MIRV attacks enemy units (#1452)
This reverts commit 185fcb5fb0.

## Description:

This change made the MIRV way too powerful. If two players MIRV each
other it creates a stalemate because it takes so long to recover.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-16 15:50:15 -07:00
VariableVince af3dcb77bd Fix: anonymized name isn't used in chat message (#1265)
## Description:

Bugfix:
- Anonymized name isn't used in Event Panel message, instead actual
player name is displayed even if "Hidden names" is enabled. Neither for
the 'P1' name in the chat message, nor for the name in "From name:
message" and "Sent name: message". Fix: in QuickChatExecution, instead
of sender.name() and recipient.name(), send their id(). In
EventsDisplay, from that PlayerID get their displayName.

- There was more in this PR to try to improve readibility and remove
some unused/uncommented code. This was moved later to #1275, which may
be re-opened and brought up-to-date after this PR is merged.

Example screenshot of the bug before the fix, send chat to anonymized
name 'Norwegian Sisterhood' but in Event Panel real name 'Mister Goo'
was displayed:
![Sent Mister Goo instead of anonymous Norwegian
Brotherhood](https://github.com/user-attachments/assets/197e2808-aa85-4271-9c96-c53fe10f6546)

## 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
- [ ] 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-07-15 19:43:31 -04:00
evanpelle 5dd7826192 make radial menu thicker (#1446)
## Description:

The root radial elements had a dead space, causing accidental misclicks.
This PR makes the wider. It also shrinks the back button to prevent
overlap.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
v0.24.0-beta3
2025-07-15 12:08:07 -07:00
evanpelle d4794840f6 Have radial menu refresh when open (#1437)
## Description:

There was a regression where the radial menu would not refresh while
open (eg open radial menu, then get enough gold to build something, the
radial wouldn't update).

Also refactored a bit

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-15 11:54:33 -07:00
evanpelle 6efc37e97d fix number of land tiles fixes #1409 (#1445)
## Description:

There was a bug in the map generator where shore tiles were counted
twice.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-15 11:38:53 -07:00
Scott Anderson 729cc6a500 Restore nation AI (#1440)
## Description:

Restore the nation AI that scaled with difficulty, while only allowing
one of the attack routines to attack.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-07-15 01:20:05 -04:00
Scott Anderson be01b90b25 Eslint (#998)
## Description:

Enable a few eslint rules:
- `@typescript-eslint/no-empty-object-type`
- `@typescript-eslint/no-require-imports`
- `no-useless-escape`

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

---------

Co-authored-by: Scott Anderson <scottanderson@users.noreply.github.com>
2025-07-15 00:41:24 -04:00
g-santos-m 31381f67f4 Enable @typescript eslint/prefer nullish coalescing eslint rule (#1420)
## Description:

Fixes #952 
Enabled @typescript-eslint/prefer-nullish-coalescing rule and worked
through every error, introducing ?? and ??= operators or disabling
errors with inline comments where appropriate, to the best of my
ability.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

g_santos_m
2025-07-15 03:00:06 +00:00
evanpelle ac9a9ec253 fix unit upgrade not considering cost (#1434)
## Description:

bugfix: The price was not considered when checking it upgrading a unit
was allowed.
Also refacted and cleaned up the code a bit.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-14 16:32:05 -07:00
floriankilian 211c2ff49d Followup: news-button: blue-glow; simpler localStorage (#1431)
## Description:

Changed the localStorage key from "news-button-last-seen-version" to a
simpler "version" in the NewsButton component.
And reverting a coderabbit recommendation in the css file, that
eliminated the blue glow effect.

Follow-up to #1385

<img width="808" height="845" alt="Screenshot 2025-07-14 205018"
src="https://github.com/user-attachments/assets/8c26c36c-ee2e-4a53-af61-f371eefd102a"
/>

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

[UN]nvm
2025-07-14 15:12:12 -04:00
DevelopingTom 29b587cdae Factory spawns trains (#1408)
## Description:

- Change trains so it spawns from factories only
- Increase train frequency as they will now spawn from a single
structure.
- Factory will spawn more trains depending on its level
- Fix port to connect to nearby railroads
- Add factory description

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

IngloriousTom

---------

Co-authored-by: Tom Rouillard <trouilla@mathworks.com>
Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-07-14 08:59:51 -07:00
evanpelle 1e73293d4f remove radial animation, fix back button (#1427)
## Description:

Removed the animation from the radial menu, it now pops up instantly
Also fixed bug where back button was grayed out

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-14 08:57:38 -07:00
evanpelle 79505c41c8 radial menu attack self bugfix (#1426)
## Description:

bugfix where the radial center button was active when clicking on your
own territory.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-13 18:09:41 -07:00
evanpelle da8aeedd8b Leaderboard improvements (#1424)
## Description:

1. Made leaderboard smaller
2. replaced show top 5/show all with a +/- to save space
3. show leaderboard by default on larger screens

<img width="458" height="393" alt="Screenshot 2025-07-13 at 5 27 10 PM"
src="https://github.com/user-attachments/assets/c18c732b-8b1e-4b71-89aa-b807ceb91e30"
/>

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-13 17:48:04 -07:00
evanpelle 5fbeb4d64e fix team bar (#1425)
## Description:

The teambar was 80 px from the top

## 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
- [ ] I have added relevant tests to the test directory
- [ ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [ ] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-13 17:42:57 -07:00
evanpelle 9c03813f63 fix team bar (#1422)
## Description:

On team games the bar was about 80 pixels below the top of the screen

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-13 15:01:15 -07:00
evanpelle 185fcb5fb0 have mirv attack enemy units (#1419)
## Description:

Have MIRVs first target enemy units. 

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-13 13:34:40 -07:00
evanpelle fab1f265cb fix build menu shortcut 2025-07-13 13:08:49 -07:00
evanpelle f877756125 move player overview higher up (#1418)
## Description:

It was too low, causing it to overlap with the events panel on smaller
screens.
<img width="310" height="382" alt="Screenshot 2025-07-13 at 12 41 32 PM"
src="https://github.com/user-attachments/assets/09be06f8-17d8-4bb0-80d1-73bb75969bb9"
/>

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-13 12:44:56 -07:00
evanpelle d9f4e86968 Remove top bar & revert control panel (#1415)
## Description:

Reverting control panel back to v23. Once we remove the worker/troop bar
we can revisit moving it to back to the top.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-13 12:29:41 -07:00
evanpelle 61ec324eb9 remove levels player overview panel (#1414)
## Description:

Since unit levels are really just stacking, there's not reason to show
number of units & sum of all units

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-13 12:25:29 -07:00
Aotumuri 9d45f21730 mls (v4.1) (#1357)
## Description:

mls for v24
Version identifier within MLS: v4.1

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-07-13 07:09:42 +00:00
evanpelle b07a59685e fix color allocator not selecting distinct colors (#1404)
## Description:

The color allocator only checked if DeltaE met a threshold of 25, but
most colors met that threshold, so it wasn't much better than random.
Now it goes down the list of assigned colors to find the most unique
color to add.

Also changed algorithms from deltaE76 to deltaE2000 as that seemed to
produce better results.

The algorithm is O(n^2) so we cap distinct check at 50 colors, after
that fall back to random selection. After 50 colors our color palette is
pretty much exhausted anyways.

Moved ColorAllocator to its own file

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-12 09:30:29 -07:00
Scott Anderson 0d7c58d5b8 Unit count (#1402)
## Description:

Use an iterative approach to counting units to reduce array allocations.

## 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
- [ ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-07-12 09:24:44 -07:00
DevelopingTom e4e17ffb13 Redraw existing railroads when redrawing the complete layer (#1410)
## Description:

Fix bug that made railroads disappear when switching to dark mode.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

IngloriousTom
2025-07-11 20:19:47 -07:00
Scott Anderson f0e9f97a7f Update README.md (#1407)
## Description:

Update README.md to link to openfront.io

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-07-11 12:09:20 -04:00
Aotumuri f15b78174b Internationalization: Add i18n support for login/auth messages in main (#1406)
## Description:
Internationalized all authentication-related messages shown before login
or when unauthorized (e.g. "Login is required to access this website.")
using the `translateText` function.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

aotumuri
2025-07-11 11:40:29 -04:00
evanpelle 67445d8d4d port execution bugfixes (#1400)
## Description:

fixes 2 bugs with port execution:

1. scale tradeship spawn chance with port level
2. pass in number of tradeships instead of total number of ports to the
config

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-10 11:41:08 -07:00
evanpelle f95f76a01a update meta (#1397)
## Description:

* cap trade ships at 100, instead have more ports increase gold per ship
* nerf defense post speed reduction. Sometimes attacks were so slow the
attacker could "store" troops in the attack.
* adjust trade ship spawn rate: increase spawn rate early game to speed
up game play
* nerf MIRVs by making blast radius smaller. This allows the territory
to stay continuous, allowing the attacker to conquer faster and speeding
up late game.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-10 10:37:20 -07:00
evanpelle 488ffc5c9e Improve unit updates & reloading (#1394)
## Description:

Previously upgrading a unit would have it reload immediately, eg
upgrading missile silo 1=>2 gives it 2 missiles immediately. With this
change it must reload the missile. Same with SAMs. This prevents users
from spamming upgrades as missiles are coming in.

Fix the progress reloading bar. Previously it only showed the SAM/silo
as reloading when it was completely out of missiles. Now it shows
roughly how many missiles are available (eg level 5 fires 3 missiles,
now progress bar is at 40%). It also shows progress of missiles
reloading. If no missiles are available, progress bar is empty

There was a bug where if a silo of SAM was in cooldown it would be
updated each tick, causing the sprite/icon to be rerendered each tick.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-10 10:06:05 -07:00
evanpelle 0feb5d29c5 fix odd dimension maps (#1389)
## Description:

Remove the last column/row from a map if it has odd dimensions. Odd
dimensions were causing pathing issues when translating between mini map
& regular map.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-09 12:23:07 -07:00
Aotumuri 9421327a63 fixed Custom Flags via Path Traversal (#1384)
## Description:

[issue](https://github.com/openfrontio/OpenFrontIO/issues/1367)
<img width="466" alt="スクリーンショット 2025-07-09 21 19 07"
src="https://github.com/user-attachments/assets/e1a1ffcf-2440-4b27-b540-242044fbd002"
/>
<img width="926" alt="スクリーンショット 2025-07-09 21 08 27"
src="https://github.com/user-attachments/assets/2f7d4edd-62db-478f-8756-e59e693b1354"
/>


## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

aotumuri
2025-07-09 19:05:07 +00:00
Scott Anderson 74f6ed4851 Fix local development (#1388)
## Description:

Remove the erroneous login requirement for local development.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-07-09 11:59:03 -07:00
floriankilian be8b7a5cb4 feat(news-button): highlight button when new version is available (#1385)
Introduced a visual indicator for the NewsButton component to notify
users about new content upon version update. This change adds an
`isActive` state to the NewsButton that checks against the version
stored in localStorage. If a new version is detected, the button is
highlighted with specific styling defined in styles.css, including a
pulsing notification effect to draw user attention. The state resets to
inactive upon button click. This enhancement improves user engagement by
ensuring they are aware of new updates.

Fixes #1369 

## Description:

![CleanShot Google Chrome 2025-07-09 at 15 38
19@2x](https://github.com/user-attachments/assets/68928e61-6ec5-472a-9933-0732e88788b5)
![CleanShot Google Chrome 2025-07-09 at 15 38
50](https://github.com/user-attachments/assets/bec96517-e4a3-4dce-a8fa-3d405ce62337)


## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

[UN]nvm
2025-07-09 14:29:29 -04:00
Scott Anderson d8d5220948 Require login to connect to staging (#1360)
## Description:

Complete:
- Add support for cookie-based auth (ref
https://github.com/openfrontio/infra/pull/83)
- Restrict game server API access to users with a specific flare
- Restrict join game to users with a valid token and an allowed flare
- Unauthorized landing page
- Token cache
- Destroy token cookie on logout

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-07-09 03:57:08 -04:00
Scott Anderson 78deecdb6c Don't erase patterns on page load (#1383)
## Description:

Even if the player does not appear to have access to a pattern, do not
erase their setting.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-07-09 00:20:38 -04:00
Scott Anderson 739399b5a5 bugfix: Crash (#1381)
## Description:

Resolve a crash caused by un-sanitized user inputs.

Fixes #1380.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-07-08 18:41:38 -07:00
Scott Anderson 2e442c9c29 Add expand ratio to bot behavior class (#1376)
## Description:

- Create a new expand ratio that allows AI players to expand with a much
lower reserve ratio than the normal attack reserve ratio.
- Unify the implementation of the first attack between bots and nations.
- Bugfix: Multiple attacks per tick could cause nations to full-send.
- Improve the chance of finding a place to boat to by allowing nations
to target non-shore land tiles.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-07-08 18:39:11 -07:00
evanpelle 057c3dd784 fix pop delta number in TopBar (#1373)
## Description:

The population delta number was always green, even if it was decreasing.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-07-08 21:13:27 +00:00
evanpelle 56dd582002 add domain and subdomain for dev env (#1379)
## Description:

env variables DOMAIN and SUBDOMAIN were not found in the env, so have
DevServerConfig override the methods.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-08 14:04:08 -07:00
evanpelle 2bec62ef8e fix top bar small screens (#1377)
## Description:

Changed top by from absolute => fixed position to fix issue where topbar
was not rendered on small screens.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-08 13:57:51 -07:00
Scott Anderson e65d8a470f bugfix: Crash during replay (#1375)
## Description:

During local development, joining a game immediately after it ends to
watch a replay results a crash.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-07-08 13:31:30 -07:00
Scott Anderson d18908bb68 Add domain, subdomain to GameRecord (#1370)
## Description:

Add domain, subdomain to GameRecord.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-07-08 12:45:27 -07:00
Scott Anderson 7b7cdfe19c Validate incoming parameters (#1371)
## Description:

Validate incoming parameters.

https://github.com/openfrontio/OpenFrontIO/security/code-scanning/17

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-07-08 12:40:36 -07:00
Tomasz 4ed4c7e507 Add localization support for game events, settings, and UI text elements (#1372)
## Description:

This PR adds missing translations for various UI components, including
game events and settings. No visual changes were made, so screenshots
are not required. All user-facing text has been properly localized and
added to the en.json file.

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

pierogi69

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-07-08 12:39:28 -07:00
evanpelle 2cbe34ed79 update ui (#1368)
## Description:

Center pop & gold information, and split up & remove the top bar.

Before:

<img width="1913" alt="Screenshot 2025-07-07 at 7 54 55 PM"
src="https://github.com/user-attachments/assets/8ab59102-1f0e-4023-905f-e0b1b2fa73a2"
/>


After:

<img width="1916" alt="Screenshot 2025-07-07 at 7 53 02 PM"
src="https://github.com/user-attachments/assets/06c885e3-a179-4447-9d1d-0da3849e726d"
/>


reference:

![image](https://github.com/user-attachments/assets/8c985a1a-e232-45ce-9af7-c1981df7fb15)

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-07 20:06:14 -07:00
evanpelle a387909262 Move settings to it's own modal (#1366)
## Description:

The settings has grown to the point where it deserves its own modal.
<img width="1144" alt="Screenshot 2025-07-07 at 3 55 23 PM"
src="https://github.com/user-attachments/assets/a1527d79-93c3-4bf3-ba67-dce643bc81ea"
/>

NOTE: styling is still needed.

## 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
- [ ] I have added relevant tests to the test directory
- [ ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [ ] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-07 16:22:55 -07:00
evanpelle 8aa3775bd8 move unit display to bottom of screen (#1365)
## Description:

Using this design:


https://cdn.discordapp.com/attachments/1391061082524881078/1391221235324551409/image.png?ex=686d157e&is=686bc3fe&hm=1027b79141dac471dcae4c002beb5f1425790bd282607efda5ff5bfb3e8fda83&
<img width="1904" alt="Screenshot 2025-07-07 at 3 11 48 PM"
src="https://github.com/user-attachments/assets/d1710c32-9dc1-48e3-8abd-affc0c6c5bfd"
/>

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-07-07 15:20:44 -07:00