import { map, shareReplay, switchMap, tap } from 'rxjs/operators'
import { HttpClient } from '@angular/common/http'
import { Inject, Injectable, LOCALE_ID } from '@angular/core'
-import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage'
+import { peertubeLocalStorage } from '@app/shared/misc/peertube-web-storage'
import { Observable, of, ReplaySubject } from 'rxjs'
import { getCompleteLocale, ServerConfig } from '../../../../../shared'
import { environment } from '../../../environments/environment'
import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
import { sortBy } from '@app/shared/misc/utils'
import { VideoPlaylistPrivacy } from '@shared/models/videos/playlist/video-playlist-privacy.model'
+import { cloneDeep } from 'lodash-es'
@Injectable()
export class ServerService {
css: ''
}
},
+ plugin: {
+ registered: []
+ },
+ theme: {
+ registered: [],
+ default: 'default'
+ },
email: {
enabled: false
},
enabledResolutions: [],
hls: {
enabled: false
+ },
+ webtorrent: {
+ enabled: true
}
},
avatar: {
}
getConfig () {
- return this.config
+ return cloneDeep(this.config)
}
getVideoCategories () {
- return this.videoCategories
+ return cloneDeep(this.videoCategories)
}
getVideoLicences () {
- return this.videoLicences
+ return cloneDeep(this.videoLicences)
}
getVideoLanguages () {
- return this.videoLanguages
+ return cloneDeep(this.videoLanguages)
}
getVideoPrivacies () {
- return this.videoPrivacies
+ return cloneDeep(this.videoPrivacies)
}
getVideoPlaylistPrivacies () {
- return this.videoPlaylistPrivacies
+ return cloneDeep(this.videoPlaylistPrivacies)
}
private loadAttributeEnum (