diff --git a/LiftLog.Ui/Pages/Feed/FeedPage.razor b/LiftLog.Ui/Pages/Feed/FeedPage.razor index 45ee7d1d..ed156122 100644 --- a/LiftLog.Ui/Pages/Feed/FeedPage.razor +++ b/LiftLog.Ui/Pages/Feed/FeedPage.razor @@ -41,12 +41,9 @@ @if (FeedState.Value.Feed is { Count: 0 }) { -
- info - -

Nothing here yet!
Nobody you're following has published anything yet! Come back later.

-
-
+ +

Nothing here yet!
Nobody you're following has published anything yet! Come back later.

+
} @@ -56,12 +53,9 @@
@if (FeedState.Value.FollowedUsers is { Count: 0 }) { -
- info - -

Start following someone!
You're not currently following anyone, ask a friend for their share link to start!

-
-
+ +

Start following someone!
You're not currently following anyone, ask a friend for their share link to start!

+
} @@ -82,12 +76,9 @@ } @if (FeedState.Value.Followers is { Count: 0 } && FeedState.Value.FollowRequests is { Count: 0 }) { -
- info - -

Nobody is following you yet!
Share your link with friends to get followers

-
-
+ +

Nobody is following you yet!
Share your link with friends to get followers

+
} diff --git a/LiftLog.Ui/Pages/History/HistoryPage.razor b/LiftLog.Ui/Pages/History/HistoryPage.razor index 9db317f8..f70dc41a 100644 --- a/LiftLog.Ui/Pages/History/HistoryPage.razor +++ b/LiftLog.Ui/Pages/History/HistoryPage.razor @@ -15,12 +15,9 @@ @if (!_latestSessions.Any()) { -
- info - -

Nothing recorded yet!
Complete a session and check again.

-
-
+ +

Nothing recorded yet!
Complete a session and check again.

+
} else { @@ -47,12 +44,9 @@ else @if (!filteredToMonthSessions.Any()) { -
- info - -

Nothing recorded in @(currentMonth.ToString("MMMM"))
Complete a session or switch to another month to view your sessions.

-
-
+ +

Nothing recorded in @(currentMonth.ToString("MMMM"))
Complete a session or switch to another month to view your sessions.

+
} } diff --git a/LiftLog.Ui/Pages/Settings/ManageWorkoutsPage.razor b/LiftLog.Ui/Pages/Settings/ManageWorkoutsPage.razor index 8d937e4e..66f32c58 100644 --- a/LiftLog.Ui/Pages/Settings/ManageWorkoutsPage.razor +++ b/LiftLog.Ui/Pages/Settings/ManageWorkoutsPage.razor @@ -23,12 +23,9 @@ @if (!ProgramState.Value.GetSessionBlueprints(PlanId).Any()) { -
- info - -

No sessions in plan
Add a session to get started.

-
-
+ +

No sessions in plan
Add a session to get started.

+
} @{ diff --git a/LiftLog.Ui/Pages/StatsPage.razor b/LiftLog.Ui/Pages/StatsPage.razor index 596d21b7..a8dfe446 100644 --- a/LiftLog.Ui/Pages/StatsPage.razor +++ b/LiftLog.Ui/Pages/StatsPage.razor @@ -26,12 +26,9 @@ } else if ((StatsState.Value.OverallView?.SessionStats.Count ?? 0) == 0) { -
- info - -

No data available.
Try changing your filters at the top.

-
-
+ +

No data available.
Try changing your filters at the top.

+
} else if (!StatsState.Value.IsLoading && StatsState.Value.OverallView is not null) { @@ -80,9 +77,21 @@ else if (!StatsState.Value.IsLoading && StatsState.Value.OverallView is not null + @{ + var anyExercisesRendered = false; + } + @{ + anyExercisesRendered = true; + } + @if(SearchTerm != "" && !anyExercisesRendered) + { + +

No exercises found.
Try changing your filters at the top.

+
+ }
} diff --git a/LiftLog.Ui/Shared/Presentation/EmptyInfo.razor b/LiftLog.Ui/Shared/Presentation/EmptyInfo.razor new file mode 100644 index 00000000..aaae71ae --- /dev/null +++ b/LiftLog.Ui/Shared/Presentation/EmptyInfo.razor @@ -0,0 +1,19 @@ + +
+ @Icon + + @ChildContent + +
+ +@code +{ + [Parameter] + public string Icon { get; set; } = "info"; + + [Parameter] + public RenderFragment? ChildContent { get; set; } + + [Parameter(CaptureUnmatchedValues = true)] + public Dictionary? AdditionalAttributes { get; set; } +} diff --git a/LiftLog.Ui/Shared/Smart/SessionComponent.razor b/LiftLog.Ui/Shared/Smart/SessionComponent.razor index 8ff064a5..7e4e63fc 100644 --- a/LiftLog.Ui/Shared/Smart/SessionComponent.razor +++ b/LiftLog.Ui/Shared/Smart/SessionComponent.razor @@ -14,12 +14,9 @@ @if (!Session.RecordedExercises.Any()) { -
- info - -

Session contains no exercises.

-
-
+ +

Session contains no exercises.

+
} else {