From 76f54932bfd3e4e6100871c9c69c952cfaa61d93 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Thu, 1 Nov 2018 20:22:58 +0100 Subject: [PATCH] Migrate to localforage to support asyncStorage mode --- package.json | 1 + src/App.vue | 4 +- src/constants.js | 3 +- src/main.js | 27 ++++--- src/storage/index.js | 119 ++++++++++++++++++++++++++++++ src/store/actions.js | 133 ++++++++++++++++++++++++++++++++- src/store/mutations-types.js | 1 + src/store/mutations.js | 139 +++++------------------------------ src/tools/index.js | 25 ------- src/views/Settings.vue | 9 +++ yarn.lock | 19 +++++ 11 files changed, 319 insertions(+), 161 deletions(-) create mode 100644 src/storage/index.js diff --git a/package.json b/package.json index 1df7cb3..bf536b0 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@mdi/font": "^3.3.92", "file-saver": "^2.0.0", "gps-to-gpx": "git://github.com/phyks/gps-to-gpx.git#1cb5adf4dd382266d076d7df3cb5aa3a4d7dd27b", + "localforage": "^1.7.3", "nosleep.js": "^0.9.0", "ol": "^5.3.0", "roboto-fontface": "^0.10.0", diff --git a/src/App.vue b/src/App.vue index 2cc9fd7..96c3910 100644 --- a/src/App.vue +++ b/src/App.vue @@ -82,7 +82,7 @@