47 lines
1.7 KiB
HTML
47 lines
1.7 KiB
HTML
<div *ngIf="mastodons$ | loading | async as mastodons">
|
|
<ng-template [ngIf]="mastodons.value">
|
|
<mat-card appearance="outlined">
|
|
<mat-card-header>
|
|
<div mat-card-avatar class="mastodon"></div>
|
|
<mat-card-title class="platform-title">
|
|
mastodon
|
|
<button mat-icon-button aria-label="How to use">
|
|
<mat-icon
|
|
matTooltip="How to send and receive hood broadcast messages with mastodon"
|
|
class="info-button"
|
|
(click)="onInfoClick()"
|
|
>info</mat-icon
|
|
>
|
|
</button>
|
|
</mat-card-title>
|
|
</mat-card-header>
|
|
<mat-card-content *ngIf="mastodons.value.length !== 0; else nomastodon">
|
|
<mat-selection-list [multiple]="false" class="list">
|
|
<a
|
|
*ngFor="let mastodon of mastodons.value"
|
|
href="https://{{mastodon.instance}}/@{{ mastodon.username }}"
|
|
routerLinkActive="router-link-active"
|
|
>
|
|
<mat-list-option>
|
|
@{{ mastodon.username }}
|
|
<mat-divider></mat-divider>
|
|
</mat-list-option>
|
|
</a>
|
|
</mat-selection-list>
|
|
</mat-card-content>
|
|
</mat-card>
|
|
<ng-template #nomastodon>
|
|
<mat-card-content>
|
|
Unfortunately your hood admin has not configured mastodon as platform
|
|
yet.
|
|
</mat-card-content>
|
|
</ng-template>
|
|
</ng-template>
|
|
<ng-template [ngIf]="mastodons.error"
|
|
><mat-icon class="warning">warning</mat-icon></ng-template
|
|
>
|
|
<ng-template [ngIf]="mastodons.loading">
|
|
<mat-spinner [diameter]="45" class="spinner"></mat-spinner>
|
|
</ng-template>
|
|
</div>
|
|
|