mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: show career options
This commit is contained in:
1 parent
3667fd82b7
commit
b7b4035492
3 files changed
+12
No files matched your search
@@ -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}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in new issue
Block a user