mirror of
https://github.com/black7375/Firefox-UI-Fix.git
synced 2025-12-06 02:30:54 -08:00
Clean: Install - Separated set custom method
This commit is contained in:
parent
ac51fa2753
commit
352616c87d
2 changed files with 70 additions and 62 deletions
66
install.ps1
66
install.ps1
|
|
@ -678,10 +678,43 @@ function Copy-CustomFiles() {
|
|||
}
|
||||
}
|
||||
|
||||
$customFileApplied = $false
|
||||
$customMethod = ""
|
||||
$customReset = $false
|
||||
$customAppend = $false
|
||||
function Set-CustomMethod() {
|
||||
$local:menuAppend="Append - Maintain changes in existing files and apply custom"
|
||||
$local:menuOverwrite="Overwrite - After initializing the change, apply only custom"
|
||||
$local:menuNone="None - Maintain changes in existing files"
|
||||
$local:menuReset="Reset- Reset to pure lepton theme without custom"
|
||||
|
||||
Write-Host "Select custom method"
|
||||
while ( "${customMethod}" -eq "" ) {
|
||||
$local:applyMethod = Menu @("${menuAppend}", "${menuOverwrite}", "${menuNone}", "${menuReset}")
|
||||
switch ( $applyMethod ) {
|
||||
"${menuAppend}" {
|
||||
$global:customMethod = "Append"
|
||||
$global:customAppend = $true
|
||||
}
|
||||
"${menuOverwrite}" {
|
||||
$global:customMethod = "Overwrite"
|
||||
$global:customReset = $true
|
||||
$global:customAppend = $true
|
||||
}
|
||||
"${menuNone}" {
|
||||
$global:customMethod = "None"
|
||||
}
|
||||
"${menuReset}" {
|
||||
$global:customMethod = "Reset"
|
||||
$global:customReset = $true
|
||||
}
|
||||
default { Write-Host "Invalid option, reselect please." }
|
||||
}
|
||||
}
|
||||
|
||||
Lepton-OKMessage "Selected ${customMethod}"
|
||||
}
|
||||
|
||||
$customFileApplied = $false
|
||||
function Apply-CustomFile() {
|
||||
Param (
|
||||
[Parameter(Mandatory=$true, Position=0)]
|
||||
|
|
@ -698,36 +731,7 @@ function Apply-CustomFile() {
|
|||
$global:customFileApplied = $true
|
||||
|
||||
if ( "${customMethod}" -eq "" ) {
|
||||
$local:menuAppend="Append - Maintain changes in existing files and apply custom"
|
||||
$local:menuOverwrite="Overwrite - After initializing the change, apply only custom"
|
||||
$local:menuNone="None - Maintain changes in existing files"
|
||||
$local:menuReset="Reset- Reset to pure lepton theme without custom"
|
||||
|
||||
Write-Host "Select custom method"
|
||||
while ( "${customMethod}" -eq "" ) {
|
||||
$local:applyMethod = Menu @("${menuAppend}", "${menuOverwrite}", "${menuNone}", "${menuReset}")
|
||||
switch ( $applyMethod ) {
|
||||
"${menuAppend}" {
|
||||
$global:customMethod = "Append"
|
||||
$global:customAppend = $true
|
||||
}
|
||||
"${menuOverwrite}" {
|
||||
$global:customMethod = "Overwrite"
|
||||
$global:customReset = $true
|
||||
$global:customAppend = $true
|
||||
}
|
||||
"${menuNone}" {
|
||||
$global:customMethod = "None"
|
||||
}
|
||||
"${menuReset}" {
|
||||
$global:customMethod = "Reset"
|
||||
$global:customReset = $true
|
||||
}
|
||||
default { Write-Host "Invalid option, reselect please." }
|
||||
}
|
||||
}
|
||||
|
||||
Lepton-OKMessage "Selected ${customMethod}"
|
||||
Set-CustomMethod
|
||||
}
|
||||
|
||||
if ( "${customReset}" -eq $true ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue