diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-11-16 20:28:38 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-11-16 20:29:26 +0100 |
commit | 8735451afff3a461e632d7c4c423b7062dc77d6b (patch) | |
tree | d58709e59c7514e3bd042cc53c86137168bbb6d7 /client/src | |
parent | 441b66f80923d1f574a74582f1fb9306b99fc12a (diff) | |
download | PeerTube-8735451afff3a461e632d7c4c423b7062dc77d6b.tar.gz PeerTube-8735451afff3a461e632d7c4c423b7062dc77d6b.tar.zst PeerTube-8735451afff3a461e632d7c4c423b7062dc77d6b.zip |
Client: add message if the admin wants to make friends without https
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/admin/friends/friend-add/friend-add.component.html | 4 | ||||
-rw-r--r-- | client/src/app/admin/friends/friend-add/friend-add.component.ts | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/client/src/app/admin/friends/friend-add/friend-add.component.html b/client/src/app/admin/friends/friend-add/friend-add.component.html index 621822860..eebe033f9 100644 --- a/client/src/app/admin/friends/friend-add/friend-add.component.html +++ b/client/src/app/admin/friends/friend-add/friend-add.component.html | |||
@@ -22,5 +22,9 @@ | |||
22 | </div> | 22 | </div> |
23 | </div> | 23 | </div> |
24 | 24 | ||
25 | <div *ngIf="canMakeFriends() === false" class="alert alert-warning"> | ||
26 | It seems that you are not on a HTTPS pod. Your webserver need to have TLS activated in order to make friends. | ||
27 | </div> | ||
28 | |||
25 | <input type="submit" value="Make friends" class="btn btn-default" [disabled]="!isFormValid()"> | 29 | <input type="submit" value="Make friends" class="btn btn-default" [disabled]="!isFormValid()"> |
26 | </form> | 30 | </form> |
diff --git a/client/src/app/admin/friends/friend-add/friend-add.component.ts b/client/src/app/admin/friends/friend-add/friend-add.component.ts index 86b018de2..14f24c192 100644 --- a/client/src/app/admin/friends/friend-add/friend-add.component.ts +++ b/client/src/app/admin/friends/friend-add/friend-add.component.ts | |||
@@ -27,6 +27,10 @@ export class FriendAddComponent implements OnInit { | |||
27 | this.hosts.push(''); | 27 | this.hosts.push(''); |
28 | } | 28 | } |
29 | 29 | ||
30 | canMakeFriends() { | ||
31 | return window.location.protocol === 'https://'; | ||
32 | } | ||
33 | |||
30 | customTrackBy(index: number, obj: any): any { | 34 | customTrackBy(index: number, obj: any): any { |
31 | return index; | 35 | return index; |
32 | } | 36 | } |