Add some message

This commit is contained in:
Made Baruna 2021-03-30 23:41:07 +08:00
parent 80c3dd6eba
commit 0ec9612791
6 changed files with 24 additions and 11 deletions

View file

@ -60,9 +60,9 @@
let url;
let processingLog = false;
let processingLog = true;
let fetchingWishes = false;
let finishedProcessingLog = false;
let finishedProcessingLog = true;
let calculatingPity = false;
let cancelled = false;
@ -511,7 +511,8 @@
{/if}
</div>
<p class="mt-4">{$t('wish.import.importNotice1')}</p>
<p>{$t('wish.import.importNotice2')}</p>
<p class="mb-1">{$t('wish.import.importNotice2')}</p>
<p class="text-red-300 mb-1">{$t('wish.import.importNotice3')}</p>
<p class="font-semibold">{$t('wish.import.saveData')}</p>
{:else if calculatingPity}
<Icon path={mdiLoading} spin color="white" />

View file

@ -31,6 +31,7 @@
"nonew": "No New Wishes",
"importNotice1": "Imported wishes will be appended or replaced accordingly to existing data",
"importNotice2": "If you don't have any data saved before, first wish will be counted as pity 1",
"importNotice3": "Please note if you are importing a different account, please make sure to separate your account on the settings page, or your data will be mixed up!",
"saveData": "Save wish data?",
"reCalculating": "Re-calculating pity...",
"processing": "Processing",
@ -355,6 +356,7 @@
"thanks": "Thanks😁!",
"modal": {
"notice": "All Todo and Wish history data will be deleted",
"backup": "You can backup your wish history first by exporting it to an excel file!",
"cancel": "Cancel",
"delete": "Delete",
"reset": "Reset"

View file

@ -31,6 +31,7 @@
"nonew": "Tdk ada wish baru",
"importNotice1": "Wish yang diimport akan ditambah atau dihapus sesuai dengan data yang sudah pernah diimport",
"importNotice2": "Jika kamu tidak mempunyai data yang tersimpan sebelumnya, wish pertama akan dihitung sebagai pity 1.",
"importNotice3": "Harap diingat jika kamu mengimport akun yang berbeda, pastikan sudah memisahkan akun di halaman setting jika tidak ingin data mu tercampur!",
"saveData": "Simpan data?",
"reCalculating": "Menghitung pity...",
"processing": "Memproses",
@ -355,8 +356,9 @@
"thanks": "Thanks😁!",
"modal": {
"notice": "Semua todo dan riwayat wish akan dihapus",
"cancel": "Cancel",
"delete": "Delete",
"backup": "Kamu bisa backup dulu riwayat history dengan mengexport nya ke file excel!",
"cancel": "Batal",
"delete": "Hapus",
"reset": "Reset"
}
},

View file

@ -11,6 +11,7 @@
<div>
<p class="text-white font-bold mb-4 text-lg">{$t('settings.modal.delete')} {account.label}?</p>
<p class="text-white mb-4">{$t('settings.modal.notice')}</p>
<p class="text-white mb-4 italic">{$t('settings.modal.backup')}</p>
<div class="flex justify-end gap-2">
<Button on:click={cancel}>{$t('settings.modal.cancel')}</Button>
<Button on:click={deleteAccount} color="red">{$t('settings.modal.delete')}</Button>

View file

@ -11,6 +11,7 @@
<div>
<p class="text-white font-bold mb-4 text-lg">{$t('settings.modal.reset')} {account.label}?</p>
<p class="text-white mb-4">{$t('settings.modal.notice')}</p>
<p class="text-white mb-4 italic">{$t('settings.modal.backup')}</p>
<div class="flex justify-end gap-2">
<Button on:click={cancel}>{$t('settings.modal.cancel')}</Button>
<Button on:click={resetAccount} color="red">{$t('settings.modal.reset')}</Button>

View file

@ -22,7 +22,7 @@
import { weaponList } from '../../data/weaponList';
import { getAccountPrefix } from '../../stores/account';
import { fromRemote, readSave } from '../../stores/saveManager';
import { getTimeOffset } from '../../stores/server';
import { getTimeOffset, server } from '../../stores/server';
import { pushToast } from '../../stores/toast';
Chart.defaults.global.defaultFontColor = '#cbd5e0';
@ -41,7 +41,7 @@
beginners: 'beginners',
};
let errorProcessingPull = '';
let errorProcessingPull = null;
const bannerType = bannerTypes[id];
let bannerChart;
@ -141,7 +141,7 @@
if (currentBanner === undefined) {
console.log('error banner here', JSON.stringify(pull));
errorProcessingPull = JSON.stringify(pull);
errorProcessingPull = pull;
pushToast($t('wish.errorBanner'), 'error');
return;
}
@ -407,9 +407,15 @@
</div>
{#if loading}
<div class="text-white pl-4 md:pl-8 mt-4">{$t('wish.detail.loading')}</div>
{#if errorProcessingPull !== ''}
Error when getting banner for {errorProcessingPull}
{/if}
<div class="text-gray-400 pl-4 md:pl-8 mt-2">
{#if errorProcessingPull !== null}
Show this on Discord if still stuck:<br/>
Error when getting banner for<br/>
id: {errorProcessingPull.id}<br/>
time: {errorProcessingPull.time}<br/>
server: {$server}
{/if}
</div>
{:else}
<div class="flex mt-4 wrapper">
<div class="block overflow-x-auto xl:overflow-x-visible whitespace-no-wrap px">