2026-02-15 23:08:54 +01:00
|
|
|
# Shows the CLI last used settings from LastUsedSettings.json file, displays pending changes and prompts the user to apply them.
|
2026-07-19 22:06:07 +02:00
|
|
|
function Show-CliLastUsedSettings {
|
|
|
|
|
Write-CliHeader 'Custom Mode'
|
2026-02-15 23:08:54 +01:00
|
|
|
|
|
|
|
|
try {
|
2026-07-19 22:06:07 +02:00
|
|
|
Import-Settings -filePath $script:SavedSettingsFilePath -expectedVersion "1.0"
|
2026-02-15 23:08:54 +01:00
|
|
|
}
|
|
|
|
|
catch {
|
|
|
|
|
Write-Error "Failed to load settings from LastUsedSettings.json file: $_"
|
2026-07-19 22:06:07 +02:00
|
|
|
Wait-ForKeyPress
|
2026-02-15 23:08:54 +01:00
|
|
|
}
|
|
|
|
|
|
2026-03-18 19:28:47 +01:00
|
|
|
if ($Silent) {
|
|
|
|
|
# Skip change summary and confirmation prompt
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-19 22:06:07 +02:00
|
|
|
Write-PendingChanges
|
|
|
|
|
Write-CliHeader 'Custom Mode'
|
2026-02-15 23:08:54 +01:00
|
|
|
}
|