Compare commits
4 Commits
ee39e28443
...
1e7f1645a6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e7f1645a6 | ||
| 8601d7ced1 | |||
| 74941a8abc | |||
| 86683d410f |
@ -124,6 +124,19 @@ async fn update_game(
|
||||
if let Some(existing) = games.iter_mut().find(|g| {
|
||||
(g.remote_id == game.remote_id && g.source == game.source) || (g.title == game.title)
|
||||
}) {
|
||||
if existing.title != game.title {
|
||||
// Update title for every opinion
|
||||
for person in user_list.lock().await.iter_mut() {
|
||||
let opinion = person
|
||||
.person
|
||||
.opinion
|
||||
.iter_mut()
|
||||
.find(|o| o.title == existing.title);
|
||||
if let Some(opinion) = opinion {
|
||||
opinion.title = game.title.clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
existing.title = game.title.clone();
|
||||
existing.source = game.source;
|
||||
existing.min_players = game.min_players;
|
||||
@ -133,6 +146,9 @@ async fn update_game(
|
||||
|
||||
r_existing = Some(existing.clone());
|
||||
}
|
||||
|
||||
games.sort_unstable_by(|g1, g2| g1.title.cmp(&g2.title));
|
||||
|
||||
let users = user_list.lock().await;
|
||||
save_state(&games, &users);
|
||||
|
||||
@ -154,7 +170,12 @@ async fn delete_game(
|
||||
{
|
||||
let game = games.remove(pos);
|
||||
|
||||
let users = user_list.lock().await;
|
||||
let mut users = user_list.lock().await;
|
||||
|
||||
for person in users.iter_mut() {
|
||||
person.person.opinion.retain_mut(|o| o.title != game.title);
|
||||
}
|
||||
|
||||
save_state(&games, &users);
|
||||
|
||||
return Some(game);
|
||||
|
||||
52
frontend/pnpm-lock.yaml
generated
52
frontend/pnpm-lock.yaml
generated
@ -16,13 +16,13 @@ importers:
|
||||
version: 2.10.1
|
||||
react:
|
||||
specifier: ^19.2.1
|
||||
version: 19.2.1
|
||||
version: 19.2.3
|
||||
react-dom:
|
||||
specifier: ^19.2.1
|
||||
version: 19.2.1(react@19.2.1)
|
||||
version: 19.2.3(react@19.2.3)
|
||||
react-router-dom:
|
||||
specifier: ^7.10.1
|
||||
version: 7.10.1(react-dom@19.2.1(react@19.2.1))(react@19.2.1)
|
||||
version: 7.10.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
|
||||
devDependencies:
|
||||
'@eslint/js':
|
||||
specifier: ^9.39.1
|
||||
@ -32,10 +32,10 @@ importers:
|
||||
version: 24.10.1
|
||||
'@types/react':
|
||||
specifier: ^19.2.7
|
||||
version: 19.2.7
|
||||
version: 19.2.8
|
||||
'@types/react-dom':
|
||||
specifier: ^19.2.3
|
||||
version: 19.2.3(@types/react@19.2.7)
|
||||
version: 19.2.3(@types/react@19.2.8)
|
||||
'@vitejs/plugin-react':
|
||||
specifier: ^5.1.2
|
||||
version: 5.1.2(rolldown-vite@7.2.5(@types/node@24.10.1))
|
||||
@ -359,8 +359,8 @@ packages:
|
||||
peerDependencies:
|
||||
'@types/react': ^19.2.0
|
||||
|
||||
'@types/react@19.2.7':
|
||||
resolution: {integrity: sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==}
|
||||
'@types/react@19.2.8':
|
||||
resolution: {integrity: sha512-3MbSL37jEchWZz2p2mjntRZtPt837ij10ApxKfgmXCTuHWagYg7iA5bqPw6C8BMPfwidlvfPI/fxOc42HLhcyg==}
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.48.1':
|
||||
resolution: {integrity: sha512-X63hI1bxl5ohelzr0LY5coufyl0LJNthld+abwxpCoo6Gq+hSqhKwci7MUWkXo67mzgUK6YFByhmaHmUcuBJmA==}
|
||||
@ -425,7 +425,7 @@ packages:
|
||||
resolution: {integrity: sha512-EcA07pHJouywpzsoTUqNh5NwGayl2PPVEJKUSinGGSxFGYn+shYbqMGBg6FXDqgXum9Ou/ecb+411ssw8HImJQ==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
peerDependencies:
|
||||
vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0
|
||||
vite: npm:rolldown-vite@7.2.5
|
||||
|
||||
acorn-jsx@5.3.2:
|
||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||
@ -863,10 +863,10 @@ packages:
|
||||
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
react-dom@19.2.1:
|
||||
resolution: {integrity: sha512-ibrK8llX2a4eOskq1mXKu/TGZj9qzomO+sNfO98M6d9zIPOEhlBkMkBUBLd1vgS0gQsLDBzA+8jJBVXDnfHmJg==}
|
||||
react-dom@19.2.3:
|
||||
resolution: {integrity: sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==}
|
||||
peerDependencies:
|
||||
react: ^19.2.1
|
||||
react: ^19.2.3
|
||||
|
||||
react-refresh@0.18.0:
|
||||
resolution: {integrity: sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==}
|
||||
@ -889,8 +889,8 @@ packages:
|
||||
react-dom:
|
||||
optional: true
|
||||
|
||||
react@19.2.1:
|
||||
resolution: {integrity: sha512-DGrYcCWK7tvYMnWh79yrPHt+vdx9tY+1gPZa7nJQtO/p8bLTDaHp4dzwEhQB7pZ4Xe3ok4XKuEPrVuc+wlpkmw==}
|
||||
react@19.2.3:
|
||||
resolution: {integrity: sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
resolve-from@4.0.0:
|
||||
@ -1354,11 +1354,11 @@ snapshots:
|
||||
dependencies:
|
||||
undici-types: 7.16.0
|
||||
|
||||
'@types/react-dom@19.2.3(@types/react@19.2.7)':
|
||||
'@types/react-dom@19.2.3(@types/react@19.2.8)':
|
||||
dependencies:
|
||||
'@types/react': 19.2.7
|
||||
'@types/react': 19.2.8
|
||||
|
||||
'@types/react@19.2.7':
|
||||
'@types/react@19.2.8':
|
||||
dependencies:
|
||||
csstype: 3.2.3
|
||||
|
||||
@ -1845,28 +1845,28 @@ snapshots:
|
||||
|
||||
punycode@2.3.1: {}
|
||||
|
||||
react-dom@19.2.1(react@19.2.1):
|
||||
react-dom@19.2.3(react@19.2.3):
|
||||
dependencies:
|
||||
react: 19.2.1
|
||||
react: 19.2.3
|
||||
scheduler: 0.27.0
|
||||
|
||||
react-refresh@0.18.0: {}
|
||||
|
||||
react-router-dom@7.10.1(react-dom@19.2.1(react@19.2.1))(react@19.2.1):
|
||||
react-router-dom@7.10.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3):
|
||||
dependencies:
|
||||
react: 19.2.1
|
||||
react-dom: 19.2.1(react@19.2.1)
|
||||
react-router: 7.10.1(react-dom@19.2.1(react@19.2.1))(react@19.2.1)
|
||||
react: 19.2.3
|
||||
react-dom: 19.2.3(react@19.2.3)
|
||||
react-router: 7.10.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
|
||||
|
||||
react-router@7.10.1(react-dom@19.2.1(react@19.2.1))(react@19.2.1):
|
||||
react-router@7.10.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3):
|
||||
dependencies:
|
||||
cookie: 1.1.1
|
||||
react: 19.2.1
|
||||
react: 19.2.3
|
||||
set-cookie-parser: 2.7.2
|
||||
optionalDependencies:
|
||||
react-dom: 19.2.1(react@19.2.1)
|
||||
react-dom: 19.2.3(react@19.2.3)
|
||||
|
||||
react@19.2.1: {}
|
||||
react@19.2.3: {}
|
||||
|
||||
resolve-from@4.0.0: {}
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ export function FilteredGamesList({
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
{price === 0 ? "0 (Free)" : price}€
|
||||
{price === 0 ? "0€ (Free)" : `${price}€`}
|
||||
</div>
|
||||
</div>
|
||||
<GameImage game={game} />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user