mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: crew in compare
This commit is contained in:
1 parent
633090f967
commit
2f183896eb
1 file changed
+20
-2
@@ -1,6 +1,6 @@
|
|||||||
import { ComponentPlaceholderIcon } from '@radix-ui/react-icons';
|
import { ComponentPlaceholderIcon } from '@radix-ui/react-icons';
|
||||||
import { Button, Flex, Popover, Table } from '@radix-ui/themes';
|
import { Button, Flex, Popover, Slider, Table, Text } from '@radix-ui/themes';
|
||||||
import { times } from 'lodash';
|
import { debounce, times } from 'lodash';
|
||||||
import { use } from 'react';
|
import { use } from 'react';
|
||||||
import { ConsumablesManager } from '../../../../components/ConsumablesManager';
|
import { ConsumablesManager } from '../../../../components/ConsumablesManager';
|
||||||
import { CrewSkillManager } from '../../../../components/CrewSkillManager';
|
import { CrewSkillManager } from '../../../../components/CrewSkillManager';
|
||||||
@@ -167,6 +167,7 @@ export function CompareTable({ stats }: CompareTableProps) {
|
|||||||
engine,
|
engine,
|
||||||
track,
|
track,
|
||||||
consumables,
|
consumables,
|
||||||
|
crewMastery,
|
||||||
},
|
},
|
||||||
index,
|
index,
|
||||||
) => {
|
) => {
|
||||||
@@ -532,6 +533,23 @@ export function CompareTable({ stats }: CompareTableProps) {
|
|||||||
</Popover.Content>
|
</Popover.Content>
|
||||||
</Popover.Root>
|
</Popover.Root>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
|
<Flex gap="2" width="100%" align="center">
|
||||||
|
<Text>{Math.round(crewMastery * 100)}%</Text>
|
||||||
|
<Flex flexGrow="1">
|
||||||
|
<Slider
|
||||||
|
defaultValue={[crewMastery]}
|
||||||
|
min={0.5}
|
||||||
|
max={1}
|
||||||
|
step={1 / 100}
|
||||||
|
onValueChange={debounce(([value]: number[]) => {
|
||||||
|
mutateCompareEphemeral((draft) => {
|
||||||
|
draft.members[index].crewMastery = value;
|
||||||
|
});
|
||||||
|
}, 500)}
|
||||||
|
/>
|
||||||
|
</Flex>
|
||||||
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user