Added main account select

This commit is contained in:
Sarah Faey 2022-11-21 22:27:56 +01:00
parent c4ecb512d7
commit 85eaf8b36e
2 changed files with 35 additions and 27 deletions

View file

@ -35,27 +35,40 @@
<InputDate @bind-Value="_user.Birthday" />
</label>
</p>
<br />
<div class="nav-item px-3">
<NavLink class="nav-link" href="gw2accountedit">
<span class="oi oi-plus" aria-hidden="true"></span> Add Guild Wars 2 Account
</NavLink>
</div>
<table>
<tr>
<th>Main Account</th>
<th>Edit</th>
</tr>
<InputRadioGroup @bind-Value="_user.MainGW2Account">
@foreach(GuildWars2Account account in _user.GuildWars2Accounts)
{
<tr>
<td>
<InputRadio Value="@account.GuildWars2AccountId" /> @account.AccountName
</td>
<td>
<div class="nav-item px-3">
@{string navLink = $"gw2accountedit/{@account.GuildWars2AccountId}";}
<NavLink class="nav-link" href="@navLink">Edit</NavLink>
</div>
</td>
</tr>
}
</InputRadioGroup>
</table>
<br />
<button type="submit">Save</button>
<ValidationSummary />
</EditForm>
<br />
<div class="nav-item px-3">
<NavLink class="nav-link" href="gw2accountedit">
<span class="oi oi-plus" aria-hidden="true"></span> Add Guild Wars 2 Account
</NavLink>
</div>
@foreach(GuildWars2Account account in _user.GuildWars2Accounts)
{
<div class="nav-item px-3">
@{string navLink = $"gw2accountedit/{@account.GuildWars2AccountId}";}
<NavLink class="nav-link" href="@navLink">@account.AccountName</NavLink>
</div>
}
</Authorized>
</AuthorizeView>
@ -73,6 +86,10 @@
_user = UserService.GetLiebUserGW2AccountOnly(discordId);
}
async Task Changed(int buildId, ChangeEventArgs args)
{
bool canTank = bool.Parse(args.Value.ToString());
}
private async Task HandleValidSubmit()
{