update
This commit is contained in:
@@ -1,7 +1,60 @@
|
||||
<div class="view">
|
||||
<h4>Infomations</h4>
|
||||
<h4 class="info-title">Informations</h4>
|
||||
|
||||
<div class="info-grid">
|
||||
<div class="info-col">
|
||||
<dl class="info-list">
|
||||
<dt class="info-term">X (m)</dt>
|
||||
<dd class="info-desc">@Localization.X.ToString("F3")</dd>
|
||||
|
||||
<dt class="info-term">Y (m)</dt>
|
||||
<dd class="info-desc">@Localization.Y.ToString("F3")</dd>
|
||||
|
||||
<dt class="info-term">Theta (rad)</dt>
|
||||
<dd class="info-desc">@Localization.Theta.ToString("F4")</dd>
|
||||
|
||||
<dt class="info-term">Theta (deg)</dt>
|
||||
<dd class="info-desc">@($"{Localization.Theta * 180.0 / Math.PI:F2}°")</dd>
|
||||
|
||||
<dt class="info-term">Ready</dt>
|
||||
<dd class="info-desc">@((Localization.IsReady) ? "Yes" : "No")</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="info-col">
|
||||
<dl class="info-list">
|
||||
<dt class="info-term">SlamState</dt>
|
||||
<dd class="info-desc">@Localization.SlamState</dd>
|
||||
|
||||
<dt class="info-term">SlamDetail</dt>
|
||||
<dd class="info-desc text-truncate" title="@Localization.SlamStateDetail">@Localization.SlamStateDetail</dd>
|
||||
|
||||
<dt class="info-term">Active Map</dt>
|
||||
<dd class="info-desc text-truncate" title="@Localization.CurrentActiveMap">@Localization.CurrentActiveMap</dd>
|
||||
|
||||
<dt class="info-term">Reliability</dt>
|
||||
<dd class="info-desc">@($"{Localization.Reliability:F1}%")</dd>
|
||||
|
||||
<dt class="info-term">MatchingScore</dt>
|
||||
<dd class="info-desc">@($"{Localization.MatchingScore:F1}%")</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
private class LocalizationDto
|
||||
{
|
||||
public bool IsReady { get; set; }
|
||||
public double X { get; set; }
|
||||
public double Y { get; set; }
|
||||
public double Theta { get; set; }
|
||||
public string SlamState { get; set; } = "Localization";
|
||||
public string SlamStateDetail { get; set; } = "/r/n";
|
||||
public string CurrentActiveMap { get; set; } = "Localization";
|
||||
public double Reliability { get; set; }
|
||||
public double MatchingScore { get; set; }
|
||||
}
|
||||
|
||||
private LocalizationDto Localization = new();
|
||||
}
|
||||
|
||||
@@ -5,9 +5,117 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
background-color: var(--mud-palette-surface);
|
||||
border-radius: var(--mud-default-borderradius);
|
||||
background-color: var(--mud-palette-surface, #ffffff);
|
||||
border-radius: var(--mud-default-borderradius, 8px);
|
||||
transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
||||
box-shadow: var(--mud-elevation-10);
|
||||
padding: 15px;
|
||||
box-shadow: var(--mud-elevation-10, 0 4px 12px rgba(0,0,0,0.08));
|
||||
padding: 12px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid rgba(0,0,0,0.04);
|
||||
}
|
||||
|
||||
.view::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 6px;
|
||||
border-top-left-radius: inherit;
|
||||
border-bottom-left-radius: inherit;
|
||||
background: linear-gradient(180deg, var(--mud-palette-primary, #1976d2), rgba(25,118,210,0.7));
|
||||
}
|
||||
|
||||
.info-title {
|
||||
margin: 0 0 10px 12px;
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
color: var(--mud-palette-primary, #1976d2);
|
||||
}
|
||||
|
||||
.info-grid {
|
||||
display: flex;
|
||||
gap: 14px;
|
||||
align-items: flex-start;
|
||||
flex: 1 1 auto;
|
||||
overflow: hidden;
|
||||
padding: 1.5em;
|
||||
}
|
||||
|
||||
.info-col {
|
||||
flex: 1 1 50%;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.info-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.info-list dt,
|
||||
.info-list dd {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 0;
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.info-term {
|
||||
width: 42%;
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
color: var(--mud-palette-text-secondary, rgba(0,0,0,0.6));
|
||||
font-weight: 600;
|
||||
box-sizing: border-box;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.info-desc {
|
||||
width: 58%;
|
||||
text-align: left;
|
||||
font-weight: 700;
|
||||
color: var(--mud-palette-text-primary, rgba(0,0,0,0.85));
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.text-truncate {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.info-list dt + dd {
|
||||
border-bottom: 1px dashed rgba(0,0,0,0.03);
|
||||
}
|
||||
|
||||
.ready-yes {
|
||||
color: var(--mud-palette-success, #2e7d32);
|
||||
}
|
||||
|
||||
.ready-no {
|
||||
color: var(--mud-palette-error, #d32f2f);
|
||||
}
|
||||
|
||||
.percent {
|
||||
color: var(--mud-palette-primary, #1976d2);
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.info-grid {
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.info-term {
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
.info-desc {
|
||||
width: 55%;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user