Quiet resting cells in tables canvas
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
if (TryGetCell(rollBand.Label, displayColumn.GroupKey, displayColumn.ColumnKey, out var resolvedCell) && resolvedCell is not null)
|
||||
{
|
||||
var cell = resolvedCell;
|
||||
var isSelectedCell = IsSelectedCell(cell);
|
||||
|
||||
@if (MatchesModeFilter(cell))
|
||||
{
|
||||
@@ -41,24 +42,34 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<button
|
||||
type="button"
|
||||
class="critical-cell-action-button is-curation"
|
||||
title="Open the curation preview for this cell."
|
||||
@onclick:stopPropagation="true"
|
||||
@onclick="() => OnOpenCuration.InvokeAsync(cell.ResultId)">
|
||||
Needs Curation
|
||||
</button>
|
||||
<span class="critical-cell-status-chip needs-curation">Needs Curation</span>
|
||||
}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="critical-cell-action-button is-edit"
|
||||
title="Open the full editor for this cell."
|
||||
@onclick:stopPropagation="true"
|
||||
@onclick="() => OnOpenEditor.InvokeAsync(cell.ResultId)">
|
||||
Edit
|
||||
</button>
|
||||
@if (isSelectedCell)
|
||||
{
|
||||
<div class="critical-cell-selected-actions">
|
||||
@if (!cell.IsCurated)
|
||||
{
|
||||
<button
|
||||
type="button"
|
||||
class="critical-cell-action-button is-curation"
|
||||
title="Open the curation preview for this cell."
|
||||
@onclick:stopPropagation="true"
|
||||
@onclick="() => OnOpenCuration.InvokeAsync(cell.ResultId)">
|
||||
Curate
|
||||
</button>
|
||||
}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="critical-cell-action-button is-edit"
|
||||
title="Open the full editor for this cell."
|
||||
@onclick:stopPropagation="true"
|
||||
@onclick="() => OnOpenEditor.InvokeAsync(cell.ResultId)">
|
||||
Edit
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<CompactCriticalCell
|
||||
@@ -317,5 +328,8 @@
|
||||
private Task SelectCell(CriticalTableCellDetail cell) =>
|
||||
OnSelectCell.InvokeAsync(new TablesCellSelection(cell.ResultId, cell.RollBand, cell.ColumnKey, cell.GroupKey));
|
||||
|
||||
private bool IsSelectedCell(CriticalTableCellDetail cell) =>
|
||||
SelectedCell is not null && cell.ResultId == SelectedCell.ResultId;
|
||||
|
||||
private static string BuildColumnSpanStyle(int span) => $"grid-column: span {span};";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user