+ {#each userBoxFields as { key, label, kind }, i (key)}
+
+
+
+
+ {#if changed.includes(key)}
+
- {/each}
-
- {#if tab === 0}
-
-
- {#each userBoxFields as { key, label, kind }, i (key)}
-
-
-
-
- {#if changed.includes(key)}
-
- {/if}
-
-
- {/each}
-
- {#if HAS_USERBOX_ASSETS}
-
-
{t("userbox.preview.ui")}
-
- {#if values.frame}
-

- {/if}
-
-
-
- {#if values.mapicon}
-
-

-
+ submit(generateBodyFromKind(key, newValue));
+ }}
+ >
+ {#if submitting === key}
+
+ {:else}
+ {t("settings.profile.save")}
{/if}
+
+ {/if}
+
+
+ {/each}
+
+ {#if HAS_USERBOX_ASSETS}
+
+
{t("userbox.preview.ui")}
+
+ {#if values.frame}
+

+ {/if}
-
- {#if values.voice}
-
-

-
- {/if}
-
+
+
+ {#if values.mapicon}
+
+

+
+ {/if}
-
{t("userbox.preview.nameplate")}
-
- {#if values.nameplate}
-
-

-
- {availableOptions.trophy.find((x) => x.id === values.trophy)
- ?.label}
-
-
-
- {user.displayName}
-
-
-
- {/if}
-
-
{t("userbox.preview.avatar")}
-
-
-

-
-
-

-
-
-

-
-
-

-
-
-

-
-
-

-
-
-

-
-
+
+ {#if values.voice}
+
+
{/if}
- {:else}
-
-
WIP
+
+
{t("userbox.preview.nameplate")}
+
+ {#if values.nameplate}
+
+

+
+ {availableOptions.trophy.find((x) => x.id === values.trophy)
+ ?.label}
+
+
+
+ {user.displayName}
+
+
+
+ {/if}
+
+
{t("userbox.preview.avatar")}
+
+
+

+
+
+

+
+
+

+
+
+

+
+
+

+
+
+

+
+
+

+
- {/if}
-
+
+ {/if}
{/if}
diff --git a/AquaNet/src/libs/sdk.ts b/AquaNet/src/libs/sdk.ts
index b1b647fd..0e8825db 100644
--- a/AquaNet/src/libs/sdk.ts
+++ b/AquaNet/src/libs/sdk.ts
@@ -266,7 +266,9 @@ export const USERBOX = {
get('/api/v2/game/chu3/user-box', {}),
getUnlockedItems: (itemId: UserBoxItemKind): Promise<{ itemKind: number, itemId: number, stock: number, isValid: boolean }[]> =>
get(`/api/v2/game/chu3/user-box-item-by-kind`,{ itemId }),
- getItemLabels: () => get(`/api/v2/game/chu3/user-box-all-items`, {}),
+ getItemLabels: () => get(`/api/v2/game/chu3/user-box-all-items`, {}).then(it =>
+ Object.fromEntries(Object.entries(it).map(([key, value]) =>
+ [key, Object.fromEntries((value as any[]).map(it => [it.id, it.name]))]))),
setUserBox: (d: { field: string, value: number | string }) =>
post(`/api/v2/game/chu3/user-detail-set`, d),
}