feat(gamemode): edit per-gamemode config from the admin panel - #824
Open
garrappachc wants to merge 1 commit into
Open
garrappachc wants to merge 1 commit into
garrappachc wants to merge 1 commit into
Conversation
Let admins set the three per-gamemode keys — games.whitelist_id, queue.player_skill_threshold, games.default_player_skill — independently for each gamemode. Each field becomes a self-contained fragment with its own gamemode tabs (GamemodeTabs) that hx-swap it in place and a hidden gamemode input, so the surrounding mixed form still saves each field to the right gamemode; `configuration.set` gains the matching gamemode argument. The tabs render nothing on single-gamemode instances, so those pages look and behave exactly as before. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the multi-gamemode (5.0.0) stack. Base: #823. Follow-up to #823 (which made the 3 keys per-gamemode at runtime).
Why
#823 made
games.whitelist_id,queue.player_skill_threshold,games.default_player_skillper-gamemode at runtime, but the admin panel could still only edit the default gamemode. This adds per-gamemode editing.What
GamemodeTabs(html/components/gamemode-tabs.tsx) — a reusable tab strip that renders nothing on single-gamemode instances; infragmentmode the tabshx-geta fragment and swap it into a target without touching the URL.whitelist-id.tsx,player-skill-threshold.tsx,default-player-skill.tsx) with its own tabs, anidfor swapping, and a hidden gamemode input. Switching a tab fetches that gamemode's values (GET …?gamemode=) and swaps in place; the surrounding mixed form still submits each field with its own gamemode, so globals and per-gamemode fields coexist.configuration.set(key, value, actor, gamemode?)gains the gamemode argument; the admin routes save each per-gamemode field under its submitted gamemode.Scope
Verified: net-new
tsc= 0, unit suite green without.env(438), lint clean.