fix: welcome svg, privacy welcome tab, marketplace optimisations, various widget fixes etc

Co-authored-by: Alex Sparkes <turbomarshmello@gmail.com>
This commit is contained in:
David Ralph
2021-07-06 19:38:20 +01:00
parent 44fc24951f
commit 95614a383f
29 changed files with 155 additions and 66 deletions

View File

@@ -238,5 +238,9 @@
{
"name": "statsData",
"value": "{}"
},
{
"name": "offlineMode",
"value": false
}
]

View File

@@ -2,13 +2,13 @@ export default class Stats {
constructor(id) {
this.id = id;
this.url = window.constants.UMAMI_DOMAIN + '/api/collect';
this.offline = (localStorage.getItem('offlineMode') !== 'true');
this.online = (localStorage.getItem('offlineMode') === 'false');
}
async postEvent(type, name) {
const value = name.toLowerCase().replaceAll(' ', '-');
if (!this.offline) {
if (this.online) {
// umami
await fetch(this.url, {
method: 'POST',
@@ -46,7 +46,7 @@ export default class Stats {
}
async tabLoad() {
if (!this.offline) {
if (this.online) {
// umami
await fetch(this.url, {
method: 'POST',