]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/app.component.ts
Add config instance warning modal
[github/Chocobozzz/PeerTube.git] / client / src / app / app.component.ts
index f686410478d5028a590eab88677d7e988f57fa04..6b18e5feba9958a68a90e698de25208b30548663 100644 (file)
@@ -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 () {