Convert to Blazor (#6)

Convert existing progress to Blazor on client and server
This commit was merged in pull request #6.
This commit is contained in:
2020-12-18 21:46:28 -05:00
committed by GitHub
parent 2f84821d11
commit e0b3fa8759
97 changed files with 2592 additions and 31063 deletions

View File

@@ -0,0 +1,52 @@
using JobsJobsJobs.Shared;
using System;
namespace JobsJobsJobs.Client
{
/// <summary>
/// Information about a user
/// </summary>
public record UserInfo(CitizenId Id, string Name);
/// <summary>
/// Client-side application state for Jobs, Jobs, Jobs
/// </summary>
public class AppState
{
public event Action OnChange = () => { };
private UserInfo? _user = null;
/// <summary>
/// The information of the currently logged-in user
/// </summary>
public UserInfo? User
{
get => _user;
set
{
_user = value;
NotifyChanged();
}
}
private string _jwt = "";
/// <summary>
/// The JSON Web Token (JWT) for the currently logged-on user
/// </summary>
public string Jwt
{
get => _jwt;
set
{
_jwt = value;
NotifyChanged();
}
}
public AppState() { }
private void NotifyChanged() => OnChange.Invoke();
}
}