only titleize single word titles on action dialogs
This commit is contained in:
parent
6fa15d3dcc
commit
797642f3e6
@ -130,8 +130,8 @@ public class InteractionRegistration : IInteractionRegistration
|
||||
return null;
|
||||
}
|
||||
|
||||
private async Task<IEnumerable<IInteractionData>> GetInteractionsInternal(string prefix = null, int? clientId = null,
|
||||
Reference.Game? game = null, CancellationToken token = default)
|
||||
private async Task<IEnumerable<IInteractionData>> GetInteractionsInternal(string prefix = null,
|
||||
int? clientId = null, Reference.Game? game = null, CancellationToken token = default)
|
||||
{
|
||||
var interactions = _interactions
|
||||
.Where(interaction => string.IsNullOrWhiteSpace(prefix) || interaction.Key.StartsWith(prefix)).Select(
|
||||
@ -149,9 +149,10 @@ public class InteractionRegistration : IInteractionRegistration
|
||||
clientId);
|
||||
return null;
|
||||
}
|
||||
}).Where(interaction => interaction is not null)
|
||||
.ToList();
|
||||
});
|
||||
|
||||
return await Task.WhenAll(interactions);
|
||||
return (await Task.WhenAll(interactions))
|
||||
.Where(interaction => interaction is not null)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
<h5 class="modal-title mb-10">@Model.Name?.Titleize()</h5>
|
||||
<h5 class="modal-title mb-10">@(Model.Name?.Split(" ").Length == 1 ? Model.Name?.Titleize() : Model.Name)</h5>
|
||||
@if (Model.Inputs.Any(input => input.Type != "hidden"))
|
||||
{
|
||||
<hr class="mb-10"/>
|
||||
|
@ -393,13 +393,8 @@
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var interaction in Model.Interactions?.Where(i => (int?)ViewBag.User?.Level >= ((int?)i?.MinimumPermission ?? 0)))
|
||||
foreach (var interaction in Model.Interactions.Where(i => (int)ViewBag.User.Level >= ((int?)i.MinimumPermission ?? 0)))
|
||||
{
|
||||
if (interaction is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
menuItems.Items.Add(new SideContextMenuItem
|
||||
{
|
||||
Title = interaction.Name,
|
||||
|
Loading…
Reference in New Issue
Block a user