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.
 
 
 
 
 

110 lines
4.8 KiB

<div class="card">
<div class="card-header">
<div class="row g-0">
<div class="col col-name">
<sqx-editable-title [name]="client.name" (nameChange)="rename($event)" [disabled]="!client.canUpdate">
</sqx-editable-title>
</div>
<div class="col-auto">
<button type="button" class="btn btn-primary" (click)="connectDialog.show()">
{{ 'clients.connect' | sqxTranslate }}
</button>
</div>
<div class="col-auto cell-actions">
<button type="button" class="btn btn-text-danger" [disabled]="!client.canRevoke"
(sqxConfirmClick)="revoke()"
confirmTitle="i18n:clients.deleteConfirmTitle"
confirmText="i18n:clients.deleteConfirmText"
confirmRememberKey="revokeClient">
<i class="icon-bin2"></i>
</button>
</div>
</div>
</div>
<div class="card-body">
<div class="container">
<div class="form-group row">
<label class="col-3 col-form-label">
{{ 'common.clientId' | sqxTranslate }}
</label>
<div class="col">
<div class="input-group">
<input readonly class="form-control" value="{{appsState.appName}}:{{client.id}}" #inputName>
<button type="button" class="btn btn-outline-secondary" [sqxCopy]="inputName">
<i class="icon-copy"></i>
</button>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-3 col-form-label">
{{ 'common.clientSecret' | sqxTranslate }}
</label>
<div class="col">
<div class="input-group">
<input readonly class="form-control" [value]="client.secret" #inputSecret>
<button type="button" class="btn btn-outline-secondary" [sqxCopy]="inputSecret">
<i class="icon-copy"></i>
</button>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-3 col-form-label">
{{ 'common.role' | sqxTranslate }}
</label>
<div class="col">
<select class="form-select" [disabled]="!client.canUpdate" [ngModel]="client.role" (ngModelChange)="updateRole($event)">
<option *ngFor="let role of clientRoles; trackBy: trackByRole" [ngValue]="role.name">{{role.name}}</option>
</select>
</div>
</div>
<div class="form-group row">
<div class="col offset-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="{{client.id}}_allowAnonymous" [disabled]="!client.canUpdate" [ngModel]="client.allowAnonymous" (ngModelChange)="updateAllowAnonymous($event)">
<label class="form-check-label" for="{{client.id}}_allowAnonymous">
{{ 'clients.allowAnonymous' | sqxTranslate }}
</label>
</div>
<sqx-form-hint>
{{ 'clients.allowAnonymousHint' | sqxTranslate }}
</sqx-form-hint>
</div>
</div>
<div class="form-group row gx-2">
<label class="col-3 col-form-label">
{{ 'clients.apiCallsLimit' | sqxTranslate }}
</label>
<div class="col">
<div class="row gx-2">
<div class="col">
<input type="number" class="form-control" min="0" [disabled]="!client.canUpdate" [(ngModel)]="apiCallsLimit">
<sqx-form-hint>{{ 'clients.apiCallsLimitHint' | sqxTranslate }}</sqx-form-hint>
</div>
<div class="col-auto" *ngIf="client.canUpdate">
<button class="btn btn-outline-secondary" (click)="updateApiCallsLimit()">
{{ 'common.save' | sqxTranslate }}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<ng-container *sqxModal="connectDialog">
<sqx-client-connect-form [client]="client"
(complete)="connectDialog.hide()">
</sqx-client-connect-form>
</ng-container>