Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

89 lines
3.6 KiB

<div class="table-items-row">
<table class="table table-middle table-sm table-borderless table-fixed client-info">
<colgroup>
<col style="width: 160px; text-align: right;" />
<col style="width: 100%" />
<col style="width: 40px" />
</colgroup>
<tr>
<td colspan="2">
<div class="float-right">
<button class="btn btn-secondary" (click)="createToken(client)">Create Token</button>
</div>
<div class="client-header">
<form *ngIf="isRenaming" class="form-inline" [formGroup]="renameForm" (ngSubmit)="rename()">
<div class="form-group mr-2">
<sqx-control-errors for="name" [submitted]="renameFormSubmitted"></sqx-control-errors>
<input type="text" class="form-control client-name enabled" formControlName="name" maxlength="20" sqxFocusOnInit (keydown)="onKeyDown($event.keyCode)" />
</div>
<button type="submit" class="btn btn-primary" [disabled]="!renameForm.valid">Save</button>
<button class="btn btn-default btn-cancel" (click)="cancelRename()">
<i class="icon-close"></i>
</button>
</form>
<span *ngIf="!isRenaming">
<h3 class="client-name">
<span (dblclick)="startRename()">{{client.name}}</span>
</h3>
<i class="client-edit icon-pencil" (click)="startRename()"></i>
</span>
</div>
<div class="client-expires">Access token expire after one hour</div>
</td>
<td class="client-delete">
<button type="button" class="btn btn-link btn-danger" (click)="revoked.emit()">
<i class="icon-bin2"></i>
</button>
</td>
</tr>
<tr>
<td>Client Id:</td>
<td>
<input readonly class="form-control" #inputId [attr.value]="clientId" #inputName />
</td>
<td>
<button type="button" class="btn btn-primary btn-link" [sqxCopy]="inputName">
<i class="icon-copy"></i>
</button>
</td>
</tr>
<tr>
<td>Client Secret:</td>
<td>
<input readonly class="form-control" name="inputSecret" [attr.value]="clientSecret" #inputSecret />
</td>
<td>
<button type="button" class="btn btn-primary btn-link" [sqxCopy]="inputSecret">
<i class="icon-copy"></i>
</button>
</td>
</tr>
</table>
</div>
<div class="modal" *sqxModalView="tokenDialog" [@fade]>
<div class="modal-backdrop"></div>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Access Token</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" (click)="tokenDialog.hide()">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<textarea readonly class="form-control access-token">{{token.tokenType}} {{token.accessToken}}</textarea>
</div>
</div>
</div>
</div>