1
0

display warning that rules only affect new games

This commit is contained in:
Adrian Wannenmacher 2026-03-10 20:56:56 +01:00
parent 0342f6742d
commit d3ed57227e
Signed by: tfld
GPG Key ID: 19D986ECB1E492D5
2 changed files with 20 additions and 3 deletions

View File

@ -27,7 +27,10 @@ export default class SessionView {
]),
this.#headOpen
? m("._alternate._apply.wb-box", m(SessionHead, { model }))
? m("._alternate._apply.wb-box", m(SessionHead, {
model,
noteNextGame: true,
}))
: null,
m("section.spacer", [

View File

@ -4,10 +4,24 @@ import { RaisingRule } from "/models/game_rules.js";
import Session from "/models/session.js";
export default class SessionHead {
/** @param {{ attrs: { model: Session } }} param The session model to use. */
view({ attrs: { model } }) {
/** The attributes a `SessionHead` component can handle.
*
* @typedef {Object} SessionHeadAttrs
* @property {Session} model The session model to use.
* @property {boolean} noteNextGame
* If set, show a message that rules only come into effect for the next game.
*/
/** @param {{ attrs: SessionHeadAttrs }} param Parameters for the component */
view({ attrs: { model, noteNextGame } }) {
return m("section", [
m("h3._positioned", "Satzeinstellungen"),
noteNextGame
? m("p",
"Obacht, wennst di Regln ändast, geltn di neien erst fürs naxte ",
"Spiel."
)
: null,
m("section", [
m("h4", "Teamnamen"),
m("label.wb-field", [