Update layout grafico MainLayout + footer + version

This commit is contained in:
Samuele Locatelli
2026-04-08 16:47:13 +02:00
parent f900437399
commit 3cfb050874
19 changed files with 438 additions and 121 deletions
+2 -4
View File
@@ -1,6 +1,4 @@
using Microsoft.Extensions.Configuration;
namespace EgwCoreLib.Lux.Data
namespace EgwCoreLib.Lux.Data
{
public partial class DataLayerContext : DbContext
{
@@ -126,7 +124,7 @@ namespace EgwCoreLib.Lux.Data
.HasKey(jst => new { jst.JobStepID, jst.CodTag });
modelBuilder.Entity<ProductionItem2ODLModel>()
.HasKey(x => new { x.ProdItemID, x.ProdODLID });
.HasKey(x => new { x.ProdItemID, x.ProdODLID });
modelBuilder.Entity<ProductionItem2ODLModel>()
.HasOne(x => x.ProductionItemNav)
@@ -0,0 +1,12 @@
<div class="d-flex justify-content-between text-light">
<div class="text-start">
Lux.ReportManager <span class="small">v.@version</span>
</div>
<div class="text-end">
<span class="small px-1">@adesso</span>
<a class="text-light" href="https://www.egalware.com/" target="_blank"><img class="img-fluid" width="12" src="images/LogoEgw.png" /> Egalware </a>
</div>
</div>
@@ -0,0 +1,72 @@
namespace Lux.Report.Manager.Components.Compo
{
public partial class CmpFooter : IDisposable
{
#region Public Methods
public void Dispose()
{
if (aTimer != null)
{
aTimer.Elapsed -= ElapsedTimer;
aTimer.Stop();
aTimer.Dispose();
}
}
#endregion Public Methods
#region Protected Methods
protected override void OnInitialized()
{
var rawVers = typeof(Program).Assembly.GetName().Version;
version = rawVers != null ? rawVers : new Version("0.0.0.0");
StartTimer();
}
#endregion Protected Methods
#region Private Fields
private DateTime adesso = DateTime.Now;
private System.Timers.Timer aTimer = null!;
private Version? version = null!;
#endregion Private Fields
#region Private Methods
private void ElapsedTimer(object? source, System.Timers.ElapsedEventArgs e)
{
var pUpd = Task.Run(async () =>
{
adesso = DateTime.Now;
await InvokeAsync(StateHasChanged);
});
pUpd.Wait();
}
private void StartTimer()
{
if (aTimer != null)
{
aTimer.Stop();
aTimer.Dispose();
}
#if DEBUG
int tOutPeriod = 1000;
#else
int tOutPeriod = 10000;
#endif
aTimer = new System.Timers.Timer(tOutPeriod);
aTimer.Elapsed += ElapsedTimer;
aTimer.Enabled = true;
aTimer.Start();
}
#endregion Private Methods
}
}
@@ -6,13 +6,16 @@
</div>
<main>
<div class="top-row px-4">
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
<div class="top-row px-4 text-end">
<a href="https://www.egalware.com/lux" target="_blank">About</a>
</div>
<article class="content px-4">
@Body
</article>
<div class="fixed-bottom bottom-row px-2 py-1">
<CmpFooter></CmpFooter>
</div>
</main>
</div>
@@ -1,96 +1,102 @@
.page {
position: relative;
display: flex;
flex-direction: column;
.page {
position: relative;
display: flex;
flex-direction: column;
}
main {
flex: 1;
flex: 1;
}
.sidebar {
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
.sidebar,
.sidebarSmall {
/*background-image: linear-gradient(180deg, rgb(5, 39, 103) 20%, #3aa6ff 90%);*/
background: -webkit-linear-gradient(to bottom, #053787, #00A5FF);
/* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to bottom, #053787, #00A5FF);
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 3.5rem;
display: flex;
align-items: center;
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
/*justify-content: flex-end;*/
height: 3.5rem;
display: flex;
align-items: center;
}
.top-row ::deep a,
.top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}
.top-row ::deep a:hover,
.top-row ::deep .btn-link:hover {
text-decoration: underline;
}
.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
.bottom-row {
color: #dedede;
background-color: #000000;
height: 1.6rem;
align-items: center;
}
.top-row ::deep a, .top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
text-decoration: underline;
}
.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
@media (max-width: 640.98px) {
.top-row {
justify-content: space-between;
}
.top-row ::deep a, .top-row ::deep .btn-link {
margin-left: 0;
}
.top-row {
justify-content: space-between;
}
.top-row ::deep a,
.top-row ::deep .btn-link {
margin-left: 0;
}
}
@media (min-width: 641px) {
.page {
flex-direction: row;
}
.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}
.top-row {
position: sticky;
top: 0;
z-index: 1;
}
.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}
.top-row, article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
.page {
flex-direction: row;
}
.sidebar {
width: 13.5rem;
height: 100vh;
position: sticky;
top: 0;
}
.sidebarSmall {
width: 4.5rem;
height: 100vh;
position: sticky;
top: 0;
}
.top-row {
position: sticky;
top: 0;
z-index: 1;
}
.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}
.top-row,
article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}
#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
@@ -0,0 +1,114 @@
.page {
position: relative;
display: flex;
flex-direction: column;
}
main {
flex: 1;
}
.sidebar,
.sidebarSmall {
/*background-image: linear-gradient(180deg, rgb(5, 39, 103) 20%, #3aa6ff 90%);*/
background: -webkit-linear-gradient(to bottom, #053787, #00A5FF); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to bottom, #053787, #00A5FF); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
/*justify-content: flex-end;*/
height: 3.5rem;
display: flex;
align-items: center;
}
.top-row ::deep a, .top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
text-decoration: underline;
}
.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
.bottom-row {
color: #dedede;
background-color: #000000;
height: 1.6rem;
align-items: center;
}
@media (max-width: 640.98px) {
.top-row {
justify-content: space-between;
}
.top-row ::deep a, .top-row ::deep .btn-link {
margin-left: 0;
}
}
@media (min-width: 641px) {
.page {
flex-direction: row;
}
.sidebar {
width: 13.5rem;
height: 100vh;
position: sticky;
top: 0;
}
.sidebarSmall {
width: 4.5rem;
height: 100vh;
position: sticky;
top: 0;
}
.top-row {
position: sticky;
top: 0;
z-index: 1;
}
.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}
.top-row, article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}
#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
@@ -0,0 +1 @@
.page{position:relative;display:flex;flex-direction:column;}main{flex:1;}.sidebar,.sidebarSmall{background:-webkit-linear-gradient(to bottom,#053787,#00a5ff);background:linear-gradient(to bottom,#053787,#00a5ff);}.top-row{background-color:#f7f7f7;border-bottom:1px solid #d6d5d5;height:3.5rem;display:flex;align-items:center;}.top-row ::deep a,.top-row ::deep .btn-link{white-space:nowrap;margin-left:1.5rem;text-decoration:none;}.top-row ::deep a:hover,.top-row ::deep .btn-link:hover{text-decoration:underline;}.top-row ::deep a:first-child{overflow:hidden;text-overflow:ellipsis;}.bottom-row{color:#dedede;background-color:#000;height:1.6rem;align-items:center;}@media(max-width:640.98px){.top-row{justify-content:space-between;}.top-row ::deep a,.top-row ::deep .btn-link{margin-left:0;}}@media(min-width:641px){.page{flex-direction:row;}.sidebar{width:13.5rem;height:100vh;position:sticky;top:0;}.sidebarSmall{width:4.5rem;height:100vh;position:sticky;top:0;}.top-row{position:sticky;top:0;z-index:1;}.top-row.auth ::deep a:first-child{flex:1;text-align:right;width:0;}.top-row,article{padding-left:2rem!important;padding-right:1.5rem!important;}}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}
@@ -8,18 +8,23 @@
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
<nav class="flex-column">
<div class="nav-item px-3">
@* <div class="nav-item px-3">
<NavLink class="nav-link" href="Home" Match="NavLinkMatch.All">
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
</NavLink>
</div>
</div> *@
<div class="nav-item px-3">
<NavLink class="nav-link" href="report-man">
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Report Customizer
<NavLink class="nav-link" href="report-man" Match="NavLinkMatch.All">
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Report List
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="../UI/">
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Lux.UI
</NavLink>
</div>
@* <div class="nav-item px-3">
<NavLink class="nav-link" href="weather">
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
@@ -1,4 +1,4 @@
@page "/"
@page "/Home"
<PageTitle>ReportManager</PageTitle>
@@ -1,6 +0,0 @@
@page "/report-editor"
<h3>ReportEditor</h3>
@code {
}
@@ -1,4 +1,5 @@
@page "/report-man"
@page "/"
@page "/report-man"
<div class="card shadow">
+28 -15
View File
@@ -1,21 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>1.1.2604.0816</Version>
</PropertyGroup>
<ItemGroup>
<Folder Include="unsafe_upload\" />
</ItemGroup>
<ItemGroup>
<Content Remove="compilerconfig.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NLog.Web.AspNetCore" />
</ItemGroup>
<ItemGroup>
<Folder Include="unsafe_upload\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lux.Report.Data\Lux.Report.Data.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="compilerconfig.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NLog.Web.AspNetCore" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lux.Report.Data\Lux.Report.Data.csproj" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
</Target>
</Project>
+6
View File
@@ -0,0 +1,6 @@
[
{
"outputFile": "Components/Layout/MainLayout.razor.css",
"inputFile": "Components/Layout/MainLayout.razor.less"
}
]
@@ -0,0 +1,59 @@
{
"compilers": {
"less": {
"autoPrefix": "",
"cssComb": "none",
"ieCompat": true,
"math": null,
"strictMath": false,
"strictUnits": false,
"relativeUrls": true,
"rootPath": "",
"sourceMapRoot": "",
"sourceMapBasePath": "",
"sourceMap": false
},
"sass": {
"autoPrefix": "",
"loadPaths": "",
"style": "expanded",
"relativeUrls": true,
"sourceMap": false
},
"stylus": {
"sourceMap": false
},
"babel": {
"sourceMap": false
},
"coffeescript": {
"bare": false,
"runtimeMode": "node",
"sourceMap": false
},
"handlebars": {
"root": "",
"noBOM": false,
"name": "",
"namespace": "",
"knownHelpersOnly": false,
"forcePartial": false,
"knownHelpers": [],
"commonjs": "",
"amd": false,
"sourceMap": false
}
},
"minifiers": {
"css": {
"enabled": true,
"termSemicolons": true,
"gzip": false
},
"javascript": {
"enabled": true,
"termSemicolons": true,
"gzip": false
}
}
}
+33
View File
@@ -0,0 +1,33 @@
param([string]$ProjectDir, [string]$ProjectPath);
$FileVers="..\Resources\VersNum.txt"
$FileManIn="..\Resources\manifest-original.xml"
$FileManOut="..\Resources\manifest.xml"
$FileCLogIn="..\Resources\ChangeLog-original.html"
$FileCLogOut="..\Resources\ChangeLog.html"
$MajMin="1.1."
$currentDate = get-date -format yyMM;
$currentTime = get-date -format ddHH;
$find = "<Version>(.|\n)*?</Version>";
$currRelNum=$MajMin + $currentDate +"." + $currentTime
$replace = "<Version>" + $MajMin + $currentDate +"." + $currentTime + "</Version>";
$csproj = Get-Content $ProjectPath
$csprojUpdated = $csproj -replace $find, $replace
Write-Output "Update csproj | $currRelNum"
Set-Content -Path $ProjectPath -Value $csprojUpdated
Set-Content -Path $FileVers -Value $currRelNum
# replace x manifest
$manData = Get-Content $FileManIn
$manData = $manData -replace "1.0.0.0", $currRelNum
$manData = $manData -replace "{{DIRNAME}}", "GPW"
$manData = $manData -replace "{{BRANCHNAME}}", "stable"
$manData = $manData -replace "{{PACKNAME}}", "GPW.UI"
Set-Content -Path $FileManOut -Value $manData
# replace x ChangeLog
$clogData = Get-Content $FileCLogIn
$clogData = $clogData -replace "{{CURRENT-REL}}", $currRelNum
Set-Content -Path $FileCLogOut -Value $clogData
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>LUX - Web Windows MES</i>
<h4>Versione: 1.1.2604.0215</h4>
<h4>Versione: 1.1.2604.0816</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.1.2604.0215
1.1.2604.0816
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.1.2604.0215</version>
<version>1.1.2604.0816</version>
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
<mandatory>false</mandatory>