Commit Graph

55 Commits

Author SHA1 Message Date
Scott Anderson 69f8e70d5d Install recommended security updates and updated browsers list (#747)
- npm audit fix --force
- npx update-browserslist-db@latest

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-05-13 18:02:41 -07:00
evanpelle ffc2fadc20 use otel for observability (#635)
## Description:

## Please complete the following:

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

<DISCORD USERNAME>

Co-authored-by: evan <openfrontio@gmail.com>
2025-05-01 11:22:56 -07:00
Scott Anderson 1070a7cb0f JWT decoding with jose (#617)
## Description:

- Decode JWT with jose, and manually verify claims.
- Unfortunately, chrome isn't able to verify EdDSA signatures, so we
can't use the simpler `jwtVerify` jose function, which would verify
claims for us.
- Use the persistent_id from the JWT.


![image](https://github.com/user-attachments/assets/f3561311-0264-48f7-8173-e7f98c3b581e)

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

fake.neo

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-30 10:17:44 -07:00
Aotumuri 607e5b5ff0 MLS-PACK (#355)
## 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

This is commit pack
This PR refactors and improves the language selection experience:
• Centralizes all language-related logic in LangSelector.ts &
LanguageModal.ts
	•	Redesigns the language selection UI for better UX across devices
	•	Adds new translations and supports more languages
Changes .w.
• Language selection is now handled entirely inside LangSelector.ts &
LanguageModal.ts
	•	Prevents background scrolling when open
	•	Highlights the current language at the top
	•	Always shows English second
	•	Shows browser language third (if different from current)
	•	All other languages are sorted alphabetically by English name
	•	Debug option is shown at the end when pressing D
	•	The language list is scrollable when it exceeds screen height
	
Supported Languages
["en", "ja", "fr", "bg", "nl", "ru", "ua", "de"]

Added Translation Keys
```
"lang": {
  "en": "English",
  "native": "English",
  "svg": "xx"
},
"map": {
  "map": "Map"
},
"game_starting_modal": {
  "title": "Game is Starting...",
  "desc": "Preparing for the lobby to start. Please wait."
},
"difficulty": {
  "difficulty": "Difficulty"
}
```

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

Translation collaborator
- Nikola123 (He was a very big help from setting up the translation site
to adding the json. Thank you so much!)
I don't have permission from my collaborators to display their names
here, so I'll put the discord link here

https://discord.com/channels/1284581928254701718/1352553113612980224/1352553113612980224
- tryout33

Collaborators from other servers.
- CCC Group (This is not Culture Convenience Club. Think of it like a
server where developers of various games are playing.)
- People who fixed the UI and found bugs.
meow02952 (discord id) <- This person also gave me a code suggestion.
Thanks!
moon_spear (discord id)
ww_what_ww (discord id)
Azuna (he doesn't have discord account)
- People who corrected translations, etc.
_kyoyume_ (discord id)
_ultrasuper_ (discord id)
grueg (he doesn't have discord account)

# If I forgot to include your name, or if you’d like your name to be
added, please let me know via Gmail or Discord.

---------

Co-authored-by: Duwibi <86431918+Duwibi@users.noreply.github.com>
2025-04-02 20:37:36 -07:00
APuddle210 71ddeca7f0 Map Revisions, one Addition, and Adjustment to Lobby Max Player based on Map Sizes (#389)
## Description:

Implementation of separate lobby playlists, one for large maps another
for small, with the implementation framework being easily adjusted for
additional playlist categories in the future (such as fantasy maps).

Addition of new map 'Between Two Seas' a small map, replacing Black Sea
in the public lobby rotation (Black Sea retained for singleplayer or
private lobbies.

Adjustments to lobbyMaxPlayer configuration function. Broke out into
tranches by map pixel count, commented to communicate to other collabs
which tranch to place their map in. This change pairs well with the
adjustment to lobby map selection to alternate between big and small
maps. For the Potato (and mobile) players.

Revision to Mena, adding lakes and rivers.

Revisions to Japan, adding lakes and rivers, slight change of bounds to
include more mainland and less ocean.


![image](https://github.com/user-attachments/assets/434ad418-3ad4-40d4-841f-2ab71d13effd)


![image](https://github.com/user-attachments/assets/c46863b4-6a29-494f-82f0-d249c5017c1d)


![image](https://github.com/user-attachments/assets/c1e10fc4-b5e8-465a-a4eb-d325447df954)


The below no longer applies, I talked to Duwibi (Nikola123) who
explained the source of the issue is outside my control, but that he was
taking the action necessary to resolve.

The only issue still present after testing the the display of the map
name for Between Two Seas on the Public Lobby button. I've asked for
assistance with this issue on the Discord and will submit a fix as soon
as I can figure out its cause. Does not impact gameplay and its 3:30am
so hopefully this issue is not enough to prevent a merge as aside from a
quick fix PR, I don't think I'll be able to do any more work until after
this weekend.


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

aPuddle
2025-04-02 10:45:37 -07:00
Scott Anderson 9a3983d014 ESLint improvements (#388)
## Description

Adds various features to improve the DX with eslint:

### Webpack

- Use `eslint-webpack-plugin` for better observability of lint errors
during development.

### Ignored files

- Enable `.gitignore` support for eslint.

### Commit hook

- Add `eslint --fix` to pre-commit hook.

### Github actions
- Add eslint check to a new github action workflow.
- Use `eslint-formatter-gha` to annotate PR files with lint failures
(see the Files changed tab,
[example](https://github.com/openfrontio/OpenFrontIO/pull/388/commits/73862230be5aad7b18e122b1cd4ab05fc9570b2c)).


![image](https://github.com/user-attachments/assets/b399b92e-8eb0-48e1-92b7-ce630ccf12e1)

## Testing

These changes have been validated through local testing and through
Github workflows.

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

fake.neo

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-02 09:09:38 -07:00
Evan 8b6895d745 add prettier import plugin 2025-03-31 13:09:27 -07:00
Mittanicz 6678d6e36e Image optimalization (#343)
I have minify images and convert them to webp format that reduce size
and keep quality.
Reduce size of bg image since its already blured by css so no need to
have it that big.

Reduce size of thumbs and helper images in helper modals should be fine
since they will not exceed the container size. Even that make them
larger than containter just to be safe
2025-03-26 10:05:45 -07:00
evanpelle f6e2ca371f Add electron deployment (#312) 2025-03-22 09:29:07 -07:00
evanpelle 6499569240 add winston logger (#289) 2025-03-18 14:36:30 -07:00
evanpelle 70e348c94b Export prometheus metrics (#286) 2025-03-18 09:00:05 -07:00
evanpelle cd1f8b9586 add testing infrastructure and example test (#276) 2025-03-17 12:20:23 -07:00
Evan 4086598a1a run npm install update deps 2025-03-17 08:56:19 -07:00
Evan 2c075fc382 Revert "initial bun setup"
This reverts commit 5236f7a212.

bun was causing code 1006 websocket errors
2025-03-16 20:37:04 -07:00
BeGj 5236f7a212 initial bun setup 2025-03-07 15:45:29 +00:00
Evan 1132dc5ed9 use S3 & reshift to archive 2025-03-03 11:53:28 -08:00
Evan c462fe74f4 move more plugins to from dev-deps to deps 2025-03-02 09:39:36 -08:00
Evan 389e905813 server is lagging for some reason and cpu is high, log cpu usage to track it 2025-02-24 13:39:03 -08:00
Evan a072a24433 add ws rate limiter 2025-02-23 19:41:38 -08:00
Evan 59ae10771c install pg 2025-02-23 19:39:21 -08:00
Evan 19794e4c65 add express rate limiting 2025-02-23 19:38:17 -08:00
Evan 0f325d4be8 add database layer 2025-02-16 12:18:50 -08:00
NewHappyRabbit 303543d246 Lobby urls! Server will server index.html and act as a SPA. 2025-02-12 21:18:23 +02:00
Evan 5abd721826 add husky precommit hook 2025-02-12 08:42:48 -08:00
Evan 2df3db7292 format root dir 2025-02-12 08:38:56 -08:00
Evan a3236653d3 add prettier command 2025-02-12 08:38:38 -08:00
NewHappyRabbit 6677936f97 All files from resources directory are now copied to build folder so they can be used directly without importing them in files.
Added flag selection.
2025-02-11 20:51:40 +02:00
NewHappyRabbit 3230151077 Started working on flags. 2025-02-11 17:51:01 +02:00
NewHappyRabbit fbd6c50b11 Added cross-env for cross-platform env variables in node. 2025-02-11 15:07:29 +02:00
Evan 2fa576c841 sanitize profane usernames 2025-02-08 19:00:35 -08:00
Evan 348a4a611a add tailwind 2025-02-01 12:05:11 -08:00
evanpelle d26eddcf2d make ips less precise before storing 2024-12-17 14:53:52 -08:00
Evan 37a71c2ef0 added discord bot 2024-12-17 14:29:31 -08:00
evanpelle 63b0e89d8b rebalance unit cost 2024-12-10 20:28:39 -08:00
Evan 7669105a1b record games in gcs 2024-12-07 18:30:04 -08:00
Evan 731536931e have game server store game 2024-12-04 18:53:36 -08:00
Evan 5abe60070b remove references to warfront 2024-12-03 20:17:58 -08:00
Evan 3e4f4e42cf created path finding web worker 2024-11-29 11:34:03 -08:00
Evan 2afecf0f39 create troop slider 2024-11-03 12:37:56 -08:00
Evan d08d0c473f add map emojis to World & Europe. Leaderboard uses twemojies 2024-10-31 16:49:40 -07:00
evanpelle 42a6a2fcef can creater & join lobby 2024-10-14 20:45:31 -07:00
evanpelle d85370dc19 Use vue, migrate emoji table to vue 2024-10-11 17:47:35 -07:00
evanpelle 64d956bda4 new front page UI 2024-10-10 17:27:00 -07:00
evanpelle 10e3361966 add donate icon 2024-10-06 19:19:21 -07:00
evanpelle 851e12613a create basic radial menu 2024-09-26 16:24:58 -07:00
evanpelle 534d97abb3 create basic win popup 2024-09-16 11:51:24 -07:00
evanpelle bf7273ad5a rebalancing 2024-09-07 13:35:07 -07:00
evanpelle 026a0cddbe use structed logging 2024-09-01 12:51:20 -07:00
evanpelle da6f0a89e7 use priority queue to store tile updates 2024-08-26 12:42:14 -07:00
evanpelle ac556ee073 preprocess map into binary data 2024-08-22 21:01:40 -07:00