X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fapp.component.ts;h=1724bbd1ac440c99ed28b415e752a69c6849069f;hb=767619f639180d28532ffb4f7919668f3e5b5772;hp=f686410478d5028a590eab88677d7e988f57fa04;hpb=43d0ea7f4b88d52097172cc0c1831edd7e492503;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index f68641047..1724bbd1a 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -71,6 +71,9 @@ export class AppComponent implements OnInit { ngOnInit () { document.getElementById('incompatible-browser').className += ' browser-ok' + this.loadPlugins() + this.themeService.initialize() + this.authService.loadClientCredentials() if (this.isUserLoggedIn()) { @@ -86,9 +89,6 @@ export class AppComponent implements OnInit { this.serverService.loadVideoPrivacies() this.serverService.loadVideoPlaylistPrivacies() - this.loadPlugins() - this.themeService.initialize() - // Do not display menu on small screens if (this.screenService.isInSmallView()) { this.isMenuDisplayed = false @@ -244,15 +244,19 @@ export class AppComponent implements OnInit { if (user.noWelcomeModal !== true) return this.welcomeModal.show() const config = this.serverService.getConfig() - - if (user.noInstanceConfigWarningModal !== true && config.signup.allowed && config.instance.name.toLowerCase() === 'peertube') { - this.instanceService.getAbout() - .subscribe(about => { - if (!about.instance.terms) { - this.instanceConfigWarningModal.show() - } - }) - } + if (user.noInstanceConfigWarningModal === true || !config.signup.allowed) return + + this.instanceService.getAbout() + .subscribe(about => { + if ( + config.instance.name.toLowerCase() === 'peertube' || + !about.instance.terms || + !about.instance.administrator || + !about.instance.maintenanceLifetime + ) { + this.instanceConfigWarningModal.show(about) + } + }) } private initHotkeys () {