++ Open Web Analytics

https://test.freeplanet.app/owa
This commit is contained in:
Paolo Arena
2019-03-16 23:47:13 +01:00
parent 9fabd68bae
commit f23f60e540
17 changed files with 154 additions and 41 deletions

View File

@@ -1,12 +1,12 @@
import indexdb from './indexdb'
import { GlobalStore } from "../store/Modules";
import { GlobalStore } from '../store/Modules'
export default async (context, cmd, table, data = null, id = '') => {
const descr = data !== null ? data.descr : ''
// console.log('globalroutines', cmd, table, descr, id)
return await indexdb(context, cmd, table, data, id)
.then(ris => {
setTimeout(function () {
setTimeout(() => {
GlobalStore.state.connData.uploading_indexeddb = 0
GlobalStore.state.connData.downloading_indexeddb = 0
}, 1000)
@@ -14,7 +14,7 @@ export default async (context, cmd, table, data = null, id = '') => {
}
).catch(err => {
setTimeout(function () {
setTimeout(() => {
GlobalStore.state.connData.uploading_indexeddb = (GlobalStore.state.connData.uploading_indexeddb === 1) ? -1 : GlobalStore.state.connData.uploading_indexeddb
GlobalStore.state.connData.downloading_indexeddb = (GlobalStore.state.connData.downloading_indexeddb === 1) ? -1 : GlobalStore.state.connData.downloading_indexeddb
}, 1000)