mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
Сделал автоматическую ссылку на QR, а так же в appsettings есть возможность выбора порта
This commit is contained in:
1 parent
2482e30cb3
commit
4b78e211f6
9 files changed
+69
-24
No files matched your search
@@ -1,5 +1,6 @@
|
||||
@inject NavigationManager navigationManager
|
||||
@inject DialogService DialogService
|
||||
@inject HttpClient http
|
||||
@inject IJSRuntime JS
|
||||
|
||||
<RadzenCard Variant="Variant.Outlined" Style="width:100%; max-width:none; padding: 8px;">
|
||||
@@ -26,6 +27,7 @@
|
||||
@code {
|
||||
[EditorRequired][Parameter] public Shared.Models.Printer.PrinterItemList Printer { get; set; }
|
||||
|
||||
|
||||
protected async override Task OnInitializedAsync()
|
||||
{
|
||||
}
|
||||
@@ -36,10 +38,15 @@
|
||||
|
||||
if (!isPhone)
|
||||
{
|
||||
string BaseAddress = await (await http.GetAsync(Shared.Classes.ApiRoutes.Network.BaseAddress)).Content.ReadAsStringAsync();
|
||||
BaseAddress = BaseAddress.Replace("\"", "");
|
||||
|
||||
Console.WriteLine($"{BaseAddress}/Printer/{Printer.Id}/CartridgeReplace");
|
||||
|
||||
var result = await DialogService.OpenAsync("Simple Dialog", ds =>
|
||||
@<RadzenStack Gap="1.5rem">
|
||||
<RadzenStack Orientation="Orientation.Horizontal" Gap="0.5rem" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.SpaceBetween">
|
||||
<RadzenQRCode Value="@($"http://192.168.0.26:5000/Printer/{Printer.Id}/CartridgeReplace")" />
|
||||
<RadzenQRCode Value="@($"{BaseAddress}/Printer/{Printer.Id}/CartridgeReplace")" />
|
||||
</RadzenStack>
|
||||
</RadzenStack>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user