update relic bar
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 2m22s

This commit is contained in:
2025-08-19 09:46:57 +07:00
parent 2b1d0b39a6
commit badd66daaf
8 changed files with 136 additions and 84 deletions

View File

@@ -242,6 +242,9 @@
"hardMode": "困难模式", "hardMode": "困难模式",
"selectPEAKEvent": "选择 PEAK 事件", "selectPEAKEvent": "选择 PEAK 事件",
"mode": "模式", "mode": "模式",
"selectMode": "选择模式" "selectMode": "选择模式",
"rollBack": "回到之前的状态",
"upRoll": "增加副属性",
"downRoll": "减少副属性"
} }
} }

View File

@@ -243,7 +243,10 @@
"hardMode": "Hard Mode", "hardMode": "Hard Mode",
"selectPEAKEvent": "Select PEAK Event", "selectPEAKEvent": "Select PEAK Event",
"mode": "Mode", "mode": "Mode",
"selectMode": "Select a mode" "selectMode": "Select a mode",
"rollBack": "Roll Back",
"upRoll": "Up Roll",
"downRoll": "Down Roll"
} }
} }

View File

@@ -242,6 +242,9 @@
"hardMode": "困難モード", "hardMode": "困難モード",
"selectPEAKEvent": "PEAK イベントを選択", "selectPEAKEvent": "PEAK イベントを選択",
"mode": "モード", "mode": "モード",
"selectMode": "モードを選択" "selectMode": "モードを選択",
"rollBack": "前の状態に戻る",
"upRoll": "サブステータスを増やす",
"downRoll": "サブステータスを減らす"
} }
} }

View File

@@ -242,6 +242,9 @@
"hardMode": "어려움 모드", "hardMode": "어려움 모드",
"selectPEAKEvent": "PEAK 이벤트 선택", "selectPEAKEvent": "PEAK 이벤트 선택",
"mode": "모드", "mode": "모드",
"selectMode": "모드를 선택" "selectMode": "모드를 선택",
"rollBack": "이전 상태로 되돌리기",
"upRoll": "부옵션 추가",
"downRoll": "부옵션 감소"
} }
} }

View File

@@ -163,15 +163,15 @@
"set": "Bộ", "set": "Bộ",
"pleaseSelectASet": "Vui lòng chọn một bộ", "pleaseSelectASet": "Vui lòng chọn một bộ",
"effectBonus": "Hiệu ứng cộng thêm", "effectBonus": "Hiệu ứng cộng thêm",
"totalRoll": "Tổng lượt lăn", "totalRoll": "Tổng số dòng",
"randomizeStats": "Ngẫu nhiên chỉ số", "randomizeStats": "Ngẫu nhiên chỉ số",
"randomizeRolls": "Ngẫu nhiên lượt lăn", "randomizeRolls": "Ngẫu nhiên số dòng",
"selectASubStat": "Chọn chỉ số phụ", "selectASubStat": "Chọn chỉ số phụ",
"selectASet": "Chọn một bộ", "selectASet": "Chọn một bộ",
"selectAMainStat": "Chọn chỉ số chính", "selectAMainStat": "Chọn chỉ số chính",
"save": "Lưu", "save": "Lưu",
"reset": "Đặt lại", "reset": "Đặt lại toàn bộ",
"roll": "Sô lượt", "roll": "Số dòng",
"step": "Bước nhảy", "step": "Bước nhảy",
"memoryOfChaos": "Hồi ức hỗn độn", "memoryOfChaos": "Hồi ức hỗn độn",
"pureFiction": "Kể chuyện hư cấu", "pureFiction": "Kể chuyện hư cấu",
@@ -242,6 +242,9 @@
"hardMode": "Chế độ khó", "hardMode": "Chế độ khó",
"selectPEAKEvent": "Chọn sự kiện", "selectPEAKEvent": "Chọn sự kiện",
"mode": "Chế độ", "mode": "Chế độ",
"selectMode": "Chọn chế độ" "selectMode": "Chọn chế độ",
"rollBack": "Quay lại bước trước",
"upRoll": "Tăng dòng",
"downRoll": "Giảm dòng"
} }
} }

View File

@@ -242,6 +242,9 @@
"hardMode": "困难模式", "hardMode": "困难模式",
"selectPEAKEvent": "选择 PEAK 事件", "selectPEAKEvent": "选择 PEAK 事件",
"mode": "模式", "mode": "模式",
"selectMode": "选择模式" "selectMode": "选择模式",
"rollBack": "回到之前的状态",
"upRoll": "增加副属性",
"downRoll": "减少副属性"
} }
} }

View File

@@ -74,7 +74,7 @@ export default function CopyImport() {
} }
setMessage({ setMessage({
type: "success", type: "success",
text: transI18n("selectedAll") text: transI18n("selectAll")
}) })
}; };

View File

@@ -13,6 +13,7 @@ import useRelicMakerStore from '@/stores/relicMakerStore';
import { toast } from 'react-toastify'; import { toast } from 'react-toastify';
import { useTranslations } from 'next-intl'; import { useTranslations } from 'next-intl';
import cloneDeep from 'lodash/cloneDeep' import cloneDeep from 'lodash/cloneDeep'
import { ChevronDown, ChevronUp } from 'lucide-react';
export default function RelicMaker() { export default function RelicMaker() {
const { avatars, setAvatars } = useUserDataStore() const { avatars, setAvatars } = useUserDataStore()
@@ -372,8 +373,13 @@ export default function RelicMaker() {
<div className="text-xl font-bold text-info">{calcAffixBonus(subAffixOptions[v.affixId], v.stepCount, v.rollCount)}{mappingStats?.[subAffixOptions[v.affixId]?.property]?.unit || ""}</div> <div className="text-xl font-bold text-info">{calcAffixBonus(subAffixOptions[v.affixId], v.stepCount, v.rollCount)}{mappingStats?.[subAffixOptions[v.affixId]?.property]?.unit || ""}</div>
</div> </div>
{/* Roll Values */} {/* Up Roll Values */}
<div className="col-span-12 grid grid-cols-3 gap-1"> <div className="col-span-12">
<div className="flex items-center gap-2 mb-2">
<ChevronUp className="w-4 h-4 text-success" />
<span className="text-sm font-semibold text-success">{transI18n("upRoll")}</span>
</div>
<div className="grid grid-cols-3 gap-1">
<button <button
onClick={() => handleSubStatChange(v.affixId, index, v.rollCount + 1, v.stepCount + 0)} onClick={() => handleSubStatChange(v.affixId, index, v.rollCount + 1, v.stepCount + 0)}
className="btn btn-sm bg-white text-slate-800 hover:bg-gray-200 border-0" className="btn btn-sm bg-white text-slate-800 hover:bg-gray-200 border-0"
@@ -393,6 +399,35 @@ export default function RelicMaker() {
{calcAffixBonus(subAffixOptions[v.affixId], v.stepCount + 2, v.rollCount + 1)}{mappingStats?.[subAffixOptions[v.affixId]?.property]?.unit || ""} {calcAffixBonus(subAffixOptions[v.affixId], v.stepCount + 2, v.rollCount + 1)}{mappingStats?.[subAffixOptions[v.affixId]?.property]?.unit || ""}
</button> </button>
</div> </div>
</div>
{/* Down Roll Values */}
<div className="col-span-12">
<div className="flex items-center gap-2 mb-2">
<ChevronDown className="w-4 h-4 text-error" />
<span className="text-sm font-semibold text-error">{transI18n("downRoll")}</span>
</div>
<div className="grid grid-cols-3 gap-1">
<button
onClick={() => handleSubStatChange(v.affixId, index, Math.max(v.rollCount - 1, 0), Math.max(v.stepCount, 0))}
className="btn btn-sm bg-white text-slate-800 hover:bg-gray-200 border-0"
>
{calcAffixBonus(subAffixOptions[v.affixId], 0 , Math.max(v.rollCount - 1, 0))}{mappingStats?.[subAffixOptions[v.affixId]?.property]?.unit || ""}
</button>
<button
onClick={() => handleSubStatChange(v.affixId, index, Math.max(v.rollCount - 1, 0), Math.max(v.stepCount - 1, 0))}
className="btn btn-sm bg-white text-slate-800 hover:bg-gray-200 border-0"
>
{calcAffixBonus(subAffixOptions[v.affixId], Math.max(v.stepCount - 1, 0), Math.max(v.rollCount - 1, 0))}{mappingStats?.[subAffixOptions[v.affixId]?.property]?.unit || ""}
</button>
<button
onClick={() => handleSubStatChange(v.affixId, index, Math.max(v.rollCount - 1, 0), Math.max(v.stepCount - 2, 0))}
className="btn btn-sm bg-white text-slate-800 hover:bg-gray-200 border-0"
>
{calcAffixBonus(subAffixOptions[v.affixId], Math.max(v.stepCount - 2, 0), Math.max(v.rollCount - 1, 0))}{mappingStats?.[subAffixOptions[v.affixId]?.property]?.unit || ""}
</button>
</div>
</div>
{/* Reset Button & Roll Info */} {/* Reset Button & Roll Info */}
<div className="col-span-12 text-center"> <div className="col-span-12 text-center">
@@ -408,7 +443,7 @@ export default function RelicMaker() {
className="btn btn-warning btn-sm mb-1" className="btn btn-warning btn-sm mb-1"
onClick={() => handlerRollback(index)} onClick={() => handlerRollback(index)}
> >
- {transI18n("rollBack")}
</button> </button>
</div> </div>
@@ -417,7 +452,6 @@ export default function RelicMaker() {
<span className="font-bold">{transI18n("step")}: <span className="text-info">{v.stepCount}</span></span> <span className="font-bold">{transI18n("step")}: <span className="text-info">{v.stepCount}</span></span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>