Show slow game's status and notes

O01eg
Sep 16, 2022, 8:24 AM
LPK5YJ2DOL4MM4HW4WJHBR57K3DVFHZIOOTBXIHTEDYDPCQCTJTQC

Dependencies

Change contents

  • replacement in src/templates/slow-game.html at line 16
    [2.26][2.26:40]()
    <dd></dd>
    [2.26]
    [2.40]
    <dd>
    {{#if status}}
    {{#if (eq status "started")}}
    Started
    {{else}}
    Finished
    {{/if}}
    {{else}}
    Prepared
    {{/if}}
    </dd>
    {{#if notes_html}}
  • replacement in src/templates/slow-game.html at line 29
    [2.60][2.60:74]()
    <dd></dd>
    [2.60]
    [2.74]
    <dd>{{ notes_html }}</dd>
    {{/if}}
  • edit in src/pages/slow_game.rs at line 11
    [3.870]
    [3.870]
    status: Option<&'a str>,
    notes_html: Option<&'a str>,
  • replacement in src/pages/slow_game.rs at line 31
    [3.1441][3.1441:1790]()
    let stmt = match dbclient.prepare("select g.status, g.notes_html, g.fo_forum_url, (select count(*) from games.players p where p.game_uid = g.game_uid and p.client_type = 'p'), MIN(t.turn_ts), MAX(t.turn_ts), COUNT(t.turn) from games.games g left join games.turns t on t.game_uid = g.game_uid where g.game_uid = $1 group by g.game_uid;").await {
    [3.1441]
    [3.1790]
    let stmt = match dbclient.prepare("select g.status::text, g.notes_html, g.fo_forum_url, (select count(*) from games.players p where p.game_uid = g.game_uid and p.client_type = 'p'), MIN(t.turn_ts), MAX(t.turn_ts), COUNT(t.turn) from games.games g left join games.turns t on t.game_uid = g.game_uid where g.game_uid = $1 group by g.game_uid;").await {
  • replacement in src/pages/slow_game.rs at line 45
    [3.2252][3.2252:2280]()
    let _row = match rows {
    [3.2252]
    [3.2280]
    let row = match rows {
  • edit in src/pages/slow_game.rs at line 58
    [3.2642]
    [3.2642]
    status: row.get::<_, Option<&str>>(0),
    notes_html: row.get::<_, Option<&str>>(1),