aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/data/common.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-07-30 23:12:55 +0800
committercrupest <crupest@outlook.com>2020-07-30 23:12:55 +0800
commit2afc8d5d6b1e7cb466e62d0e59e2c05143d664c6 (patch)
tree43a9e1dc4de281e3d4295e6aaac7253827008d00 /Timeline/ClientApp/src/app/data/common.ts
parentd3085ff3483c063b07b9553b539f3836b666cac8 (diff)
downloadtimeline-2afc8d5d6b1e7cb466e62d0e59e2c05143d664c6.tar.gz
timeline-2afc8d5d6b1e7cb466e62d0e59e2c05143d664c6.tar.bz2
timeline-2afc8d5d6b1e7cb466e62d0e59e2c05143d664c6.zip
Save post list locally.
Diffstat (limited to 'Timeline/ClientApp/src/app/data/common.ts')
-rw-r--r--Timeline/ClientApp/src/app/data/common.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/Timeline/ClientApp/src/app/data/common.ts b/Timeline/ClientApp/src/app/data/common.ts
index 7f3f4e93..e9b56970 100644
--- a/Timeline/ClientApp/src/app/data/common.ts
+++ b/Timeline/ClientApp/src/app/data/common.ts
@@ -1,3 +1,11 @@
+import localforage from 'localforage';
+
+export const dataStorage = localforage.createInstance({
+ name: 'data',
+ description: 'Database for offline data.',
+ driver: localforage.INDEXEDDB,
+});
+
export interface BlobWithUrl {
blob: Blob;
url: string;