aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
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/+admin
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/+admin')
-rw-r--r--client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts b/client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts
index e3f317e6d..ad2f05c6b 100644
--- a/client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts
+++ b/client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts
@@ -1,12 +1,12 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage'
2import { NotificationsService } from 'angular2-notifications' 3import { NotificationsService } from 'angular2-notifications'
3import { SortMeta } from 'primeng/primeng' 4import { SortMeta } from 'primeng/primeng'
4import { Job } from '../../../../../../shared/index' 5import { Job } from '../../../../../../shared/index'
5import { JobState } from '../../../../../../shared/models' 6import { JobState } from '../../../../../../shared/models'
6import { RestPagination, RestTable } from '../../../shared' 7import { RestPagination, RestTable } from '../../../shared'
7import { viewportHeight } from '../../../shared/misc/utils'
8import { JobService } from '../shared'
9import { RestExtractor } from '../../../shared/rest/rest-extractor.service' 8import { RestExtractor } from '../../../shared/rest/rest-extractor.service'
9import { JobService } from '../shared'
10 10
11@Component({ 11@Component({
12 selector: 'my-jobs-list', 12 selector: 'my-jobs-list',
@@ -56,12 +56,12 @@ export class JobsListComponent extends RestTable implements OnInit {
56 } 56 }
57 57
58 private loadJobState () { 58 private loadJobState () {
59 const result = localStorage.getItem(JobsListComponent.JOB_STATE_LOCAL_STORAGE_STATE) 59 const result = peertubeLocalStorage.getItem(JobsListComponent.JOB_STATE_LOCAL_STORAGE_STATE)
60 60
61 if (result) this.jobState = result as JobState 61 if (result) this.jobState = result as JobState
62 } 62 }
63 63
64 private saveJobState () { 64 private saveJobState () {
65 localStorage.setItem(JobsListComponent.JOB_STATE_LOCAL_STORAGE_STATE, this.jobState) 65 peertubeLocalStorage.setItem(JobsListComponent.JOB_STATE_LOCAL_STORAGE_STATE, this.jobState)
66 } 66 }
67} 67}