Style changes
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
@page "/"
|
||||
@page "/AwaitingDisposition"
|
||||
|
||||
@using MudBlazor
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
|
||||
@namespace OI.Metrology.View
|
||||
@ -13,12 +14,8 @@
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||
<div class="col-xs-1">
|
||||
<input type="button" class="btn" id="OpenButton" value="Open" />
|
||||
</div>
|
||||
<div class="col-xs-1">
|
||||
<input type="button" class="btn" id="RefreshButton" value="Refresh" />
|
||||
</div>
|
||||
<MudChip Icon="@Icons.Material.Filled.FileOpen" Color="Color.Primary" Label="true" id="OpenButton">Open</MudChip>
|
||||
<MudChip Icon="@Icons.Material.Filled.Refresh" Color="Color.Primary" Label="true" id="RefreshButton">Refresh</MudChip>
|
||||
</div>
|
||||
|
||||
<script suppress-error="BL9992">
|
||||
|
@ -1,3 +1,4 @@
|
||||
// using IgniteUI.Blazor.Controls;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.JSInterop;
|
||||
@ -8,6 +9,9 @@ namespace OI.Metrology.View;
|
||||
public partial class AwaitingDisposition
|
||||
{
|
||||
|
||||
// protected IgbIcon? OpenIconRef { get; set; }
|
||||
// protected IgbIcon? RefreshIconRef { get; set; }
|
||||
|
||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||
[Inject] protected HttpClient? HttpClient { get; set; }
|
||||
[Inject] protected AppSettings? AppSettings { get; set; }
|
||||
@ -15,6 +19,18 @@ public partial class AwaitingDisposition
|
||||
|
||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
// if (firstRender && OpenIconRef is not null)
|
||||
// {
|
||||
// const string svg = "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='512' height='512' aria-labelledby='gyjump-down-desc gyjump-down-title'><title id='gyjump-down-title'>Jump Down Icon</title><desc id='gyjump-down-desc'>A picture showing a bent arrow pointing down towards a line.</desc><path d='M21.5 18.5v2h-16v-2h16zm-8-15c1.6 0 3 .5 4.3 1.2l-1.5 1.5c-.8-.4-1.8-.7-2.8-.7-3.3 0-6 2.7-6 6h3l-4 4-4-4h3c0-1.5.4-2.9 1.2-4.2.6-1 1.4-1.8 2.4-2.5 1.2-.8 2.8-1.3 4.4-1.3z'/></svg>";
|
||||
// _ = OpenIconRef.EnsureReady().ContinueWith(new Action<Task>((e) =>
|
||||
// OpenIconRef.RegisterIconFromTextAsync("jump-down", svg, "material")));
|
||||
// }
|
||||
// if (firstRender && RefreshIconRef is not null)
|
||||
// {
|
||||
// const string svg = "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='512' height='512' aria-labelledby='lzsystem-update-desc lzsystem-update-title'><title id='lzsystem-update-title'>System Update Icon</title><desc id='lzsystem-update-desc'>A picture depicting a computer screen with a reload symbol in the middle.</desc><path d='M20 2H4a2 2 0 00-2 2v12a2 2 0 002 2h6l-2 4h8l-2-4h6a2 2 0 002-2V4a2 2 0 00-2-2zm-8.194 2.923a5.077 5.077 0 104.724 6.923h.982a6.019 6.019 0 11-.237-4.277l.919-.2-.85 2.631-1.85-2.049.857-.184a5.1 5.1 0 00-4.545-2.844zM14 11.424l-.8.8-2-2V6.715h1.139v3.042z'/></svg>";
|
||||
// _ = RefreshIconRef.EnsureReady().ContinueWith(new Action<Task>((e) =>
|
||||
// RefreshIconRef.RegisterIconFromTextAsync("system-update", svg, "material")));
|
||||
// }
|
||||
if (firstRender)
|
||||
{
|
||||
if (JSRuntime is null)
|
||||
|
@ -1,7 +1,15 @@
|
||||
@page "/index"
|
||||
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using IgniteUI.Blazor.Controls
|
||||
|
||||
@namespace OI.Metrology.View
|
||||
|
||||
<PageTitle>Index</PageTitle>
|
||||
|
||||
<IgbChip Size="SizableComponentSize.Medium" Selectable="false" Removable="false">
|
||||
<span slot="start">
|
||||
<IgbIcon @ref="@BrushIconRef" IconName="brush" Collection="material" ></IgbIcon>
|
||||
</span>
|
||||
Start Slot
|
||||
</IgbChip>
|
||||
|
@ -1,4 +1,32 @@
|
||||
namespace OI.Metrology.View;
|
||||
using IgniteUI.Blazor.Controls;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
namespace OI.Metrology.View;
|
||||
|
||||
public partial class Index
|
||||
{ }
|
||||
{
|
||||
|
||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||
|
||||
protected IgbIcon? BrushIconRef { get; set; }
|
||||
|
||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender && BrushIconRef is not null)
|
||||
{
|
||||
string refreshIcon = "<svg width='24px' height='24px' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-refresh-ccw'><polyline points='1 4 1 10 7 10'></polyline><polyline points='23 20 23 14 17 14'></polyline><path d='M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15'></path></svg>";
|
||||
string brushIcon = "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' aria-labelledby='bqbrush-desc bqbrush-title'><title id='bqbrush-title'>Brush Icon</title><desc id='bqbrush-desc'>A picture showing a painting brush.</desc><path d='M13.093 6.743a1.074 1.074 0 011.306.251l.237.237-6.4 6.4-.242-.231a1.074 1.074 0 01-.251-1.306c.446-.693 1.553-2.516.515-3.554-1.584-1.585-2.225-.94-3.809-2.528S2.714 3 3.354 2.354s2.073-.489 3.658 1.095.943 2.225 2.527 3.809c1.038 1.042 2.861-.069 3.554-.515zm6.93 5.874L15.31 7.9 8.9 14.31l4.433 4.433c-.039.159-.084.327-.137.508 0 0-.8 2.749.8 2.749s.8-2.749.8-2.749a10.75 10.75 0 01-.272-1.14L16.2 16.44a8.944 8.944 0 00-2.072-3.314s.555-.545 3.323 2.063l.811-.811-1.54-2.5 2.5 1.539z'/></svg>";
|
||||
_ = BrushIconRef.EnsureReady().ContinueWith(new Action<Task>((e) =>
|
||||
BrushIconRef.RegisterIconFromTextAsync("brush", brushIcon, "material")));
|
||||
}
|
||||
if (firstRender)
|
||||
{
|
||||
if (JSRuntime is null)
|
||||
throw new NullReferenceException(nameof(JSRuntime));
|
||||
return JSRuntime.InvokeVoidAsync("initIndex").AsTask();
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using IgniteUI.Blazor.Controls;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
@ -6,11 +7,19 @@ namespace OI.Metrology.View;
|
||||
public partial class RunHeaders
|
||||
{
|
||||
|
||||
protected IgbIcon? IconRef { get; set; }
|
||||
|
||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||
[Inject] protected Models.AppSettings? AppSettings { get; set; }
|
||||
|
||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender && IconRef is not null)
|
||||
{
|
||||
const string buildIcon = "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z'/></svg>";
|
||||
_ = IconRef.EnsureReady().ContinueWith(new Action<Task>((e) =>
|
||||
IconRef.RegisterIconFromTextAsync("build", buildIcon, "material")));
|
||||
}
|
||||
if (firstRender)
|
||||
{
|
||||
if (JSRuntime is null)
|
||||
|
@ -1,3 +1,4 @@
|
||||
using IgniteUI.Blazor.Controls;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
@ -6,6 +7,8 @@ namespace OI.Metrology.View;
|
||||
public partial class RunInfo
|
||||
{
|
||||
|
||||
protected IgbIcon? IconRef { get; set; }
|
||||
|
||||
[Parameter] public int? HeaderId { get; set; }
|
||||
[Parameter] public int? ToolTypeId { get; set; }
|
||||
|
||||
@ -14,6 +17,12 @@ public partial class RunInfo
|
||||
|
||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender && IconRef is not null)
|
||||
{
|
||||
const string buildIcon = "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z'/></svg>";
|
||||
_ = IconRef.EnsureReady().ContinueWith(new Action<Task>((e) =>
|
||||
IconRef.RegisterIconFromTextAsync("build", buildIcon, "material")));
|
||||
}
|
||||
if (firstRender)
|
||||
{
|
||||
if (JSRuntime is null)
|
||||
|
@ -5,44 +5,54 @@
|
||||
<MudDialogProvider />
|
||||
<MudSnackbarProvider />
|
||||
|
||||
<div class="navbar navbar-fixed-top @(AppSettings is not null && AppSettings.IsDevelopment ? "test-database" : "" )">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="navbar-brand">
|
||||
<a href="/"><img src="images/IFX_LOGO_RGB.png" height="20" /></a>
|
||||
OI Metrology Viewer
|
||||
<MudThemeProvider Theme="_MyCustomTheme" />
|
||||
|
||||
<MudPaper Style="padding:1px;">
|
||||
<div class="navbar navbar-fixed-top @_Database">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="navbar-brand">
|
||||
<a href="/"><img src="images/IFX_LOGO_RGB.png" height="20" /></a>
|
||||
OI Metrology Viewer
|
||||
</div>
|
||||
</div>
|
||||
@if (AppSettings is not null && AppSettings.IsDevelopment)
|
||||
{
|
||||
<p class="navbar-text hidden-xs hidden-sm"><span class="test-database-text">TEST DATABASE</span></p>
|
||||
}
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="AwaitingDisposition">Awaiting Disposition</a></li>
|
||||
<li><a href="RunInfo">Run Information</a></li>
|
||||
<li><a href="RunHeaders">Run Headers</a></li>
|
||||
<li><a href="Export">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@if (AppSettings is not null && AppSettings.IsDevelopment)
|
||||
{
|
||||
<p class="navbar-text hidden-xs hidden-sm"><span class="test-database-text">TEST DATABASE</span></p>
|
||||
}
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="AwaitingDisposition">Awaiting Disposition</a></li>
|
||||
<li><a href="RunInfo">Run Information</a></li>
|
||||
<li><a href="RunHeaders">Run Headers</a></li>
|
||||
<li><a href="Export">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid body-content">
|
||||
@Body
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© @DateTime.Now.Year - Infineon Technologies</p>
|
||||
@if (AppSettings is not null && AppSettings.IsDevelopment)
|
||||
{
|
||||
<p><strong>Request ID:</strong><code>@_RequestId</code></p>
|
||||
}
|
||||
</footer>
|
||||
</div>
|
||||
<div class="container-fluid body-content">
|
||||
@Body
|
||||
<hr />
|
||||
<footer>
|
||||
@if (AppSettings is not null && AppSettings.IsDevelopment)
|
||||
{
|
||||
<p class="navbar-text navbar-right">
|
||||
<MudSwitch @bind-Checked="@_IsDarkMode" Color="Color.Primary" Class="ma-4" T="bool" Label="Toggle Light/Dark Mode" />
|
||||
</p>
|
||||
}
|
||||
<p>© @DateTime.Now.Year - Infineon Technologies</p>
|
||||
@if (AppSettings is not null && AppSettings.IsDevelopment)
|
||||
{
|
||||
<p><strong>Request ID:</strong><code>@_RequestId</code></p>
|
||||
}
|
||||
</footer>
|
||||
</div>
|
||||
</MudPaper>
|
||||
|
||||
<div id="MessageModal"></div>
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MudBlazor;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace OI.Metrology.View.Shared;
|
||||
@ -6,14 +7,42 @@ namespace OI.Metrology.View.Shared;
|
||||
public partial class MainLayout
|
||||
{
|
||||
|
||||
private bool _IsDarkMode;
|
||||
private string? _Database;
|
||||
private string? _RequestId;
|
||||
private MudTheme? _MyCustomTheme;
|
||||
private MudThemeProvider? _MudThemeProvider;
|
||||
|
||||
[Inject] protected Models.AppSettings? AppSettings { get; set; }
|
||||
// [Inject] protected IHttpContextAccessor? HttpContextAccessor { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
_RequestId = Activity.Current?.Id ?? string.Empty;
|
||||
_Database = AppSettings is not null && !AppSettings.IsDevelopment ? "test-database" : "prod-database";
|
||||
_RequestId = Activity.Current?.Id ?? string.Empty; // HttpContextAccessor?.HttpContext?.TraceIdentifier;
|
||||
_MyCustomTheme = new MudTheme()
|
||||
{
|
||||
Palette = new Palette()
|
||||
{
|
||||
Primary = "#478f7c",
|
||||
Secondary = "#AB377A",
|
||||
Success = "#AEC067",
|
||||
Info = "#928285",
|
||||
Warning = "#F07F3C",
|
||||
Error = "#E30034",
|
||||
AppbarBackground = "#478f7c",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender && _MudThemeProvider is not null && _MyCustomTheme is not null)
|
||||
{
|
||||
_IsDarkMode = await _MudThemeProvider.GetSystemPreference();
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user