2024-05-31 13:16:09 +00:00
|
|
|
@inject CustomAuthenticationStateProvider AuthStateProvider;
|
|
|
|
<nav class="left drawer l">
|
2024-05-31 01:27:01 +00:00
|
|
|
<header>
|
|
|
|
<nav>
|
2024-05-31 13:16:09 +00:00
|
|
|
<AuthorizeView>
|
|
|
|
<Authorized>
|
|
|
|
<img class="circle medium" src="https://profiles.cache.lol/@FirstAddress/picture" alt="@FirstAddress" />
|
|
|
|
<div>Hey, @Name.</div>
|
|
|
|
|
|
|
|
</Authorized>
|
|
|
|
<NotAuthorized>
|
|
|
|
<img src="https://cdn.cache.lol/img/prami.svg" class="medium">
|
|
|
|
<div>
|
|
|
|
Hey there. <br/>
|
|
|
|
<a href="/login">Login?</a>
|
|
|
|
</div>
|
|
|
|
</NotAuthorized>
|
|
|
|
</AuthorizeView>
|
|
|
|
|
2024-05-31 01:27:01 +00:00
|
|
|
</nav>
|
|
|
|
</header>
|
2024-05-31 13:16:09 +00:00
|
|
|
<NavLink class="row nav-link" href="" Match="NavLinkMatch.All">
|
2024-05-31 01:27:01 +00:00
|
|
|
<i class="fa-solid fa-fw fa-home"></i>
|
|
|
|
<div>Home</div>
|
|
|
|
</NavLink>
|
2024-05-31 13:16:09 +00:00
|
|
|
<NavLink class="row nav-link" href="/statuslog/latest">
|
2024-05-31 01:27:01 +00:00
|
|
|
<i><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><path fill="#4dabf7" d="M250 450c-38.388 0-76.775-14.646-106.066-43.934l-100-100c-58.579-58.58-58.579-153.553 0-212.132C100.534 37.336 191.105 35.421 250 88.191c58.898-52.768 149.47-50.853 206.066 5.743 58.58 58.58 58.58 153.553 0 212.132l-100 100C326.778 435.354 288.39 450 250 450" /><path fill="#228be6" d="M220.52 176.634a11.792 11.792 0 1 1-23.586 0 11.792 11.792 0 0 1 23.585 0" /><path fill="#1864ab" stroke="#1864ab" stroke-miterlimit="10" stroke-width="11.32074" d="M220.52 176.634a11.792 11.792 0 1 1-23.586 0 11.792 11.792 0 0 1 23.585 0Z" /><path fill="#228be6" d="M303.066 176.634a11.792 11.792 0 1 1-23.585 0 11.792 11.792 0 0 1 23.585 0" /><path fill="#1864ab" stroke="#1864ab" stroke-miterlimit="10" stroke-width="11.32074" d="M303.066 176.634a11.792 11.792 0 1 1-23.585 0 11.792 11.792 0 0 1 23.585 0Z" /><path fill="#228be6" stroke="#461036" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="18.8679" d="M208.75 223.817c18.875 30.802 63.626 30.802 82.501 0" /><path fill="#1971c2" d="M438.68 212.011c0-32.564-26.399-58.962-58.963-58.962s-58.962 26.398-58.962 58.962 26.398 58.963 58.962 58.963 58.962-26.399 58.962-58.963m-259.433 0c0-32.564-26.398-58.962-58.962-58.962S61.32 179.447 61.32 212.011s26.398 58.963 58.963 58.963 58.962-26.399 58.962-58.963" /><path fill="#4dabf7" stroke="#1864ab" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="18.8679" d="M208.75 223.817c18.875 30.802 63.626 30.802 82.501 0" /></svg></i>
|
|
|
|
<div>Statuslog</div>
|
|
|
|
</NavLink>
|
2024-05-31 13:16:09 +00:00
|
|
|
<div class="row max"></div>
|
|
|
|
<footer>
|
|
|
|
<AuthorizeView>
|
|
|
|
<Authorized><a class="button small" @onclick='() => AuthStateProvider.Logout()'>Logout</a></Authorized>
|
|
|
|
<NotAuthorized><a class="button small" href="/login">Login</a></NotAuthorized>
|
|
|
|
</AuthorizeView>
|
|
|
|
</footer>
|
2024-05-31 01:27:01 +00:00
|
|
|
</nav>
|
2024-05-30 01:06:08 +00:00
|
|
|
|
2024-05-31 01:27:01 +00:00
|
|
|
<nav class="left m">
|
|
|
|
<header>
|
|
|
|
<img src="https://cdn.cache.lol/img/prami.svg" class="circle">
|
|
|
|
</header>
|
|
|
|
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
|
|
|
<i class="fa-solid fa-fw fa-home"></i>
|
|
|
|
<div>Home</div>
|
|
|
|
</NavLink>
|
|
|
|
<NavLink class="nav-link" href="/statuslog/latest">
|
|
|
|
<i><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><path fill="#4dabf7" d="M250 450c-38.388 0-76.775-14.646-106.066-43.934l-100-100c-58.579-58.58-58.579-153.553 0-212.132C100.534 37.336 191.105 35.421 250 88.191c58.898-52.768 149.47-50.853 206.066 5.743 58.58 58.58 58.58 153.553 0 212.132l-100 100C326.778 435.354 288.39 450 250 450" /><path fill="#228be6" d="M220.52 176.634a11.792 11.792 0 1 1-23.586 0 11.792 11.792 0 0 1 23.585 0" /><path fill="#1864ab" stroke="#1864ab" stroke-miterlimit="10" stroke-width="11.32074" d="M220.52 176.634a11.792 11.792 0 1 1-23.586 0 11.792 11.792 0 0 1 23.585 0Z" /><path fill="#228be6" d="M303.066 176.634a11.792 11.792 0 1 1-23.585 0 11.792 11.792 0 0 1 23.585 0" /><path fill="#1864ab" stroke="#1864ab" stroke-miterlimit="10" stroke-width="11.32074" d="M303.066 176.634a11.792 11.792 0 1 1-23.585 0 11.792 11.792 0 0 1 23.585 0Z" /><path fill="#228be6" stroke="#461036" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="18.8679" d="M208.75 223.817c18.875 30.802 63.626 30.802 82.501 0" /><path fill="#1971c2" d="M438.68 212.011c0-32.564-26.399-58.962-58.963-58.962s-58.962 26.398-58.962 58.962 26.398 58.963 58.962 58.963 58.962-26.399 58.962-58.963m-259.433 0c0-32.564-26.398-58.962-58.962-58.962S61.32 179.447 61.32 212.011s26.398 58.963 58.963 58.963 58.962-26.399 58.962-58.963" /><path fill="#4dabf7" stroke="#1864ab" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="18.8679" d="M208.75 223.817c18.875 30.802 63.626 30.802 82.501 0" /></svg></i>
|
|
|
|
<div>Statuslog</div>
|
|
|
|
</NavLink>
|
|
|
|
</nav>
|
2024-05-30 01:06:08 +00:00
|
|
|
|
2024-05-31 01:27:01 +00:00
|
|
|
<nav class="bottom s">
|
|
|
|
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
|
|
|
<i class="fa-solid fa-fw fa-home"></i>
|
|
|
|
<div>Home</div>
|
|
|
|
</NavLink>
|
|
|
|
<NavLink class="nav-link" href="/statuslog/latest">
|
|
|
|
<i><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><path fill="#4dabf7" d="M250 450c-38.388 0-76.775-14.646-106.066-43.934l-100-100c-58.579-58.58-58.579-153.553 0-212.132C100.534 37.336 191.105 35.421 250 88.191c58.898-52.768 149.47-50.853 206.066 5.743 58.58 58.58 58.58 153.553 0 212.132l-100 100C326.778 435.354 288.39 450 250 450" /><path fill="#228be6" d="M220.52 176.634a11.792 11.792 0 1 1-23.586 0 11.792 11.792 0 0 1 23.585 0" /><path fill="#1864ab" stroke="#1864ab" stroke-miterlimit="10" stroke-width="11.32074" d="M220.52 176.634a11.792 11.792 0 1 1-23.586 0 11.792 11.792 0 0 1 23.585 0Z" /><path fill="#228be6" d="M303.066 176.634a11.792 11.792 0 1 1-23.585 0 11.792 11.792 0 0 1 23.585 0" /><path fill="#1864ab" stroke="#1864ab" stroke-miterlimit="10" stroke-width="11.32074" d="M303.066 176.634a11.792 11.792 0 1 1-23.585 0 11.792 11.792 0 0 1 23.585 0Z" /><path fill="#228be6" stroke="#461036" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="18.8679" d="M208.75 223.817c18.875 30.802 63.626 30.802 82.501 0" /><path fill="#1971c2" d="M438.68 212.011c0-32.564-26.399-58.962-58.963-58.962s-58.962 26.398-58.962 58.962 26.398 58.963 58.962 58.963 58.962-26.399 58.962-58.963m-259.433 0c0-32.564-26.398-58.962-58.962-58.962S61.32 179.447 61.32 212.011s26.398 58.963 58.963 58.963 58.962-26.399 58.962-58.963" /><path fill="#4dabf7" stroke="#1864ab" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="18.8679" d="M208.75 223.817c18.875 30.802 63.626 30.802 82.501 0" /></svg></i>
|
|
|
|
<div>Statuslog</div>
|
|
|
|
</NavLink>
|
2024-05-31 13:16:09 +00:00
|
|
|
</nav>
|
|
|
|
|
|
|
|
@code {
|
|
|
|
private string? Name = null;
|
|
|
|
private List<string> Addresses = new List<string>();
|
|
|
|
private string FirstAddress { get => this.Addresses.FirstOrDefault() ?? string.Empty; }
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync() {
|
|
|
|
var state = await AuthStateProvider.GetAuthenticationStateAsync();
|
|
|
|
var identity = state.User.Identity;
|
|
|
|
|
|
|
|
Name = identity?.Name ?? string.Empty;
|
|
|
|
Addresses = state.User.FindFirst("addresses")?.Value?.Split(',')?.ToList() ?? new List<string>();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|