added close btn
This commit is contained in:
parent
61f956d964
commit
644be7e71e
6 changed files with 44 additions and 7 deletions
|
|
@ -1,7 +1,15 @@
|
||||||
<div class="overlay" (click)="uploadMovieOverview()">
|
<div class="overlay" (click)="uploadMovieOverview()">
|
||||||
<div class="center" (click)="stopPropagation($event)">
|
<div class="center" (click)="stopPropagation($event)">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="headline">Upload Movie</div>
|
<div class="headline">
|
||||||
|
Upload Movie
|
||||||
|
<app-btn-small
|
||||||
|
[imgPath]="'close'"
|
||||||
|
[btnRadius]="'32px'"
|
||||||
|
[imgRadius]="'24px'"
|
||||||
|
(click)="uploadMovieOverview()"
|
||||||
|
></app-btn-small>
|
||||||
|
</div>
|
||||||
<form
|
<form
|
||||||
#movieForm="ngForm"
|
#movieForm="ngForm"
|
||||||
(ngSubmit)="onSubmit(movieForm)"
|
(ngSubmit)="onSubmit(movieForm)"
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,22 @@
|
||||||
@import "./../../../../../assets/style/auth-layout.scss";
|
@import "./../../../../../assets/style/auth-layout.scss";
|
||||||
|
|
||||||
.center {
|
.center {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
app-btn-small {
|
||||||
|
position: absolute;
|
||||||
|
top: 24px;
|
||||||
|
right: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
// Overlay
|
// Overlay
|
||||||
|
|
||||||
.overlay {
|
.overlay {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { ErrorService } from '../../../../services/error.service';
|
||||||
import { BtnLargeComponent } from '../../../../shared/components/buttons/btn-large/btn-large.component';
|
import { BtnLargeComponent } from '../../../../shared/components/buttons/btn-large/btn-large.component';
|
||||||
import { MovieService } from '../../../../services/movie.service';
|
import { MovieService } from '../../../../services/movie.service';
|
||||||
import { LoadingDialogComponent } from '../../../../shared/components/loading-dialog/loading-dialog.component';
|
import { LoadingDialogComponent } from '../../../../shared/components/loading-dialog/loading-dialog.component';
|
||||||
|
import { BtnSmallComponent } from '../../../../shared/components/buttons/btn-small/btn-small.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-upload-movie',
|
selector: 'app-upload-movie',
|
||||||
|
|
@ -14,6 +15,7 @@ import { LoadingDialogComponent } from '../../../../shared/components/loading-di
|
||||||
FormsModule,
|
FormsModule,
|
||||||
BtnLargeComponent,
|
BtnLargeComponent,
|
||||||
LoadingDialogComponent,
|
LoadingDialogComponent,
|
||||||
|
BtnSmallComponent,
|
||||||
],
|
],
|
||||||
templateUrl: './upload-movie.component.html',
|
templateUrl: './upload-movie.component.html',
|
||||||
styleUrl: './upload-movie.component.scss',
|
styleUrl: './upload-movie.component.scss',
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,18 @@
|
||||||
<button class="btn" [disabled]="disabled">
|
<button
|
||||||
|
class="btn"
|
||||||
|
[disabled]="disabled"
|
||||||
|
[ngStyle]="{
|
||||||
|
'--btnRadius': btnRadius,
|
||||||
|
'--imgRadius': imgRadius
|
||||||
|
}"
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
src="./../../../../assets/img/{{ imgPath }}.svg"
|
src="./../../../../assets/img/{{ imgPath }}.svg"
|
||||||
alt="{{ imgPath }}"
|
alt="{{ imgPath }}"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
[ngStyle]="{
|
||||||
|
'--btnRadius': btnRadius,
|
||||||
|
'--imgRadius': imgRadius
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 48px;
|
width: var(--btnRadius);
|
||||||
height: 48px;
|
height: var(--btnRadius);
|
||||||
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
|
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-color: blue;
|
background-color: blue;
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
.icon {
|
.icon {
|
||||||
height: 32px;
|
width: var(--imgRadius);
|
||||||
width: auto;
|
height: var(--imgRadius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,16 @@
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-btn-small',
|
selector: 'app-btn-small',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [],
|
imports: [CommonModule],
|
||||||
templateUrl: './btn-small.component.html',
|
templateUrl: './btn-small.component.html',
|
||||||
styleUrl: './btn-small.component.scss',
|
styleUrl: './btn-small.component.scss',
|
||||||
})
|
})
|
||||||
export class BtnSmallComponent {
|
export class BtnSmallComponent {
|
||||||
@Input() imgPath: string = '';
|
@Input() imgPath: string = '';
|
||||||
|
@Input() btnRadius: string = '48px';
|
||||||
|
@Input() imgRadius: string = '32px';
|
||||||
@Input() disabled: boolean = false;
|
@Input() disabled: boolean = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue