From 931e611cf77eaf892aba78fb8cf761922871f9b8 Mon Sep 17 00:00:00 2001 From: split / May Date: Wed, 1 Jan 2025 06:21:12 -0800 Subject: [PATCH] revert: :rewind: Reverse decision to remove the classic UserBox preview Adds back the classic UserBox preview when AquaBox is disabled / unavailable --- .../components/settings/ChuniSettings.svelte | 45 +++++++++++++------ AquaNet/src/libs/i18n/en_ref.ts | 1 + AquaNet/src/libs/i18n/zh.ts | 1 + 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/AquaNet/src/components/settings/ChuniSettings.svelte b/AquaNet/src/components/settings/ChuniSettings.svelte index 372a147e..7ff8be0f 100644 --- a/AquaNet/src/components/settings/ChuniSettings.svelte +++ b/AquaNet/src/components/settings/ChuniSettings.svelte @@ -209,20 +209,37 @@ {/each} {/if} - {#if USERBOX_INSTALLED} - -
- - -
- {/if} - {#if USERBOX_SUPPORT} -

- -

+ {#if HAS_USERBOX_ASSETS} + {#if USERBOX_INSTALLED} + +
+ + +
+ {/if} + {#if USERBOX_SUPPORT} +

+ +

+ {/if} + {#if !USERBOX_SUPPORT || !USERBOX_INSTALLED || !USERBOX_ENABLED.value} +

{t("userbox.header.preview")}

+

{t("userbox.preview.notice")}

+ + {#if preview} +
+ {#each userItems.filter(v => v.iKey != 'trophy' && v.iKey != 'systemVoice') as { iKey, ubKey, items }, i} +
+ {ts(`userbox.${ubKey}`)} + +
+ {/each} +
+ {/if} + {/if} {/if} {/if} diff --git a/AquaNet/src/libs/i18n/en_ref.ts b/AquaNet/src/libs/i18n/en_ref.ts index 4b225e5b..40a07673 100644 --- a/AquaNet/src/libs/i18n/en_ref.ts +++ b/AquaNet/src/libs/i18n/en_ref.ts @@ -176,6 +176,7 @@ export const EN_REF_USERBOX = { 'userbox.avatarItem': 'Avatar Item', 'userbox.avatarFront': 'Avatar Front', 'userbox.avatarBack': 'Avatar Back', + 'userbox.preview.notice': 'To honor the copyright, we cannot host the images of the userbox items. However, if someone else is willing to provide the images, you can enter their URL here and it will be displayed.', 'userbox.preview.url': 'Image URL', 'userbox.error.nodata': 'Chuni data not found', diff --git a/AquaNet/src/libs/i18n/zh.ts b/AquaNet/src/libs/i18n/zh.ts index a96060a0..a98e6e93 100644 --- a/AquaNet/src/libs/i18n/zh.ts +++ b/AquaNet/src/libs/i18n/zh.ts @@ -186,6 +186,7 @@ export const zhUserbox: typeof EN_REF_USERBOX = { 'userbox.avatarItem': '企鹅物品', 'userbox.avatarFront': '企鹅前景', 'userbox.avatarBack': '企鹅背景', + 'userbox.preview.notice': '「生存战略」:为了尊重版权,我们不会提供游戏内物品的图片。但是如果你认识其他愿意提供图床的人,在这里输入 URL 就可以显示出预览。', 'userbox.preview.url': '图床 URL', 'userbox.error.nodata': '未找到中二数据', };