diff --git a/frontend/src/components/NavBar.vue b/frontend/src/components/NavBar.vue index 8a061f9..6d3cd6b 100644 --- a/frontend/src/components/NavBar.vue +++ b/frontend/src/components/NavBar.vue @@ -12,6 +12,7 @@ const links = [ { to: '/fight-card', label: 'FIGHT CARD' }, { to: '/arena', label: 'WATCH' }, { to: '/feed', label: 'FEED' }, + { to: '/tournaments', label: 'TOURNEYS' }, { to: '/leaderboard', label: 'RANKINGS' }, { to: '/docs', label: 'DOCS' }, ] diff --git a/frontend/src/pages/TournamentListPage.vue b/frontend/src/pages/TournamentListPage.vue new file mode 100644 index 0000000..102f784 --- /dev/null +++ b/frontend/src/pages/TournamentListPage.vue @@ -0,0 +1,104 @@ + + + + + TOURNAMENTS + + + + {{ f.toUpperCase() }} + + + + Loading... + + + No tournaments found. + + + + + + {{ t.name }} + + {{ statusLabel(t.status) }} + + + + {{ t.format === 'single_elim' ? 'Single Elim' : 'Round Robin' }} + {{ t.size }} bots + {{ t.entrySats }} sats entry + {{ t.prizeSats }} sats prize + Round {{ t.currentRound }} + + + + + diff --git a/frontend/src/pages/TournamentPage.vue b/frontend/src/pages/TournamentPage.vue new file mode 100644 index 0000000..03c58cd --- /dev/null +++ b/frontend/src/pages/TournamentPage.vue @@ -0,0 +1,244 @@ + + + + + + < back to tournaments + + + Loading... + {{ error }} + + + + + + + {{ tournament.name }} + + + {{ tournament.format === 'single_elim' ? 'Single Elimination' : 'Round Robin' }} + · {{ tournament.size }} bots + · {{ tournament.prizeSats }} sats prize + + + + {{ tournament.status === 'open' ? 'OPEN' : tournament.status === 'active' ? 'LIVE' : 'FINISHED' }} + + + + + + + + CHAMPION + + {{ champion.botName }} + + + + + + + + REGISTERED ({{ entries.length }}/{{ tournament.size }}) + + + + + {{ entry.botName }} + + + empty + + + + + + + + + + {{ roundLabel(ri + 1) }} + + + + + + {{ match.botAName || 'BYE' }} + W + + + + {{ match.botBName || 'BYE' }} + W + + + + {{ match.status === 'live' ? 'WATCH LIVE' : 'REPLAY' }} + + + + + + + + + diff --git a/frontend/src/router.ts b/frontend/src/router.ts index a52bafc..5dfa71b 100644 --- a/frontend/src/router.ts +++ b/frontend/src/router.ts @@ -71,6 +71,16 @@ const routes = [ name: 'feed', component: () => import('./pages/FeedPage.vue'), }, + { + path: '/tournaments', + name: 'tournaments', + component: () => import('./pages/TournamentListPage.vue'), + }, + { + path: '/tournament/:id', + name: 'tournament', + component: () => import('./pages/TournamentPage.vue'), + }, ] export const router = createRouter({
+ {{ tournament.format === 'single_elim' ? 'Single Elimination' : 'Round Robin' }} + · {{ tournament.size }} bots + · {{ tournament.prizeSats }} sats prize +
CHAMPION