mirror of
https://github.com/mue/mue.git
synced 2026-07-13 12:07:45 +02:00
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:
@@ -238,5 +238,9 @@
|
||||
{
|
||||
"name": "statsData",
|
||||
"value": "{}"
|
||||
},
|
||||
{
|
||||
"name": "offlineMode",
|
||||
"value": false
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user