Commit Graph

23 Commits

Author SHA1 Message Date
Ryan 3e661752af UI refinements (#2859)
## Description:

UI Refinements requested by @evanpelle  check https://ui.openfront.dev

## 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:

w.o.n
2026-01-11 14:52:03 -08:00
Ryan 5e6c90d9bb Main Menu UI Overhaul (#2829)
## Description:

Overhauls the Main Menu UI, visit https://menu.openfront.dev to see
everything.

## 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:

w.o.n
2026-01-09 20:26:34 -08:00
bijx 4ee3319397 Feat: Added cursor price option to user and basic settings (#2655)
## Description:

Following the hotkey cursor price textbox addition of #2650, this
feature adds the option to enable and disable the visual feature via the
User Settings menu or the Basic Settings modal in game. Also added a
[new icon](https://thenounproject.com/icon/pay-per-click-2586454/) for
the Basic Settings modal from the Noun Project and added credit for it
to the `CREDITS.md` file.

### Video Demo


https://github.com/user-attachments/assets/1667081e-45e3-4b11-9bda-3f00c341e03c

### User Settings Menu
<img width="1029" height="1436" alt="image"
src="https://github.com/user-attachments/assets/e4e6bf6d-db59-463a-81fb-f622ef6e3931"
/>

### Basic Settings Menu
<img width="964" height="1545" alt="image"
src="https://github.com/user-attachments/assets/6b083655-b96e-4937-95d6-f3458858f03d"
/>



## 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:

bijx
2025-12-20 11:09:44 -08:00
Aotumuri 66ae8cd9bb Remove troop ratio slider and description (#2617)
## Description:

Removed unused translation strings and code.

## 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:

aotumuri
2025-12-14 15:13:40 -08:00
Aotumuri f57adced5d Add missing English keybind text for MIRV action (#2289)
## Description:

This PR adds the missing string for the MIRV keybind action in the User
Settings menu.
<img width="383" height="137" alt="スクリーンショット 2025-10-25 16 03 21"
src="https://github.com/user-attachments/assets/1a436fff-76a3-428a-bf14-c836ef9faf40"
/>

## 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:

aotumuri
2025-10-25 13:57:58 -07:00
Vivacious Box f6839ffe99 Fix icons and add mirv to build bar (#2154)
## Description:

Fix blurry icons and add mirv to build bar
<img width="792" height="101" alt="image"
src="https://github.com/user-attachments/assets/a46c4724-c99b-4541-b56b-92ec662c8ec5"
/>

<img width="176" height="275" alt="image"
src="https://github.com/user-attachments/assets/dbcd2ed4-0f21-4065-9a52-9b16e9043270"
/>


## 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:

DISCORD_USERNAME
2025-10-08 13:49:54 -07:00
Vivacious Box 311d43ab4f Build bar (#2059)
## Description:

Make the unit display bar a proper unit build bar
Add shortcuts for all structures and units
Add ranges for ranged structures and units
Changed the shortcuts to use the key instead of the code for
internationalization purposes


![buildbar](https://github.com/user-attachments/assets/6407dc9c-14b4-40cc-8faa-cdd9e88c9fd2)
<img width="285" height="517" alt="image"
src="https://github.com/user-attachments/assets/91bb01e6-e48c-4255-ace1-306af9cdc25b"
/>

## 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:

Mr.Box

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
Co-authored-by: icslucas <carolinacarazolli@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-02 12:38:28 -07:00
Aotumuri b7e07208c8 Fix: Sync Dark Mode Button State (#1708)
## Description:

This PR updates the dark mode toggle logic to synchronize the state of
the component.
Fix: https://github.com/openfrontio/OpenFrontIO/issues/1244

## 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 have read and accepted the CLA agreement (only required once).

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

aotumuri
2025-08-06 01:26:20 +00:00
Vivacious Box b479d04c6c Icons update (#1562)
## Description:

Add option toggle for structure sprites
Add new icons
Add new shapes
Add scaling for text and bigger text

<img width="853" height="548" alt="image"
src="https://github.com/user-attachments/assets/2f3e0b3d-af34-485b-a897-11fd74f6c51a"
/>
<img width="690" height="375" alt="image"
src="https://github.com/user-attachments/assets/9dea3fc2-6054-473d-9530-0222e49948ac"
/>


## 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 have read and accepted the CLA aggreement (only required once).

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

Mr. Box

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-08-04 10:06:53 -07:00
Tyler Hanavan 15d0fd5b64 Allow main menu modals to be closed by clicking escape (#1617)
## Description:



Allow the main menu modals to be closed by clicking the Escape key. The
manner by which this change achieves this is by adding a
connectedCallback to add a keydown EventListener, which closes the modal
on clicking Escape.

Relevant issue: #1586 

My earlier PR was only for the in-game modals, as they can access the
Event Bus and receive the CloseViewEvent.
https://github.com/openfrontio/OpenFrontIO/pull/1604

As mentioned, this PR differs in that it does not use the Event Bus
because these are not in-game modals. The main menu modals do not have
access to the event bus.

Affected modals for this PR.
- UserSettingModal.ts
- TerritoryPatternsModal.ts
- SingePlayerModal.ts
- NewsModal.ts
- LanguageModal.ts
- JoinPrivateLobbyModal.ts
- HostLobbyModal.ts
- HelpModal.ts
- FlatInput.ts








## 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 have read and accepted the CLA agreement (only required once).

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

slyty

---------

Co-authored-by: Antoine <antoine.gannat@gmail.com>
2025-08-02 04:36:03 -04:00
evanpelle 3b8a36166a Remove workers & troop ratio bar, only have troops (#1676)
## Description:

The troop/worker ratio bar is almost never changed. so remove it and the
entire concept of workers. Now there is just troops.

Now players get a consistent 1k/s gold.

## 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 have read and accepted the CLA agreement (only required once).

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

evan
2025-08-01 16:06:59 -07:00
maxime.io c5484696f7 Display FPS monitor overview (#1573)
## Description:

Display an FPS monitor to track performance on each new feature.
It only appears in the development environment, positioned at the top
center to remain visible—especially on mobile.
The display can be closed via a close button.

I already use it to evaluate my other PR on low end device.

<img width="1126" height="845" alt="image"
src="https://github.com/user-attachments/assets/a7197572-6aea-47df-9dd2-e84947c7aee0"
/>


## 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 have read and accepted the CLA aggreement (only required once).

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

devalnor
2025-07-30 15:28:38 -04:00
floriankilian 48632cc0e0 Add private lobby ID visibility toggle (#1382)
## Description:
Added an eye icon to the lobby ID button so users can hide/show their
lobby ID for privacy. When hidden, it shows dots (••••••••) instead of
the actual ID. Also added a setting in the user settings to control the
default behavior.

**Fixes #1091**

### What's new:
- Click the eye icon to toggle lobby ID visibility
- Global preference in User Settings modal
- Creating a new Lobby will take the set preference from User Settings
- Copy function still works when hidden


![image](https://github.com/user-attachments/assets/3f0b0299-cf49-492a-a1eb-51ec73ba1827)

![image](https://github.com/user-attachments/assets/77c48a89-1910-4bd4-988d-d86d5f3cbf4a)

![image](https://github.com/user-attachments/assets/5d4e16d8-0e91-4cb4-a343-4529172a766e)


## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:
[UN]nvm
2025-07-26 00:00:47 -04:00
Daniel b181c6c15d Keybind Ground Attack (#1258)
## Description:

- Implement ground attack logic in ClientGameRunner
- Move cursor location logic from doBoatAttackUnderCursor to
getTileUnderCursor for reusability.
- New keybind G for Ground Attack
- Add translations for ground attack labels in English

## 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

<img width="902" alt="image"
src="https://github.com/user-attachments/assets/54bb3178-af2e-4715-bfa2-82b7fe0e8e85"
/>

*The getTileUnderCursor() and doGroundAttackUnderCursor() methods are
private with many dependencies. I did not do isolated unit testing and
thus zero tests where added.

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

eng.la

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-25 15:21:54 +00:00
maxime.io 629ce68604 Show a red alert frame when the player is betrayed (#1195)
## Description:

With the alert frame, we're notified and can view the event using a
“Focus” button that moves the map to the traitor, or dismiss it with a
“Dismiss” button. The alert auto-dismisses after a few seconds.

**Because this feature provides an advantage, the trade-off is having to
wait a full 10 seconds or manually clicking “Dismiss” to close it.**

- Show a red alert frame animation when the player is betrayed.
- ~~The alert frame can be dismissed manually.~~
- The alert frame is automatically dismissed after ~~10~~ 3 seconds.
- If the user doesn’t want to see it at all, they can disable it in the
settings.

![Capture d’écran 2025-06-16 à 20 09
51](https://github.com/user-attachments/assets/2897ae16-85d6-4201-ac5b-e60b0cb18add)
![Capture d’écran 2025-06-16 à 20 10
24](https://github.com/user-attachments/assets/088edf08-20fe-4dae-8c00-cbcd24004bd0)
![Capture d’écran 2025-06-16 à 20 10
50](https://github.com/user-attachments/assets/894296aa-c753-429f-8c5d-edd881deec48)
![Capture d’écran 2025-06-16 à 20 11
14](https://github.com/user-attachments/assets/29503958-0042-4614-8db2-2663cadee441)

## 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:

This is my first PR let me know if anything needs improvement!

devalnor
2025-06-23 19:15:30 +00:00
Aotumuri b71acdc993 Patterned territory (#786)
## Description:
This is meant to give players more customization options.
Permission handling hasn’t really been implemented yet.
## 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-06-22 23:57:24 -04:00
tnhnblgl 4367bacf71 Add Boat hotkey (#1060)
## Description:
Pressing B to fast boat

![Screenshot_2025-06-06-09-32-53-865_com android
chrome](https://github.com/user-attachments/assets/cdd4aefe-0088-4334-bf69-7cf3b32b6db6)

## 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:
dovg
2025-06-06 14:11:39 -07:00
falc b29cc56abc added ratio controls (#963)
## Description:
added custom controls for attack ration to user 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

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

@qqkedsi
![Screenshot from 2025-05-31
01-18-30](https://github.com/user-attachments/assets/2460aab2-51ef-46d9-9d05-53e84dd57b29)

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-03 15:54:54 -07:00
DevelopingTom bb24f18285 Add new FX layer and a nuke animation (#807)
## Description:

Changes:
- Added an AnimatedSprite class to handle spritesheets
- New FX layer, displaying cosmectics effects
- New Nuke FX: an animated sprite explosion, and a shockwave effect
- New "Special effects" setting, toggle to deactivate the FX layer for
lower-end hardware / personal taste


#### Note that the animation is a placeholder. It should be replaced
when a better looking one is available.

- Nuke:


https://github.com/user-attachments/assets/6eff1d0d-5081-47ad-932f-2bfcda72cb3c


- Mirv:


https://github.com/user-attachments/assets/3bc891b4-449c-4acb-8e24-e237b423c2a9


- SAM are also using the same Nuke animation. To be improved with a
custom FX:


https://github.com/user-attachments/assets/d65addce-5890-42c2-81e0-3eaa79ed87f3

## Performances:

Excellent since it's not manipulating the underlying imagedata directly.
Profiling during a MIRV with 100's of animations:

![image](https://github.com/user-attachments/assets/3477c963-d10f-493b-bcb1-93b7990d3edb)



### New settings:

- main menu:


![image](https://github.com/user-attachments/assets/5b1127bb-3b89-4c06-b519-fb173301d9fd)

- In game:


![image](https://github.com/user-attachments/assets/ba899253-a7cf-4d1c-8801-da41d2b1536b)


## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-18 12:43:12 -07:00
Scott Anderson 70745faac4 Enable strictNullChecks, eqeqeq (#436)
## Description:

Improve type safety and runtime correctness by:
1. Enabling TypeScript's
[strictNullChecks](https://www.typescriptlang.org/tsconfig/#strictNullChecks)
compiler option.
2. Replacing all loose equality operators (`==` and `!=`) with strict
equality operators (`===` and `!==`).
3. Cleaning up of type declarations, null handling logic, and equality
expressions throughout the project.

Currently, the code allows implicit assumptions that `null` and
`undefined` are interchangeable, and relies on type-coercing equality
checks that can introduce subtle bugs. These practices make it difficult
to reason about when values may be absent and hinder the effectiveness
of static analysis.

Migrating to strict null checks and enforcing strict equality
comparisons will clarify intent, reduce bugs, and make the codebase
safer and easier to maintain.

Fixes #466 

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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 <662325+scottanderson@users.noreply.github.com>
Co-authored-by: evanpelle <openfrontio@gmail.com>
2025-05-15 16:39:40 -07:00
Aotumuri a62bbbc6b1 Add anonymous name toggle to user settings (#661)
## Description:
Added a new toggle to user settings 
I deleted some leftover files that were no longer in use in order to
eliminate errors.

## Please complete the following:
- [x] I have added screenshots for all UI updates
- [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-05-07 08:55:01 -07:00
Aotumuri 7092e9c166 Added keybinding configuration. (#548)
## Description:
Added support for customizable keybind settings.

fixes #549

fixed these bug
https://discord.com/channels/1284581928254701718/1363254158341308668
https://discord.com/channels/1284581928254701718/1362159209642459166

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-05 08:40:52 -07:00
Aotumuri 3eccbaa982 Added User Settings Modal (#379)
## Description:

This PR adds a **User Settings** modal accessible from the main UI.

Currently available settings include:
- Toggle for Dark Mode
- Writing Speed Multiplier (slider)
- Bug Count (number input)
-  Troop and Worker Ratio (slider)
-  Left Click to Open Menu
-  Emoji toggle

Settings are saved via `localStorage` and persist across sessions.
There's also a hidden Easter Egg...

https://discord.com/channels/1284581928254701718/1286741605310533653/1355900228712009908
<img width="787" alt="スクリーンショット 2025-03-31 8 40 08"
src="https://github.com/user-attachments/assets/a9943834-cf40-4fa6-b828-06a8476172da"
/>

Fixes #482 

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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:

<DISCORD USERNAME>
aotumuri
2025-04-14 11:47:50 -07:00