games: active vs non-active games (games.library.active, owner toggles on the dashboard and each game ⋯ menu; nothing deleted). Header flyout and mobile menu list every game split into active / non-active; /trackers and home tiles show active chips and open both sections on hover; /start shows active with a non-active toggle. Games dashboard moved from /projects/game-tracker to /trackers/games (dashboard of active games only; old URL and /credits 301); deep trackers stay put
All checks were successful
Deploy production / deploy (push) Successful in 1m13s
All checks were successful
Deploy production / deploy (push) Successful in 1m13s
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { sql } from 'drizzle-orm';
|
||||
import { check, integer, text } from 'drizzle-orm/pg-core';
|
||||
import { boolean, check, integer, text } from 'drizzle-orm/pg-core';
|
||||
import { gamesSchema } from './schemas';
|
||||
import { id, timestamps } from './helpers';
|
||||
|
||||
// Every game I play (plus speedcubing): one row per game, shown at /trackers/games/<slug>.
|
||||
// The header, home, /trackers and /start chips come from `gameTrackers` in #lib/projects
|
||||
// (static, so navigation needs no query); keep the slugs in sync with these rows.
|
||||
// (static, so navigation needs no query); keep the slugs in sync with these rows. Only the
|
||||
// `active` flag is dynamic: the root layout loads the non-active slugs (#lib/server/games/active).
|
||||
// Deep trackers (osu! journal, Call of Duty mastery, Pokémon catches) stay where they are
|
||||
// and are linked through `tracker_href`.
|
||||
export const GAME_STATUSES = ['main', 'active', 'occasional', 'unknown'] as const;
|
||||
@@ -36,6 +37,9 @@ export const gameLibrary = gamesSchema.table(
|
||||
.default(sql`'{}'::text[]`),
|
||||
notes: text('notes'),
|
||||
sortOrder: integer('sort_order').notNull().default(100),
|
||||
/** Games I play now (my pick, toggled on /trackers/games). Non-active games keep their
|
||||
* data and page; navigation lists them in a separate "non-active" section. */
|
||||
active: boolean('active').notNull().default(true),
|
||||
...timestamps
|
||||
},
|
||||
(t) => [
|
||||
|
||||
Reference in New Issue
Block a user