Adjust toast

pull/1/head
Made Baruna 2021-03-29 09:34:21 +08:00
parent 52142c832d
commit f248203bda
4 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,5 @@
import dayjs from 'dayjs';
import { t as $t } from 'svelte-i18n'
import { getAccountPrefix } from '../stores/account';
import { getTimeOffset } from '../stores/server';
@ -8,6 +9,9 @@ import { weaponList } from '../data/weaponList';
import { characters } from '../data/characters';
import { pushToast } from '../stores/toast';
let t;
$t.subscribe(f => t = f)
const bannerTypes = {
'character-event': 'characters',
'weapon-event': 'weapons',
@ -100,7 +104,7 @@ export function process(id) {
const nextBanner = getNextBanner(pull.time, currentBannerIndex, selectedBanners);
if (nextBanner === undefined) {
pushToast('Something went wrong, please leave a message on Discord 😅', 'error');
pushToast(t('wish.errorBanner'), 'error');
Sentry.captureMessage('failed to get current banner', {
contexts: {
pullData: {

View File

@ -24,7 +24,7 @@
"welcomeStart2": "button up there",
"manual": "If you want to manually input the data, you can enable it here:",
"manualButton": "Enable Manual Input",
"errorBanner": "Banner time missmatch! Please adjust your server. Still not working? please leave a message on Discord 😅",
"errorBanner": "Banner time missmatch! Please adjust your server on settings page. Still not working? please leave a message on Discord 😅",
"import": {
"title": "Import Wish History",
"faqsButton": "FAQ - READ FIRST",

View File

@ -24,7 +24,7 @@
"welcomeStart2": "diatas untuk mulai",
"manual": "Jika kamu ingin memasukkan datanya secara manual, kamu bisa menyalakannya disini:",
"manualButton": "Nyalakan Input Manual",
"errorBanner": "Waktu banner salah! Coba sesuaikan server. Masih gak bisa? tolong chat di Discord 😅",
"errorBanner": "Waktu banner salah! Coba sesuaikan server di halaman settings. Masih gak bisa? tolong chat di Discord 😅",
"import": {
"title": "Import Riwayat Wish",
"faqsButton": "FAQS - BACA DULU",

View File

@ -22,7 +22,7 @@ export const pushToast = (msg = '', type = 'default') => {
];
setTimeout(() => {
unshiftToast();
}, 3500);
}, 5000);
return updatedToasts;
});