Added support for navigating to files in recent videos (subscription and not). No support for download-only mode yet

Added navigate to subscription menu item for the files

Sidenav mode is "side" now for testing, likely not a permanent change and will be optional in the future
This commit is contained in:
Isaac Grynsztein
2020-07-18 20:37:43 -04:00
parent cc189a3abd
commit 8384b73c4c
8 changed files with 82 additions and 14 deletions

View File

@@ -47,6 +47,7 @@ export class PostsService implements CanActivate {
open_create_default_admin_dialog = new BehaviorSubject<boolean>(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');
}