Show chat reminders only when the host rail is unavailable
This commit is contained in:
parent
e8602430dc
commit
81315ea484
3 changed files with 5 additions and 1 deletions
|
|
@ -642,7 +642,9 @@
|
|||
(s.phase === "equipment" && me.ready && !canReopenChoice(s, seat!)) ||
|
||||
(s.phase === "eruption" && seat !== 0)}>{mobileLabel} →</button
|
||||
>
|
||||
{#if store.chatAvailable && store.chatState.unreadIds.length}<button class="dock-chat" onclick={openChat}
|
||||
{#if store.chatAvailable && store.chatNotifications && store.chatState.unreadIds.length}<button
|
||||
class="dock-chat"
|
||||
onclick={openChat}
|
||||
>Chat{store.chatState.unreadIds.length ? ` · ${store.chatState.unreadIds.length}` : ""}</button
|
||||
>{/if}
|
||||
</div>{/if}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { SoundDesign, type SoundCue } from "./sound";
|
|||
import type { View, Move } from "fuji-engine";
|
||||
export class Store {
|
||||
analysis = $state(false);
|
||||
chatNotifications = $state(true);
|
||||
chat = new ChatController();
|
||||
chatState = $state.raw(this.chat.snapshot);
|
||||
chatAvailable = $derived(this.chatState.enabled && !this.analysis);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ registerViewer<View, Move>(
|
|||
return;
|
||||
}
|
||||
store.analysis = preferences.analysis === true;
|
||||
store.chatNotifications = preferences.chatNotifications !== false;
|
||||
store.colorblind = preferences.colorBlind === true;
|
||||
store.setSound(preferences.sound !== false);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue