mirror of
https://github.com/tiennm99/noitu.git
synced 2026-10-11 12:28:54 +00:00
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:
1 parent
a198922ad0
commit
3ef9f48df0
2 files changed
+6
-2
No files matched your search
@@ -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
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user