Skip to content

Commit 3afd285

Browse files
committed
Messed with the layout of the continous refresher
1 parent 4722588 commit 3afd285

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed
Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
@using BlazorMonaco.Editor
22
@using ProgrammerAl.SvgHelpers.Components.AnimatedComponents
33

4-
<div class="flex">
5-
<button onclick=@(async () => await HandleOpenFileAsync())
6-
class="border border-black bg-green-800 min-h-12 text-gray-200 p-2">
7-
Choose File
8-
</button>
9-
</div>
4+
<div class="flex flex-col gap-2">
5+
<p class="text-sm">Continuously refreshes the image displayed here from your local device. You can edit it in one program, and have this screen open somwehre else to quickly see the changes.</p>
106

7+
<div class="flex">
8+
<button onclick=@(async () => await HandleOpenFileAsync())
9+
class="border border-black bg-green-800 min-h-12 text-gray-200 p-2">
10+
Choose File
11+
</button>
12+
</div>
1113

12-
@if (!string.IsNullOrWhiteSpace(SvgHtml.Value))
13-
{
14-
<div>
15-
<p>Last updated: @(LastImageRefreshTime)</p>
16-
<div class="border border-4">
17-
@SvgHtml
14+
@if (HasImage)
15+
{
16+
<div>
17+
<p>Last updated: @(LastImageRefreshTime)</p>
18+
<div class="border border-4">
19+
@SvgHtml
20+
</div>
1821
</div>
19-
</div>
20-
}
22+
}
23+
</div>

src/SvgHelpers/SvgHelpers/Components/ContinuousImageRefreshComponent.razor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public partial class ContinuousImageRefreshComponent : ComponentBase
1919
private DateTime LastImageRefreshTime { get; set; } = DateTime.MinValue;
2020
private MarkupString SvgHtml { get; set; }
2121

22+
private bool HasImage => !string.IsNullOrWhiteSpace(SvgHtml.Value);
23+
2224
[Inject, NotNull]
2325
private IJSRuntime? JSRuntime { get; set; }
2426

0 commit comments

Comments
 (0)