fix(web): open the in-room rules link in a new tab

The board and lobby screens resign or leave the room when they unmount,
so an in-page navigation to the rules forfeited the game being played.
This commit is contained in:
tiennm99 committed 2026-09-21 15:42:14 +07:00
1 parent a198922ad0
commit 3ef9f48df0
2 files changed
+6 -2

No files matched your search

+3 -1
View File
@@ -130,7 +130,9 @@
<ConnectionBadge />
<div class="meta">
{#if modeLabel}<span class="mode">{modeLabel}</span>{/if}
<a class="rules-link" href="/rules">{t.rulesLink}</a>
<!-- A new tab: this screen resigns or leaves the room when it unmounts,
so an in-page navigation to the rules would forfeit the game. -->
<a class="rules-link" href="/rules" target="_blank" rel="noopener">{t.rulesLink}</a>
{#if onchatopen}
<!-- Above the chain rather than below it, which is where this used
to live: the chain grows a row per turn, and a badge under it
+3 -1
View File
@@ -87,7 +87,9 @@
{#if !compact}
<div class="top">
<ConnectionBadge />
<a class="rules-link" href="/rules">{t.rulesLink}</a>
<!-- A new tab: this screen resigns or leaves the room when it unmounts,
so an in-page navigation to the rules would forfeit the game. -->
<a class="rules-link" href="/rules" target="_blank" rel="noopener">{t.rulesLink}</a>
</div>
<RoomCodePanel code={s.roomCode} />
{:else}