1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- @inherits LayoutComponentBase
- @using Console = HyperCube.Utils.AdvConsole;
- <div class="page">
- <div class="sidebar">
- <NavMenu />
- </div>
- <div class="main">
- <div class="top-row px-4 auth">
- @if (connected)
- {
- <span class="dot-green"></span>
- }
- else
- {
- <span class="dot-red"></span>
- }
- <EditForm Model="Networks">
- <InputSelect @bind-Value="Networks" class="custom-select">
- @foreach (var value in Networks)
- {
- <option>@value</option>
- }
- </InputSelect>
- </EditForm>
- <a class="navbar-brand" href="">Правовая информация</a>
- <a class="navbar-brand" href="">Контакты</a>
- <LoginDisplay />
- </div>
- <div class="content px-4">
- @Body
- </div>
- </div>
- </div>
- @using HyperCube.Models;
- @code {
- List<string> Networks = new();
- bool connected = false;
- protected override async Task OnInitializedAsync()
- {
- try
- {
- await Blockchain.GetInstance().Initialize();
- if (Blockchain.Connected != "" && Blockchain.Connected != "none")
- {
- connected = true;
- Networks.Add(Blockchain.Connected);
- }
- else
- {
- connected = false;
- Networks.Add("Blockchain not connected");
- }
- }
- catch (Exception e)
- {
- Console.WriteLine(e.Message + ", stack trace:" + e.StackTrace);
- }
- }
- }
|