UPDATE: new ui
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 47s
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 47s
This commit is contained in:
@@ -274,6 +274,8 @@
|
||||
"detailHiddenUi": "开启后将隐藏游戏界面。",
|
||||
"detailDisableCensorship": "开启后将关闭游戏内的审查。",
|
||||
"detailMultipathCharacter": "允许更改部分角色的命途。",
|
||||
"trailblazer": "开拓者"
|
||||
"trailblazer": "开拓者",
|
||||
"listExtraEffect": "额外效果列表",
|
||||
"extra": "额外"
|
||||
}
|
||||
}
|
||||
@@ -275,6 +275,8 @@
|
||||
"detailHiddenUi": "Enabling this feature will hide the game UI.",
|
||||
"detailDisableCensorship": "Enabling this feature will disable in-game censorship.",
|
||||
"detailMultipathCharacter": "Allows changing the Path of certain characters.",
|
||||
"trailblazer": "Trailblazer"
|
||||
"trailblazer": "Trailblazer",
|
||||
"listExtraEffect": "List Extra Effect",
|
||||
"extra": "Extra"
|
||||
}
|
||||
}
|
||||
@@ -274,6 +274,8 @@
|
||||
"detailHiddenUi": "この機能を有効にすると、ゲームのUIを非表示にします。",
|
||||
"detailDisableCensorship": "この機能を有効にすると、ゲーム内の検閲を無効にします。",
|
||||
"detailMultipathCharacter": "一部キャラクターの運命を変更できます。",
|
||||
"trailblazer": "開拓者"
|
||||
"trailblazer": "開拓者",
|
||||
"listExtraEffect": "追加効果一覧",
|
||||
"extra": "追加"
|
||||
}
|
||||
}
|
||||
@@ -274,6 +274,8 @@
|
||||
"detailHiddenUi": "이 기능을 활성화하면 게임 UI가 숨겨집니다.",
|
||||
"detailDisableCensorship": "이 기능을 활성화하면 게임 내 검열이 비활성화됩니다.",
|
||||
"detailMultipathCharacter": "일부 캐릭터의 운명을 변경할 수 있습니다.",
|
||||
"trailblazer": "개척자"
|
||||
"trailblazer": "개척자",
|
||||
"listExtraEffect": "추가 효과 목록",
|
||||
"extra": "추가"
|
||||
}
|
||||
}
|
||||
@@ -274,6 +274,8 @@
|
||||
"detailHiddenUi": "Khi bật tính năng này sẽ ẩn giao diện của game.",
|
||||
"detailDisableCensorship": "Khi bật tính năng này sẽ tắt kiểm duyệt của game.",
|
||||
"detailMultipathCharacter": "Cho phép thay đổi Vận Mệnh của một vài nhân vật.",
|
||||
"trailblazer": "Nhà khai phá"
|
||||
"trailblazer": "Nhà khai phá",
|
||||
"listExtraEffect": "Danh sách hiệu ứng bổ sung",
|
||||
"extra": "Bổ sung"
|
||||
}
|
||||
}
|
||||
@@ -274,6 +274,8 @@
|
||||
"detailHiddenUi": "开启后将隐藏游戏界面。",
|
||||
"detailDisableCensorship": "开启后将关闭游戏内的审查。",
|
||||
"detailMultipathCharacter": "允许更改部分角色的命途。",
|
||||
"trailblazer": "开拓者"
|
||||
"trailblazer": "开拓者",
|
||||
"listExtraEffect": "额外效果列表",
|
||||
"extra": "额外"
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
import { useState } from "react"
|
||||
import { replaceByParam, getLocaleName } from "@/helper"
|
||||
import { ExtraEffect } from "@/types"
|
||||
import { useTranslations } from "next-intl"
|
||||
|
||||
type Props = {
|
||||
extras: Record<string, ExtraEffect> | undefined
|
||||
@@ -12,7 +13,7 @@ type Props = {
|
||||
export default function ExtraEffectList({ extras, locale }: Props) {
|
||||
const [openList, setOpenList] = useState(false)
|
||||
const [openId, setOpenId] = useState<number | null>(null)
|
||||
|
||||
const transI18n = useTranslations("DataPage")
|
||||
if (!extras || Object.keys(extras).length === 0) return null
|
||||
|
||||
return (
|
||||
@@ -22,7 +23,7 @@ export default function ExtraEffectList({ extras, locale }: Props) {
|
||||
onClick={() => setOpenList(!openList)}
|
||||
>
|
||||
<span className="text-sm font-semibold text-primary">
|
||||
List Extra Effect ({Object.keys(extras).length})
|
||||
{transI18n("listExtraEffect")} ({Object.keys(extras).length})
|
||||
</span>
|
||||
|
||||
<span
|
||||
@@ -36,7 +37,7 @@ export default function ExtraEffectList({ extras, locale }: Props) {
|
||||
|
||||
<div
|
||||
className={`overflow-hidden transition-all duration-300 ${
|
||||
openList ? "max-h-[500px] mt-2" : "max-h-0"
|
||||
openList ? "max-h-125 mt-2" : "max-h-0"
|
||||
}`}
|
||||
>
|
||||
<div className="flex flex-col gap-2">
|
||||
@@ -56,7 +57,7 @@ export default function ExtraEffectList({ extras, locale }: Props) {
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-[10px] uppercase font-bold bg-primary/50 px-1.5 py-0.5 rounded">
|
||||
Extra
|
||||
{transI18n("extra")}
|
||||
</span>
|
||||
|
||||
<span className="text-sm font-medium text-primary/80">
|
||||
|
||||
@@ -10,7 +10,7 @@ import { useMemo, useState } from "react"
|
||||
import useDetailDataStore from "@/stores/detailDataStore"
|
||||
|
||||
export default function ExtraSettingBar() {
|
||||
const { extraData, setExtraData } = useGlobalStore()
|
||||
const { extraData, setExtraData, isEnableChangePath, setIsEnableChangePath } = useGlobalStore()
|
||||
const transI18n = useTranslations("DataPage")
|
||||
const { mapAvatar, mapPeak, stage, baseType } = useDetailDataStore()
|
||||
const { locale } = useLocaleStore()
|
||||
@@ -228,8 +228,15 @@ export default function ExtraSettingBar() {
|
||||
<div className="tooltip tooltip-info tooltip-bottom" data-tip={transI18n("detailMultipathCharacter")}>
|
||||
<Info className="text-primary" size={20} />
|
||||
</div>
|
||||
<input
|
||||
type="checkbox"
|
||||
className="toggle toggle-primary"
|
||||
checked={isEnableChangePath}
|
||||
onChange={(e) => setIsEnableChangePath(e.target.checked)}
|
||||
/>
|
||||
</h3>
|
||||
|
||||
{isEnableChangePath && (
|
||||
<>
|
||||
<motion.div className="form-control bg-base-200 p-4 rounded-xl shadow">
|
||||
<label className="flex items-center gap-3">
|
||||
<User className="text-warning" size={20} />
|
||||
@@ -288,6 +295,8 @@ export default function ExtraSettingBar() {
|
||||
/>
|
||||
</label>
|
||||
</motion.div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* CHALLENGE */}
|
||||
|
||||
@@ -14,7 +14,7 @@ export const connectToPS = async (): Promise<{ success: boolean, message: string
|
||||
username,
|
||||
password
|
||||
} = useConnectStore.getState()
|
||||
const {setExtraData, setIsConnectPS} = useGlobalStore.getState()
|
||||
const { setExtraData, setIsConnectPS } = useGlobalStore.getState()
|
||||
|
||||
let urlQuery = serverUrl
|
||||
if (!urlQuery.startsWith("http://") && !urlQuery.startsWith("https://")) {
|
||||
@@ -59,7 +59,7 @@ export const syncDataToPS = async (): Promise<{ success: boolean, message: strin
|
||||
password
|
||||
} = useConnectStore.getState()
|
||||
|
||||
const {extraData, setIsConnectPS, setExtraData} = useGlobalStore.getState()
|
||||
const {extraData, setIsConnectPS, setExtraData, isEnableChangePath} = useGlobalStore.getState()
|
||||
|
||||
|
||||
const {avatars, battle_type, moc_config, pf_config, as_config, ce_config, peak_config} = useUserDataStore.getState()
|
||||
@@ -85,7 +85,13 @@ export const syncDataToPS = async (): Promise<{ success: boolean, message: strin
|
||||
return { success: true, message: "" }
|
||||
}
|
||||
}
|
||||
const response = await SendDataToServer(username, password, urlQuery, data, extraData)
|
||||
const newExtra = structuredClone(extraData)
|
||||
|
||||
if (newExtra && !isEnableChangePath) {
|
||||
newExtra.multi_path = undefined
|
||||
}
|
||||
|
||||
const response = await SendDataToServer(username, password, urlQuery, data, newExtra)
|
||||
if (typeof response === "string") {
|
||||
setIsConnectPS(false)
|
||||
return { success: false, message: response }
|
||||
|
||||
@@ -4,6 +4,8 @@ import { ExtraData } from '@/types'
|
||||
interface GlobalState {
|
||||
isConnectPS: boolean;
|
||||
extraData?: ExtraData;
|
||||
isEnableChangePath: boolean
|
||||
setIsEnableChangePath: (newIsEnableChangePath: boolean) => void;
|
||||
setExtraData: (newExtraData: ExtraData | undefined) => void;
|
||||
setIsConnectPS: (newIsConnectPS: boolean) => void;
|
||||
}
|
||||
@@ -11,6 +13,8 @@ interface GlobalState {
|
||||
const useGlobalStore = create<GlobalState>((set) => ({
|
||||
isConnectPS: false,
|
||||
extraData: undefined,
|
||||
isEnableChangePath: false,
|
||||
setIsEnableChangePath: (newIsEnableChangePath: boolean) => set({ isEnableChangePath: newIsEnableChangePath }),
|
||||
setExtraData: (newExtraData: ExtraData | undefined) => set({ extraData: newExtraData }),
|
||||
setIsConnectPS: (newIsConnectPS: boolean) => set({ isConnectPS: newIsConnectPS }),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user