thumbnails now lazy load. when it is loading, a content loading gradient is shown in front of it

made file cards look better on mobile devices
This commit is contained in:
Isaac Grynsztein
2020-02-20 15:45:40 -05:00
parent 7eac88a31f
commit 54492b109a
5 changed files with 47 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ export class FileCardComponent implements OnInit {
@Input() isPlaylist = false;
@Input() count = null;
type;
image_loaded = false;
constructor(private postsService: PostsService, public snackBar: MatSnackBar, public mainComponent: MainComponent) { }
@@ -43,6 +44,10 @@ export class FileCardComponent implements OnInit {
}
imageLoaded(loaded) {
this.image_loaded = true;
}
public openSnackBar(message: string, action: string) {
this.snackBar.open(message, action, {
duration: 2000,