feat: merge main into v2 (#3193)

* feat(console): personal access tokens (#3185)

* token dialog, pat module

* pat components

* i18n, warn dialog, add token dialog

* cleanup dialog

* clipboard

* return creationDate of pat

* i18n

Co-authored-by: Livio Amstutz <[email protected]>

* fix(cockroach): update to 21.2.5 (#3189)

Co-authored-by: Max Peintner <[email protected]>
Co-authored-by: Silvan <[email protected]>
This commit is contained in:
Livio Amstutz
2022-02-11 13:33:31 +01:00
committed by GitHub
co-authored by Max Peintner Silvan
parent b44b48fa1e
commit 5d4351f47c
25 changed files with 745 additions and 6 deletions
@@ -0,0 +1,30 @@
<span class="title" mat-dialog-title>{{'USER.PERSONALACCESSTOKEN.ADDED.TITLE' | translate}}</span>
<div mat-dialog-content>
<cnsl-info-section [type]="InfoSectionType.WARN"> {{'USER.PERSONALACCESSTOKEN.ADDED.DESCRIPTION' | translate}}
</cnsl-info-section>
<ng-container *ngIf="tokenResponse">
<div class="row">
<p class="left">{{'USER.PERSONALACCESSTOKEN.ID' | translate}}</p>
<p class="right">{{tokenResponse.tokenId}}</p>
</div>
<div class="row" *ngIf="tokenResponse.token">
<p class="left">{{'USER.PERSONALACCESSTOKEN.TOKEN' | translate}}</p>
<div class="right">
<button class="ctc" [disabled]="copied === tokenResponse.token"
[matTooltip]="(copied !== tokenResponse.token ? 'ACTIONS.COPY' : 'ACTIONS.COPIED' ) | translate"
cnslCopyToClipboard [valueToCopy]="tokenResponse.token" (copiedValue)="copied = $event" mat-icon-button>
<i *ngIf="copied !== tokenResponse.token" class="las la-clipboard"></i>
<i *ngIf="copied === tokenResponse.token" class="las la-clipboard-check"></i>
</button>
<span>{{tokenResponse.token}}</span>
</div>
</div>
</ng-container>
</div>
<div mat-dialog-actions class="action">
<button color="primary" mat-raised-button class="ok-button" (click)="closeDialog()">
{{'ACTIONS.CLOSE' | translate}}
</button>
</div>