1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Add ability to add custom css/javascript

This commit is contained in:
Chocobozzz 2018-02-22 10:22:53 +01:00
parent 6221f311de
commit 00b5556c18
No known key found for this signature in database
GPG key ID: 583A612D890159BE
15 changed files with 143 additions and 14 deletions

View file

@ -12,6 +12,7 @@ export class ServerService {
private static BASE_VIDEO_URL = environment.apiUrl + '/api/v1/videos/'
private static CONFIG_LOCAL_STORAGE_KEY = 'server-config'
configLoaded = new ReplaySubject<boolean>(1)
videoPrivaciesLoaded = new ReplaySubject<boolean>(1)
videoCategoriesLoaded = new ReplaySubject<boolean>(1)
videoLicencesLoaded = new ReplaySubject<boolean>(1)
@ -19,7 +20,11 @@ export class ServerService {
private config: ServerConfig = {
instance: {
name: 'PeerTube'
name: 'PeerTube',
customizations: {
javascript: '',
css: ''
}
},
serverVersion: 'Unknown',
signup: {
@ -56,7 +61,11 @@ export class ServerService {
loadConfig () {
this.http.get<ServerConfig>(ServerService.BASE_CONFIG_URL)
.do(this.saveConfigLocally)
.subscribe(data => this.config = data)
.subscribe(data => {
this.config = data
this.configLoaded.next(true)
})
}
loadVideoCategories () {