Browse Source

Move details of granted access

pull/7792/head
Thomas Kaul 1 month ago
parent
commit
be5aac5839
  1. 4
      apps/client/src/app/components/access-table/access-table.component.html
  2. 4
      apps/client/src/app/components/access-table/access-table.component.ts
  3. 6
      apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts

4
apps/client/src/app/components/access-table/access-table.component.html

@ -98,10 +98,10 @@
</button> </button>
} }
@if (element.type === 'MCP' && hasPermissionToEnableMcp) { @if (element.type === 'MCP' && hasPermissionToEnableMcp) {
<button mat-menu-item (click)="onCopyIdToClipboard(element.id)"> <button mat-menu-item (click)="onCopyTokenToClipboard(element.id)">
<span class="align-items-center d-flex"> <span class="align-items-center d-flex">
<ion-icon class="mr-2" name="copy-outline" /> <ion-icon class="mr-2" name="copy-outline" />
<span i18n>Copy identifier to clipboard</span> <span i18n>Copy token to clipboard</span>
</span> </span>
</button> </button>
} }

4
apps/client/src/app/components/access-table/access-table.component.ts

@ -139,11 +139,11 @@ export class GfAccessTableComponent {
return `${this.baseUrl}/${languageCode}/${publicRoutes.public.path}/${aId}`; return `${this.baseUrl}/${languageCode}/${publicRoutes.public.path}/${aId}`;
} }
protected onCopyIdToClipboard(aId: string) { protected onCopyTokenToClipboard(aId: string) {
this.clipboard.copy(aId); this.clipboard.copy(aId);
this.snackBar.open( this.snackBar.open(
'✅ ' + $localize`Identifier has been copied to the clipboard`, '✅ ' + $localize`Token has been copied to the clipboard`,
undefined, undefined,
{ {
duration: ms('3 seconds') duration: ms('3 seconds')

6
apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts

@ -236,6 +236,10 @@ export class GfCreateOrUpdateAccessDialogComponent implements OnInit {
return this.accessForm?.get('type')?.value as AccessType; return this.accessForm?.get('type')?.value as AccessType;
} }
protected get isMcpAccess() {
return this.accessType === 'MCP';
}
protected get isPublicAccess() { protected get isPublicAccess() {
return this.accessType === 'PUBLIC'; return this.accessType === 'PUBLIC';
} }
@ -245,7 +249,7 @@ export class GfCreateOrUpdateAccessDialogComponent implements OnInit {
} }
protected get showMcpDetails() { protected get showMcpDetails() {
return this.canGrantMcpAccess && this.mode === 'update'; return this.canGrantMcpAccess && this.isMcpAccess && this.mode === 'update';
} }
protected get showPublicDetails() { protected get showPublicDetails() {

Loading…
Cancel
Save