UI: Copy button visible on hover
This commit is contained in:
parent
fba360a237
commit
0dd8161790
@ -161,9 +161,10 @@
|
|||||||
<ng-container matColumnDef="key">
|
<ng-container matColumnDef="key">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header style="width: 40%"> {{ 'attribute.key' | translate }} </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header style="width: 40%"> {{ 'attribute.key' | translate }} </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let attribute">
|
<mat-cell *matCellDef="let attribute">
|
||||||
<div fxLayout="row" style="align-items: center">
|
<div class="attribute" fxLayout="row" style="align-items: center">
|
||||||
<span class="ellipsis">{{ attribute.key }}</span>
|
<span class="ellipsis">{{ attribute.key }}</span>
|
||||||
<tb-copy-button
|
<tb-copy-button
|
||||||
|
class="attribute-copy"
|
||||||
[disabled]="isLoading$ | async"
|
[disabled]="isLoading$ | async"
|
||||||
[copyText]="attribute.key"
|
[copyText]="attribute.key"
|
||||||
tooltipText="{{ 'attribute.copy-key' | translate }}"
|
tooltipText="{{ 'attribute.copy-key' | translate }}"
|
||||||
@ -181,9 +182,10 @@
|
|||||||
class="tb-value-cell"
|
class="tb-value-cell"
|
||||||
(click)="editAttribute($event, attribute)">
|
(click)="editAttribute($event, attribute)">
|
||||||
<div fxFlex fxLayout="row" style="align-items: center">
|
<div fxFlex fxLayout="row" style="align-items: center">
|
||||||
<div fxFlex fxLayout="row" style="overflow: hidden; align-items: center;">
|
<div class="attribute" fxFlex fxLayout="row" style="overflow: hidden; align-items: center;">
|
||||||
<span class="ellipsis">{{attribute.value | tbJson}}</span>
|
<span class="ellipsis">{{attribute.value | tbJson}}</span>
|
||||||
<tb-copy-button
|
<tb-copy-button
|
||||||
|
class="attribute-copy"
|
||||||
[disabled]="isLoading$ | async"
|
[disabled]="isLoading$ | async"
|
||||||
[copyText]="attribute.value | tbJson"
|
[copyText]="attribute.value | tbJson"
|
||||||
tooltipText="{{ 'attribute.copy-value' | translate }}"
|
tooltipText="{{ 'attribute.copy-value' | translate }}"
|
||||||
|
|||||||
@ -51,6 +51,7 @@
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
.mat-mdc-table {
|
.mat-mdc-table {
|
||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
|
min-width: 450px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,6 +71,17 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.attribute-copy {
|
||||||
|
visibility: hidden;
|
||||||
|
transition: visibility 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.attribute:hover {
|
||||||
|
.attribute-copy {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user