refactor: changed "stanza" to "gara"

main
Antonio De Lucreziis 23 hours ago
parent d9c53c9abc
commit e76f3abea0

@ -3,6 +3,19 @@
A simple website that displays the leaderboard of the GGWP match. The leaderboard can be updated by
the admin using a nice control panel.
### Features
- Made using [Astro](https://astro.build/) with the NodeJS adapter for the endpoints
- Admins can create various matches and update the leaderboard using the control panel
- The leaderboard is displayed in a nice table with the player's name, score
- The leaderboard is updated in real-time using simple server-sent events
- The database is SQLite with a rooms table that has a `data` column that stores the public JSON
data of the match.
## Development
Install the dependencies:

@ -16,7 +16,7 @@ export const AdminLogin = ({}) => {
return (
<div class="card tint-blue stack-v center">
<h3>Accedi al pannello di controllo di una stanza</h3>
<h3>Accedi al pannello di controllo di una gara</h3>
<input
type="text"
class="fill-w"

@ -14,7 +14,7 @@ const handleCreateRoom = async (id: string, teams: string[], questions: Question
const { password } = value
if (status === 'ok') {
alert(`Stanza creata con successo!\n\nPassword Admin: ${password}\n(non la perdere)`)
alert(`Gara creata con successo!\n\nPassword Admin: ${password}\n(non la perdere)`)
return
}
@ -37,11 +37,11 @@ export const NewRoom = ({}) => {
return (
<div class="card tint-red stack-v center">
<h3>Crea una nuova stanza</h3>
<h3>Crea una nuova gara</h3>
<input
type="text"
class="fill-w"
placeholder="Nome stanza, e.g. ggwp-2024..."
placeholder="Nome gara, e.g. ggwp-2024..."
value={roomName}
onInput={e => setRoomName(e.currentTarget.value)}
/>
@ -189,7 +189,7 @@ export const NewRoom = ({}) => {
)
}
>
Crea Stanza
Crea Gara
</button>
</div>
)

@ -7,7 +7,7 @@ import { AdminPage } from '@/components/AdminPage'
const { room } = Astro.params
if (!room) {
return Astro.redirect('/error?msg=' + encodeURIComponent(`Devi specificare una stanza`))
return Astro.redirect('/error?msg=' + encodeURIComponent(`Devi specificare una gara`))
}
if (Astro.cookies.has('sid')) {

@ -4,7 +4,7 @@ import { LiveLeaderboard } from '@/components/LiveLeaderboard'
const { room } = Astro.params
if (!room) {
return Astro.redirect('/error?msg=' + encodeURIComponent(`Devi specificare una stanza`))
return Astro.redirect('/error?msg=' + encodeURIComponent(`Devi specificare una gara`))
}
---

Loading…
Cancel
Save