Neighbourhood.omg.lol/Components/Layout/AvatarMenuLinks.razor

59 lines
2.1 KiB
Text
Raw Normal View History

@inject CustomAuthenticationStateProvider AuthStateProvider;
@inject State State;
<a class="m s row">
<i class="emoji medium" data-emoji="👋">👋</i>
<span>Hey, @(State.Name ?? "there").</span>
</a>
2024-07-02 02:55:07 +00:00
<a class="s row" href="/now">
<i class="square fa-duotone fa-seedling"></i>
<span>Now.garden</span>
</a>
<a class="s row" href="/directory">
<i class="square fa-duotone fa-address-book"></i>
2024-07-02 02:55:07 +00:00
<span>Directory</span>
</a>
@foreach (AddressResponseData address in State.AddressList ?? new List<AddressResponseData>()) {
<a class="row @(address == State.SelectedAddress ? "active" : "")" @onclick="() => State.SelectedAddress = 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>
2024-07-25 05:00:46 +00:00
<a class="indent row" href="/person/@State.SelectedAddressName#pastebin">
<i class="fa-solid fa-clipboard"></i>
<span>Pastebin</span>
</a>
}
}
2024-07-02 02:55:07 +00:00
@if (State.IsAuthorized) {
<a class="row" @onclick='() => AuthStateProvider.Logout()'>
<i class="fa-solid fa-door-open"></i>
<span>Logout</span>
</a>
}
else {
<a class="row" href="/login">
<i class="fa-solid fa-door-closed"></i>
<span>Login</span>
</a>
}
<a class="row medium-opacity">
<i class="fa-solid fa-circle-info tiny"></i>
<small>@App.Name - @App.Version</small>
</a>