Skip to content

Commit

Permalink
Added illegal message
Browse files Browse the repository at this point in the history
  • Loading branch information
Loic-Vanden-Bossche committed Dec 7, 2023
1 parent a75d7e9 commit 7913936
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 632 deletions.
11 changes: 3 additions & 8 deletions packages/frontend/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { SignUpComponent } from './auth/sign-up/sign-up.component';
import { PageNotFoundComponent } from './navigation/page-not-found/page-not-found.component';
import { AuthGuardService as AuthGuard } from './auth/auth.guard';
import { AdminGuardService as AdminGuard } from './admin/admin.guard';
import { PlayerComponent } from './player/player.component';
import { AdminMediasComponent } from './admin/admin-medias/admin-medias.component';
import { AdminUsersComponent } from './admin/admin-users/admin-users.component';
import { SearchResultsComponent } from './pages/search-results/search-results.component';
Expand All @@ -18,6 +17,7 @@ import { NotActivatedComponent } from './navigation/not-activated/not-activated.
import { AlreadyActivatedGuard } from './auth/already-activated.guard';
import { MyListComponent } from './pages/my-list/my-list.component';
import { CategoryResultsComponent } from './pages/category-results/category-results.component';
import { IllegalComponent } from "./player/illegal.component";

const routes: Routes = [
{
Expand Down Expand Up @@ -96,13 +96,8 @@ const routes: Routes = [
component: SignUpComponent,
},
{
path: 'play/:mediaId',
component: PlayerComponent,
canActivate: [AuthGuard, ActivatedGuard],
},
{
path: 'play/:mediaId/:seasonIndex/:episodeIndex',
component: PlayerComponent,
path: 'illegal',
component: IllegalComponent,
canActivate: [AuthGuard, ActivatedGuard],
},
{ path: '**', redirectTo: 'not-found' },
Expand Down
5 changes: 2 additions & 3 deletions packages/frontend/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ import { AuthModule } from './auth/auth.module';
import { AdminModule } from './admin/admin.module';
import { interceptors } from './api/interceptors';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { PlayerComponent } from './player/player.component';
import { NgChartsModule } from 'ng2-charts';
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';
import { PlayNextMediaComponent } from './player/play-next-media/play-next-media.component';
import { UserModule } from './user/user.module';
import { IllegalComponent } from "./player/illegal.component";

@NgModule({
declarations: [AppComponent, PlayerComponent, PlayNextMediaComponent],
declarations: [AppComponent, IllegalComponent],
imports: [
BrowserModule,
AppRoutingModule,
Expand Down
33 changes: 33 additions & 0 deletions packages/frontend/src/app/player/illegal.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<div class="h-full w-full bg-black">
<div
class="absolute flex flex-col aspect-[475/712] top-1/2 left-1/2 h-3/4 -translate-x-1/2 -translate-y-1/2"
>
<div @onNotActivated class="h-full w-full rounded-3xl overflow-hidden">
<div
[ngStyle]="{ 'background-image': 'url(assets/img/illegal.gif)' }"
class="bg-center h-full bg-cover"
>
<div
class="h-full w-full flex flex-col bg-gradient-to-b from-transparent to-black/50"
>
<div
class="mt-auto h-16 flex flex-row items-center justify-center bg-error"
>
<p class="font-bold text-xl text-center text-white">
👮 Le contenu n'est pas disponible 👮
</p>
</div>
</div>
</div>
</div>
<div @onReturnToMenuButton class="h-12 mt-10 flex flex-col items-center">
<a class="h-full" routerLink="/"
><button
class="h-full bg-white px-3 text-lg rounded font-bold text-black"
>
Retourner à l'accueil
</button></a
>
</div>
</div>
</div>
40 changes: 40 additions & 0 deletions packages/frontend/src/app/player/illegal.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { Component } from '@angular/core';
import { animate, style, transition, trigger } from '@angular/animations';

@Component({
selector: 'app-not-activated',
templateUrl: './illegal.component.html',
animations: [
trigger('onNotActivated', [
transition(':enter', [
style({
opacity: 0,
transform: 'TranslateY(-100%) Scale(0.5)',
}),
animate(
'1s ease',
style({
opacity: 1,
transform: 'TranslateY(0) Scale(1)',
}),
),
]),
]),
trigger('onReturnToMenuButton', [
transition(':enter', [
style({
opacity: 0,
transform: 'Scale(0.5)',
}),
animate(
'1s 0.5s ease',
style({
opacity: 1,
transform: 'Scale(1)',
}),
),
]),
]),
],
})
export class IllegalComponent {}

This file was deleted.

This file was deleted.

54 changes: 0 additions & 54 deletions packages/frontend/src/app/player/player.component.html

This file was deleted.

Loading

0 comments on commit 7913936

Please sign in to comment.