display warning that rules only affect new games
This commit is contained in:
parent
0342f6742d
commit
d3ed57227e
@ -27,7 +27,10 @@ export default class SessionView {
|
|||||||
]),
|
]),
|
||||||
|
|
||||||
this.#headOpen
|
this.#headOpen
|
||||||
? m("._alternate._apply.wb-box", m(SessionHead, { model }))
|
? m("._alternate._apply.wb-box", m(SessionHead, {
|
||||||
|
model,
|
||||||
|
noteNextGame: true,
|
||||||
|
}))
|
||||||
: null,
|
: null,
|
||||||
|
|
||||||
m("section.spacer", [
|
m("section.spacer", [
|
||||||
|
|||||||
@ -4,10 +4,24 @@ import { RaisingRule } from "/models/game_rules.js";
|
|||||||
import Session from "/models/session.js";
|
import Session from "/models/session.js";
|
||||||
|
|
||||||
export default class SessionHead {
|
export default class SessionHead {
|
||||||
/** @param {{ attrs: { model: Session } }} param The session model to use. */
|
/** The attributes a `SessionHead` component can handle.
|
||||||
view({ attrs: { model } }) {
|
*
|
||||||
|
* @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", [
|
return m("section", [
|
||||||
m("h3._positioned", "Satzeinstellungen"),
|
m("h3._positioned", "Satzeinstellungen"),
|
||||||
|
noteNextGame
|
||||||
|
? m("p",
|
||||||
|
"Obacht, wennst di Regln ändast, geltn di neien erst fürs naxte ",
|
||||||
|
"Spiel."
|
||||||
|
)
|
||||||
|
: null,
|
||||||
m("section", [
|
m("section", [
|
||||||
m("h4", "Teamnamen"),
|
m("h4", "Teamnamen"),
|
||||||
m("label.wb-field", [
|
m("label.wb-field", [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user