UPDATE: Responsive for mobile
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 1m53s
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 1m53s
This commit is contained in:
@@ -376,8 +376,8 @@ export default function ActionBar() {
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<dialog id="update_profile_modal" className="modal ">
|
||||
<div className="modal-box w-11/12 max-w-7xl bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<dialog id="update_profile_modal" className="modal">
|
||||
<div className="modal-box w-11/12 max-w-7xl max-h-[85vh] bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="sticky top-0 z-10">
|
||||
<motion.button
|
||||
whileHover={{ scale: 1.1, rotate: 90 }}
|
||||
@@ -419,7 +419,7 @@ export default function ActionBar() {
|
||||
</dialog>
|
||||
|
||||
<dialog id="copy_profile_modal" className="modal">
|
||||
<div className="modal-box w-11/12 max-w-7xl bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="modal-box w-11/12 max-w-7xl max-h-[85vh] bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="sticky top-0 z-10">
|
||||
<motion.button
|
||||
whileHover={{ scale: 1.1, rotate: 90 }}
|
||||
@@ -444,7 +444,7 @@ export default function ActionBar() {
|
||||
|
||||
|
||||
<dialog id="avatars_modal" className="modal">
|
||||
<div className="modal-box w-11/12 max-w-7xl bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="modal-box w-11/12 max-w-7xl max-h-[85vh] bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="sticky top-0 z-10">
|
||||
<motion.button
|
||||
whileHover={{ scale: 1.1, rotate: 90 }}
|
||||
|
||||
@@ -510,7 +510,7 @@ export default function AvatarInfo() {
|
||||
)}
|
||||
|
||||
<dialog id="action_detail_modal" className="modal backdrop-blur-sm">
|
||||
<div className="modal-box w-11/12 max-w-5xl bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="modal-box w-11/12 max-w-5xl max-h-[85vh] bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="sticky top-0 z-10">
|
||||
<motion.button
|
||||
whileHover={{ scale: 1.1, rotate: 90 }}
|
||||
|
||||
@@ -495,8 +495,8 @@ export default function Header() {
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<dialog id="connect_modal" className="modal sm:modal-middle backdrop-blur-sm">
|
||||
<div className="modal-box w-11/12 max-w-7xl bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<dialog id="connect_modal" className="modal">
|
||||
<div className="modal-box w-11/12 max-w-7xl max-h-[85vh] bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="sticky top-0 z-10">
|
||||
<motion.button
|
||||
whileHover={{ scale: 1.1, rotate: 90 }}
|
||||
@@ -597,71 +597,73 @@ export default function Header() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="flex flex-col sm:flex-row justify-between items-center mt-6 mb-2">
|
||||
<div className="mb-4 sm:mb-0">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 mt-6 mb-2">
|
||||
{/* Status */}
|
||||
<div className="flex items-center justify-center md:justify-start">
|
||||
<span className="text-md mr-2">{transI18n("status")}:</span>
|
||||
<span className={`badge ${isConnectPS ? 'badge-success' : 'badge-error'} badge-lg`}>
|
||||
<span
|
||||
className={`badge ${isConnectPS ? "badge-success" : "badge-error"
|
||||
} badge-lg`}
|
||||
>
|
||||
{isConnectPS ? transI18n("connected") : transI18n("unconnected")}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="flex space-x-2">
|
||||
{/* Buttons */}
|
||||
<div className="flex flex-col sm:flex-row gap-2 w-full justify-center md:justify-end">
|
||||
<button
|
||||
onClick={
|
||||
async () => {
|
||||
const response = await connectToPS()
|
||||
onClick={async () => {
|
||||
const response = await connectToPS();
|
||||
if (response.success) {
|
||||
setIsConnectPS(true)
|
||||
setIsConnectPS(true);
|
||||
setMessage({
|
||||
type: "success",
|
||||
text: transI18n("connectedSuccess")
|
||||
})
|
||||
text: transI18n("connectedSuccess"),
|
||||
});
|
||||
} else {
|
||||
setIsConnectPS(false)
|
||||
setIsConnectPS(false);
|
||||
setMessage({
|
||||
type: "error",
|
||||
text: response.message
|
||||
})
|
||||
text: response.message,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
className={`btn btn-primary`}
|
||||
|
||||
}}
|
||||
className="btn btn-primary w-full sm:w-auto"
|
||||
>
|
||||
{transI18n("connectPs")}
|
||||
</button>
|
||||
|
||||
{isConnectPS && (
|
||||
<button
|
||||
onClick={
|
||||
async () => {
|
||||
const response = await syncDataToPS()
|
||||
onClick={async () => {
|
||||
const response = await syncDataToPS();
|
||||
if (response.success) {
|
||||
setMessage({
|
||||
type: "success",
|
||||
text: transI18n("syncSuccess")
|
||||
})
|
||||
text: transI18n("syncSuccess"),
|
||||
});
|
||||
} else {
|
||||
setMessage({
|
||||
type: "error",
|
||||
text: `${transI18n("syncFailed")}: ${response.message}`
|
||||
})
|
||||
text: `${transI18n("syncFailed")}: ${response.message}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
className={`btn btn-success`}
|
||||
}}
|
||||
className="btn btn-success w-full sm:w-auto"
|
||||
>
|
||||
{transI18n("sync")}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
|
||||
<dialog id="import_modal" className="modal backdrop-blur-sm">
|
||||
<div className="modal-box w-11/12 max-w-max bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<dialog id="import_modal" className="modal">
|
||||
<div className="modal-box w-11/12 max-w-7xl max-h-[85vh] bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="sticky top-0 z-10">
|
||||
<motion.button
|
||||
whileHover={{ scale: 1.1, rotate: 90 }}
|
||||
@@ -687,8 +689,8 @@ export default function Header() {
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<dialog id="monster_modal" className="modal sm:backdrop-blur-sm md:backdrop-blur-none">
|
||||
<div className="modal-box w-11/12 max-w-max bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<dialog id="monster_modal" className="modal">
|
||||
<div className="modal-box w-11/12 max-w-7xl max-h-[85vh] bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="sticky top-0 z-10">
|
||||
<motion.button
|
||||
whileHover={{ scale: 1.1, rotate: 90 }}
|
||||
|
||||
@@ -20,7 +20,7 @@ export default function RelicMaker() {
|
||||
const { avatarSelected } = useAvatarStore()
|
||||
const { setIsOpenRelic } = useModelStore()
|
||||
const { mapRelicInfo } = useRelicStore()
|
||||
const { mapMainAffix, mapSubAffix} = useAffixStore()
|
||||
const { mapMainAffix, mapSubAffix } = useAffixStore()
|
||||
const transI18n = useTranslations("DataPage")
|
||||
const {
|
||||
selectedRelicSlot,
|
||||
@@ -172,7 +172,7 @@ export default function RelicMaker() {
|
||||
const exKeys = Object.keys(exSubAffixOptions);
|
||||
for (let i = 0; i < newSubAffixes.length; i++) {
|
||||
const keys = Object.keys(subAffixOptions).filter((key) => !exKeys.includes(key));
|
||||
const randomKey = keys[Math.floor(Math.random() * keys.length )];
|
||||
const randomKey = keys[Math.floor(Math.random() * keys.length)];
|
||||
exKeys.push(randomKey);
|
||||
const randomValue = subAffixOptions[randomKey];
|
||||
newSubAffixes[i].affixId = randomKey;
|
||||
@@ -326,18 +326,18 @@ export default function RelicMaker() {
|
||||
{/* Right Panel - Sub Stats */}
|
||||
<div className="space-y-4">
|
||||
{/* Total Roll */}
|
||||
<div className="bg-base-100 rounded-xl p-6 border border-slate-700 z-[1]">
|
||||
<div className="bg-base-100 rounded-xl p-4 border border-slate-700 z-[1]">
|
||||
<h3 className="text-lg font-bold mb-4">{transI18n("totalRoll")} {listSelectedSubStats.reduce((a, b) => a + b.rollCount, 0)}</h3>
|
||||
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
<button
|
||||
className="btn btn-outline btn-success"
|
||||
className="btn btn-outline btn-success sm:btn-sm"
|
||||
onClick={randomizeStats}
|
||||
>
|
||||
{transI18n("randomizeStats")}
|
||||
</button>
|
||||
<button
|
||||
className="btn btn-outline btn-success"
|
||||
className="btn btn-outline btn-success sm:btn-sm"
|
||||
onClick={randomizeRolls}
|
||||
>
|
||||
{transI18n("randomizeRolls")}
|
||||
@@ -384,7 +384,7 @@ export default function RelicMaker() {
|
||||
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"
|
||||
>
|
||||
{calcAffixBonus(subAffixOptions[v.affixId], 0 , v.rollCount + 1)}{mappingStats?.[subAffixOptions[v.affixId]?.property]?.unit || ""}
|
||||
{calcAffixBonus(subAffixOptions[v.affixId], 0, v.rollCount + 1)}{mappingStats?.[subAffixOptions[v.affixId]?.property]?.unit || ""}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => handleSubStatChange(v.affixId, index, v.rollCount + 1, v.stepCount + 1)}
|
||||
@@ -412,7 +412,7 @@ export default function RelicMaker() {
|
||||
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 || ""}
|
||||
{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))}
|
||||
@@ -430,9 +430,9 @@ export default function RelicMaker() {
|
||||
</div>
|
||||
|
||||
{/* Reset Button & Roll Info */}
|
||||
<div className="col-span-12 text-center">
|
||||
<div className="grid grid-cols-2 gap-1 items-center justify-items-start">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="col-span-12 text-center w-full">
|
||||
<div className="grid grid-rows-2 gap-1 items-center justify-items-start w-full">
|
||||
<div className="grid grid-cols-2 gap-2 items-center w-full">
|
||||
<button
|
||||
className="btn btn-error btn-sm mb-1"
|
||||
onClick={() => resetSubStat(index)}
|
||||
@@ -447,7 +447,7 @@ export default function RelicMaker() {
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="text-lg flex items-center gap-2 text-gray-400">
|
||||
<div className="grid grid-cols-2 gap-2 items-center w-full">
|
||||
<span className="font-bold">{transI18n("roll")}: <span className="text-info">{v.rollCount}</span></span>
|
||||
<span className="font-bold">{transI18n("step")}: <span className="text-info">{v.stepCount}</span></span>
|
||||
</div>
|
||||
@@ -456,7 +456,7 @@ export default function RelicMaker() {
|
||||
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
))}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -315,8 +315,8 @@ export default function RelicsInfo() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<dialog id="action_detail_modal" className="modal lg:backdrop-blur-sm z-10">
|
||||
<div className="modal-box w-11/12 max-w-7xl bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<dialog id="action_detail_modal" className="modal">
|
||||
<div className="modal-box w-11/12 max-w-7xl max-h-[85vh] bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="sticky top-0 z-10">
|
||||
<motion.button
|
||||
whileHover={{ scale: 1.1, rotate: 90 }}
|
||||
@@ -335,8 +335,8 @@ export default function RelicsInfo() {
|
||||
|
||||
</dialog>
|
||||
|
||||
<dialog id="quick_view_modal" className="modal lg:backdrop-blur-sm z-10">
|
||||
<div className="modal-box w-11/12 max-w-7xl bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<dialog id="quick_view_modal" className="modal">
|
||||
<div className="modal-box w-11/12 max-w-7xl max-h-[85vh] bg-base-100 text-base-content border border-purple-500/50 shadow-lg shadow-purple-500/20">
|
||||
<div className="sticky top-0 z-10">
|
||||
<motion.button
|
||||
whileHover={{ scale: 1.1, rotate: 90 }}
|
||||
|
||||
Reference in New Issue
Block a user