diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-28 15:46:56 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-09-05 10:17:02 +0200 |
commit | 589d9f55f6f3f0d069d4bbb207d3d20769cc4ded (patch) | |
tree | 0826bda439beb523e458513672a3d06c924e1760 /client/src/app/app.component.ts | |
parent | 43d0ea7f4b88d52097172cc0c1831edd7e492503 (diff) | |
download | PeerTube-589d9f55f6f3f0d069d4bbb207d3d20769cc4ded.tar.gz PeerTube-589d9f55f6f3f0d069d4bbb207d3d20769cc4ded.tar.zst PeerTube-589d9f55f6f3f0d069d4bbb207d3d20769cc4ded.zip |
Add config instance warning modal
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r-- | client/src/app/app.component.ts | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index f68641047..6b18e5feb 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -244,15 +244,19 @@ export class AppComponent implements OnInit { | |||
244 | if (user.noWelcomeModal !== true) return this.welcomeModal.show() | 244 | if (user.noWelcomeModal !== true) return this.welcomeModal.show() |
245 | 245 | ||
246 | const config = this.serverService.getConfig() | 246 | const config = this.serverService.getConfig() |
247 | 247 | if (user.noInstanceConfigWarningModal === true || !config.signup.allowed) return | |
248 | if (user.noInstanceConfigWarningModal !== true && config.signup.allowed && config.instance.name.toLowerCase() === 'peertube') { | 248 | |
249 | this.instanceService.getAbout() | 249 | this.instanceService.getAbout() |
250 | .subscribe(about => { | 250 | .subscribe(about => { |
251 | if (!about.instance.terms) { | 251 | if ( |
252 | this.instanceConfigWarningModal.show() | 252 | config.instance.name.toLowerCase() === 'peertube' || |
253 | } | 253 | !about.instance.terms || |
254 | }) | 254 | !about.instance.administrator || |
255 | } | 255 | !about.instance.maintenanceLifetime |
256 | ) { | ||
257 | this.instanceConfigWarningModal.show(about) | ||
258 | } | ||
259 | }) | ||
256 | } | 260 | } |
257 | 261 | ||
258 | private initHotkeys () { | 262 | private initHotkeys () { |