Persistenten storage message hinzugefügt
This commit is contained in:
parent
3555446818
commit
b005de38b7
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd $(dirname "$0")/..
|
||||
npm run build 1
|
||||
npm run build
|
||||
12817
public/js/app.js
12817
public/js/app.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
import {LocalStorageSettingsFragment, SettingsManager, SettingsSite} from "../../../../../js/lib/pwa-core";
|
||||
import {Helper, InitPromise, ThemeManager, Translator} from "../../../../../js/lib/pwa-lib";
|
||||
import {FlashMessenger, Helper, InitPromise, ThemeManager, Translator} from "../../../../../js/lib/pwa-lib";
|
||||
import {WordRotatorDb} from "../WordRotatorDb";
|
||||
import {InstallManager, Matomo, MyStorageManager, SoundManager} from "../../../../../js/lib/pwa-assets";
|
||||
import {CreditsSite} from "../site/CreditsSite";
|
||||
@ -98,12 +98,13 @@ export class WordRotatorSettingFragment extends LocalStorageSettingsFragment {
|
||||
storageObject.parentElement.classList.remove("hidden");
|
||||
storageObject.parentElement.addEventListener("click", () => {
|
||||
storageManager.persist().then(isPersisted => {
|
||||
console.log(isPersisted);
|
||||
storageObject.removeAllChildren().appendChild(Translator.makePersistentTranslation("storage-info", [
|
||||
Math.round(storage.usage / (1024 * 1024) * 100) / 100,
|
||||
Math.round(storage.quota / (1024 * 1024) * 100) / 100,
|
||||
Math.round(storage.usage / storage.quota * 10000) / 100,
|
||||
((isPersisted) ? "" : "nicht")]));
|
||||
|
||||
console.log("p", isPersisted);
|
||||
if (!isPersisted){
|
||||
FlashMessenger.addMessage("storage-permission-not-get");
|
||||
}
|
||||
|
||||
@ -33,6 +33,6 @@
|
||||
"credits-coin-text":"Sound:<br/>Der Münz-Sound ist von der Webseite <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a>. Alle Rechte für diesen Münz-Sound gehören <a target='_blank' rel='noopener' href = '{0}' class = 'link'>{0}</a>.",
|
||||
"credits-music-text":"Musik:<br/>Bright And Beautiful - GEMAfreie Musik von <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a><br/>Licensed under Creative Commons: By Attribution 4.0 International (CC BY 4.0)<br/><a href = '{1}' target='_blank' rel='noopener' class = 'link'>{1}</a><br/>Angepasst (geschnitten) für diese App",
|
||||
"storage-info":"Ungef. {0}/{1}MB genutzt ({2}%, {3} dauerhaft gespeichert)",
|
||||
"storage-permission-not-get":"Der Browser gibt nicht die Erlaubnis zur dauerhaften Speicherung..."
|
||||
"storage-permission-not-get":"Der Browser gibt nicht die Erlaubnis zur dauerhaften Speicherung...",
|
||||
"storage-permission-get":"Die Daten sind nun dauerhaft gespeichert"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user