diff --git a/frontend/src/components/content/requiredText.tsx b/frontend/src/components/content/requiredText.tsx index cb41e03..b065d1e 100644 --- a/frontend/src/components/content/requiredText.tsx +++ b/frontend/src/components/content/requiredText.tsx @@ -3,7 +3,7 @@ import { Text } from "@chakra-ui/react"; export default function RequiredText({ children, }: { - children: React.ReactNode; + children?: React.ReactNode; }) { return ( diff --git a/frontend/src/constants/enhance/material.ts b/frontend/src/constants/enhance/material.ts index aa2cbbd..bb96747 100644 --- a/frontend/src/constants/enhance/material.ts +++ b/frontend/src/constants/enhance/material.ts @@ -22,17 +22,17 @@ import POTENTIAL from "../../assets/item/potential/potential.webp"; import POTENTIAL_ADDI from "../../assets/item/potential/potential-addi.webp"; export enum MATERIAL_TYPE { - SPEEL_TRACE = "SPEEL_TRACE", - INCREDIBLE_CHAOS = "INCREDIBLE_CHAOS", - PREMIUM_ACCESSORY_ATTACK = "PREMIUM_ACCESSORY_ATTACK", - PREMIUM_ACCESSORY_MAGIC_ATTACK = "PREMIUM_ACCESSORY_MAGIC_ATTACK", - STARFORCE = "STARFORCE", + SPEEL_TRACE = "SPEEL_TRACE", // 주흔 + INCREDIBLE_CHAOS = "INCREDIBLE_CHAOS", // 놀긍혼 + PREMIUM_ACCESSORY_ATTACK = "PREMIUM_ACCESSORY_ATTACK", // 프악공 + PREMIUM_ACCESSORY_MAGIC_ATTACK = "PREMIUM_ACCESSORY_MAGIC_ATTACK", // 프악마 + STARFORCE = "STARFORCE", // 스타포스 - POWERFUL = "POWERFUL", - ETERNAL = "ETERNAL", - BLACK_REBIRTH = "BLACK_REBIRTH", - ABYSS = "ABYSS", - GRINDSTONE = "GRINDSTONE", + POWERFUL = "POWERFUL", // 강활불 + ETERNAL = "ETERNAL", // 영환불 + BLACK_REBIRTH = "BLACK_REBIRTH", // 검환불 + ABYSS = "ABYSS", // 심환불 + GRINDSTONE = "GRINDSTONE", // 연마석 STRANGE = "STRANGE", // 수상한 MASTER = "MASTER", // 장인 diff --git a/frontend/src/pages/enhance/4-config/config.tsx b/frontend/src/pages/enhance/4-config/config.tsx index 033413e..a7291b7 100644 --- a/frontend/src/pages/enhance/4-config/config.tsx +++ b/frontend/src/pages/enhance/4-config/config.tsx @@ -21,5 +21,5 @@ export default function Config({ ) return ; - return <>; + return 필요한 추가 설정이 없습니다.; } diff --git a/frontend/src/pages/enhance/7-execute/execute.tsx b/frontend/src/pages/enhance/7-execute/execute.tsx index a7c9fb2..ae325c9 100644 --- a/frontend/src/pages/enhance/7-execute/execute.tsx +++ b/frontend/src/pages/enhance/7-execute/execute.tsx @@ -1,5 +1,6 @@ import RequiredText from "../../../components/content/requiredText"; import { MATERIAL_TYPE } from "../../../constants/enhance/material"; +import GrindStone from "./grindStone/grindStone"; import Potential from "./potential/potential"; export default function Execute({ @@ -32,11 +33,13 @@ export default function Execute({ MATERIAL_TYPE.POTENTIAL, MATERIAL_TYPE.POTENTIAL_ADDI, ].includes(materialType) - ) { + ) return ( ); - } - return <>; + if (materialType == MATERIAL_TYPE.GRINDSTONE) + return ; + + return 개발중인 기능입니다.; } diff --git a/frontend/src/pages/enhance/7-execute/grindStone/grindStone.tsx b/frontend/src/pages/enhance/7-execute/grindStone/grindStone.tsx new file mode 100644 index 0000000..f301c51 --- /dev/null +++ b/frontend/src/pages/enhance/7-execute/grindStone/grindStone.tsx @@ -0,0 +1,121 @@ +import { + Button, + Flex, + Icon, + IconButton, + Image, + Stack, + Tag, + Text, + useColorMode, +} from "@chakra-ui/react"; +import RequiredText from "../../../../components/content/requiredText"; +import { useAppSelector } from "../../../../stores/hooks"; +import GRINDSTONE from "../../../../assets/item/scroll/grindstone.png"; +import MESO from "../../../../assets/item/meso/coin.png"; +import { RxPlus, RxDoubleArrowRight } from "react-icons/rx"; +import { FaPlus, FaMinus, FaPlusCircle } from "react-icons/fa"; +import Slot from "./slot"; + +export default function GrindStone({ + inventoryIndex, +}: { + inventoryIndex: number; +}) { + const inventory = useAppSelector((state) => state.user.inventory); + const item = inventory[inventoryIndex].after; + + const { colorMode } = useColorMode(); + const dark = colorMode === "dark"; + const palette600 = dark ? ".300" : ".600"; + + if (!item.special_ring_level) + return ( + 선택한 아이템은 특수 스킬 반지가 아닙니다. + ); + + return ( + + + + 사용할 연마석 수량을 설정해주세요. + + + 연마석 수량에 따라 연마 성공 확률 및 연마에 사용되는{" "} + 메소가 설정됩니다. + + + + + Lv. 4 + + } + > + + + + 1 / 5}> + + + + + Lv. 5 + + } + > + + + + + } /> + } /> + + + + + 성공 확률  10% + + + + 500,000,000 + + + + + + + ); +} diff --git a/frontend/src/pages/enhance/7-execute/grindStone/slot.tsx b/frontend/src/pages/enhance/7-execute/grindStone/slot.tsx new file mode 100644 index 0000000..019c8fb --- /dev/null +++ b/frontend/src/pages/enhance/7-execute/grindStone/slot.tsx @@ -0,0 +1,54 @@ +import { AspectRatio, Box, Flex, useColorMode } from "@chakra-ui/react"; + +export default function Slot({ + bgColorScheme, + spec, + children, +}: { + bgColorScheme: string; + spec?: React.ReactNode; + children?: React.ReactNode; +}) { + const { colorMode } = useColorMode(); + const dark = colorMode === "dark"; + const palette50 = dark ? ".900" : ".50"; + const palette200 = dark ? ".600" : ".200"; + const palette400 = dark ? ".500" : ".400"; + + return ( + + + + {children} + + {spec} + + + + + ); +} diff --git a/frontend/src/pages/enhance/common/itemIcon.tsx b/frontend/src/pages/enhance/common/itemIcon.tsx new file mode 100644 index 0000000..5bc75e7 --- /dev/null +++ b/frontend/src/pages/enhance/common/itemIcon.tsx @@ -0,0 +1,26 @@ +import { Box, Image } from "@chakra-ui/react"; +import { ItemEquipmentDetail } from "../../../types/character/itemEquipment/itemEquipment"; +import { getSpecialRingIcon } from "../../../utils/icon"; + +export default function ItemIcon({ + item, + opacity, +}: { + item: ItemEquipmentDetail; + opacity?: number; +}) { + return ( + + + {item?.special_ring_level ? ( + + ) : undefined} + + ); +} diff --git a/frontend/src/pages/enhance/common/itemTooltip.tsx b/frontend/src/pages/enhance/common/itemTooltip.tsx index 53f354b..29bf0a2 100644 --- a/frontend/src/pages/enhance/common/itemTooltip.tsx +++ b/frontend/src/pages/enhance/common/itemTooltip.tsx @@ -17,7 +17,7 @@ import { POTENTIAL_INFOS, } from "../../../constants/enhance/potential"; import { getMaxGrade, parseGrade } from "../../../services/enhance/potential"; -import { getSpecialRingIcon } from "../../../utils/icon"; +import ItemIcon from "./itemIcon"; export default function ItemToolTip({ item }: { item: ItemEquipmentDetail }) { const grade = getMaxGrade(item); @@ -149,15 +149,7 @@ function ImageAndReqLevel({ borderColor={potentialColor} backgroundColor="gray.300" > - - {item.special_ring_level ? ( - - ) : undefined} + {potentialColor && ( diff --git a/frontend/src/pages/enhance/common/slotButton.tsx b/frontend/src/pages/enhance/common/slotButton.tsx index 0a2375e..75d0ca1 100644 --- a/frontend/src/pages/enhance/common/slotButton.tsx +++ b/frontend/src/pages/enhance/common/slotButton.tsx @@ -1,9 +1,9 @@ -import { IconButton, Image, Tooltip } from "@chakra-ui/react"; +import { IconButton, Tooltip } from "@chakra-ui/react"; import { ItemEquipmentDetail } from "../../../types/character/itemEquipment/itemEquipment"; import ItemToolTip from "./itemTooltip"; import { getMaxGrade } from "../../../services/enhance/potential"; import { POTENTIAL_INFOS } from "../../../constants/enhance/potential"; -import { getSpecialRingIcon } from "../../../utils/icon"; +import ItemIcon from "./itemIcon"; export default function SlotButton({ item, @@ -35,24 +35,7 @@ export default function SlotButton({ grade && !transparent ? POTENTIAL_INFOS[grade].borderColor : undefined } colorScheme={colorScheme} - icon={ - <> - - {item?.special_ring_level ? ( - - ) : undefined} - - } + icon={} onClick={onClick} />