2024-06-24 01:51:27 +00:00
|
|
|
@using System.Reflection
|
|
|
|
@inject CustomAuthenticationStateProvider AuthStateProvider;
|
2024-06-14 00:45:31 +00:00
|
|
|
@inject State State;
|
|
|
|
<AuthorizeView>
|
|
|
|
<Authorized>
|
|
|
|
<NavLink>
|
|
|
|
<button class="transparent circle small large">
|
|
|
|
<img class="responsive avatar" src="https://profiles.cache.lol/@State.SelectedAddressName/picture" alt="@State.SelectedAddressName">
|
|
|
|
<menu class="no-wrap">
|
2024-06-14 01:44:23 +00:00
|
|
|
<a class="m s row">
|
|
|
|
<i class="emoji medium" data-emoji="👋">👋</i>
|
|
|
|
<span>Hey, @State.Name.</span>
|
|
|
|
</a>
|
2024-06-18 07:11:28 +00:00
|
|
|
<a class="m s row" href="/directory">
|
|
|
|
<i class="fa-duotone fa-address-book"></i>
|
|
|
|
<span>Address Directory</span>
|
|
|
|
</a>
|
2024-06-14 00:45:31 +00:00
|
|
|
@foreach (AddressResponseData address in State.AddressList ?? new List<AddressResponseData>()) {
|
|
|
|
<a class="row @(address == State.SelectedAddress ? "active" : "")" @onclick="() => changeAddress(address)">
|
|
|
|
<img class="tiny circle avatar" src="https://profiles.cache.lol/@address.Address/picture" alt="@address.Address" />
|
|
|
|
<span class="address"><i class="fa-solid fa-fw fa-at tiny"></i>@address.Address</span>
|
|
|
|
</a>
|
|
|
|
if (address.Address == State.SelectedAddressName) {
|
|
|
|
<a class="indent row" href="/person/@State.SelectedAddressName#profile">
|
|
|
|
<i class="fa-solid fa-id-card"></i>
|
|
|
|
<span>Profile</span>
|
|
|
|
</a>
|
|
|
|
<a class="indent row" href="/person/@State.SelectedAddressName#statuses">
|
|
|
|
<i class="fa-solid fa-message-smile"></i>
|
|
|
|
<span>Statuslog</span>
|
|
|
|
</a>
|
|
|
|
<a class="indent row" href="/person/@State.SelectedAddressName#pics">
|
|
|
|
<i class="fa-solid fa-images"></i>
|
|
|
|
<span>Pics</span>
|
|
|
|
</a>
|
|
|
|
<a class="indent row" href="/person/@State.SelectedAddressName#now">
|
|
|
|
<i class="fa-duotone fa-seedling"></i>
|
|
|
|
<span>/Now</span>
|
|
|
|
</a>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<a class="row" @onclick='() => AuthStateProvider.Logout()'>
|
|
|
|
<i class="fa-solid fa-door-open"></i>
|
|
|
|
<span>Logout</span>
|
|
|
|
</a>
|
2024-06-24 01:51:27 +00:00
|
|
|
<a class="row medium-opacity">
|
|
|
|
<i class="fa-solid fa-circle-info tiny"></i>
|
|
|
|
<small>@assembly.Name - @assembly.Version?.ToString()</small>
|
|
|
|
</a>
|
2024-06-14 00:45:31 +00:00
|
|
|
</menu>
|
|
|
|
</button>
|
|
|
|
<small class="s m address"><i class="fa-solid fa-fw fa-at tiny"></i>@State.SelectedAddressName</small>
|
|
|
|
</NavLink>
|
|
|
|
<div class="l">
|
|
|
|
Hey, @State.Name. <br />
|
|
|
|
<a class="address" href="/person/@State.SelectedAddressName"><i class="fa-solid fa-fw fa-at tiny"></i>@State.SelectedAddressName</a>
|
|
|
|
</div>
|
|
|
|
</Authorized>
|
|
|
|
<NotAuthorized>
|
|
|
|
<NavLink>
|
2024-06-18 06:46:01 +00:00
|
|
|
<button class="transparent square small large">
|
2024-06-14 00:45:31 +00:00
|
|
|
<img class="responsive" src="/img/prami-neighbourhood.svg">
|
|
|
|
<menu class="no-wrap">
|
|
|
|
<a class="m s row">
|
|
|
|
<i class="emoji medium" data-emoji="👋">👋</i>
|
|
|
|
<span>Hey there.</span>
|
|
|
|
</a>
|
|
|
|
<a class="row" href="/login">
|
|
|
|
<i class="fa-solid fa-door-closed"></i>
|
|
|
|
<span>Login</span>
|
|
|
|
</a>
|
|
|
|
</menu>
|
|
|
|
</button>
|
|
|
|
<small class="s m address">Omg.lol</small>
|
|
|
|
</NavLink>
|
|
|
|
<div class="l">
|
|
|
|
Hey there. <br />
|
|
|
|
<a href="/login">Login?</a>
|
|
|
|
</div>
|
|
|
|
</NotAuthorized>
|
|
|
|
</AuthorizeView>
|
|
|
|
|
|
|
|
@code {
|
2024-06-24 01:51:27 +00:00
|
|
|
AssemblyName assembly = Assembly.GetExecutingAssembly().GetName();
|
2024-06-14 00:45:31 +00:00
|
|
|
public void changeAddress(AddressResponseData address) {
|
|
|
|
State.SelectedAddress = address;
|
|
|
|
}
|
|
|
|
}
|