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:
parent
6221f311de
commit
00b5556c18
15 changed files with 143 additions and 14 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue