Add more file icons

This commit is contained in:
Dean Herbert 2020-09-25 12:42:28 +09:00
parent 1b8b417b85
commit a890e5830d
1 changed files with 27 additions and 1 deletions

View File

@ -62,7 +62,33 @@ protected override bool OnClick(ClickEvent e)
protected override string FallbackName => file.Name;
protected override IconUsage? Icon => FontAwesome.Regular.FileAudio;
protected override IconUsage? Icon
{
get
{
switch (file.Extension)
{
case ".ogg":
case ".mp3":
case ".wav":
return FontAwesome.Regular.FileAudio;
case ".jpg":
case ".jpeg":
case ".png":
return FontAwesome.Regular.FileImage;
case ".mp4":
case ".avi":
case ".mov":
case ".flv":
return FontAwesome.Regular.FileVideo;
default:
return FontAwesome.Regular.File;
}
}
}
}
}
}