This commit is contained in:
Michele Artini 2023-04-14 11:00:13 +02:00
parent 7ad5bc2395
commit c4608e68be
5 changed files with 37 additions and 11 deletions

View File

@ -38,8 +38,15 @@
background-color: #eaeaea;
}
.menu-item .badge-label {
.menu-count {
padding-top: 0.3em;
padding-bottom: 0.3em;
padding-left: 0.5em;
padding-right: 0.5em;
border-radius: 0.2em;
font-size: 0.6em;
color: #fff;
text-align: center;
float: right;
width: 2em;
width: 3em;
}

View File

@ -28,7 +28,7 @@
<div *ngIf="r.simple">
<a class="menu-item" [routerLink]="['resources/' + r.id]">
{{r.name}}
<span class="badge-label badge-info">{{r.count}}</span>
<span class="menu-count">{{r.count}}</span>
</a>
</div>
</ng-container>
@ -44,7 +44,7 @@
<div *ngIf="!r.simple">
<a class="menu-item" [routerLink]="['adv_resources/' + r.id]">
{{r.name}}
<span class="badge-label badge-info">{{r.count}}</span>
<span class="menu-count">{{r.count}}</span>
</a>
</div>
</ng-container>

View File

@ -27,9 +27,21 @@
</p>
</mat-card-content>
<mat-card-actions>
<button mat-stroked-button color="primary" (click)="openMetadataDialog(r)">edit metadata</button>
<button mat-stroked-button color="primary" (click)="openContentDialog(r)">edit content</button>
<a href="./api/resources/{{r.id}}/content" mat-stroked-button color="link" target="_blank">raw content</a>
<button mat-stroked-button color="warn" (click)="deleteResource(r)">delete</button>
<button mat-stroked-button color="primary" (click)="openMetadataDialog(r)">
<mat-icon fontIcon="edit"></mat-icon>
edit metadata
</button>
<button mat-stroked-button color="primary" (click)="openContentDialog(r)">
<mat-icon fontIcon="edit"></mat-icon>
edit content
</button>
<a href="./api/resources/{{r.id}}/content" mat-stroked-button color="link" target="_blank">
<mat-icon fontIcon="code"></mat-icon>
raw content
</a>
<button mat-stroked-button color="warn" (click)="deleteResource(r)">
<mat-icon fontIcon="delete"></mat-icon>
delete
</button>
</mat-card-actions>
</mat-card>

View File

@ -19,13 +19,16 @@
</button>
<button mat-stroked-button color="primary" (click)="editConf()">
<mat-icon fontIcon="edit"></mat-icon>
edit
configure
</button>
<a href="./api/resources/{{conf.workflow}}/content" mat-stroked-button color="link" target="_blank">
<mat-icon fontIcon="code"></mat-icon>
raw workflow
</a>
<button mat-stroked-button color="warn" (click)="deleteConf()">
<mat-icon fontIcon="delete"></mat-icon>
delete
</button>
<pre>{{conf | json}}</pre>
</div>

View File

@ -81,10 +81,14 @@ a:not([href]):hover {
padding-bottom: 0.3em;
padding-left: 0.5em;
padding-right: 0.5em;
border-radius: 0.7em;
border-radius: 0.2em;
font-size: 0.9em;
font-weight: bold;
font-variant: small-caps;
color: #fff;
text-align: center;
margin-left: 0.1em;
margin-right: 0.1em;
}
.badge-default {