Update samy.ps1

This commit is contained in:
2025-12-01 03:51:09 -05:00
parent 88b6aeef24
commit 4b0394ba5d

View File

@@ -909,11 +909,21 @@ Write-LogHybrid "Tasks by page: onboard=$(
### Get SVSMSP module version to display in the UI
function Get-ModuleVersionHtml {
$mod = Get-Module -ListAvailable -Name SVSMSP | Sort-Object Version -Descending | Select-Object -First 1
# Friendly branch label based on $Script:SamyBranch
$branchDisplay = switch ($Script:SamyBranch.ToLower()) {
'main' { 'Main / Stable' }
'beta' { 'Beta' }
default { $Script:SamyBranch }
}
if ($mod) {
return "<div style='color:#bbb; font-size:0.9em; margin-top:1em;'>Module Version: $($mod.Version)</div>"
return "<div style='color:#bbb; font-size:0.9em; margin-top:1em;'>Module Version: $($mod.Version)<span style='margin-left:10px;'>UI Branch: $branchDisplay</span></div>"
}
return "<div style='color:#f66;'>SVSMSP_Module not found</div>"
}
}
#endregion Get-ModuleVersionHtml
@@ -1063,10 +1073,6 @@ $cssContent
{{moduleVersion}}
</div>
<div style="color:#bbb; font-size:0.8em; margin-top:2px;">
UI Branch: {{branchTag}}
</div>
<!-- Centered rotating tagline -->
<div id="tagline" class="tagline">
Script Automation Monkey (Yeah!)
@@ -1204,7 +1210,6 @@ $jsContent
$html = $html.Replace('{{appsCheckboxes}}', $apps)
$html = $html.Replace('{{tasksJsAll}}', $tasksJsAll)
$html = $html.Replace('{{defaultPage}}', $Page)
$html = $html.Replace('{{branchTag}}', $branchDisplay)
return $html