[frontend/components] Display file name for compose attachments that aren't images
This commit is contained in:
parent
e1ddc5c8f6
commit
da5f065757
2 changed files with 14 additions and 3 deletions
|
@ -16,15 +16,19 @@
|
|||
}
|
||||
else if (File.ContentType.StartsWith("audio") || Constants.CommonAudioExtensions.Any(e => File.Filename.EndsWith(e)))
|
||||
{
|
||||
<Icon Name="Icons.FileAudio" Size="5em"/>
|
||||
<Icon Name="Icons.FileAudio" Size="3em"/>
|
||||
}
|
||||
else if (File.ContentType.StartsWith("video") || Constants.CommonVideoExtensions.Any(e => File.Filename.EndsWith(e)))
|
||||
{
|
||||
<Icon Name="Icons.FileVideo" Size="5em"/>
|
||||
<Icon Name="Icons.FileVideo" Size="3em"/>
|
||||
}
|
||||
else
|
||||
{
|
||||
<Icon Name="Icons.File" Size="5em"/>
|
||||
<Icon Name="Icons.File" Size="3em"/>
|
||||
}
|
||||
@if (!File.ContentType.StartsWith("image") && Constants.CommonImageExtensions.All(e => !File.Filename.EndsWith(e)))
|
||||
{
|
||||
<span class="file-name">@File.Filename</span>
|
||||
}
|
||||
<div class="labels">
|
||||
@if (File.Description != null)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
max-width: 10rem;
|
||||
padding: 0.5rem 0.5rem 0;
|
||||
border-radius: 0.5rem;
|
||||
cursor: pointer;
|
||||
|
@ -12,6 +13,12 @@
|
|||
background-color: var(--hover-color);
|
||||
}
|
||||
|
||||
.file-name {
|
||||
font-size: 0.8em;
|
||||
text-align: center;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
::deep {
|
||||
.ph {
|
||||
display: block;
|
||||
|
|
Loading…
Add table
Reference in a new issue