mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: clear provisions button
This commit is contained in:
1 parent
be20173acd
commit
db1e4af20c
1 file changed
+48
-39
@@ -517,52 +517,48 @@ export default function Page() {
|
|||||||
</Popover.Trigger>
|
</Popover.Trigger>
|
||||||
|
|
||||||
<Popover.Content>
|
<Popover.Content>
|
||||||
<Flex direction="column" gap="4">
|
<EquipmentManager
|
||||||
<EquipmentManager
|
matrix={equipmentMatrix}
|
||||||
matrix={equipmentMatrix}
|
preset={equipmentPreset}
|
||||||
preset={equipmentPreset}
|
onChange={(matrix) => {
|
||||||
onChange={(matrix) => {
|
mutateCompareTemporary((draft) => {
|
||||||
|
draft.members[index].equipmentMatrix =
|
||||||
|
matrix;
|
||||||
|
draft.sorting = undefined;
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Flex justify="end" gap="4" mt="4">
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
color="red"
|
||||||
|
onClick={() => {
|
||||||
mutateCompareTemporary((draft) => {
|
mutateCompareTemporary((draft) => {
|
||||||
draft.members[index].equipmentMatrix =
|
draft.members[index].equipmentMatrix =
|
||||||
matrix;
|
times(3, () =>
|
||||||
|
times(3, () => 0),
|
||||||
|
) as EquipmentMatrix;
|
||||||
draft.sorting = undefined;
|
draft.sorting = undefined;
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
|
Clear
|
||||||
<Flex justify="end" gap="4">
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="red"
|
onClick={() => {
|
||||||
onClick={() => {
|
mutateCompareTemporary((draft) => {
|
||||||
mutateCompareTemporary((draft) => {
|
draft.members.forEach((member) => {
|
||||||
draft.members[index].equipmentMatrix =
|
member.equipmentMatrix =
|
||||||
times(3, () =>
|
draft.members[index].equipmentMatrix;
|
||||||
times(3, () => 0),
|
|
||||||
) as EquipmentMatrix;
|
|
||||||
draft.sorting = undefined;
|
draft.sorting = undefined;
|
||||||
});
|
});
|
||||||
}}
|
});
|
||||||
>
|
}}
|
||||||
Clear
|
>
|
||||||
</Button>
|
Apply to all
|
||||||
<Button
|
</Button>
|
||||||
variant="ghost"
|
|
||||||
onClick={() => {
|
|
||||||
mutateCompareTemporary((draft) => {
|
|
||||||
draft.members.forEach((member) => {
|
|
||||||
member.equipmentMatrix =
|
|
||||||
draft.members[
|
|
||||||
index
|
|
||||||
].equipmentMatrix;
|
|
||||||
draft.sorting = undefined;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Apply to all
|
|
||||||
</Button>
|
|
||||||
</Flex>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
</Popover.Content>
|
</Popover.Content>
|
||||||
</Popover.Root>
|
</Popover.Root>
|
||||||
@@ -629,6 +625,19 @@ export default function Page() {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<Flex justify="end" mt="4">
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
onClick={() => {
|
||||||
|
mutateCompareTemporary((draft) => {
|
||||||
|
draft.members[index].provisions = [];
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Clear
|
||||||
|
</Button>
|
||||||
|
</Flex>
|
||||||
</Popover.Content>
|
</Popover.Content>
|
||||||
</Popover.Root>
|
</Popover.Root>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
Reference in new issue
Block a user