diff --git a/frontend/src/app/components/home/browse/browse.component.html b/frontend/src/app/components/home/browse/browse.component.html
index 6c1a20f..13b6a5c 100644
--- a/frontend/src/app/components/home/browse/browse.component.html
+++ b/frontend/src/app/components/home/browse/browse.component.html
@@ -34,12 +34,12 @@
-@if (newMovieOverview) {
-
+@if (uploadMovieOverview) {
+
}
diff --git a/frontend/src/app/components/home/browse/browse.component.ts b/frontend/src/app/components/home/browse/browse.component.ts
index 35a4f99..67c7bb9 100644
--- a/frontend/src/app/components/home/browse/browse.component.ts
+++ b/frontend/src/app/components/home/browse/browse.component.ts
@@ -1,15 +1,13 @@
-import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { HeaderComponent } from '../../../shared/components/header/header.component';
import { HeroBannerComponent } from './hero-banner/hero-banner.component';
import { CategoriesComponent } from './categories/categories.component';
import { AuthService } from '../../../services/auth.service';
import { MovieService } from '../../../services/movie.service';
-import { Observable, Subscription } from 'rxjs';
import { CommonModule } from '@angular/common';
import { VideoPlayerComponent } from './vjs-player/vjs-player.component';
-import { BtnLargeComponent } from '../../../shared/components/buttons/btn-large/btn-large.component';
import { BtnSmallComponent } from '../../../shared/components/buttons/btn-small/btn-small.component';
-import { NewMovieComponent } from './new-movie/new-movie.component';
+import { UploadMovieComponent } from './upload-movie/upload-movie.component';
@Component({
selector: 'app-browse',
@@ -21,23 +19,22 @@ import { NewMovieComponent } from './new-movie/new-movie.component';
CategoriesComponent,
VideoPlayerComponent,
BtnSmallComponent,
- NewMovieComponent,
+ UploadMovieComponent,
],
templateUrl: './browse.component.html',
styleUrl: './browse.component.scss',
})
export class BrowseComponent implements OnInit {
movies: any[] = [];
+ currentMovie: any[] = [];
+ playMovie: string = '';
+ uploadMovieOverview: boolean = false;
constructor(
private authService: AuthService,
private movieService: MovieService
) {}
- currentMovie: any[] = [];
- playMovie: string = '';
- newMovieOverview: boolean = false;
-
async ngOnInit() {
await this.loadAllMovies();
this.currentMovie.length === 0 ? this.loadRandomMovie() : null;
@@ -68,7 +65,9 @@ export class BrowseComponent implements OnInit {
}
}
- toggleNewMovieOverview(value: any) {
- this.newMovieOverview = value;
+ toggleUploadMovieOverview(value: any) {
+ console.log(value);
+
+ this.uploadMovieOverview = value;
}
}
diff --git a/frontend/src/app/components/home/browse/new-movie/new-movie.component.html b/frontend/src/app/components/home/browse/new-movie/new-movie.component.html
deleted file mode 100644
index 6713e99..0000000
--- a/frontend/src/app/components/home/browse/new-movie/new-movie.component.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/frontend/src/app/components/home/browse/new-movie/new-movie.component.spec.ts b/frontend/src/app/components/home/browse/new-movie/new-movie.component.spec.ts
deleted file mode 100644
index 07e6d53..0000000
--- a/frontend/src/app/components/home/browse/new-movie/new-movie.component.spec.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { NewMovieComponent } from './new-movie.component';
-
-describe('NewMovieComponent', () => {
- let component: NewMovieComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- imports: [NewMovieComponent]
- })
- .compileComponents();
-
- fixture = TestBed.createComponent(NewMovieComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/frontend/src/app/components/home/browse/new-movie/new-movie.component.ts b/frontend/src/app/components/home/browse/new-movie/new-movie.component.ts
deleted file mode 100644
index 615608d..0000000
--- a/frontend/src/app/components/home/browse/new-movie/new-movie.component.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Component, EventEmitter, Output } from '@angular/core';
-
-@Component({
- selector: 'app-new-movie',
- standalone: true,
- imports: [],
- templateUrl: './new-movie.component.html',
- styleUrl: './new-movie.component.scss',
-})
-export class NewMovieComponent {
- @Output() toggleNewMovieOverview = new EventEmitter();
-
- stopPropagation(event: MouseEvent) {
- event.stopPropagation();
- }
-
- newMovieOverview() {
- this.toggleNewMovieOverview.emit(false);
- }
-}
diff --git a/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.html b/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.html
new file mode 100644
index 0000000..25bf9d1
--- /dev/null
+++ b/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.html
@@ -0,0 +1,94 @@
+
diff --git a/frontend/src/app/components/home/browse/new-movie/new-movie.component.scss b/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.scss
similarity index 70%
rename from frontend/src/app/components/home/browse/new-movie/new-movie.component.scss
rename to frontend/src/app/components/home/browse/upload-movie/upload-movie.component.scss
index 0d3f3d6..39b32f8 100644
--- a/frontend/src/app/components/home/browse/new-movie/new-movie.component.scss
+++ b/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.scss
@@ -1,4 +1,10 @@
@import "./../../../../../assets/style/colors.scss";
+@import "./../../../../../assets/style/form.scss";
+@import "./../../../../../assets/style/auth-layout.scss";
+
+.center {
+ text-align: center;
+}
// Overlay
@@ -17,14 +23,3 @@
align-items: center;
z-index: 999;
}
-
-.overlay-mobile {
- position: fixed;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- width: 100vw;
- height: 100vh;
- z-index: 999;
-}
diff --git a/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.spec.ts b/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.spec.ts
new file mode 100644
index 0000000..5dd490b
--- /dev/null
+++ b/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.spec.ts
@@ -0,0 +1,21 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { UploadMovieComponent } from './upload-movie.component';
+
+describe('UploadMovieComponent', () => {
+ let component: UploadMovieComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [UploadMovieComponent],
+ }).compileComponents();
+
+ fixture = TestBed.createComponent(UploadMovieComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.ts b/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.ts
new file mode 100644
index 0000000..6b97f3c
--- /dev/null
+++ b/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.ts
@@ -0,0 +1,38 @@
+import { CommonModule } from '@angular/common';
+import { Component, EventEmitter, Output } from '@angular/core';
+import { FormsModule, NgForm } from '@angular/forms';
+import { ErrorService } from '../../../../services/error.service';
+import { BtnLargeComponent } from '../../../../shared/components/buttons/btn-large/btn-large.component';
+@Component({
+ selector: 'app-upload-movie',
+ standalone: true,
+ imports: [CommonModule, FormsModule, BtnLargeComponent],
+ templateUrl: './upload-movie.component.html',
+ styleUrl: './upload-movie.component.scss',
+})
+export class UploadMovieComponent {
+ @Output() toggleUploadMovieOverview = new EventEmitter();
+
+ movieData = {
+ title: '',
+ description: '',
+ filmGenre: '',
+ videoFile: '',
+ };
+
+ constructor(public errorService: ErrorService) {}
+
+ stopPropagation(event: MouseEvent) {
+ event.stopPropagation();
+ }
+
+ uploadMovieOverview() {
+ this.toggleUploadMovieOverview.emit(false);
+ }
+
+ async onSubmit(ngForm: NgForm) {
+ if (ngForm.submitted && ngForm.form.valid) {
+ console.log('send');
+ }
+ }
+}
diff --git a/frontend/src/assets/style/auth-layout.scss b/frontend/src/assets/style/auth-layout.scss
index 70827d7..5217b7c 100644
--- a/frontend/src/assets/style/auth-layout.scss
+++ b/frontend/src/assets/style/auth-layout.scss
@@ -54,6 +54,9 @@ section {
@media screen and (max-width: 660px) {
.content {
padding: 43px 24px;
+ .headline {
+ font-size: 36px;
+ }
}
}
@@ -62,3 +65,9 @@ section {
width: 80%;
}
}
+
+@media screen and (max-width: 400px) {
+ .content {
+ padding: 24px 18px;
+ }
+}
diff --git a/frontend/src/assets/style/form.scss b/frontend/src/assets/style/form.scss
index 89111b8..8e06efb 100644
--- a/frontend/src/assets/style/form.scss
+++ b/frontend/src/assets/style/form.scss
@@ -3,7 +3,9 @@ form {
flex-direction: column;
align-items: center;
justify-content: space-between;
- input {
+ input,
+ textarea,
+ select {
width: 90%;
padding: 12px 18px;
box-sizing: border-box;
@@ -13,6 +15,7 @@ form {
border-radius: 12px;
font-size: 18px;
font-weight: 400;
+ resize: none;
transition: background-color 250ms ease-in-out, color 250ms ease-in-out,
border-color 250ms ease-in-out;
&::placeholder {
@@ -23,6 +26,17 @@ form {
background-color: rgba($white, 0.1);
}
}
+ input::file-selector-button {
+ width: fit-content;
+ box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
+ border-radius: 6px;
+ padding: 6px;
+ color: $white;
+ background-color: blue;
+ border: 1px solid blue;
+ transition: 300ms ease-in-out;
+ cursor: pointer;
+ }
.error-border {
border: 1px solid $red;
color: $red;
@@ -66,7 +80,9 @@ form {
@media screen and (max-width: 600px) {
form {
- input {
+ input,
+ textarea,
+ select {
width: 100%;
}
}