diff --git a/src/components/WishImportModal.svelte b/src/components/WishImportModal.svelte index 8cd18dd7..25253506 100644 --- a/src/components/WishImportModal.svelte +++ b/src/components/WishImportModal.svelte @@ -17,6 +17,8 @@ import { readSave, updateSave } from '../stores/saveManager'; import { getAccountPrefix } from '../stores/account'; import { submitWishTally } from '../functions/wishTally'; + import Select from './Select.svelte'; + import { server } from '../stores/server'; export let processFirstTimePopup; export let closeModal; @@ -459,8 +461,23 @@ updateSave(`${prefix}${path}`, data); } + const servers = [ + { label: 'Asia/TW/HK/MO', value: 'Asia' }, + { label: 'America', value: 'America' }, + { label: 'Europe', value: 'Europe' }, + ]; + + function updateServer() { + if (selectedServer === null) return; + server.set(selectedServer.value); + } + + let selectedServer = null; + $: selectedServer, updateServer(); + onMount(() => { detectPlatform(); + selectedServer = servers.find((e) => e.value === $server); }); @@ -510,7 +527,11 @@ {/if} -
{$t('wish.import.importNotice1')}
+{$t('wish.import.server')}
+ +{$t('wish.import.importNotice1')}
{$t('wish.import.importNotice2')}
{$t('wish.import.importNotice3')}
{$t('wish.import.saveData')}
@@ -583,10 +604,8 @@ > CORS{$t('wish.import.faqs.a4.1')} - {$t('wish.import.faqs.a4.2')}{$t('wish.import.faqs.a4.2')}{$t('wish.import.faqs.q5')}
diff --git a/src/locales/en.json b/src/locales/en.json index 00c570ce..2f35af51 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -94,6 +94,7 @@ "timeout": "Connection timeout, please wait a moment and try again later", "invalidData": "Invalid data returned from API, try again later", "success": "Import success 😀!", + "server": "Select your server:", "wishTallyCheck": "Submit pity for global wish tally", "wishTally": "We are doing a global wish tally! You can submit your wish tally to participate. All pity data will be aggregated to know what is the average pity of paimon.moe users.", "wishTallyCollected": [ diff --git a/src/locales/id.json b/src/locales/id.json index 6202fc0f..5ecda79d 100644 --- a/src/locales/id.json +++ b/src/locales/id.json @@ -94,6 +94,7 @@ "timeout": "Connection timeout, tunggu sebentar dan coba lagi nanti", "invalidData": "Invalid data dikembalikan dari API, coba lagi nanti", "success": "Import berhasil 😀!", + "server": "Pilih server mu:", "wishTallyCheck": "Submit pity untuk perhitungan pity global", "wishTally": "Kita sedang melakukan perhitungan pity global! Kamu bisa mensubmit pity mu untuk berpartisipasi. Semua data pity akan dikumpulkan untuk mengetahui berapa pity rata-rata pengguna paimon.moe.", "wishTallyCollected": [