Client: add message if the admin wants to make friends without https

This commit is contained in:
Chocobozzz 2016-11-16 20:28:38 +01:00
parent 441b66f809
commit 8735451aff
2 changed files with 8 additions and 0 deletions

View File

@ -22,5 +22,9 @@
</div>
</div>
<div *ngIf="canMakeFriends() === false" class="alert alert-warning">
It seems that you are not on a HTTPS pod. Your webserver need to have TLS activated in order to make friends.
</div>
<input type="submit" value="Make friends" class="btn btn-default" [disabled]="!isFormValid()">
</form>

View File

@ -27,6 +27,10 @@ export class FriendAddComponent implements OnInit {
this.hosts.push('');
}
canMakeFriends() {
return window.location.protocol === 'https://';
}
customTrackBy(index: number, obj: any): any {
return index;
}