This commit is contained in:
Eugenio Chiodo
2022-02-15 00:08:41 +01:00
parent 5cba76554a
commit e64bce3171
22 changed files with 1152 additions and 93 deletions

View File

@ -12,6 +12,14 @@
<div class="flex flex-col space-y-3 flex-1 py-3 pr-3 md:py-4 md:pr-4 min-w-0">
<div class="flex flex-col space-y-1 flex-1 min-w-0">
@if (Message.BoostingUser != null)
{
<p class="inline-flex flex-1 space-x-2 min-w-0 text-xs text-xs">
<a class="font-bold" href="@Message.BoostingUser.ProfileUrl" title="@Message.BoostingUser.UserName">@Message.BoostingUser.DisplayName</a>
<i class="ion-md-repeat has-text-info" aria-hidden="true"></i>
<span>@CascadingState.Localizer["boosted"]</span>
</p>
}
<p class="inline-flex flex-1 space-x-2 min-w-0 justify-between text-xs md:text-sm">
<span class="inline-flex space-x-2 min-w-0">
<b class="shrink truncate max-w-[80%]" title="@Message.User.DisplayName">
@ -105,11 +113,15 @@
}
@if (OnMessageBoost.HasDelegate)
{
<button class="button is-small is-rounded @(Message.IsBoosted ? "neoBtnSmallInsetPlain" : "neoBtnSmall")" @onclick="() => OnMessageBoost.InvokeAsync(Message)"
<button class="button is-small is-rounded @SUtility.IfTrueThen(Message.IsBoostedByCurrentUser,"neoBtnSmallInsetPlain","neoBtnSmall") @SUtility.IfTrueThen(Message.BoostsCounter != 0, "has-icons-left")" @onclick="() => OnMessageBoost.InvokeAsync(Message)"
title="@CascadingState.Localizer["Boost"]">
<span class="icon">
<i aria-hidden="true" class="ion-md-repeat text-lg has-text-info"></i>
<span class="icon is-left">
<i aria-hidden="true" class="ion-md-repeat @SUtility.IfTrueThen(Message.BoostsCounter != 0,null,"text-lg") has-text-info"></i>
</span>
@if (Message.BoostsCounter != 0)
{
<span>@Message.BoostsCounter</span>
}
</button>
}
@if (OnMessageFavourite.HasDelegate)

View File

@ -307,7 +307,8 @@
MediaType.Images => 5,
MediaType.Audio => 1,
MediaType.Video => 1,
MediaType.Documents => 3
MediaType.Documents => 3,
_ => 0
};
if (eventArgs.FileCount > maximumFileCount)
{
@ -324,7 +325,8 @@
MediaType.Images => 3_145_728,
MediaType.Audio => 5_242_880,
MediaType.Video => 20_971_520,
MediaType.Documents => 3_145_728
MediaType.Documents => 3_145_728,
_ => 0
};
var uploadMedia = default(UploadMedia);
using (var memStream = new MemoryStream())