mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-02-17 07:56:24 +00:00
Refactor code structure for improved readability and maintainability (#473)
* Add ToolTips to Tweaks
This commit is contained in:
30
Scripts/CLI/ShowCLIMenuOptions.ps1
Normal file
30
Scripts/CLI/ShowCLIMenuOptions.ps1
Normal file
@@ -0,0 +1,30 @@
|
||||
# Shows the CLI menu options and prompts the user to select one. Loops until a valid option is selected.
|
||||
function ShowCLIMenuOptions {
|
||||
Do {
|
||||
$ModeSelectionMessage = "Please select an option (1/2)"
|
||||
|
||||
PrintHeader 'Menu'
|
||||
|
||||
Write-Host "(1) Default mode: Quickly apply the recommended changes"
|
||||
Write-Host "(2) App removal mode: Select & remove apps, without making other changes"
|
||||
|
||||
# Only show this option if SavedSettings file exists
|
||||
if (Test-Path $script:SavedSettingsFilePath) {
|
||||
Write-Host "(3) Quickly apply your last used settings"
|
||||
|
||||
$ModeSelectionMessage = "Please select an option (1/2/3)"
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host ""
|
||||
|
||||
$Mode = Read-Host $ModeSelectionMessage
|
||||
|
||||
if (($Mode -eq '3') -and -not (Test-Path $script:SavedSettingsFilePath)) {
|
||||
$Mode = $null
|
||||
}
|
||||
}
|
||||
while ($Mode -ne '1' -and $Mode -ne '2' -and $Mode -ne '3')
|
||||
|
||||
return $Mode
|
||||
}
|
||||
Reference in New Issue
Block a user