Add button to edit application.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<div class="application-list" *ngIf="applicationsStatus?.length; else noAnyApp">
|
||||
<app-application-card *ngFor="let applicationStatus of applicationsStatus" [applicationStatus]="applicationStatus"></app-application-card>
|
||||
<app-application-card *ngFor="let applicationStatus of applicationsStatus"
|
||||
[applicationStatus]="applicationStatus"></app-application-card>
|
||||
</div>
|
||||
<ng-template #noAnyApp>
|
||||
<div class="no-any-app">
|
||||
<p>There is no any application.</p>
|
||||
<p>
|
||||
There is no any application.
|
||||
</p>
|
||||
<p>
|
||||
Add one by clicking here: <app-add-application-button></app-add-application-button>
|
||||
Add one by clicking here:
|
||||
<app-add-application-button></app-add-application-button>
|
||||
</p>
|
||||
</div>
|
||||
</ng-template>
|
||||
@@ -2,6 +2,11 @@
|
||||
<div class="logo">
|
||||
<img [src]="applicationStatus?.application?.image" />
|
||||
<div class="status {{applicationStatus?.status?.toLowerCase()}}" matTooltip="This application is running"></div>
|
||||
<button class="icon secondary"
|
||||
(click)="edit()"
|
||||
matTooltip="Edit the application details">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="name">{{applicationStatus?.application?.name}}</div>
|
||||
</div>
|
||||
@@ -8,6 +8,12 @@
|
||||
.logo {
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
button {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
width: 164px;
|
||||
height: 164px;
|
||||
@@ -34,6 +40,14 @@
|
||||
border: 2px solid #770000;
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
opacity: 0;
|
||||
transition: opacity .2s ease;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Application } from '../../entities/Application';
|
||||
import { ApplicationStatus } from '../../entities/ApplicationStatus';
|
||||
import { ApplicationService } from '../../services/application.service';
|
||||
import { ModalService } from '../../services/modal.service';
|
||||
|
||||
interface AppDisplaying {
|
||||
name: string,
|
||||
@@ -18,6 +19,11 @@ export class ApplicationCardComponent {
|
||||
@Input() applicationStatus: ApplicationStatus | undefined;
|
||||
|
||||
constructor(
|
||||
private _applicationService: ApplicationService
|
||||
private _applicationService: ApplicationService,
|
||||
private _modalService: ModalService
|
||||
) {}
|
||||
|
||||
edit(): void {
|
||||
// this._modalService.open();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,27 @@
|
||||
@import '../colors.scss';
|
||||
@import "../colors.scss";
|
||||
|
||||
button {
|
||||
// background-color: $blue;
|
||||
background-image: linear-gradient($btn-primary-background-top, $btn-primary-background-bottom);
|
||||
button, a.button {
|
||||
background-image: linear-gradient(
|
||||
$btn-primary-background-top,
|
||||
$btn-primary-background-bottom
|
||||
);
|
||||
color: white;
|
||||
border: solid 1px $btn-primary-background-bottom;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-width: 5rem;
|
||||
border-radius: .3rem;
|
||||
padding: .15rem 1rem;
|
||||
border-radius: 0.3rem;
|
||||
padding: 0.15rem 1rem;
|
||||
font-weight: 600;
|
||||
margin: .2rem .5rem;
|
||||
margin: 0.2rem 0.5rem;
|
||||
|
||||
&:active {
|
||||
border-color: $btn-primary-active-border;
|
||||
background-image: linear-gradient($btn-primary-active-background-top, $btn-primary-active-background-bottom);
|
||||
background-image: linear-gradient(
|
||||
$btn-primary-active-background-top,
|
||||
$btn-primary-active-background-bottom
|
||||
);
|
||||
}
|
||||
|
||||
&.secondary {
|
||||
@@ -47,4 +52,11 @@ button {
|
||||
background-color: #dddddd;
|
||||
}
|
||||
}
|
||||
|
||||
&.icon {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
min-width: 25px;
|
||||
width: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user