From 9044504b86ebf07d273d62bf21faf05e50dd27e0 Mon Sep 17 00:00:00 2001 From: Michael Escamilla Date: Sun, 15 Mar 2026 19:17:34 -0700 Subject: [PATCH] Make the Serial Number and UUID masked by default in the UI. Add click events to show values if needed. --- workflow/default/ux/MainWindow.ps1 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/workflow/default/ux/MainWindow.ps1 b/workflow/default/ux/MainWindow.ps1 index 4db7faf..1d80fd0 100644 --- a/workflow/default/ux/MainWindow.ps1 +++ b/workflow/default/ux/MainWindow.ps1 @@ -349,13 +349,13 @@ $deviceOSDProductText.Text = $deviceOSDProduct $deviceComputerSystemSKUText = $window.FindName("deviceComputerSystemSKUText") $deviceComputerSystemSKUText.Text = $deviceComputerSystemSKU $deviceSerialNumberText = $window.FindName("deviceSerialNumberText") -$deviceSerialNumberText.Text = $deviceSerialNumber +$deviceSerialNumberText.Text = '*' * ($deviceSerialNumber.Length) $deviceIsAutopilotSpecText = $window.FindName("deviceIsAutopilotSpecText") $deviceIsAutopilotSpecText.Text = $deviceIsAutopilotSpec $deviceIsTpmSpecText = $window.FindName("deviceIsTpmSpecText") $deviceIsTpmSpecText.Text = $deviceIsTpmSpec $deviceUUIDText = $window.FindName("deviceUUIDText") -$deviceUUIDText.Text = $deviceUUID +$deviceUUIDText.Text = '*' * ($deviceUUID.Length) $SelectedOSLanguageText = $window.FindName("SelectedOSLanguageText") $SelectedIdText = $window.FindName("SelectedIdText") $SelectedFileNameText = $window.FindName("SelectedFileNameText") @@ -364,6 +364,22 @@ $DriverPackUrlText.Text = [string]$global:OSDCloudDeploy.DriverPackObject.Url $StartButton = $window.FindName("StartButton") $StartButton.IsEnabled = $false +$deviceUUIDText.Add_MouseDown({ + if ($deviceUUIDText.Text -match '\*') { + $deviceUUIDText.Text = $deviceUUID + } else { + $deviceUUIDText.Text = '*' * ($deviceUUID.Length) + } +}) + +$deviceSerialNumberText.Add_MouseDown({ + if ($deviceSerialNumberText.Text -match '\*') { + $deviceSerialNumberText.Text = $deviceSerialNumber + } else { + $deviceSerialNumberText.Text = '*' * ($deviceSerialNumber.Length) + } +}) + function Get-ComboValue { param( [Parameter(Mandatory)]