Skip to content

Commit

Permalink
Update Schemas main screen
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcibotari committed Sep 29, 2024
1 parent 28d49d1 commit f561d88
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 33 deletions.
8 changes: 5 additions & 3 deletions src/app/features/spaces/assets/assets.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
</button>
}

<button mat-icon-button [matMenuTriggerFor]="extraMenu">
<mat-icon>more_vert</mat-icon>
</button>
@if (['ASSET_IMPORT', 'ASSET_EXPORT'] | canUserPerform | async) {
<button mat-icon-button [matMenuTriggerFor]="extraMenu">
<mat-icon>more_vert</mat-icon>
</button>
}

<mat-menu #extraMenu="matMenu">
@if ('ASSET_IMPORT' | canUserPerform | async) {
Expand Down
37 changes: 19 additions & 18 deletions src/app/features/spaces/schemas/schemas.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,25 @@
Add Schema
</button>
}
<button mat-icon-button [matMenuTriggerFor]="extraMenu">
<mat-icon>more_vert</mat-icon>
</button>

<mat-menu #extraMenu="matMenu">
@if ('SCHEMA_IMPORT' | canUserPerform | async) {
<button mat-menu-item (click)="openImportDialog()">
<mat-icon>cloud_upload</mat-icon>
<span>Import</span>
</button>
}
@if ('SCHEMA_EXPORT' | canUserPerform | async) {
<button mat-menu-item (click)="openExportDialog()">
<mat-icon>cloud_download</mat-icon>
<span>Export</span>
</button>
}
</mat-menu>
@if (['SCHEMA_IMPORT', 'SCHEMA_EXPORT'] | canUserPerform | async) {
<button mat-icon-button [matMenuTriggerFor]="extraMenu">
<mat-icon>more_vert</mat-icon>
</button>
<mat-menu #extraMenu="matMenu">
@if ('SCHEMA_IMPORT' | canUserPerform | async) {
<button mat-menu-item (click)="openImportDialog()">
<mat-icon>cloud_upload</mat-icon>
<span>Import</span>
</button>
}
@if ('SCHEMA_EXPORT' | canUserPerform | async) {
<button mat-menu-item (click)="openExportDialog()">
<mat-icon>cloud_download</mat-icon>
<span>Export</span>
</button>
}
</mat-menu>
}
</mat-toolbar-row>
</mat-toolbar>
@if (isLoading) {
Expand Down
26 changes: 14 additions & 12 deletions src/app/features/spaces/translations/translations.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,20 @@
<span>Published {{ locale.name }} JSON</span>
</button>
}
<mat-divider></mat-divider>
@if ('TRANSLATION_IMPORT' | canUserPerform | async) {
<button mat-menu-item (click)="openImportDialog(space.locales)">
<mat-icon>cloud_upload</mat-icon>
<span>Import</span>
</button>
}
@if ('TRANSLATION_EXPORT' | canUserPerform | async) {
<button mat-menu-item (click)="openExportDialog(space.locales)">
<mat-icon>cloud_download</mat-icon>
<span>Export</span>
</button>
@if (['TRANSLATION_IMPORT', 'TRANSLATION_EXPORT'] | canUserPerform | async) {
<mat-divider></mat-divider>
@if ('TRANSLATION_IMPORT' | canUserPerform | async) {
<button mat-menu-item (click)="openImportDialog(space.locales)">
<mat-icon>cloud_upload</mat-icon>
<span>Import</span>
</button>
}
@if ('TRANSLATION_EXPORT' | canUserPerform | async) {
<button mat-menu-item (click)="openExportDialog(space.locales)">
<mat-icon>cloud_download</mat-icon>
<span>Export</span>
</button>
}
}
</mat-menu>
</mat-toolbar-row>
Expand Down

0 comments on commit f561d88

Please sign in to comment.