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

@@ -108,4 +108,4 @@ function fancyTimeFormat(time) {
ret += '' + mins + ':' + (secs < 10 ? '0' : '');
ret += '' + secs;
return ret;
}
}

View File

@@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { PostsService } from 'app/posts.services';
import { ActivatedRoute, Router } from '@angular/router';
import { ActivatedRoute, Router, ParamMap } from '@angular/router';
@Component({
selector: 'app-subscription',
@@ -43,9 +43,26 @@ export class SubscriptionComponent implements OnInit {
filterProperty = this.filterProperties['upload_date'];
downloading = false;
initialized = false;
constructor(private postsService: PostsService, private route: ActivatedRoute, private router: Router) { }
ngOnInit() {
this.route.paramMap.subscribe((params: ParamMap) => {
this.id = params.get('id');
this.postsService.service_initialized.subscribe(init => {
if (init) {
this.initialized = true;
this.getConfig();
this.getSubscription();
}
});
if (!this.initialized) {
this.getConfig();
this.getSubscription();
}
});
if (this.route.snapshot.paramMap.get('id')) {
this.id = this.route.snapshot.paramMap.get('id');