diff --git a/JSMR.UI.Blazor/Enums/Graphic.cs b/JSMR.UI.Blazor/Enums/Graphic.cs
index 88ac5ff..13691a3 100644
--- a/JSMR.UI.Blazor/Enums/Graphic.cs
+++ b/JSMR.UI.Blazor/Enums/Graphic.cs
@@ -15,6 +15,7 @@ public enum Graphic
Circle,
Tag,
Person,
+ Avatar,
Sort,
Grid,
Age,
diff --git a/JSMR.UI.Blazor/Layout/LoginLayout.razor b/JSMR.UI.Blazor/Layout/LoginLayout.razor
new file mode 100644
index 0000000..b64fee8
--- /dev/null
+++ b/JSMR.UI.Blazor/Layout/LoginLayout.razor
@@ -0,0 +1,5 @@
+@inherits LayoutComponentBase
+
+
+ @Body
+
\ No newline at end of file
diff --git a/JSMR.UI.Blazor/Layout/MainLayout.razor b/JSMR.UI.Blazor/Layout/MainLayout.razor
index 0eeb0fa..824da10 100644
--- a/JSMR.UI.Blazor/Layout/MainLayout.razor
+++ b/JSMR.UI.Blazor/Layout/MainLayout.razor
@@ -1,27 +1,30 @@
-@using JSMR.UI.Blazor.Services
+@using JSMR.UI.Blazor.Components
+@using JSMR.UI.Blazor.Services
@inject SessionState Session
+@inject NavigationManager Navigation
@inherits LayoutComponentBase
-
- @if (Session.IsAuthenticated)
- {
-
Logged in as @Session.Me?.name (@Session.Me?.role)
-
Logout
- }
- else
- {
-
Login
- }
-
-
JSMR
-
+ @* *@
+
+ @if (Session.IsAuthenticated)
+ {
+ @* Logged in as @Session.Me?.Name (@Session.Me?.Role) *@
+
+ @Session.Me?.Name @* (@Session.Me?.Role) *@
+
+ Logout
+ }
+ else
+ {
+ Login
+ }
@@ -89,4 +92,10 @@
{
Session.Changed -= OnSessionChanged;
}
+
+ private async Task LogoutAsync()
+ {
+ await Session.LogoutAsync();
+ Navigation.NavigateTo("/login");
+ }
}
\ No newline at end of file
diff --git a/JSMR.UI.Blazor/Pages/Login.razor b/JSMR.UI.Blazor/Pages/Login.razor
index 6a25bbc..c8d0fef 100644
--- a/JSMR.UI.Blazor/Pages/Login.razor
+++ b/JSMR.UI.Blazor/Pages/Login.razor
@@ -1,4 +1,5 @@
@page "/login"
+@layout LoginLayout
@using JSMR.UI.Blazor.Services
@@ -9,29 +10,23 @@
@if (Session.IsAuthenticated)
{
- You're already logged in as @Session.Me?.name.
+ You're already logged in as @Session.Me?.Name.
}
else
{
-
-
-
-
-
-
-
-
-
-
-
-
-
- @if (!string.IsNullOrWhiteSpace(error))
- {
-
@error
- }
+
+
+
+
+ Login
+ @if (!string.IsNullOrWhiteSpace(error))
+ {
+ @error
+ }
+
+
}
diff --git a/JSMR.UI.Blazor/Pages/VoiceWorks.razor b/JSMR.UI.Blazor/Pages/VoiceWorks.razor
index af5ca2d..716b77c 100644
--- a/JSMR.UI.Blazor/Pages/VoiceWorks.razor
+++ b/JSMR.UI.Blazor/Pages/VoiceWorks.razor
@@ -12,7 +12,6 @@
@inherits SearchPageBase
-
Voice Works
Voice Works
@@ -42,7 +41,6 @@
}
-
@code {
[Inject]
diff --git a/JSMR.UI.Blazor/Services/AuthenticationClient.cs b/JSMR.UI.Blazor/Services/AuthenticationClient.cs
index 05df3e9..0f5ecdc 100644
--- a/JSMR.UI.Blazor/Services/AuthenticationClient.cs
+++ b/JSMR.UI.Blazor/Services/AuthenticationClient.cs
@@ -25,5 +25,5 @@ public class AuthenticationClient(HttpClient http)
return await resp.Content.ReadFromJsonAsync(cancellationToken: ct);
}
- public sealed record MeResponse(string? name, string? id, string? role);
+ public sealed record MeResponse(string? Name, string? Id, string? Role);
}
\ No newline at end of file
diff --git a/JSMR.UI.Blazor/wwwroot/css/app.css b/JSMR.UI.Blazor/wwwroot/css/app.css
index 4569813..60c6732 100644
--- a/JSMR.UI.Blazor/wwwroot/css/app.css
+++ b/JSMR.UI.Blazor/wwwroot/css/app.css
@@ -659,8 +659,14 @@ code {
.j-chip.is-clickable {
cursor: pointer;
user-select: none;
+ --chip-hover-alpha: 0.2;
+ transition: .2s linear;
}
+ .j-chip.is-clickable:hover {
+ background: rgb(var(--chip-rgb) / var(--chip-hover-alpha));
+ }
+
.j-chip.varient-filled {
padding: .4rem .8rem;
border-radius: 1rem;
@@ -703,6 +709,21 @@ code {
width: 16px;
}
+.j-icon.size-small {
+ width: 1rem;
+ height: 1rem;
+}
+
+.j-icon.size-medium {
+ width: 1.5rem;
+ height: 1.5rem;
+}
+
+.j-icon.size-large {
+ width: 2rem;
+ height: 2rem;
+}
+
.j-icon-color-yellow {
background: #ffe073;
}
@@ -784,6 +805,14 @@ code {
mask-image: url("../svg/person-fill.svg");
}
+.j-icon-avatar {
+ mask-image: url("../svg/person-circle.svg");
+}
+
+.j-icon-avatar-fill {
+ mask-image: url("../svg/person-circle.svg");
+}
+
.j-icon-sort {
mask-image: url("../svg/sort.svg");
}
diff --git a/JSMR.UI.Blazor/wwwroot/svg/person-circle.svg b/JSMR.UI.Blazor/wwwroot/svg/person-circle.svg
new file mode 100644
index 0000000..af6f2b4
--- /dev/null
+++ b/JSMR.UI.Blazor/wwwroot/svg/person-circle.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file