();
- constructor() { }
+ /*
+ Planned sizes:
+ small: 150x175
+ medium: 200x200
+ big: 250x200
+ */
+
+ constructor(private dialog: MatDialog) { }
ngOnInit(): void {
this.file_length = fancyTimeFormat(this.file_obj.duration);
}
deleteFile(blacklistMode = false) {
+ if (this.file_obj.sub_id) {
+ }
}
navigateToFile() {
+ this.goToFile.emit(this.file_obj);
+ }
+ navigateToSubscription() {
+ this.goToSubscription.emit(this.file_obj);
}
openFileInfoDialog() {
-
+ this.dialog.open(VideoInfoDialogComponent, {
+ data: {
+ file: this.file_obj,
+ },
+ minWidth: '50vw'
+ })
}
-
+
}
function fancyTimeFormat(time) {
diff --git a/src/app/main/main.component.html b/src/app/main/main.component.html
index ed7f1fe..63cb3a2 100644
--- a/src/app/main/main.component.html
+++ b/src/app/main/main.component.html
@@ -183,6 +183,7 @@
+
diff --git a/src/app/posts.services.ts b/src/app/posts.services.ts
index 62ce5d2..c3331f3 100644
--- a/src/app/posts.services.ts
+++ b/src/app/posts.services.ts
@@ -47,6 +47,7 @@ export class PostsService implements CanActivate {
open_create_default_admin_dialog = new BehaviorSubject(false);
config = null;
+ subscriptions = null;
constructor(private http: HttpClient, private router: Router, @Inject(DOCUMENT) private document: Document,
public snackBar: MatSnackBar) {
console.log('PostsService Initialized...');
@@ -113,6 +114,15 @@ export class PostsService implements CanActivate {
this.theme = this.THEMES_CONFIG[theme];
}
+ getSubscriptionByID(sub_id) {
+ for (let i = 0; i < this.subscriptions.length; i++) {
+ if (this.subscriptions[i]['id'] === sub_id) {
+ return this.subscriptions[i];
+ }
+ }
+ return null;
+ }
+
startHandshake(url: string) {
return this.http.get(url + 'geturl');
}