fix edit page

This commit is contained in:
_Bastler 2022-01-20 08:35:30 +01:00
parent 12a33eb6b8
commit 92165c40c5
4 changed files with 32 additions and 13 deletions

View File

@ -1,4 +1 @@
<a mat-mini-fab routerLink="/v/{{name}}/edit" matTooltip="{{'views.edit' | i18n}}" color="primary">
<mat-icon inline="true">edit</mat-icon>
</a>
<page-entries *ngIf="name" #entries [fetch]="boundFetch"></page-entries>

View File

@ -1,6 +0,0 @@
a.mat-mini-fab {
position: fixed;
top: 34px;
right: 5px;
z-index: 5;
}

View File

@ -1,13 +1,20 @@
<ng-container *ngIf="settings">
<ng-container *ngFor="let view of views">
<mat-divider *ngIf="view.divider"></mat-divider>
<a routerLink="/v/{{view.name}}" routerLinkActive="active" mat-list-item>
<mat-icon>{{'sorting.' + view.sorting + '.icon' | i18n}}</mat-icon> {{'sorting.' + view.name | i18nEmpty}}
</a>
<mat-list-item>
<a routerLink="/v/{{view.name}}" routerLinkActive="active" class="link">
<mat-icon>{{'sorting.' + view.sorting + '.icon' | i18n}}</mat-icon> {{'sorting.' + view.name | i18nEmpty}}
</a>
<small>
<a routerLink="/v/{{view.name}}/edit" matTooltip="{{'views.edit' | i18n}}" color="primary" class="edit">
<mat-icon inline="true">edit</mat-icon>
</a>
</small>
</mat-list-item>
</ng-container>
<mat-divider></mat-divider>
<a *ngIf="views.length < settings.maxViews" routerLink="/v" routerLinkActive="active" mat-list-item
title="{{'views.add' | i18n}}">
<mat-icon style="margin: 0 auto;">add</mat-icon>
</a>
</ng-container>
</ng-container>

View File

@ -1,3 +1,24 @@
mat-form-field {
display: block;
}
mat-list-item {
a.link {
flex-grow: 1;
}
a.edit {
display: none;
}
}
mat-list-item:hover {
a.edit {
opacity: 0.6;
display: inline-block;
}
a.edit:hover {
opacity: 1;
}
}