diff --git a/src/components/StoragePersist.vue b/src/components/StoragePersist.vue index 570dd8f..0c148eb 100644 --- a/src/components/StoragePersist.vue +++ b/src/components/StoragePersist.vue @@ -6,9 +6,9 @@ import {toast} from 'vue3-toastify'; export default class StoragePersist extends Vue { async mounted(): Promise { if (!navigator.storage) { - toast.error(this.$t('localStoragePersistNotSupported'), {autoClose: false, theme: 'colored'}); - } else { - await navigator.storage.persist(); + toast.error(this.$t('localStorage.notSupported')); + } else if (!await navigator.storage.persist()) { + toast.warning(this.$t('localStorage.persistent.notSupported')); } } } diff --git a/src/locale/de.ts b/src/locale/de.ts index d26f59b..347c188 100644 --- a/src/locale/de.ts +++ b/src/locale/de.ts @@ -16,7 +16,12 @@ export const messagesDe = { }, locale: 'Sprache', locales: messagesEn.locales, - localStoragePersistNotSupported: 'Lokaler Speicher wird nicht permanent. Das könnte in längere Wartezeiten verursachen!', + localStorage: { + notSupported: 'Lokaler Speicher wird nicht unterstützt. Diese Anwendung funktioniert möglicherweise nicht!', + persistent: { + notSupported: 'Lokaler Speicher wird nicht persistent. Das könnte in längere Wartezeiten verursachen!', + }, + }, manga: { chapters: { newCount: '#Neue Kapitel', diff --git a/src/locale/en.ts b/src/locale/en.ts index ea41ad3..cb36121 100644 --- a/src/locale/en.ts +++ b/src/locale/en.ts @@ -17,7 +17,12 @@ export const messagesEn = { 'de': 'Deutsch', 'en': 'English', }, - localStoragePersistNotSupported: 'Local storage will not be persisted. This could result in longer loading times!', + localStorage: { + notSupported: 'Local storage is not supported. The application will probably not work!', + persistent: { + notSupported: 'Local storage will not be persisted. This could result in longer loading times!', + }, + }, manga: { chapters: { newCount: '#new chapters',