Adjust toast
parent
52142c832d
commit
f248203bda
|
@ -1,4 +1,5 @@
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
import { t as $t } from 'svelte-i18n'
|
||||||
|
|
||||||
import { getAccountPrefix } from '../stores/account';
|
import { getAccountPrefix } from '../stores/account';
|
||||||
import { getTimeOffset } from '../stores/server';
|
import { getTimeOffset } from '../stores/server';
|
||||||
|
@ -8,6 +9,9 @@ import { weaponList } from '../data/weaponList';
|
||||||
import { characters } from '../data/characters';
|
import { characters } from '../data/characters';
|
||||||
import { pushToast } from '../stores/toast';
|
import { pushToast } from '../stores/toast';
|
||||||
|
|
||||||
|
let t;
|
||||||
|
$t.subscribe(f => t = f)
|
||||||
|
|
||||||
const bannerTypes = {
|
const bannerTypes = {
|
||||||
'character-event': 'characters',
|
'character-event': 'characters',
|
||||||
'weapon-event': 'weapons',
|
'weapon-event': 'weapons',
|
||||||
|
@ -100,7 +104,7 @@ export function process(id) {
|
||||||
const nextBanner = getNextBanner(pull.time, currentBannerIndex, selectedBanners);
|
const nextBanner = getNextBanner(pull.time, currentBannerIndex, selectedBanners);
|
||||||
|
|
||||||
if (nextBanner === undefined) {
|
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', {
|
Sentry.captureMessage('failed to get current banner', {
|
||||||
contexts: {
|
contexts: {
|
||||||
pullData: {
|
pullData: {
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
"welcomeStart2": "button up there",
|
"welcomeStart2": "button up there",
|
||||||
"manual": "If you want to manually input the data, you can enable it here:",
|
"manual": "If you want to manually input the data, you can enable it here:",
|
||||||
"manualButton": "Enable Manual Input",
|
"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": {
|
"import": {
|
||||||
"title": "Import Wish History",
|
"title": "Import Wish History",
|
||||||
"faqsButton": "FAQ - READ FIRST",
|
"faqsButton": "FAQ - READ FIRST",
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
"welcomeStart2": "diatas untuk mulai",
|
"welcomeStart2": "diatas untuk mulai",
|
||||||
"manual": "Jika kamu ingin memasukkan datanya secara manual, kamu bisa menyalakannya disini:",
|
"manual": "Jika kamu ingin memasukkan datanya secara manual, kamu bisa menyalakannya disini:",
|
||||||
"manualButton": "Nyalakan Input Manual",
|
"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": {
|
"import": {
|
||||||
"title": "Import Riwayat Wish",
|
"title": "Import Riwayat Wish",
|
||||||
"faqsButton": "FAQS - BACA DULU",
|
"faqsButton": "FAQS - BACA DULU",
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const pushToast = (msg = '', type = 'default') => {
|
||||||
];
|
];
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
unshiftToast();
|
unshiftToast();
|
||||||
}, 3500);
|
}, 5000);
|
||||||
|
|
||||||
return updatedToasts;
|
return updatedToasts;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue