@@ -59,14 +59,4 @@
> input
flex: 1
-
- .warning
- background: #aa555510
- padding: 10px
- border-left: solid 2px vars.$c-error
-
- &::before
- color: vars.$c-error
- font-weight: bold
- content: "!"
diff --git a/AquaNet/src/components/ui/Error.svelte b/AquaNet/src/components/ui/Error.svelte
new file mode 100644
index 00000000..a3caf0d6
--- /dev/null
+++ b/AquaNet/src/components/ui/Error.svelte
@@ -0,0 +1,30 @@
+
+
+
+
+
{t('status.error')}
+
{t('status.error.hint')}{t('status.error.hint.link')}
+
{t('status.detail', { detail: error })}
+
+
+
+
+
+
+
+
diff --git a/AquaNet/src/components/ui/Loading.svelte b/AquaNet/src/components/ui/Loading.svelte
new file mode 100644
index 00000000..32d9328a
--- /dev/null
+++ b/AquaNet/src/components/ui/Loading.svelte
@@ -0,0 +1,30 @@
+
+
+
+
+ LOADING
+
+
+
diff --git a/AquaNet/src/libs/i18n/en_ref.ts b/AquaNet/src/libs/i18n/en_ref.ts
index 1e3de49c..3c0cc05e 100644
--- a/AquaNet/src/libs/i18n/en_ref.ts
+++ b/AquaNet/src/libs/i18n/en_ref.ts
@@ -229,7 +229,15 @@ export const EN_REF_USERBOX = {
'userbox.new.error.invalidUrl': 'The URL you inputted is invalid.'
}
+export const EN_REF_MAI_PHOTO = {
+ 'maiphoto.title': 'Mai Memorial Photo Gallery',
+ 'maiphoto.url_warning': 'Note: If you want to share a photo with your friend, please save the photo. Do not copy image URL because the URL contains sensitive information.',
+ 'maiphoto.none': 'No photo found. You can upload photo by clicking upload at the end of each game session.',
+}
+
export const EN_REF = { ...EN_REF_USER, ...EN_REF_Welcome, ...EN_REF_GENERAL,
- ...EN_REF_LEADERBOARD, ...EN_REF_HOME, ...EN_REF_SETTINGS, ...EN_REF_USERBOX }
+ ...EN_REF_LEADERBOARD, ...EN_REF_HOME, ...EN_REF_SETTINGS, ...EN_REF_USERBOX,
+ ...EN_REF_MAI_PHOTO
+}
export type LocalizedMessages = typeof EN_REF
diff --git a/AquaNet/src/libs/i18n/zh.ts b/AquaNet/src/libs/i18n/zh.ts
index 591f6b35..08bcd4b1 100644
--- a/AquaNet/src/libs/i18n/zh.ts
+++ b/AquaNet/src/libs/i18n/zh.ts
@@ -2,6 +2,7 @@ import {
EN_REF_GENERAL,
EN_REF_HOME,
EN_REF_LEADERBOARD,
+ EN_REF_MAI_PHOTO,
EN_REF_SETTINGS,
EN_REF_USER,
EN_REF_USERBOX,
@@ -234,6 +235,11 @@ export const zhUserbox: typeof EN_REF_USERBOX = {
'userbox.new.error.invalidUrl': '输入的 URL 无效。'
};
+export const zhMaiPhoto: typeof EN_REF_MAI_PHOTO = {
+ 'maiphoto.title': 'Mai 纪念照片库',
+ 'maiphoto.url_warning': '注意:如果想与朋友分享图片的话,请先保存照片再发出去。不要复制图片 URL,因为 URL 中包含 AquaDX 账号信息。',
+ 'maiphoto.none': '还没有图片哦~ 可以在每次游戏结束的时候点击上传来上传照片。',
+}
export const ZH = { ...zhUser, ...zhWelcome, ...zhGeneral,
- ...zhLeaderboard, ...zhHome, ...zhSettings, ...zhUserbox }
+ ...zhLeaderboard, ...zhHome, ...zhSettings, ...zhUserbox, ...zhMaiPhoto }
diff --git a/AquaNet/src/libs/sdk.ts b/AquaNet/src/libs/sdk.ts
index 9761e99e..8b71ef23 100644
--- a/AquaNet/src/libs/sdk.ts
+++ b/AquaNet/src/libs/sdk.ts
@@ -284,6 +284,8 @@ export const CARD = {
export const GAME = {
trend: (username: string, game: GameName): Promise
=>
post(`/api/v2/game/${game}/trend`, { username }),
+ photos: (): Promise =>
+ post(`/api/v2/game/mai2/my-photo`, { }),
userSummary: (username: string, game: GameName): Promise =>
post(`/api/v2/game/${game}/user-summary`, { username }),
ranking: (game: GameName): Promise =>
diff --git a/AquaNet/src/pages/MaiPhoto.svelte b/AquaNet/src/pages/MaiPhoto.svelte
new file mode 100644
index 00000000..8b9eb9ad
--- /dev/null
+++ b/AquaNet/src/pages/MaiPhoto.svelte
@@ -0,0 +1,57 @@
+
+
+
+
+
{t("maiphoto.title")}
+
+
+ {#await GAME.photos()}
+
+ {:then photos}
+ {#if photos.length === 0}
+ {t('maiphoto.none')}
+ {:else}
+ {t('maiphoto.url_warning')}
+ {/if}
+
+ {#each photos as photo}
+
+

+
+ {/each}
+
+ {:catch error}
+
+ {/await}
+
+
+