Update samy.ps1

This commit is contained in:
2025-12-20 21:02:04 -05:00
parent c4a9aefd58
commit fc14845f46

View File

@@ -975,11 +975,19 @@ function Get-UIHtml {
#
# 2) Build the JS tasks array once (this is the only dynamic JS piece)
#
$tasksJsAll = (
$tasksJson = @(
$Global:SamyTasks | ForEach-Object {
" { id: '$($_.Id)', handler: '/$($_.Name)', label: '$($_.Label)' }"
[pscustomobject]@{
id = [string]$_.Id
handler = "/$([string]$_.Name)"
label = [string]$_.Label
}
}
) -join ",`n"
) | ConvertTo-Json -Depth 4
# If you still want to keep the variable name "tasksJsAll", just store JSON in it:
$tasksJsAll = $tasksJson
# Human friendly branch label for UI
$branchDisplay = switch ($Script:SamyBranch.ToLower()) {