Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
badhitman committed Feb 23, 2024
1 parent acee4d1 commit b058dfd
Show file tree
Hide file tree
Showing 12 changed files with 898 additions and 22 deletions.
12 changes: 12 additions & 0 deletions ab-log.web/ab-log.web.Client/Pages/CamerasPage.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@page "/cameras-page"

@inject ILogger<CamerasPage> _loger
@inject IRefitCamerasService _refit

@inherits BlazorBusyComponentBaseModel

<PageTitle>Камеры</PageTitle>

@code {

}
34 changes: 34 additions & 0 deletions ab-log.web/ab-log.web.Client/Pages/HardwareConfigPage.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@page "/hardware-page/{Id:int}"

@using RazorLib.Shared.navs.tabs
@using RazorLib.Shared.hardwares
@using RazorLib.Shared;
@using BlazorLib
@using SharedLib
@using Refit

@inject ILogger<HardwaresPage> _loger

@inherits BlazorBusyComponentBaseModel

<PageTitle>
Управляющий блок #@(Id)
</PageTitle>

<h1>Настройка управляющего блока</h1>

<CascadingValue Value="@Id">
<TabSetComponent>
<TabComponent Tooltip="Управляющий блок" Title="Управляющий блок">
<HardwareFormComponent />
</TabComponent>
<TabComponent Tooltip="Ретранслятор" Title="Ретранслятор">
<HardwareTranslateMainLayerComponent />
</TabComponent>
</TabSetComponent>
</CascadingValue>

@code {
[Parameter, EditorRequired]
public int Id { get; set; }
}
53 changes: 53 additions & 0 deletions ab-log.web/ab-log.web.Client/Pages/HardwaresPage.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@page "/hardwares-page"

@using RazorLib.Shared.hardwares
@using BlazorLib
@using SharedLib

@inject ILogger<HardwaresPage> _loger
@inject IRefitHardwaresService _refit

@inherits BlazorBusyComponentBaseModel

<PageTitle>Устройства</PageTitle>

<nav class="navbar bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand">Устройства</a>
<div class="d-flex">
<button @onclick="OpeningToggle" class="btn btn-outline-success" type="submit">Добавить</button>
</div>
</div>
</nav>
<br />
<HardwaresListComponent @ref="refCom" />

@if (IsAddingHardware)
{
<div class="offcanvas offcanvas-end show" tabindex="-1" id="offcanvasBottom" aria-labelledby="offcanvasBottomLabel" aria-modal="true" role="dialog">
<div class="offcanvas-header">
<h5>
Новый контроллер:
</h5>
<button @onclick="OpeningToggle" type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<HardwareFormComponent UpdateFormEvent="OpeningToggle" />
</div>
</div>
<div @onclick="OpeningToggle" class="offcanvas-backdrop fade show"></div>
}

@code {
bool IsAddingHardware = false;

HardwaresListComponent? refCom;

void OpeningToggle()
{
IsAddingHardware = !IsAddingHardware;
StateHasChanged();
if (!IsAddingHardware)
refCom?.ReloadHardwares();
}
}
26 changes: 26 additions & 0 deletions ab-log.web/ab-log.web.Client/Pages/IndexPage.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@page "/"



<PageTitle>Настройки</PageTitle>

<figure>
<blockquote class="blockquote">
<p>Локальный сервер.</p>
</blockquote>
<figcaption class="blockquote-footer">
Прямой доступ к системе
</figcaption>
</figure>

<MudTabs Elevation="2" Rounded="true" ApplyEffectsToContainer="true" PanelClass="pa-6">
<MudTabPanel Text="Email">
<EmailConfigComponent />
</MudTabPanel>
<MudTabPanel Text="Telegram bot">
<TelegramBotConfigComponent />
</MudTabPanel>
<MudTabPanel Text="About">
<AboutComponent />
</MudTabPanel>
</MudTabs>
9 changes: 9 additions & 0 deletions ab-log.web/ab-log.web.Client/Pages/MqttConfigPage.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@page "/mqtt-config-page"

@using RazorLib.Shared.settings

<MqttConfigComponent />

@code {

}
Loading

0 comments on commit b058dfd

Please sign in to comment.