First Committ

This commit is contained in:
Paolo Arena
2021-08-31 18:09:59 +02:00
commit 1d6c55807c
299 changed files with 55382 additions and 0 deletions

31
src/globalroutines/index.ts Executable file
View File

@@ -0,0 +1,31 @@
// import { useGlobalStore } from '@store/globalStore'
// import indexdb from './indexdb'
import { idbKeyval as storage } from '@src/js/storage'
export default async (context: any, cmd: string, table: string, data: any = null, id = '') => {
// const globalStore = useGlobalStore()
// const descr = data !== null ? data.descr : ''
// console.log('globalroutines', cmd, table, descr, id)
return storage.setdata(table, data)
/*return indexdb(context, cmd, table, data, id)
.then((ris) => {
// console.log('globalStore.state.connData', globalStore.state.connData)
setTimeout(() => {
// globalStore.connData.uploading_indexeddb = 0
// globalStore.connData.downloading_indexeddb = 0
}, 1000)
return ris
}).catch((err) => {
setTimeout(() => {
// globalStore.connData.uploading_indexeddb = (globalStore.connData.uploading_indexeddb === 1) ? -1 : globalStore.connData.uploading_indexeddb
// globalStore.connData.downloading_indexeddb = (globalStore.connData.downloading_indexeddb === 1) ? -1 : globalStore.connData.downloading_indexeddb
}, 1000)
console.log('ERROR INDEXEDDB: ', err)
})
*/
}