added the Module Ver. under logo
This commit is contained in:
@@ -296,7 +296,14 @@ $subHtml
|
||||
}
|
||||
|
||||
|
||||
|
||||
### Get SVSMSP module version to display in the UI
|
||||
function Get-ModuleVersionHtml {
|
||||
$mod = Get-Module -ListAvailable -Name SVSMSP_Module | Sort-Object Version -Descending | Select-Object -First 1
|
||||
if ($mod) {
|
||||
return "<div style='color:#bbb; font-size:0.9em; margin-top:1em;'>Module Version: $($mod.Version)</div>"
|
||||
}
|
||||
return "<div style='color:#f66;'>SVSMSP_Module not found</div>"
|
||||
}
|
||||
|
||||
|
||||
function Get-UIHtml {
|
||||
@@ -660,6 +667,7 @@ $htmlTemplate = @"
|
||||
<body>
|
||||
<div class="logo-container">
|
||||
<img src="https://git.svstools.com/syelle/Logo/raw/branch/main/SVS_logo.svg" alt="SVS Logo">
|
||||
{{moduleVersion}}
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="sidebar">
|
||||
@@ -767,6 +775,7 @@ $htmlTemplate = @"
|
||||
# 5) Inject into template
|
||||
#
|
||||
$html = $htmlTemplate
|
||||
$html = $html.Replace('{{moduleVersion}}', (Get-ModuleVersionHtml))
|
||||
$html = $html.Replace('{{onboardLeftColumn}}', $onboardLeft)
|
||||
$html = $html.Replace('{{onboardRightColumn}}', $onboardRight)
|
||||
$html = $html.Replace('{{offboardCheckboxes}}', $offboard)
|
||||
|
||||
Reference in New Issue
Block a user