mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
55 lines
2.5 KiB
HTML
55 lines
2.5 KiB
HTML
|
<my-bridge-config [bridgeComponent]="this">
|
||
|
<ng-template #bridgeParamsTemplate>
|
||
|
<my-ibox [isCollapsible]="true">
|
||
|
<h5 class="my-ibox-title">
|
||
|
{{'Add a new webhook' | translate}}
|
||
|
</h5>
|
||
|
<div class="my-ibox-content">
|
||
|
<label class="label-block">
|
||
|
{{'Webhook Name' | translate}}
|
||
|
<input title="webhook name" type="text" class="form-control form-control-sm"
|
||
|
[(ngModel)]="webhookName" [disabled]="isBusy">
|
||
|
</label>
|
||
|
<div style="margin-top: 25px">
|
||
|
<button type="button" class="btn btn-sm btn-primary" [disabled]="isBusy" (click)="newHook()">
|
||
|
{{'Create' | translate}}
|
||
|
</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</my-ibox>
|
||
|
<my-ibox [isCollapsible]="true">
|
||
|
<h5 class="my-ibox-title">
|
||
|
Webhooks
|
||
|
</h5>
|
||
|
<div class="my-ibox-content">
|
||
|
<table class="table table-striped table-condensed table-bordered">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Name</th>
|
||
|
<th>URL</th>
|
||
|
<th class="actions-col">{{'Actions' | translate}}</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<tr *ngIf="newConfig.connections.length === 0">
|
||
|
<td colspan="4">{{'No webhooks' | translate}}</td>
|
||
|
</tr>
|
||
|
<tr *ngFor="let hook of newConfig.connections">
|
||
|
<td *ngIf="hook.config.name">{{ hook.config.name }}</td>
|
||
|
<td *ngIf="!hook.config.name"><i>{{'No name' | translate}}</i></td>
|
||
|
<td class="webhook-url"><a [href]="hook.config.url" target="_blank">{{ hook.config.url }}</a></td>
|
||
|
<td class="actions-col">
|
||
|
<button type="button" class="btn btn-sm btn-outline-danger"
|
||
|
[disabled]="isBusy"
|
||
|
(click)="removeHook(hook)">
|
||
|
<i class="far fa-trash-alt"></i> {{'Delete' | translate}}
|
||
|
</button>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</my-ibox>
|
||
|
</ng-template>
|
||
|
</my-bridge-config>
|