From 3c9b817674d1b8a927d291aab0a2d8efcaf6df72 Mon Sep 17 00:00:00 2001 From: Jack Hadrill Date: Fri, 8 Jan 2021 17:59:53 +0000 Subject: [PATCH] Use IndexedDB for storage --- package-lock.json | 45 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + src/views/Host.vue | 5 +++-- src/views/Screen.vue | 3 ++- 4 files changed, 51 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f8b62b5..f586e60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.1.0", "dependencies": { "core-js": "^3.6.5", + "indexeddb-chunk-store": "^2.2.1", "mitt": "^2.1.0", "pretty-bytes": "^5.5.0", "pretty-ms": "^7.0.1", @@ -8666,6 +8667,15 @@ "node": ">= 6" } }, + "node_modules/idb-kv-store": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/idb-kv-store/-/idb-kv-store-4.5.0.tgz", + "integrity": "sha512-snvtAQRforYUI+C2+45L2LBJy/0/uQUffxv8/uwiS98fSUoXHVrFPClgzWZWxT0drwkLHJRm9inZcYzTR42GLA==", + "dependencies": { + "inherits": "^2.0.3", + "promisize": "^1.1.2" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -8851,6 +8861,14 @@ "node": ">=8" } }, + "node_modules/indexeddb-chunk-store": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/indexeddb-chunk-store/-/indexeddb-chunk-store-2.2.1.tgz", + "integrity": "sha1-+P7j8aztkWUADhl9K+dT8a31EHo=", + "dependencies": { + "idb-kv-store": "^4.3.1" + } + }, "node_modules/indexes-of": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", @@ -13034,6 +13052,11 @@ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, + "node_modules/promisize": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/promisize/-/promisize-1.1.2.tgz", + "integrity": "sha1-m0fiyyrkl+seutwsQZHWTRXJSdE=" + }, "node_modules/proxy-addr": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", @@ -25268,6 +25291,15 @@ "postcss": "^7.0.14" } }, + "idb-kv-store": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/idb-kv-store/-/idb-kv-store-4.5.0.tgz", + "integrity": "sha512-snvtAQRforYUI+C2+45L2LBJy/0/uQUffxv8/uwiS98fSUoXHVrFPClgzWZWxT0drwkLHJRm9inZcYzTR42GLA==", + "requires": { + "inherits": "^2.0.3", + "promisize": "^1.1.2" + } + }, "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -25388,6 +25420,14 @@ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, + "indexeddb-chunk-store": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/indexeddb-chunk-store/-/indexeddb-chunk-store-2.2.1.tgz", + "integrity": "sha1-+P7j8aztkWUADhl9K+dT8a31EHo=", + "requires": { + "idb-kv-store": "^4.3.1" + } + }, "indexes-of": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", @@ -28719,6 +28759,11 @@ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, + "promisize": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/promisize/-/promisize-1.1.2.tgz", + "integrity": "sha1-m0fiyyrkl+seutwsQZHWTRXJSdE=" + }, "proxy-addr": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", diff --git a/package.json b/package.json index 6b4be81..a330109 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ }, "dependencies": { "core-js": "^3.6.5", + "indexeddb-chunk-store": "^2.2.1", "mitt": "^2.1.0", "pretty-bytes": "^5.5.0", "pretty-ms": "^7.0.1", diff --git a/src/views/Host.vue b/src/views/Host.vue index 01df18c..3e5a8c7 100644 --- a/src/views/Host.vue +++ b/src/views/Host.vue @@ -56,9 +56,10 @@