diff options
author | Chocobozzz <me@florianbigard.com> | 2018-03-23 14:26:20 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-03-23 14:26:20 +0100 |
commit | 0bd78bf30b2ae159791bdc90d17ed18e0327f621 (patch) | |
tree | e8f69cef499a99c51deeea39f7197b7ff93a80a2 /client/src/app/+admin | |
parent | 9c673970f66fe91c665e1e3905fa768f57e11a18 (diff) | |
download | PeerTube-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.ts | 8 |
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 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' | ||
2 | import { NotificationsService } from 'angular2-notifications' | 3 | import { NotificationsService } from 'angular2-notifications' |
3 | import { SortMeta } from 'primeng/primeng' | 4 | import { SortMeta } from 'primeng/primeng' |
4 | import { Job } from '../../../../../../shared/index' | 5 | import { Job } from '../../../../../../shared/index' |
5 | import { JobState } from '../../../../../../shared/models' | 6 | import { JobState } from '../../../../../../shared/models' |
6 | import { RestPagination, RestTable } from '../../../shared' | 7 | import { RestPagination, RestTable } from '../../../shared' |
7 | import { viewportHeight } from '../../../shared/misc/utils' | ||
8 | import { JobService } from '../shared' | ||
9 | import { RestExtractor } from '../../../shared/rest/rest-extractor.service' | 8 | import { RestExtractor } from '../../../shared/rest/rest-extractor.service' |
9 | import { 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 | } |