fix(overlay): re-add score stats toggle
All checks were successful
deploy / deploy (push) Successful in 59s
All checks were successful
deploy / deploy (push) Successful in 59s
This commit is contained in:
parent
a49fa9dbb6
commit
c9a6703d94
@ -107,6 +107,14 @@ export default function Analytics() {
|
||||
settingsStore.setShowSongInfo(value);
|
||||
}}
|
||||
/>
|
||||
<SwitchInput
|
||||
id="show-score-stats"
|
||||
label="Show Song Info"
|
||||
defaultChecked={settingsStore.settings.showScoreStats}
|
||||
onChange={(value) => {
|
||||
settingsStore.setShowScoreStats(value);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
|
@ -11,6 +11,7 @@ interface OverlaySettingsStore {
|
||||
settings: {
|
||||
showPlayerStats: boolean;
|
||||
showSongInfo: boolean;
|
||||
showScoreStats: boolean;
|
||||
};
|
||||
|
||||
setIpAddress: (ipAddress: string) => void;
|
||||
@ -18,6 +19,7 @@ interface OverlaySettingsStore {
|
||||
setPlatform: (platform: string) => void;
|
||||
setShowPlayerStats: (showPlayerStats: boolean) => void;
|
||||
setShowSongInfo: (showSongInfo: boolean) => void;
|
||||
setShowScoreStats: (showScoreStats: boolean) => void;
|
||||
}
|
||||
|
||||
export const useOverlaySettingsStore = create<OverlaySettingsStore>()(
|
||||
@ -29,6 +31,7 @@ export const useOverlaySettingsStore = create<OverlaySettingsStore>()(
|
||||
settings: {
|
||||
showPlayerStats: true,
|
||||
showSongInfo: true,
|
||||
showScoreStats: true,
|
||||
},
|
||||
|
||||
setIpAddress(ipAddress: string) {
|
||||
@ -62,6 +65,14 @@ export const useOverlaySettingsStore = create<OverlaySettingsStore>()(
|
||||
},
|
||||
});
|
||||
},
|
||||
setShowScoreStats(showScoreStats: boolean) {
|
||||
set({
|
||||
settings: {
|
||||
...get().settings,
|
||||
showScoreStats,
|
||||
},
|
||||
});
|
||||
},
|
||||
}),
|
||||
{
|
||||
name: "overlaySettings",
|
||||
|
Loading…
x
Reference in New Issue
Block a user