diff --git a/frontend/src/components/EventLog.svelte b/frontend/src/components/EventLog.svelte index bde1085..1b66d09 100644 --- a/frontend/src/components/EventLog.svelte +++ b/frontend/src/components/EventLog.svelte @@ -42,6 +42,10 @@ // When set, the game is at a rolled-back state; events past this checkpoint are the // greyed, still-undoable future. Rolling forward to one of them redoes the rollback. $: head = state.game?.rollback_head_checkpoint_id ?? null; + // The point in time the game is currently at: the rollback head if set, otherwise + // the newest checkpoint (supplied by the backend). A button targeting it would be a + // no-op, so the "you are here" event — and, in live play, the latest event — has none. + $: currentPos = head !== null ? head : (state.latest_checkpoint_id ?? 0); $: mergePolled(state.events); @@ -175,7 +179,7 @@ {KIND_ICONS[event.kind] || KIND_ICONS.info} {event.message} {formatTime(event.timestamp)} - {#if canRollback && event.checkpoint_id > 0} + {#if canRollback && event.checkpoint_id > 0 && event.checkpoint_id !== currentPos}