mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: consumable info
This commit is contained in:
1 parent
29aaf60da0
commit
879a5d534c
1 file changed
+34
-5
+34
-5
@@ -1,4 +1,12 @@
|
|||||||
import { Button, Flex, Heading } from '@radix-ui/themes';
|
import { InfoCircledIcon } from '@radix-ui/react-icons';
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Flex,
|
||||||
|
Heading,
|
||||||
|
IconButton,
|
||||||
|
Popover,
|
||||||
|
Text,
|
||||||
|
} from '@radix-ui/themes';
|
||||||
import { use } from 'react';
|
import { use } from 'react';
|
||||||
import { ConsumableButton } from '../../../../../../../components/ModuleButtons/ConsumableButton';
|
import { ConsumableButton } from '../../../../../../../components/ModuleButtons/ConsumableButton';
|
||||||
import { checkConsumableProvisionInclusivity } from '../../../../../../../core/blitzkrieg/checkConsumableProvisionInclusivity';
|
import { checkConsumableProvisionInclusivity } from '../../../../../../../core/blitzkrieg/checkConsumableProvisionInclusivity';
|
||||||
@@ -28,7 +36,27 @@ export function Consumables() {
|
|||||||
return (
|
return (
|
||||||
<ConfigurationChildWrapper>
|
<ConfigurationChildWrapper>
|
||||||
<Flex gap="4" align="center">
|
<Flex gap="4" align="center">
|
||||||
<Heading size="4">Consumables</Heading>
|
<Flex gap="2" align="center">
|
||||||
|
<Popover.Root>
|
||||||
|
<Popover.Trigger>
|
||||||
|
<IconButton variant="ghost">
|
||||||
|
<InfoCircledIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Popover.Trigger>
|
||||||
|
|
||||||
|
<Popover.Content>
|
||||||
|
<Flex direction="column" gap="2">
|
||||||
|
<Text>
|
||||||
|
<Text color="amber">Yellow consumables</Text> do not affect
|
||||||
|
the statistics.
|
||||||
|
</Text>
|
||||||
|
</Flex>
|
||||||
|
</Popover.Content>
|
||||||
|
</Popover.Root>
|
||||||
|
|
||||||
|
<Heading size="4">Consumables</Heading>
|
||||||
|
</Flex>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="red"
|
color="red"
|
||||||
@@ -48,10 +76,11 @@ export function Consumables() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ConsumableButton
|
<ConsumableButton
|
||||||
|
special={consumable.duration === undefined}
|
||||||
duration={
|
duration={
|
||||||
typeof consumable.duration === 'number'
|
consumable.duration === undefined
|
||||||
? consumable.duration * (hasHighEndConsumables ? 0.7 : 1)
|
? undefined
|
||||||
: undefined
|
: consumable.duration * (hasHighEndConsumables ? 0.7 : 1)
|
||||||
}
|
}
|
||||||
cooldown={
|
cooldown={
|
||||||
consumable.cooldown *
|
consumable.cooldown *
|
||||||
|
|||||||
Reference in new issue
Block a user