Added ability to favorite a file

Moved file filter options above the list of files, and added option to filter for favorites
This commit is contained in:
Isaac Abadi
2022-12-28 21:48:24 -06:00
parent c45e0f04be
commit 665bcc04a7
15 changed files with 173 additions and 40 deletions

View File

@@ -9,6 +9,7 @@ import localeES from '@angular/common/locales/es';
import localeDE from '@angular/common/locales/de';
import localeZH from '@angular/common/locales/zh';
import localeNB from '@angular/common/locales/nb';
import { DatabaseFile } from 'api-types';
registerLocaleData(localeGB);
registerLocaleData(localeFR);
@@ -50,6 +51,7 @@ export class UnifiedFileCardComponent implements OnInit {
@Input() jwtString = null;
@Input() availablePlaylists = null;
@Output() goToFile = new EventEmitter<any>();
@Output() toggleFavorite = new EventEmitter<DatabaseFile>();
@Output() goToSubscription = new EventEmitter<any>();
@Output() deleteFile = new EventEmitter<any>();
@Output() addFileToPlaylist = new EventEmitter<any>();
@@ -158,6 +160,10 @@ export class UnifiedFileCardComponent implements OnInit {
this.hide_image = false;
}
emitToggleFavorite() {
this.toggleFavorite.emit(this.file_obj);
}
}
function fancyTimeFormat(time) {