From 6e09d3d40132e398e93a58f78d8494ac5e1d5f3b Mon Sep 17 00:00:00 2001 From: eric-kingu Date: Tue, 14 Nov 2023 00:31:51 -0300 Subject: [PATCH 01/16] =?UTF-8?q?Conecta=20os=20bot=C3=B5es=20do=20header?= =?UTF-8?q?=20com=20suas=20rotas=20e=20faz=20o=20bot=C3=A3o=20de=20mais=20?= =?UTF-8?q?op=C3=A7=C3=B5es=20descer=20em=20um=20esbo=C3=A7o=20de=20dropdo?= =?UTF-8?q?wn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Savio Cunha --- src/app/app-routing.module.ts | 6 +++++- src/app/app.module.ts | 4 ++++ .../background/background.component.html | 19 ++++++++++++------- .../background/background.component.ts | 4 ++++ 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index b2ef9ad5..2d4c4b29 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,8 @@ import { CheckCodeRestPasswordComponent } from './pages/check-code-rest-password import { ResetPasswordComponent } from './pages/reset-password/reset-password.component'; import { AuthGuard } from './services/auth.guard'; import { EditUserComponent } from './pages/edit-user/edit-user.component'; +import { ProgramacaoComponent } from './pages/programacao/programacao.component'; +import { AgoraComponent } from './pages/agora/agora.component'; const routes: Routes = [ { path: 'login', component: LoginComponent }, @@ -24,7 +26,9 @@ const routes: Routes = [ { path: 'changePassword', component: ResetPasswordComponent }, { path: 'profile', component: ProfileComponent, canActivate: [AuthGuard], }, { path: 'editUser/:id', component: EditUserComponent, canActivate: [AuthGuard], }, - { path: '', component: HomePageComponent, canActivate: [AuthGuard], } + { path: '', component: HomePageComponent, canActivate: [AuthGuard], }, + { path: 'programacao', component: ProgramacaoComponent}, + { path: 'agora', component: AgoraComponent} ]; @NgModule({ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 44042d17..1c91fcbe 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -22,6 +22,8 @@ import { CheckCodeRestPasswordComponent } from './pages/check-code-rest-password import { AuthGuard } from './services/auth.guard'; import { AuthService } from './services/auth.service'; import { EditUserComponent } from './pages/edit-user/edit-user.component'; +import { AgoraComponent } from './pages/agora/agora.component'; +import { ProgramacaoComponent } from './pages/programacao/programacao.component'; @NgModule({ declarations: [ @@ -40,6 +42,8 @@ import { EditUserComponent } from './pages/edit-user/edit-user.component'; ResetPasswordComponent, CheckCodeRestPasswordComponent, EditUserComponent, + AgoraComponent, + ProgramacaoComponent, ], imports: [ BrowserModule, diff --git a/src/app/components/background/background.component.html b/src/app/components/background/background.component.html index ef83a777..e73e501d 100644 --- a/src/app/components/background/background.component.html +++ b/src/app/components/background/background.component.html @@ -4,13 +4,18 @@ simbolo-unb
-
-
Início
| -
Agora na TV
| -
Programação
| -
Transmissões
-
- hamburguer + + hamburguer +
+
diff --git a/src/app/components/background/background.component.ts b/src/app/components/background/background.component.ts index a0abb674..de116eb8 100644 --- a/src/app/components/background/background.component.ts +++ b/src/app/components/background/background.component.ts @@ -6,5 +6,9 @@ import { Component } from '@angular/core'; styleUrls: ['./background.component.css'] }) export class BackgroundComponent { + isMenuOpened: boolean = false; + toggleMenu(): void { + this.isMenuOpened = !this.isMenuOpened; + } } From b6965066369947fa9183783a9c8392464658e873 Mon Sep 17 00:00:00 2001 From: eric-kingu Date: Tue, 14 Nov 2023 13:50:08 -0300 Subject: [PATCH 02/16] Adiciona componentes placeholder para link Co-authored-by: Savio Cunha --- src/app/pages/agora/agora.component.css | 0 src/app/pages/agora/agora.component.html | 1 + src/app/pages/agora/agora.component.spec.ts | 23 +++++++++++++++++++ src/app/pages/agora/agora.component.ts | 10 ++++++++ .../programacao/programacao.component.css | 0 .../programacao/programacao.component.html | 1 + .../programacao/programacao.component.spec.ts | 23 +++++++++++++++++++ .../programacao/programacao.component.ts | 10 ++++++++ 8 files changed, 68 insertions(+) create mode 100644 src/app/pages/agora/agora.component.css create mode 100644 src/app/pages/agora/agora.component.html create mode 100644 src/app/pages/agora/agora.component.spec.ts create mode 100644 src/app/pages/agora/agora.component.ts create mode 100644 src/app/pages/programacao/programacao.component.css create mode 100644 src/app/pages/programacao/programacao.component.html create mode 100644 src/app/pages/programacao/programacao.component.spec.ts create mode 100644 src/app/pages/programacao/programacao.component.ts diff --git a/src/app/pages/agora/agora.component.css b/src/app/pages/agora/agora.component.css new file mode 100644 index 00000000..e69de29b diff --git a/src/app/pages/agora/agora.component.html b/src/app/pages/agora/agora.component.html new file mode 100644 index 00000000..48b60c14 --- /dev/null +++ b/src/app/pages/agora/agora.component.html @@ -0,0 +1 @@ +

agora works!

diff --git a/src/app/pages/agora/agora.component.spec.ts b/src/app/pages/agora/agora.component.spec.ts new file mode 100644 index 00000000..a11174b6 --- /dev/null +++ b/src/app/pages/agora/agora.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AgoraComponent } from './agora.component'; + +describe('AgoraComponent', () => { + let component: AgoraComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ AgoraComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(AgoraComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/agora/agora.component.ts b/src/app/pages/agora/agora.component.ts new file mode 100644 index 00000000..4ee9c175 --- /dev/null +++ b/src/app/pages/agora/agora.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-agora', + templateUrl: './agora.component.html', + styleUrls: ['./agora.component.css'] +}) +export class AgoraComponent { + +} diff --git a/src/app/pages/programacao/programacao.component.css b/src/app/pages/programacao/programacao.component.css new file mode 100644 index 00000000..e69de29b diff --git a/src/app/pages/programacao/programacao.component.html b/src/app/pages/programacao/programacao.component.html new file mode 100644 index 00000000..a1c2dc60 --- /dev/null +++ b/src/app/pages/programacao/programacao.component.html @@ -0,0 +1 @@ +

programacao works!

diff --git a/src/app/pages/programacao/programacao.component.spec.ts b/src/app/pages/programacao/programacao.component.spec.ts new file mode 100644 index 00000000..dc125793 --- /dev/null +++ b/src/app/pages/programacao/programacao.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProgramacaoComponent } from './programacao.component'; + +describe('ProgramacaoComponent', () => { + let component: ProgramacaoComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ProgramacaoComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ProgramacaoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/programacao/programacao.component.ts b/src/app/pages/programacao/programacao.component.ts new file mode 100644 index 00000000..cf1bf82d --- /dev/null +++ b/src/app/pages/programacao/programacao.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-programacao', + templateUrl: './programacao.component.html', + styleUrls: ['./programacao.component.css'] +}) +export class ProgramacaoComponent { + +} From f042af5b7c18a51e5c6a4bbd05adbf83d61db251 Mon Sep 17 00:00:00 2001 From: savioc2 Date: Wed, 15 Nov 2023 18:44:02 -0300 Subject: [PATCH 03/16] =?UTF-8?q?adicionando=20componente=20de=20transmiss?= =?UTF-8?q?=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Eric Akio --- src/app/app-routing.module.ts | 11 ++++----- .../background/background.component.html | 3 ++- .../transmissoes/transmissoes.component.css | 0 .../transmissoes/transmissoes.component.html | 1 + .../transmissoes.component.spec.ts | 23 +++++++++++++++++++ .../transmissoes/transmissoes.component.ts | 11 +++++++++ 6 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 src/app/pages/transmissoes/transmissoes.component.css create mode 100644 src/app/pages/transmissoes/transmissoes.component.html create mode 100644 src/app/pages/transmissoes/transmissoes.component.spec.ts create mode 100644 src/app/pages/transmissoes/transmissoes.component.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index ae8feb5c..564f5daa 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,13 +12,11 @@ import { CheckCodeRestPasswordComponent } from './pages/check-code-rest-password import { ResetPasswordComponent } from './pages/reset-password/reset-password.component'; import { AuthGuard } from './services/auth.guard'; import { EditUserComponent } from './pages/edit-user/edit-user.component'; -<<<<<<< HEAD -import { ProgramacaoComponent } from './pages/programacao/programacao.component'; -import { AgoraComponent } from './pages/agora/agora.component'; -======= import { SuggestAgendaComponent } from './pages/suggest-agenda/suggest-agenda.component'; import { ParticipateComponent } from './pages/participate/participate.component'; ->>>>>>> c6e17862938e0f0a21bd8a1c130a93c1eb4e0b27 +import { ProgramacaoComponent } from './pages/programacao/programacao.component'; +import { AgoraComponent } from './pages/agora/agora.component'; +import { TransmissoesComponent } from './pages/transmissoes/transmissoes.component'; const routes: Routes = [ { path: 'login', component: LoginComponent }, @@ -35,7 +33,8 @@ const routes: Routes = [ { path: 'editUser/:id', component: EditUserComponent, canActivate: [AuthGuard], }, { path: '', component: HomePageComponent, canActivate: [AuthGuard], }, { path: 'programacao', component: ProgramacaoComponent}, - { path: 'agora', component: AgoraComponent} + { path: 'agora', component: AgoraComponent}, + { path: 'transmissoes', component: TransmissoesComponent} ]; @NgModule({ diff --git a/src/app/components/background/background.component.html b/src/app/components/background/background.component.html index 53a1019a..50c67a27 100644 --- a/src/app/components/background/background.component.html +++ b/src/app/components/background/background.component.html @@ -8,7 +8,8 @@ Início| Agora na TV| Programação| - Transmissões + Transmissões + hamburguer
diff --git a/src/app/pages/transmissoes/transmissoes.component.css b/src/app/pages/transmissoes/transmissoes.component.css new file mode 100644 index 00000000..e69de29b diff --git a/src/app/pages/transmissoes/transmissoes.component.html b/src/app/pages/transmissoes/transmissoes.component.html new file mode 100644 index 00000000..36d26117 --- /dev/null +++ b/src/app/pages/transmissoes/transmissoes.component.html @@ -0,0 +1 @@ +

transmissoes works!

diff --git a/src/app/pages/transmissoes/transmissoes.component.spec.ts b/src/app/pages/transmissoes/transmissoes.component.spec.ts new file mode 100644 index 00000000..03f6da3a --- /dev/null +++ b/src/app/pages/transmissoes/transmissoes.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TransmissoesComponent } from './transmissoes.component'; + +describe('TransmissoesComponent', () => { + let component: TransmissoesComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [TransmissoesComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(TransmissoesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/transmissoes/transmissoes.component.ts b/src/app/pages/transmissoes/transmissoes.component.ts new file mode 100644 index 00000000..b76f82c9 --- /dev/null +++ b/src/app/pages/transmissoes/transmissoes.component.ts @@ -0,0 +1,11 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-transmissoes', + templateUrl: './transmissoes.component.html', + styleUrls: ['./transmissoes.component.css'] + +}) +export class TransmissoesComponent { + +} From 35df6ffe04838854f0af35bcd4c52159ad7adbaa Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Wed, 15 Nov 2023 22:09:52 -0300 Subject: [PATCH 04/16] Conserta link do twitter --- src/app/components/background/background.component.html | 2 +- src/app/components/background/twitter.com/unb_tv | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 src/app/components/background/twitter.com/unb_tv diff --git a/src/app/components/background/background.component.html b/src/app/components/background/background.component.html index 530c9a93..bd610904 100644 --- a/src/app/components/background/background.component.html +++ b/src/app/components/background/background.component.html @@ -49,7 +49,7 @@ diff --git a/src/app/components/background/twitter.com/unb_tv b/src/app/components/background/twitter.com/unb_tv new file mode 100644 index 00000000..e69de29b From e8e0bc01940658b4de4b8f4fbf832cb1495953bf Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Wed, 15 Nov 2023 22:15:29 -0300 Subject: [PATCH 05/16] Adiciona efeito de cursor aos itens do header --- .../components/background/background.component.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/components/background/background.component.html b/src/app/components/background/background.component.html index bd610904..12b2ba65 100644 --- a/src/app/components/background/background.component.html +++ b/src/app/components/background/background.component.html @@ -5,13 +5,13 @@
-
Início
| -
Agora na TV
| -
Programação
| -
Transmissões
| -
Participe
+
Início
| +
Agora na TV
| +
Programação
| +
Transmissões
| +
Participe
- hamburguer + hamburguer
From 9ca7503a8c858dfb3cb3166644a17f8504b51b4f Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Wed, 15 Nov 2023 22:39:24 -0300 Subject: [PATCH 06/16] Remove icone de 'pauta' --- src/app/components/background/background.component.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app/components/background/background.component.html b/src/app/components/background/background.component.html index 12b2ba65..1ce3a450 100644 --- a/src/app/components/background/background.component.html +++ b/src/app/components/background/background.component.html @@ -18,11 +18,6 @@
-
- - form-unb - -
telefone From ca5ae2e18912d767a82f7eb837fd65cb3520a0d0 Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Thu, 16 Nov 2023 11:03:15 -0300 Subject: [PATCH 07/16] Adiciona teste para o componente de abrir menu --- .../background/background.component.spec.ts | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/app/components/background/background.component.spec.ts b/src/app/components/background/background.component.spec.ts index 53021daf..d7dcedf7 100644 --- a/src/app/components/background/background.component.spec.ts +++ b/src/app/components/background/background.component.spec.ts @@ -9,10 +9,9 @@ describe('BackgroundComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ BackgroundComponent ], - imports: [RouterTestingModule] - }) - .compileComponents(); + declarations: [BackgroundComponent], + imports: [RouterTestingModule], + }).compileComponents(); fixture = TestBed.createComponent(BackgroundComponent); component = fixture.componentInstance; @@ -22,4 +21,20 @@ describe('BackgroundComponent', () => { it('should create', () => { expect(component).toBeTruthy(); }); + + it('should initialize isMenuOpened to false', () => { + expect(component.isMenuOpened).toBe(false); + }); + + it('should toggle isMenuOpened when toggleMenu is called', () => { + expect(component.isMenuOpened).toBe(false); + + component.toggleMenu(); + + expect(component.isMenuOpened).toBe(true); + + component.toggleMenu(); + + expect(component.isMenuOpened).toBe(false); + }); }); From ec53bbc85d6ee11a9a32a66c0fed4d2fec546585 Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Sat, 18 Nov 2023 19:16:59 -0300 Subject: [PATCH 08/16] Remove item do footer --- src/app/components/background/background.component.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app/components/background/background.component.html b/src/app/components/background/background.component.html index 820a6c50..bbbac5f5 100644 --- a/src/app/components/background/background.component.html +++ b/src/app/components/background/background.component.html @@ -36,11 +36,6 @@
-
telefone From 340ede12e3c701b19266bdfd6545a9549eab2204 Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Sat, 18 Nov 2023 19:17:42 -0300 Subject: [PATCH 09/16] =?UTF-8?q?Remove=20teste=20de=20m=C3=A9todo=20n?= =?UTF-8?q?=C3=A3o=20utilizado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../background/background.component.spec.ts | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/app/components/background/background.component.spec.ts b/src/app/components/background/background.component.spec.ts index eff25c22..9f001727 100644 --- a/src/app/components/background/background.component.spec.ts +++ b/src/app/components/background/background.component.spec.ts @@ -11,9 +11,8 @@ describe('BackgroundComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [BackgroundComponent], - imports: [RouterTestingModule, MenuModule] - }) - .compileComponents(); + imports: [RouterTestingModule, MenuModule], + }).compileComponents(); fixture = TestBed.createComponent(BackgroundComponent); component = fixture.componentInstance; @@ -24,19 +23,4 @@ describe('BackgroundComponent', () => { expect(component).toBeTruthy(); }); - it('should initialize isMenuOpened to false', () => { - expect(component.isMenuOpened).toBe(false); - }); - - it('should toggle isMenuOpened when toggleMenu is called', () => { - expect(component.isMenuOpened).toBe(false); - - component.toggleMenu(); - - expect(component.isMenuOpened).toBe(true); - - component.toggleMenu(); - - expect(component.isMenuOpened).toBe(false); - }); }); From 376bdb87360787806e6b0495a37a27bbdd980473 Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Sat, 18 Nov 2023 22:28:03 -0300 Subject: [PATCH 10/16] =?UTF-8?q?Remove=20importa=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.module.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 297ed451..c3ccacb2 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -5,7 +5,7 @@ import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { ReactiveFormsModule } from '@angular/forms'; import { ToastModule } from 'primeng/toast'; import { ConfirmDialogModule } from 'primeng/confirmdialog'; -import { ConfirmationService } from 'primeng/api'; +import { ConfirmationService, MessageService } from 'primeng/api'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { OAuthModule, OAuthStorage } from 'angular-oauth2-oidc'; import { InputTextModule } from 'primeng/inputtext'; @@ -34,7 +34,6 @@ import { MenuModule } from 'primeng/menu'; import { VideoCommentComponent } from './components/video-comment/video-comment.component'; import { SuggestAgendaComponent } from './pages/suggest-agenda/suggest-agenda.component'; import { ParticipateComponent } from './pages/participate/participate.component'; -import { MessageService } from 'primeng/api'; @NgModule({ imports: [ @@ -65,8 +64,6 @@ import { MessageService } from 'primeng/api'; ResetPasswordComponent, CheckCodeRestPasswordComponent, EditUserComponent, - AgoraComponent, - ProgramacaoComponent, SuggestAgendaComponent, ParticipateComponent, VideoCommentComponent, @@ -85,4 +82,4 @@ import { MessageService } from 'primeng/api'; ], bootstrap: [AppComponent], }) -export class AppModule { } +export class AppModule {} From 19f1eab303fea8f11e3cc877520ce882a63988a6 Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Sat, 18 Nov 2023 22:32:09 -0300 Subject: [PATCH 11/16] =?UTF-8?q?Acrescenta=20comportamentos=20para=20?= =?UTF-8?q?=C3=ADcone=20de=20telefone=20em=20diferentes=20dispositivos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../background/background.component.html | 24 ++++++++-------- .../background/background.component.ts | 28 ++++++++++++++----- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/src/app/components/background/background.component.html b/src/app/components/background/background.component.html index bbbac5f5..55788450 100644 --- a/src/app/components/background/background.component.html +++ b/src/app/components/background/background.component.html @@ -32,39 +32,41 @@
-
+
-
- diff --git a/src/app/components/background/background.component.ts b/src/app/components/background/background.component.ts index 80ce1d0e..34f00dee 100644 --- a/src/app/components/background/background.component.ts +++ b/src/app/components/background/background.component.ts @@ -1,26 +1,40 @@ import { Component, OnInit } from '@angular/core'; import { MenuItem, MessageService } from 'primeng/api'; - @Component({ selector: 'app-background', templateUrl: './background.component.html', styleUrls: ['./background.component.css'], - providers: [MessageService] + providers: [MessageService], }) export class BackgroundComponent implements OnInit { items: MenuItem[] = []; + mobileDevide: boolean = true; - constructor( - ) { } + constructor() {} ngOnInit(): void { this.items = [ { label: 'Perfil', - routerLink: '/profile' - } - ] + routerLink: '/profile', + }, + ]; + this.identifiesUserDevice(); } + identifiesUserDevice(): void { + if ( + RegExp(/Android/i).exec(navigator.userAgent) || + RegExp(/iPhone/i).exec(navigator.userAgent) || + RegExp(/iPad/i).exec(navigator.userAgent) || + RegExp(/iPod/i).exec(navigator.userAgent) || + RegExp(/BlackBerry/i).exec(navigator.userAgent) || + RegExp(/Windows Phone/i).exec(navigator.userAgent) + ) { + this.mobileDevide = true; // está utilizando dispositivo móvel + } else { + this.mobileDevide = false; + } + } } From 823aa9ac7e1dab2f79f63efba4c0d933adb583ad Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Sun, 19 Nov 2023 09:36:50 -0300 Subject: [PATCH 12/16] =?UTF-8?q?Testa=20m=C3=A9todo=20que=20identifica=20?= =?UTF-8?q?=20o=20dispositivo=20do=20usu=C3=A1rio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../background/background.component.spec.ts | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/src/app/components/background/background.component.spec.ts b/src/app/components/background/background.component.spec.ts index 9f001727..a9058ab1 100644 --- a/src/app/components/background/background.component.spec.ts +++ b/src/app/components/background/background.component.spec.ts @@ -23,4 +23,96 @@ describe('BackgroundComponent', () => { expect(component).toBeTruthy(); }); + describe('Identifies User Device', () => { + it('should identify a mobile device - Android', () => { + // mock userAgent for Android + Object.defineProperty(navigator, 'userAgent', { + value: + 'Mozilla/5.0 (Linux; Android 10; Pixel 3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Mobile Safari/537.36', + configurable: true, + writable: true, + }); + + component.identifiesUserDevice(); + expect(component.mobileDevide).toBeTruthy(); + }); + + it('should identify a mobile device - iPhone', () => { + // mock userAgent for iPhone + Object.defineProperty(navigator, 'userAgent', { + value: + 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.3 Mobile/15E148 Safari/604.1', + configurable: true, + writable: true, + }); + + component.identifiesUserDevice(); + expect(component.mobileDevide).toBeTruthy(); + }); + + it('should identify a mobile device - iPad', () => { + // mock userAgent for iPad + Object.defineProperty(navigator, 'userAgent', { + value: + 'Mozilla/5.0 (iPad; CPU OS 14_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Mobile/15E148 Safari/604.1', + configurable: true, + writable: true, + }); + + component.identifiesUserDevice(); + expect(component.mobileDevide).toBeTruthy(); + }); + + it('should identify a mobile device - iPod', () => { + // mock userAgent for iPod + Object.defineProperty(navigator, 'userAgent', { + value: + 'Mozilla/5.0 (iPod; CPU iPhone OS 14_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Mobile/15E148 Safari/604.1', + configurable: true, + writable: true, + }); + + component.identifiesUserDevice(); + expect(component.mobileDevide).toBeTruthy(); + }); + + it('should identify a mobile device - Windows Phone', () => { + // mock userAgent for Windows Phone + Object.defineProperty(navigator, 'userAgent', { + value: + 'Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; Microsoft; Lumia 950 XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Mobile Safari/537.36 Edge/13.10586', + configurable: true, + writable: true, + }); + + component.identifiesUserDevice(); + expect(component.mobileDevide).toBeTruthy(); + }); + + it('should identify a mobile device - BlackBerry', () => { + // mock userAgent for BlackBerry + Object.defineProperty(navigator, 'userAgent', { + value: + 'Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+', + configurable: true, + writable: true, + }); + + component.identifiesUserDevice(); + expect(component.mobileDevide).toBeTruthy(); + }); + + it('should identify a non-mobile device', () => { + // mock userAgent + Object.defineProperty(navigator, 'userAgent', { + value: + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 OPR/104.0.0.0 (Edition std-1)', + configurable: true, + writable: true, + }); + + component.identifiesUserDevice(); + expect(component.mobileDevide).toBeFalsy(); + }); + }); }); From e12eee928339a45b0cb4fd47aa253c27fa30c2f7 Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Sun, 19 Nov 2023 09:49:37 -0300 Subject: [PATCH 13/16] =?UTF-8?q?Remove=20arquivos=20n=C3=A3o=20utlizados?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/background/twitter.com/unb_tv | 0 .../transmissoes/transmissoes.component.css | 0 .../transmissoes/transmissoes.component.html | 1 - .../transmissoes.component.spec.ts | 23 ------------------- .../transmissoes/transmissoes.component.ts | 11 --------- 5 files changed, 35 deletions(-) delete mode 100644 src/app/components/background/twitter.com/unb_tv delete mode 100644 src/app/pages/transmissoes/transmissoes.component.css delete mode 100644 src/app/pages/transmissoes/transmissoes.component.html delete mode 100644 src/app/pages/transmissoes/transmissoes.component.spec.ts delete mode 100644 src/app/pages/transmissoes/transmissoes.component.ts diff --git a/src/app/components/background/twitter.com/unb_tv b/src/app/components/background/twitter.com/unb_tv deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/pages/transmissoes/transmissoes.component.css b/src/app/pages/transmissoes/transmissoes.component.css deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/pages/transmissoes/transmissoes.component.html b/src/app/pages/transmissoes/transmissoes.component.html deleted file mode 100644 index 36d26117..00000000 --- a/src/app/pages/transmissoes/transmissoes.component.html +++ /dev/null @@ -1 +0,0 @@ -

transmissoes works!

diff --git a/src/app/pages/transmissoes/transmissoes.component.spec.ts b/src/app/pages/transmissoes/transmissoes.component.spec.ts deleted file mode 100644 index 03f6da3a..00000000 --- a/src/app/pages/transmissoes/transmissoes.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { TransmissoesComponent } from './transmissoes.component'; - -describe('TransmissoesComponent', () => { - let component: TransmissoesComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [TransmissoesComponent] - }) - .compileComponents(); - - fixture = TestBed.createComponent(TransmissoesComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/transmissoes/transmissoes.component.ts b/src/app/pages/transmissoes/transmissoes.component.ts deleted file mode 100644 index b76f82c9..00000000 --- a/src/app/pages/transmissoes/transmissoes.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-transmissoes', - templateUrl: './transmissoes.component.html', - styleUrls: ['./transmissoes.component.css'] - -}) -export class TransmissoesComponent { - -} From 953b7369b6b5bf75b205fffeec8ae3373d5ec261 Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Sun, 19 Nov 2023 10:01:51 -0300 Subject: [PATCH 14/16] Adiciona identificadores aos links --- .../components/background/background.component.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/components/background/background.component.html b/src/app/components/background/background.component.html index 55788450..cc1947f3 100644 --- a/src/app/components/background/background.component.html +++ b/src/app/components/background/background.component.html @@ -39,32 +39,32 @@ class="flex flex-row items-center justify-center gap-3 py-6 px-3 md:py-10 mt-5" > From 49a336819275f4c3a2c8689604bc094852e4155f Mon Sep 17 00:00:00 2001 From: GabrielaTiago Date: Sun, 19 Nov 2023 10:19:46 -0300 Subject: [PATCH 15/16] Adiciona propriedade 'rel' aos links --- .../background/background.component.html | 42 ++++++++++++++++--- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/src/app/components/background/background.component.html b/src/app/components/background/background.component.html index cc1947f3..313d363e 100644 --- a/src/app/components/background/background.component.html +++ b/src/app/components/background/background.component.html @@ -39,32 +39,62 @@ class="flex flex-row items-center justify-center gap-3 py-6 px-3 md:py-10 mt-5" > From 507ca482d900c84b9fda943984a252cb7d5ddec5 Mon Sep 17 00:00:00 2001 From: geraldovictor <32902812+geraldovictor@users.noreply.github.com> Date: Mon, 20 Nov 2023 09:53:29 -0300 Subject: [PATCH 16/16] Atualiza imports --- src/app/app.module.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index e327d9aa..4b2ccff0 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -38,7 +38,6 @@ import { SuggestAgendaComponent } from './pages/suggest-agenda/suggest-agenda.co import { ParticipateComponent } from './pages/participate/participate.component'; import { GridComponent } from './pages/grid/grid.component'; import { GridDaysComponent } from './pages/grid-days/grid-days.component'; -import { MessageService } from 'primeng/api'; import { ProgressSpinnerModule } from 'primeng/progressspinner'; @NgModule({