aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/rest
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-23 14:26:20 +0100
committerChocobozzz <me@florianbigard.com>2018-03-23 14:26:20 +0100
commit0bd78bf30b2ae159791bdc90d17ed18e0327f621 (patch)
treee8f69cef499a99c51deeea39f7197b7ff93a80a2 /client/src/app/shared/rest
parent9c673970f66fe91c665e1e3905fa768f57e11a18 (diff)
downloadPeerTube-0bd78bf30b2ae159791bdc90d17ed18e0327f621.tar.gz
PeerTube-0bd78bf30b2ae159791bdc90d17ed18e0327f621.tar.zst
PeerTube-0bd78bf30b2ae159791bdc90d17ed18e0327f621.zip
Proxify local storage and handle if it is unavailable
Diffstat (limited to 'client/src/app/shared/rest')
-rw-r--r--client/src/app/shared/rest/rest-table.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/shared/rest/rest-table.ts b/client/src/app/shared/rest/rest-table.ts
index 165fc4e45..fe1a91d2d 100644
--- a/client/src/app/shared/rest/rest-table.ts
+++ b/client/src/app/shared/rest/rest-table.ts
@@ -1,3 +1,4 @@
1import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage'
1import { LazyLoadEvent } from 'primeng/components/common/lazyloadevent' 2import { LazyLoadEvent } from 'primeng/components/common/lazyloadevent'
2import { SortMeta } from 'primeng/components/common/sortmeta' 3import { SortMeta } from 'primeng/components/common/sortmeta'
3 4
@@ -15,7 +16,7 @@ export abstract class RestTable {
15 protected abstract loadData (): void 16 protected abstract loadData (): void
16 17
17 loadSort () { 18 loadSort () {
18 const result = localStorage.getItem(this.sortLocalStorageKey) 19 const result = peertubeLocalStorage.getItem(this.sortLocalStorageKey)
19 20
20 if (result) { 21 if (result) {
21 try { 22 try {
@@ -42,7 +43,7 @@ export abstract class RestTable {
42 } 43 }
43 44
44 saveSort () { 45 saveSort () {
45 localStorage.setItem(this.sortLocalStorageKey, JSON.stringify(this.sort)) 46 peertubeLocalStorage.setItem(this.sortLocalStorageKey, JSON.stringify(this.sort))
46 } 47 }
47 48
48} 49}