Update icons for event attributes
This commit is contained in:
@@ -1,21 +1,25 @@
|
||||
@using WebApp.Models
|
||||
|
||||
<span style=""></span>
|
||||
@if (EventDefinition.LevelOfEffort.HasValue)
|
||||
@* @if (EventDefinition.LevelOfEffort.HasValue)
|
||||
{
|
||||
<span class="numberCircle">@EventDefinition.LevelOfEffort</span>
|
||||
}
|
||||
} *@
|
||||
<MudText Style="font-family: monospace; white-space: pre;">
|
||||
|
||||
@{
|
||||
var loeIcon = AppIcons.LevelOfEffortIcon(EventDefinition.LevelOfEffort);
|
||||
var loeColor = AppIcons.IconColors.GetValueOrDefault(loeIcon, "inherit");
|
||||
}
|
||||
@RenderFixedWidthChar(loeIcon, "1.5em", loeColor)
|
||||
@foreach (var charStr in _attributes.Select(c => c.ToString()))
|
||||
{
|
||||
var color = AppIcons.IconColors.GetValueOrDefault(charStr, "inherit");
|
||||
if (AppIcons.IconTooltips.TryGetValue(charStr, out var tooltip))
|
||||
{
|
||||
<MudTooltip Text="@tooltip">@charStr</MudTooltip>
|
||||
<MudTooltip Text="@tooltip">@RenderFixedWidthChar(charStr, color: color)</MudTooltip>
|
||||
}
|
||||
else
|
||||
{
|
||||
@charStr
|
||||
@RenderFixedWidthChar(charStr, color: color)
|
||||
}
|
||||
}
|
||||
</MudText>
|
||||
@@ -35,4 +39,9 @@
|
||||
_attributes += EventDefinition.InterviewOrPresentation ? AppIcons.PresentationEvent : " ";
|
||||
_attributes += EventDefinition.Presubmission ? AppIcons.PresubmissionEvent : " ";
|
||||
}
|
||||
|
||||
private RenderFragment RenderFixedWidthChar(string character, string width = "1.3em", string color = "inherit") => __builder =>
|
||||
{
|
||||
<span style="display: inline-block; width: @width; text-align: center; color: @color;">@character</span>
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user