Created unified file card component, recent videos component (not done) and started scaffolding work on the backend

This commit is contained in:
Isaac Grynsztein
2020-07-13 22:09:48 -04:00
parent d371ccf094
commit 4ebb2d4297
14 changed files with 310 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
<div>
<div class="container">
<div class="row justify-content-center">
<div *ngFor="let file of files" class="col-6 col-lg-4 mb-2 mt-2 file-col">
<app-unified-file-card [file_obj]="file"></app-unified-file-card>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,3 @@
.file-col {
max-width: 240px;
}

View File

@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RecentVideosComponent } from './recent-videos.component';
describe('RecentVideosComponent', () => {
let component: RecentVideosComponent;
let fixture: ComponentFixture<RecentVideosComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ RecentVideosComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(RecentVideosComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,29 @@
import { Component, OnInit } from '@angular/core';
import { PostsService } from 'app/posts.services';
@Component({
selector: 'app-recent-videos',
templateUrl: './recent-videos.component.html',
styleUrls: ['./recent-videos.component.scss']
})
export class RecentVideosComponent implements OnInit {
normal_files_received = false;
subscription_files_received = false;
files: any[] = null;
constructor(private postsService: PostsService) { }
ngOnInit(): void {
}
getAllFiles() {
}
sortFiles(a, b) {
// uses the 'registered' flag as the timestamp
const result = b.registered - a.registered;
return result;
}
}