feat: show career options

This commit is contained in:
TrèsAbhi committed 2023-10-01 19:00:05 -05:00
1 parent 3667fd82b7
commit b7b4035492
3 files changed
+12

No files matched your search

+2
View File
@@ -199,6 +199,7 @@ export default function SessionPage() {
since !== undefined &&
diff !== undefined && (
<Breakdown.Row
minimized={!session.showCareer}
title={`Since ${since.toLocaleString(undefined, {
hour: 'numeric',
minute: 'numeric',
@@ -280,6 +281,7 @@ export default function SessionPage() {
return (
<Breakdown.Row
key={stats.tank_id}
minimized={!session.showCareer}
title={tankopedia?.name ?? `Unknown tank ${stats.tank_id}`}
type="tank"
tankType={tankopedia?.type}
+8
View File
@@ -247,6 +247,14 @@ export default function Page() {
>
Show total
</DropdownMenu.CheckboxItem>
<DropdownMenu.CheckboxItem
checked={session.showCareer}
onCheckedChange={(checked) =>
useSession.setState({ showCareer: checked })
}
>
Show career
</DropdownMenu.CheckboxItem>
</DropdownMenu.Content>
</DropdownMenu.Root>
</div>
+2
View File
@@ -25,6 +25,7 @@ type Session = (
showDelta: boolean;
}[] & { length: 4 };
showTotal: boolean;
showCareer: boolean;
};
export const useSession = create<Session>()(
@@ -34,6 +35,7 @@ export const useSession = create<Session>()(
isTracking: false,
promptBeforeReset: true,
showTotal: true,
showCareer: true,
customColumns: [
{ display: 'battles', showDelta: false },