123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- @page "/wallet"
- @using Microsoft.AspNetCore.Identity;
- @inject AuthenticationStateProvider AuthenticationStateProvider
- @inject UserManager<IdentityUser> UserManager;
- @attribute [Authorize]
- @code
- {
- bool adm = false;
- bool init = false;
- bool ver = false;
- bool req = false;
- bool admin { get { return adm; }
- set { adm = value;
- if (!account.roles.Contains(Models.Role.Admin))
- account.roles.Add(Models.Role.Admin);
- else
- account.roles.Remove(Models.Role.Admin);
- }
- }
- bool initiator { get { return init; } set { init = value;
- if (!account.roles.Contains(Models.Role.Initiator))
- account.roles.Add(Models.Role.Initiator);
- else
- account.roles.Remove(Models.Role.Initiator);
- } }
- bool verifier { get { return ver; } set { ver = value;
- if (!account.roles.Contains(Models.Role.Verifier))
- account.roles.Add(Models.Role.Verifier);
- else
- account.roles.Remove(Models.Role.Verifier);
- } }
- bool requester { get { return req; } set { req = value;
- if (!account.roles.Contains(Models.Role.Requester))
- account.roles.Add(Models.Role.Requester);
- else
- account.roles.Remove(Models.Role.Requester);
- } }
- }
- <div class="tabs__content">
- <div class="tabs__controls">
- <a href="DocEdit" class="tabs__btn">Загрузка материалов</a>
- <a href="Verifying" class="tabs__btn">Верификация</a>
- <a class="tabs__btn">Библиотеки</a>
- <a class="tabs__btn">Заказы</a>
- </div>
- <div class="upload">
- <h2 class="upload__title">Кошелек @account.roles.Count; @account.Name</h2>
- </div>
- <table class="table-bordered" cellspacing="5" cellpadding="5">
- <tbody>
- <tr>
- <td>UUID:</td>
- <td>@account.UUID</td>
- </tr>
- <tr>
- <td>Name:</td>
- <td>@account.Name</td>
- </tr>
- <tr>
- <td>Email:</td>
- <td>@account.Email</td>
- </tr>
- <tr>
- <td>ETH Address:</td>
- <td>@account.eth_address</td>
- </tr>
- <tr>
- <td>Balance:</td>
- <td>@myBalance WEI</td>
- </tr>
- <tr>
- <td>Администратор:</td>
- <td><input @bind="admin" type="checkbox" name="admin" /></td>
- </tr>
- <tr>
- <td>Инициатор:<input @bind="initiator" type="checkbox" name="init" /></td>
- </tr>
- <tr>
- <td>Заказчик:</td>
- <td><input @bind="verifier" type="checkbox" name="request" /></td>
- </tr>
- <tr>
- <td>Верификатор:<input @bind="requester" type="checkbox" name="vaerify" /></td>
- </tr>
- <p>
- @foreach (var role in account.roles)
- @role
- </p>
- </tbody>
- </table>
- </div>
|