+ >
Entrevista com a Professora Carla Rocha (UnB) como parte do projeto Mulheres que Inspiram. Adeia surgiu através da leitura do texto Eu programo, tu programas, elx hackea: mulheres hackers e perspectivas tecnopolíticas e do interesse em dar visibilidade a mulheres que atuam na área de software livre e educação aberta. Transcrição do áudio disponível..em https://pt.wikiversity.org/wiki/Educa%C3%A7%C3%A3o_Aberta/Mulheres_que_inspiram
Disponível com uma licença CC-BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).
",
- "keywords": "mulheres, computação, professora, ciência da computação, gênero",
- "visibility": "PUBLIC",
- "duration": 508459,
- "generateLibras": true,
- "generateSubtitle": true,
- "qtAccess": 36,
- "qtLikes": 0,
- "images": [
- {
- "type": "DEFAULT",
- "href": "https://eduplay.rnp.br/portal/assets/videos/images/1679168690066.jpg"
- }
- ],
- "userOwner": {
- "id": 44590,
- "name": "Tel Amiel",
- "avatar": "https://eduplay.rnp.br/portal/assets/users/images/1683107832084.jpg"
- }
- },
- {
- "id": 184760,
- "title": "Dia 4: Minicurso de Extensão - UnB - Racontez-nous votre histoire",
- "keywords": "mconf",
- "visibility": "PUBLIC",
- "duration": 5161003,
- "generateLibras": true,
- "generateSubtitle": true,
- "qtAccess": 24,
- "qtLikes": 0,
- "images": [
- {
- "type": "DEFAULT",
- "href": "https://eduplay.rnp.br/portal/assets/videos/images/1687455434581.png"
- }
- ],
- "userOwner": {
- "id": 45799,
- "name": "Denise Gisele de Britto Damasco"
- }
- },
- {
- "id": 184518,
- "title": "Dia 1: Minicurso de Extensão - UnB - Présentation Denise Damasco",
- "keywords": "mconf",
- "visibility": "PUBLIC",
- "duration": 3532366,
- "generateLibras": true,
- "generateSubtitle": true,
- "qtAccess": 24,
- "qtLikes": 0,
- "images": [
- {
- "type": "DEFAULT",
- "href": "https://eduplay.rnp.br/portal/assets/videos/images/1686872273578.png"
- }
- ],
- "userOwner": {
- "id": 45799,
- "name": "Denise Gisele de Britto Damasco"
- }
- },
- {
- "id": 111840,
- "title": "Aulas Síncronas ás 14 horas as terças-feiras e quintas-feiras",
- "description": "Aulas Síncronas ás 14 horas as terças-feiras e quintas-feiras",
- "keywords": "Aulas Síncronas ás 14 horas as terças-feiras e quintas-feiras",
- "visibility": "PUBLIC",
- "duration": 6111573,
- "generateLibras": true,
- "generateSubtitle": true,
- "qtAccess": 38,
- "qtLikes": 0,
- "images": [
- {
- "type": "DEFAULT",
- "href": "https://eduplay.rnp.br/portal/assets/videos/images/1621608406505.png"
- }
- ],
- "userOwner": {
- "id": 28703,
- "name": "Jorlandio Francisco Felix"
- }
- },
- {
- "id": 141981,
- "title": "Liliane Campos Machado",
- "description": "Liliane Campos Machado",
- "keywords": "Liliane Campos Machado",
- "visibility": "PUBLIC",
- "duration": 6482260,
- "generateLibras": true,
- "generateSubtitle": true,
- "qtAccess": 162,
- "qtLikes": 0,
- "images": [
- {
- "type": "DEFAULT",
- "href": "https://eduplay.rnp.br/portal/assets/videos/images/1629828306049.png"
- }
- ],
- "userOwner": {
- "id": 29754,
- "name": "Liliane Campos Machado"
- }
- },
- {
- "id": 111535,
- "title": "NTE videoconferências",
- "description": "NTE videoconferências",
- "keywords": "NTE videoconferências",
- "visibility": "PUBLIC",
- "duration": 7508000,
- "generateLibras": true,
- "generateSubtitle": true,
- "qtAccess": 73,
- "qtLikes": 0,
- "images": [
- {
- "type": "DEFAULT",
- "href": "https://eduplay.rnp.br/portal/assets/videos/images/1621383436732.png"
- }
- ],
- "userOwner": {
- "id": 19994,
- "name": "Endryl Francelino de Souza"
- }
- },
- {
- "id": 184759,
- "title": "Dia 3: Minicurso de Extensão - UnB - Racontez-nous votre histoire",
- "keywords": "mconf",
- "visibility": "PUBLIC",
- "duration": 5175560,
- "generateLibras": true,
- "generateSubtitle": true,
- "qtAccess": 24,
- "qtLikes": 0,
- "images": [
- {
- "type": "DEFAULT",
- "href": "https://eduplay.rnp.br/portal/assets/videos/images/1687454416354.png"
- }
- ],
- "userOwner": {
- "id": 45799,
- "name": "Denise Gisele de Britto Damasco"
- }
- },
- {
- "id": 179217,
- "title": "Patricia Tuxi dos Santos",
- "description": "Patricia Tuxi dos Santos",
- "keywords": "Patricia Tuxi dos Santos",
- "visibility": "PUBLIC",
- "duration": 109163,
- "generateLibras": true,
- "generateSubtitle": true,
- "qtAccess": 42,
- "qtLikes": 0,
- "images": [
- {
- "type": "DEFAULT",
- "href": "https://eduplay.rnp.br/portal/assets/videos/images/1675876887636.png"
- }
- ],
- "userOwner": {
- "id": 44725,
- "name": "Patricia Tuxi dos Santos"
- }
- },
- {
- "id": 142458,
- "title": "Sala de Reunião 04 do NTE",
- "description": "Sala de Reunião 04 do NTE",
- "keywords": "Sala de Reunião 04 do NTE",
- "visibility": "PUBLIC",
- "duration": 2750269,
- "generateLibras": true,
- "generateSubtitle": true,
- "qtAccess": 75,
- "qtLikes": 0,
- "images": [
- {
- "type": "DEFAULT",
- "href": "https://eduplay.rnp.br/portal/assets/videos/images/1630088527294.png"
- }
- ],
- "userOwner": {
- "id": 30684,
- "name": "Fabio Ferreira de Oliveira"
- }
- }
- ]
-};
+const mockData: IVideo[] = [
+ {
+ id: 190985,
+ title: 'Esboços: Luiz Gallina',
+ description:
+ '
A curiosidade de Luiz Gallina em descobrir e entender como mecanismos e processos funcionam dá origem a uma obra composta por gravuras, pinturas e esculturas - abordando temas tão diversos quanto as árvores da paisagem de Brasília, a alquimia e os sonhos colecionados de forma escrita pelo artista durante anos.
',
+ keywords: 'Esboços; Luiz Gallina; UnBTV;',
+ visibility: 'PUBLIC',
+ duration: 1527827,
+ embed:
+ '
',
+ generateLibras: true,
+ generateSubtitle: true,
+ qtAccess: 20,
+ qtLikes: 0,
+ images: [
+ {
+ type: 'DEFAULT',
+ href: 'https://eduplay.rnp.br/portal/assets/videos/images/1699445118833.jpg',
+ },
+ ],
+ channels: [
+ {
+ id: 190265,
+ name: 'UnBTV',
+ },
+ ],
+ },
+ {
+ id: 190984,
+ title: 'Esboços: Ricardo Caldeira',
+ description:
+ '
Quando Ricardo Caldeira desenha parece dançar imprimindo na tela um traço marcante que fala sobre afeto, negritude, ancestralidade. Aqui o artista relembra sua infância e adolescência, os primeiros trabalhos e a relação com a região de São Sebastião, local que o influenciou e que hoje ele transforma por meio da participação em coletivos culturais.
',
+ keywords: 'Esboços; Ricardo Caldeira; UnBTV;',
+ visibility: 'PUBLIC',
+ duration: 1525621,
+ embed:
+ '
',
+ generateLibras: true,
+ generateSubtitle: true,
+ qtAccess: 14,
+ qtLikes: 0,
+ images: [
+ {
+ type: 'DEFAULT',
+ href: 'https://eduplay.rnp.br/portal/assets/videos/images/1699445004278.jpg',
+ },
+ ],
+ channels: [
+ {
+ id: 190265,
+ name: 'UnBTV',
+ },
+ ],
+ },
+ {
+ id: 190334,
+ title: 'Esboços | Fernanda Pacca',
+ description:
+ '
Confetes, braçadeiras de náilon, botões, linhas de costuras compõe a palheta de cores que constroem surpreendentes figuras humanas na obra de Fernanda Pacca. Trabalhos que impressionam pela forma e abordam diversos temas como o fascínio pelo anatomia, a repressão - tanto estética quanto social - e a violência contra a mulher.
',
+ keywords: 'Fernanda Pacca; Esboços; unbtv;',
+ visibility: 'PUBLIC',
+ duration: 1550174,
+ embed:
+ '
',
+ generateLibras: true,
+ generateSubtitle: true,
+ qtAccess: 15,
+ qtLikes: 0,
+ images: [
+ {
+ type: 'DEFAULT',
+ href: 'https://eduplay.rnp.br/portal/assets/videos/images/1698243181940.jpg',
+ },
+ ],
+ channels: [
+ {
+ id: 190265,
+ name: 'UnBTV',
+ },
+ ],
+ },
+ {
+ id: 190333,
+ title: 'Esboços | Valéria Pena-Costa',
+ description:
+ '
Poeira, insetos, objetos em deterioração são, ao mesmo tempo, tema e matéria-prima para a obra de Valéria Pena-Costa em um trabalho que reflete a inevitável passagem do tempo, as memórias de infância, os medos passados e presentes em diferentes formas de expressão.
',
+ keywords: 'Valéria Pena-Costa; Esboços; unbtv;',
+ visibility: 'PUBLIC',
+ duration: 1547193,
+ embed:
+ '
',
+ generateLibras: true,
+ generateSubtitle: true,
+ qtAccess: 23,
+ qtLikes: 0,
+ images: [
+ {
+ type: 'DEFAULT',
+ href: 'https://eduplay.rnp.br/portal/assets/videos/images/1698243362095.jpg',
+ },
+ ],
+ channels: [
+ {
+ id: 190265,
+ name: 'UnBTV',
+ },
+ ],
+ },
+ {
+ id: 190324,
+ title: 'Esboços: TNHA',
+ description:
+ '
A busca por uma identidade que integre raízes negras, indígenas e latino-americanas cria uma obra que resgata ancestralidade, de olho sempre nas injustiças históricas. Seja espalhando rostos em grafites pelo Distrito Federal para suavizar o caminho de todo dia; seja tatuando ou fazendo ilustrações, TNHA tem um traço singular que carrega todo um aprendizado de andanças por diferentes comunidades e vivências familiares.
',
+ keywords: 'esboços; Tnha; unbtv;',
+ visibility: 'PUBLIC',
+ duration: 1550383,
+ embed:
+ '
',
+ generateLibras: true,
+ generateSubtitle: true,
+ qtAccess: 14,
+ qtLikes: 0,
+ images: [
+ {
+ type: 'DEFAULT',
+ href: 'https://eduplay.rnp.br/portal/assets/videos/images/1698146507222.jpg',
+ },
+ ],
+ channels: [
+ {
+ id: 190265,
+ name: 'UnBTV',
+ },
+ ],
+ },
+];
class VideoServiceMock {
- constructor() { }
- findAll() {
+ getVideosCatalog() {
return of(mockData);
}
}
@@ -239,39 +155,50 @@ describe('VideoComponent', () => {
let component: VideoComponent;
let fixture: ComponentFixture
;
let videoService: VideoService;
+ let router: Router;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [VideoComponent],
imports: [HttpClientTestingModule],
- providers: [{ provide: VideoService, useValue: new VideoServiceMock() }]
- })
- .compileComponents();
+ providers: [{ provide: VideoService, useValue: new VideoServiceMock() }],
+ }).compileComponents();
fixture = TestBed.createComponent(VideoComponent);
component = fixture.componentInstance;
videoService = TestBed.inject(VideoService);
+ router = TestBed.inject(Router);
});
it('should create', () => {
expect(component).toBeTruthy();
});
- it('shoud call findAll', () => {
- spyOn(component, 'findAll');
+ it('should call getVideos ', () => {
+ spyOn(component, 'getVideos');
fixture.detectChanges();
- expect(component.findAll).toHaveBeenCalled();
- })
+ expect(component.getVideos).toHaveBeenCalled();
+ });
- it('should call findAll and return a list of videos', () => {
- const mySpy = spyOn(videoService, 'findAll').and.callThrough();
- component.findAll();
+ it('should call getVideos and return a list of videos', () => {
+ const mySpy = spyOn(component, 'getVideos').and.callThrough();
+ component.getVideos();
expect(mySpy).toHaveBeenCalled();
+ expect(component.unbTvVideos).toEqual(mockData);
});
- it('should call findAll and return an error', () => {
- const mySpy = spyOn(videoService, 'findAll').and.returnValue(throwError(() => new Error('Erro')));
- component.findAll();
+ it('should call getVideos and return an error', () => {
+ const mySpy = spyOn(videoService, 'getVideosCatalog').and.returnValue(
+ throwError(() => new Error('Erro'))
+ );
+ component.getVideos();
+ expect(component.unbTvVideos).toEqual([]);
expect(mySpy).toHaveBeenCalled();
});
+
+ it('should call returnToCatalog when the button is clicked', () => {
+ const navigateSpy = spyOn(router, 'navigate');
+ component.returnToCatalog();
+ expect(navigateSpy).toHaveBeenCalledWith(['/catalog']);
+ });
});
diff --git a/src/app/pages/video/video.component.ts b/src/app/pages/video/video.component.ts
index dcff846d..d7ba5837 100644
--- a/src/app/pages/video/video.component.ts
+++ b/src/app/pages/video/video.component.ts
@@ -1,33 +1,34 @@
import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
import { VideoService } from '../../services/video.service';
import { IVideo } from 'src/shared/model/video.model';
-import { HttpErrorResponse, HttpResponse } from '@angular/common/http';
-import { IEduplayVideosByInstitution } from 'src/shared/model/eduplay-by-institution.model';
@Component({
selector: 'app-video',
templateUrl: './video.component.html',
styleUrls: ['./video.component.css'],
})
-
export class VideoComponent implements OnInit {
- videosEduplay: IVideo[] = [];
+ unbTvVideos: IVideo[] = [];
- constructor(private videoService: VideoService) { }
+ constructor(private videoService: VideoService, private router: Router) {}
ngOnInit(): void {
- this.findAll();
+ this.getVideos();
}
- findAll(): void {
- this.videoService.findAll().subscribe({
- next: (data) => {
- this.videosEduplay = data.body?.videoList || [];
+ getVideos(): void {
+ this.videoService.getVideosCatalog().subscribe({
+ next: (videos) => {
+ this.unbTvVideos = videos;
},
error: (error) => {
- console.log(error);
+ console.error(error);
},
- }
- );
+ });
+ }
+
+ returnToCatalog(): void {
+ this.router.navigate(['/catalog']);
}
}
diff --git a/src/app/services/auth.service.spec.ts b/src/app/services/auth.service.spec.ts
index f5736b2e..83b00de8 100644
--- a/src/app/services/auth.service.spec.ts
+++ b/src/app/services/auth.service.spec.ts
@@ -118,10 +118,24 @@ describe('AuthService', () => {
req.flush(userResponse);
});
+ it('should refresh token', () => {
+ const dummyResponse = { access_token: 'dummyToken' };
+
+ service.refreshToken().subscribe(res => {
+ expect(res).toEqual(dummyResponse);
+ });
+
+ const req = httpMock.expectOne(`${service.usersAPIURL}/auth/refresh`);
+ expect(req.request.method).toBe('POST');
+ req.flush(dummyResponse);
+ });
+
it('should logout', () => {
localStorage.setItem('token', 'testtoken');
+ const navigateSpy = spyOn(service['router'], 'navigate');
service.logout();
expect(localStorage.getItem('token')).toBeNull();
+ expect(navigateSpy).toHaveBeenCalledWith(['/loginsocial']);
});
-
+
});
diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts
index c91004b4..6a2bd524 100644
--- a/src/app/services/auth.service.ts
+++ b/src/app/services/auth.service.ts
@@ -21,6 +21,10 @@ export class AuthService {
return this.http.post(`${this.usersAPIURL}/auth/login`, user);
}
+ loginSocialUser(userSocialData: any): Observable {
+ return this.http.post(`${this.usersAPIURL}/auth/login/social`, userSocialData);
+ }
+
activeAccount(emailCode: any): Observable {
return this.http.patch(`${this.usersAPIURL}/auth/activate-account`, emailCode);
}
@@ -45,9 +49,13 @@ export class AuthService {
const token = localStorage.getItem('token');
return !!token;
}
-
+
+ refreshToken(): Observable {
+ return this.http.post(`${this.usersAPIURL}/auth/refresh`, null);
+ }
+
logout(): void {
localStorage.removeItem('token');
- this.router.navigate(['/login']);
+ this.router.navigate(['/loginsocial']);
}
}
diff --git a/src/app/services/video.service.spec.ts b/src/app/services/video.service.spec.ts
index accb7896..465edd9d 100644
--- a/src/app/services/video.service.spec.ts
+++ b/src/app/services/video.service.spec.ts
@@ -3,9 +3,153 @@ import {
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
-import { EDUPLAY_API_URL, UNB_ID } from 'src/app/app.constant';
+import {
+ EDUPLAY_API_URL,
+ UNB_ID,
+ VIDEOS_LIMIT,
+ VIDEOS_ORDER,
+} from 'src/app/app.constant';
import { EDUPLAY_CLIENT_KEY } from '../environment/environment';
import { VideoService } from './video.service';
+import { IVideo } from 'src/shared/model/video.model';
+
+const mockData: IVideo[] = [
+ {
+ id: 190985,
+ title: 'Esboços: Luiz Gallina',
+ description:
+ '
A curiosidade de Luiz Gallina em descobrir e entender como mecanismos e processos funcionam dá origem a uma obra composta por gravuras, pinturas e esculturas - abordando temas tão diversos quanto as árvores da paisagem de Brasília, a alquimia e os sonhos colecionados de forma escrita pelo artista durante anos.
',
+ keywords: 'Esboços; Luiz Gallina; UnBTV;',
+ visibility: 'PUBLIC',
+ duration: 1527827,
+ embed:
+ '',
+ generateLibras: true,
+ generateSubtitle: true,
+ qtAccess: 20,
+ qtLikes: 0,
+ images: [
+ {
+ type: 'DEFAULT',
+ href: 'https://eduplay.rnp.br/portal/assets/videos/images/1699445118833.jpg',
+ },
+ ],
+ channels: [
+ {
+ id: 190265,
+ name: 'UnBTV',
+ },
+ ],
+ },
+ {
+ id: 190984,
+ title: 'Esboços: Ricardo Caldeira',
+ description:
+ '
Quando Ricardo Caldeira desenha parece dançar imprimindo na tela um traço marcante que fala sobre afeto, negritude, ancestralidade. Aqui o artista relembra sua infância e adolescência, os primeiros trabalhos e a relação com a região de São Sebastião, local que o influenciou e que hoje ele transforma por meio da participação em coletivos culturais.
',
+ keywords: 'Esboços; Ricardo Caldeira; UnBTV;',
+ visibility: 'PUBLIC',
+ duration: 1525621,
+ embed:
+ '',
+ generateLibras: true,
+ generateSubtitle: true,
+ qtAccess: 14,
+ qtLikes: 0,
+ images: [
+ {
+ type: 'DEFAULT',
+ href: 'https://eduplay.rnp.br/portal/assets/videos/images/1699445004278.jpg',
+ },
+ ],
+ channels: [
+ {
+ id: 190265,
+ name: 'UnBTV',
+ },
+ ],
+ },
+ {
+ id: 190334,
+ title: 'Esboços | Fernanda Pacca',
+ description:
+ '
Confetes, braçadeiras de náilon, botões, linhas de costuras compõe a palheta de cores que constroem surpreendentes figuras humanas na obra de Fernanda Pacca. Trabalhos que impressionam pela forma e abordam diversos temas como o fascínio pelo anatomia, a repressão - tanto estética quanto social - e a violência contra a mulher.
',
+ keywords: 'Fernanda Pacca; Esboços; unbtv;',
+ visibility: 'PUBLIC',
+ duration: 1550174,
+ embed:
+ '',
+ generateLibras: true,
+ generateSubtitle: true,
+ qtAccess: 15,
+ qtLikes: 0,
+ images: [
+ {
+ type: 'DEFAULT',
+ href: 'https://eduplay.rnp.br/portal/assets/videos/images/1698243181940.jpg',
+ },
+ ],
+ channels: [
+ {
+ id: 190265,
+ name: 'UnBTV',
+ },
+ ],
+ },
+ {
+ id: 190333,
+ title: 'Esboços | Valéria Pena-Costa',
+ description:
+ '
Poeira, insetos, objetos em deterioração são, ao mesmo tempo, tema e matéria-prima para a obra de Valéria Pena-Costa em um trabalho que reflete a inevitável passagem do tempo, as memórias de infância, os medos passados e presentes em diferentes formas de expressão.
',
+ keywords: 'Valéria Pena-Costa; Esboços; unbtv;',
+ visibility: 'PUBLIC',
+ duration: 1547193,
+ embed:
+ '',
+ generateLibras: true,
+ generateSubtitle: true,
+ qtAccess: 23,
+ qtLikes: 0,
+ images: [
+ {
+ type: 'DEFAULT',
+ href: 'https://eduplay.rnp.br/portal/assets/videos/images/1698243362095.jpg',
+ },
+ ],
+ channels: [
+ {
+ id: 190265,
+ name: 'UnBTV',
+ },
+ ],
+ },
+ {
+ id: 190324,
+ title: 'Esboços: TNHA',
+ description:
+ '
A busca por uma identidade que integre raízes negras, indígenas e latino-americanas cria uma obra que resgata ancestralidade, de olho sempre nas injustiças históricas. Seja espalhando rostos em grafites pelo Distrito Federal para suavizar o caminho de todo dia; seja tatuando ou fazendo ilustrações, TNHA tem um traço singular que carrega todo um aprendizado de andanças por diferentes comunidades e vivências familiares.
',
+ keywords: 'esboços; Tnha; unbtv;',
+ visibility: 'PUBLIC',
+ duration: 1550383,
+ embed:
+ '',
+ generateLibras: true,
+ generateSubtitle: true,
+ qtAccess: 14,
+ qtLikes: 0,
+ images: [
+ {
+ type: 'DEFAULT',
+ href: 'https://eduplay.rnp.br/portal/assets/videos/images/1698146507222.jpg',
+ },
+ ],
+ channels: [
+ {
+ id: 190265,
+ name: 'UnBTV',
+ },
+ ],
+ },
+];
describe('VideoService', () => {
let service: VideoService;
@@ -269,7 +413,7 @@ describe('VideoService', () => {
});
const req = httpMock.expectOne(
- `${EDUPLAY_API_URL}video?institution=${UNB_ID}`
+ `${EDUPLAY_API_URL}video?institution=${UNB_ID}&limit=${VIDEOS_LIMIT}&order=${VIDEOS_ORDER}`
);
expect(req.request.method).toBe('GET');
expect(req.request.headers.get('clientkey')).toBe(EDUPLAY_CLIENT_KEY);
@@ -331,4 +475,27 @@ describe('VideoService', () => {
req.flush(mockData);
});
});
+
+ describe('setVideosCatalog', () => {
+ it('should set videos catalog', () => {
+ const mockVideos = mockData;
+
+ service.setVideosCatalog(mockVideos);
+
+ service.getVideosCatalog().subscribe((videos) => {
+ expect(videos).toEqual(mockVideos);
+ });
+ });
+ });
+
+ describe('getVideosCatalog', () => {
+ it('should get videos catalog', () => {
+ const mockVideos = mockData;
+ service.setVideosCatalog(mockVideos);
+
+ service.getVideosCatalog().subscribe((videos) => {
+ expect(videos).toEqual(mockVideos);
+ });
+ });
+ });
});
diff --git a/src/app/services/video.service.ts b/src/app/services/video.service.ts
index 896b483b..95b7964c 100644
--- a/src/app/services/video.service.ts
+++ b/src/app/services/video.service.ts
@@ -1,17 +1,19 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
-import { Observable } from 'rxjs';
-import { EDUPLAY_API_URL, UNB_ID } from 'src/app/app.constant';
+import { BehaviorSubject, Observable } from 'rxjs';
+import {
+ EDUPLAY_API_URL,
+ UNB_ID,
+ VIDEOS_LIMIT,
+ VIDEOS_ORDER,
+} from 'src/app/app.constant';
import { IVideo } from 'src/shared/model/video.model';
import { IEduplayVideosByInstitution } from 'src/shared/model/eduplay-by-institution.model';
-import { IVideoVersion } from 'src/shared/model/video-version.model';
import { EDUPLAY_CLIENT_KEY } from '../environment/environment';
type VideoResponseType = HttpResponse;
-type VideoArrayResponseType = HttpResponse;
type EduplayByInstitutionResponseType =
HttpResponse;
-type VideoVersionResponseType = HttpResponse;
@Injectable({
providedIn: 'root',
@@ -20,13 +22,16 @@ export class VideoService {
public resourceUrl = EDUPLAY_API_URL + 'video';
public eduplayClientKey = EDUPLAY_CLIENT_KEY;
public unbId = UNB_ID;
+ public limit = VIDEOS_LIMIT;
+ public order = VIDEOS_ORDER;
+ private selectedCatalogProgram = new BehaviorSubject([]);
constructor(private http: HttpClient) {}
findAll(): Observable {
let headers = new HttpHeaders({ clientkey: this.eduplayClientKey });
return this.http.get(
- `${this.resourceUrl}?institution=${this.unbId}`,
+ `${this.resourceUrl}?institution=${this.unbId}&limit=${this.limit}&order=${this.order}`,
{ headers: headers, observe: 'response' }
);
}
@@ -39,4 +44,12 @@ export class VideoService {
observe: 'response',
});
}
+
+ setVideosCatalog(videos: IVideo[]) {
+ this.selectedCatalogProgram.next(videos);
+ }
+
+ getVideosCatalog(): Observable {
+ return this.selectedCatalogProgram.asObservable();
+ }
}
diff --git a/src/assets/email-svgrepo-com.svg b/src/assets/email-svgrepo-com.svg
new file mode 100644
index 00000000..5fa1e9e3
--- /dev/null
+++ b/src/assets/email-svgrepo-com.svg
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/src/assets/facebook-icon-white-png.png b/src/assets/facebook-icon-white-png.png
new file mode 100644
index 00000000..bade5046
Binary files /dev/null and b/src/assets/facebook-icon-white-png.png differ
diff --git a/src/assets/fonts/Helvetica-Bold.ttf b/src/assets/fonts/Helvetica-Bold.ttf
new file mode 100644
index 00000000..332b66ca
Binary files /dev/null and b/src/assets/fonts/Helvetica-Bold.ttf differ
diff --git a/src/assets/fonts/Helvetica.ttf b/src/assets/fonts/Helvetica.ttf
new file mode 100644
index 00000000..718f22d4
Binary files /dev/null and b/src/assets/fonts/Helvetica.ttf differ
diff --git a/src/assets/imgs/catalog-thumbs/1.Fala-Jovem.jpg b/src/assets/imgs/catalog-thumbs/1.Fala-Jovem.jpg
new file mode 100644
index 00000000..bb8f872a
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/1.Fala-Jovem.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/10.Explique-sua-Tese.jpg b/src/assets/imgs/catalog-thumbs/10.Explique-sua-Tese.jpg
new file mode 100644
index 00000000..4a67fb2f
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/10.Explique-sua-Tese.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/11.Fazendo-Ciencia-Formando-Cientistas.jpg b/src/assets/imgs/catalog-thumbs/11.Fazendo-Ciencia-Formando-Cientistas.jpg
new file mode 100644
index 00000000..b18c6e0c
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/11.Fazendo-Ciencia-Formando-Cientistas.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/12.Radar-da-Extensao.jpg b/src/assets/imgs/catalog-thumbs/12.Radar-da-Extensao.jpg
new file mode 100644
index 00000000..67d62f8e
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/12.Radar-da-Extensao.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/13.Se-Liga-no-PAS.jpg b/src/assets/imgs/catalog-thumbs/13.Se-Liga-no-PAS.jpg
new file mode 100644
index 00000000..27857f03
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/13.Se-Liga-no-PAS.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/14.UnBTV-Ciencia.png b/src/assets/imgs/catalog-thumbs/14.UnBTV-Ciencia.png
new file mode 100644
index 00000000..21f0bb75
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/14.UnBTV-Ciencia.png differ
diff --git a/src/assets/imgs/catalog-thumbs/15.Universidade-Para-Que.jpg b/src/assets/imgs/catalog-thumbs/15.Universidade-Para-Que.jpg
new file mode 100644
index 00000000..865b8467
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/15.Universidade-Para-Que.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/16.Emcantos.jpg b/src/assets/imgs/catalog-thumbs/16.Emcantos.jpg
new file mode 100644
index 00000000..4c05b48a
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/16.Emcantos.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/17.Casa-do-Som.jpg b/src/assets/imgs/catalog-thumbs/17.Casa-do-Som.jpg
new file mode 100644
index 00000000..c7a89779
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/17.Casa-do-Som.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/18.Esbocos.jpg b/src/assets/imgs/catalog-thumbs/18.Esbocos.jpg
new file mode 100644
index 00000000..1d24ab45
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/18.Esbocos.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/19.Exclusiva.jpg b/src/assets/imgs/catalog-thumbs/19.Exclusiva.jpg
new file mode 100644
index 00000000..41831288
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/19.Exclusiva.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/2.Informe-UnB.jpg b/src/assets/imgs/catalog-thumbs/2.Informe-UnB.jpg
new file mode 100644
index 00000000..41404142
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/2.Informe-UnB.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/20.Floresta-de-Gente.jpg b/src/assets/imgs/catalog-thumbs/20.Floresta-de-Gente.jpg
new file mode 100644
index 00000000..81a59152
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/20.Floresta-de-Gente.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/21.Guia-do-Calouro.jpg b/src/assets/imgs/catalog-thumbs/21.Guia-do-Calouro.jpg
new file mode 100644
index 00000000..9712a530
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/21.Guia-do-Calouro.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/22.Memorias-de-Paulo-Freire.jpg b/src/assets/imgs/catalog-thumbs/22.Memorias-de-Paulo-Freire.jpg
new file mode 100644
index 00000000..0e79e803
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/22.Memorias-de-Paulo-Freire.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/23.Os-desafios-das-eleicoes2022.jpg b/src/assets/imgs/catalog-thumbs/23.Os-desafios-das-eleicoes2022.jpg
new file mode 100644
index 00000000..dabdaf0a
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/23.Os-desafios-das-eleicoes2022.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/24.Podcast-Vida-de-Estudante.jpg b/src/assets/imgs/catalog-thumbs/24.Podcast-Vida-de-Estudante.jpg
new file mode 100644
index 00000000..afd9e8ec
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/24.Podcast-Vida-de-Estudante.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/25.Serie-Arquitetura.jpg b/src/assets/imgs/catalog-thumbs/25.Serie-Arquitetura.jpg
new file mode 100644
index 00000000..c28459fb
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/25.Serie-Arquitetura.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/26.Mini-Doc.jpg b/src/assets/imgs/catalog-thumbs/26.Mini-Doc.jpg
new file mode 100644
index 00000000..b16679ca
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/26.Mini-Doc.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/27.Documentarios.jpg b/src/assets/imgs/catalog-thumbs/27.Documentarios.jpg
new file mode 100644
index 00000000..80537600
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/27.Documentarios.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/28.Pitadas-do-Cerrado.jpg b/src/assets/imgs/catalog-thumbs/28.Pitadas-do-Cerrado.jpg
new file mode 100644
index 00000000..a2c5cc36
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/28.Pitadas-do-Cerrado.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/3.Zapping.jpg b/src/assets/imgs/catalog-thumbs/3.Zapping.jpg
new file mode 100644
index 00000000..45d61426
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/3.Zapping.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/4.Brasil-em-Questao.jpg b/src/assets/imgs/catalog-thumbs/4.Brasil-em-Questao.jpg
new file mode 100644
index 00000000..2053e3f5
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/4.Brasil-em-Questao.jpg differ
diff --git "a/src/assets/imgs/catalog-thumbs/5.Dia\314\201logos.jpg" "b/src/assets/imgs/catalog-thumbs/5.Dia\314\201logos.jpg"
new file mode 100644
index 00000000..df2be674
Binary files /dev/null and "b/src/assets/imgs/catalog-thumbs/5.Dia\314\201logos.jpg" differ
diff --git a/src/assets/imgs/catalog-thumbs/6.Tirando-de-Letra.jpg b/src/assets/imgs/catalog-thumbs/6.Tirando-de-Letra.jpg
new file mode 100644
index 00000000..eda8be79
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/6.Tirando-de-Letra.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/7.UnBTV-Entrevista.jpg b/src/assets/imgs/catalog-thumbs/7.UnBTV-Entrevista.jpg
new file mode 100644
index 00000000..65c387b0
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/7.UnBTV-Entrevista.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/8.Vasto-Mundo.jpg b/src/assets/imgs/catalog-thumbs/8.Vasto-Mundo.jpg
new file mode 100644
index 00000000..607d3bc8
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/8.Vasto-Mundo.jpg differ
diff --git a/src/assets/imgs/catalog-thumbs/9.Vozes-Diplomaticas.jpg b/src/assets/imgs/catalog-thumbs/9.Vozes-Diplomaticas.jpg
new file mode 100644
index 00000000..c7e212bf
Binary files /dev/null and b/src/assets/imgs/catalog-thumbs/9.Vozes-Diplomaticas.jpg differ
diff --git a/src/assets/share.png b/src/assets/share.png
new file mode 100644
index 00000000..65caca70
Binary files /dev/null and b/src/assets/share.png differ
diff --git a/src/shared/model/catalog.model.ts b/src/shared/model/catalog.model.ts
new file mode 100644
index 00000000..d532d81f
--- /dev/null
+++ b/src/shared/model/catalog.model.ts
@@ -0,0 +1,61 @@
+import { IVideo } from './video.model';
+
+export class Catalog {
+ journalism: Journalism = new Journalism();
+ interviews: Interviews = new Interviews();
+ researchAndScience: ResearchAndScience = new ResearchAndScience();
+ artAndCulture: ArtAndCulture = new ArtAndCulture();
+ specialSeries: SpecialSeries = new SpecialSeries();
+ documentaries: Documentaries = new Documentaries();
+ varieties: Varieties = new Varieties();
+ unbtv: IVideo[] = [];
+}
+
+class Journalism {
+ falaJovem: IVideo[] = [];
+ informeUnB: IVideo[] = [];
+ zapping: IVideo[] = [];
+}
+
+class Interviews {
+ brasilEmQuestao: IVideo[] = [];
+ dialogos: IVideo[] = [];
+ tirandoDeLetra: IVideo[] = [];
+ entrevistas: IVideo[] = [];
+ vastoMundo: IVideo[] = [];
+ vozesDiplomaticas: IVideo[] = [];
+}
+
+class ResearchAndScience {
+ expliqueSuaTese: IVideo[] = [];
+ fazendoCiencia: IVideo[] = [];
+ radarDaExtencao: IVideo[] = [];
+ seLigaNoPAS: IVideo[] = [];
+ unbTvCiencia: IVideo[] = [];
+ universidadeParaQue: IVideo[] = [];
+}
+
+class ArtAndCulture {
+ emCantos: IVideo[] = [];
+ casaDoSom: IVideo[] = [];
+ esbocos: IVideo[] = [];
+ exclusiva: IVideo[] = [];
+}
+
+class SpecialSeries {
+ florestaDeGente: IVideo[] = [];
+ guiaDoCalouro: IVideo[] = [];
+ memoriasPauloFreire: IVideo[] = [];
+ desafiosDasEleicoes: IVideo[] = [];
+ vidaDeEstudante: IVideo[] = [];
+ arquiteturaICC: IVideo[] = [];
+}
+
+class Documentaries {
+ miniDoc: IVideo[] = [];
+ documentaries: IVideo[] = [];
+}
+
+class Varieties {
+ pitadasDoCerrado: IVideo[] = [];
+}
diff --git a/src/shared/model/channel.model.ts b/src/shared/model/channel.model.ts
new file mode 100644
index 00000000..382f0623
--- /dev/null
+++ b/src/shared/model/channel.model.ts
@@ -0,0 +1,8 @@
+export interface IChannel {
+ id: number;
+ name: string;
+}
+
+export class Channel implements IChannel {
+ constructor(public id: number, public name: string) {}
+}
diff --git a/src/shared/model/video.model.ts b/src/shared/model/video.model.ts
index de3178a0..d35d3a2d 100644
--- a/src/shared/model/video.model.ts
+++ b/src/shared/model/video.model.ts
@@ -1,33 +1,36 @@
-import { IImage } from "./image.model";
+import { IChannel } from './channel.model';
+import { IImage } from './image.model';
export interface IVideo {
- id?: number;
- title?: string;
- description?: string;
- keywords?: string;
- visibility?: string;
- duration?: number;
- generateLibras?: boolean;
- generateSubtitle?: boolean;
- qtAccess?: number;
- qtLikes?: number;
- images?: IImage[];
- embed?: string;
+ id?: number;
+ title?: string;
+ description?: string;
+ keywords?: string;
+ visibility?: string;
+ duration?: number;
+ generateLibras?: boolean;
+ generateSubtitle?: boolean;
+ qtAccess?: number;
+ qtLikes?: number;
+ images?: IImage[];
+ embed?: string;
+ channels?: IChannel[];
}
export class Video implements IVideo {
- constructor(
- public id?: number,
- public title?: string,
- public description?: string,
- public keywords?: string,
- public visibility?: string,
- public duration?: number,
- public generateLibras?: boolean,
- public generateSubtitle?: boolean,
- public qtAccess?: number,
- public qtLikes?: number,
- public images?: IImage[],
- public embed?: string,
- ) { }
-}
\ No newline at end of file
+ constructor(
+ public id?: number,
+ public title?: string,
+ public description?: string,
+ public keywords?: string,
+ public visibility?: string,
+ public duration?: number,
+ public generateLibras?: boolean,
+ public generateSubtitle?: boolean,
+ public qtAccess?: number,
+ public qtLikes?: number,
+ public images?: IImage[],
+ public embed?: string,
+ public channels?: IChannel[]
+ ) {}
+}
diff --git a/tailwind.config.js b/tailwind.config.js
index 599586eb..bdad8f63 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -7,12 +7,13 @@ module.exports = {
custom: ["unb-pro", "sans-serif"],
},
backgroundColor: {
- 'blue-brand': '#0087C8',
+ "blue-brand": "#0087C8",
},
textColor: {
- 'blue-brand': '#0087C8',
+ "grey-brand": "#3c3c3b",
+ "blue-brand": "#0087C8",
},
},
plugins: [],
- }
-}
+ },
+};
diff --git a/tsconfig.app.json b/tsconfig.app.json
index 374cc9d2..f54aee6e 100644
--- a/tsconfig.app.json
+++ b/tsconfig.app.json
@@ -3,7 +3,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
- "types": []
+ "types": ["gapi", "gapi.auth2"]
},
"files": [
"src/main.ts"