From 4b0394ba5db394c09ac27d276a1fdad72ab9fb3a Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Mon, 1 Dec 2025 03:51:09 -0500 Subject: [PATCH] Update samy.ps1 --- samy.ps1 | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/samy.ps1 b/samy.ps1 index 1df138b..f06ca3d 100644 --- a/samy.ps1 +++ b/samy.ps1 @@ -907,13 +907,23 @@ Write-LogHybrid "Tasks by page: onboard=$( #region Get-ModuleVersionHtml ### 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 - if ($mod) { - return "
Module Version: $($mod.Version)
" - } - return "
SVSMSP_Module not found
" - } + 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 "
Module Version: $($mod.Version)UI Branch: $branchDisplay
" + } + + return "
SVSMSP_Module not found
" +} + #endregion Get-ModuleVersionHtml @@ -1063,10 +1073,6 @@ $cssContent {{moduleVersion}} -
- UI Branch: {{branchTag}} -
-
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