Aded new parameter "rightsidebar_off" (#447)

- new parameter "rightsidebar_off"
- removed css rules to fix new cover
This commit is contained in:
amd64fox
2023-06-22 17:35:22 +03:00
committed by GitHub
parent 82645ab213
commit 0168df8d12
2 changed files with 11 additions and 37 deletions

View File

@@ -45,6 +45,9 @@ param
[Parameter(HelpMessage = 'Do not hide the icon of collaborations in playlists.')]
[switch]$hide_col_icon_off,
[Parameter(HelpMessage = 'disable new right sidebar.')]
[switch]$rightsidebar_off,
[Parameter(HelpMessage = 'Do not enable enhance playlist.')]
[switch]$enhance_playlist_off,
@@ -985,8 +988,14 @@ function Helper($paramname) {
}
# New theme
else {
if (!($rightsidebarcolor)) { $remEnable.remove('RightSidebarColors') }
if ($old_lyrics) { $remEnable.remove('RightSidebarLyrics') }
if ($rightsidebar_off) {
$RightSidebar = $webjson.others.EnableExp.RightSidebar
$webjson.others.DisableExp | Add-Member -MemberType NoteProperty -Name "RightSidebar" -Value $RightSidebar
}
else {
if (!($rightsidebarcolor)) { $remEnable.remove('RightSidebarColors') }
if ($old_lyrics) { $remEnable.remove('RightSidebarLyrics') }
}
}
if (!$premium) { $remEnable.remove('RemoteDownloads') }
@@ -1430,21 +1439,6 @@ If ($test_spa) {
$css += $webjson.others.veryhighstream.add
}
# New UI fix
if ([version]$offline -ge [version]"1.1.94.864" -and $new_theme) {
if ([version]$offline -lt [version]"1.2.3.1107") {
$css += $webjson.others.navaltfix.add[0]
}
if ([version]$offline -ge [version]"1.2.3.1107") {
$css += $webjson.others.navaltfix.add[1]
}
if ([version]$offline -ge [version]"1.2.6.861" -and [version]$offline -le [version]"1.2.6.863") {
$css += $webjson.others.leftsidebarfix.add
}
$css += $webjson.others.navaltfix.add[2]
$css += $webjson.others.navaltfix.add[3]
$css += $webjson.others.navaltfix.add[4]
}
if ($null -ne $css ) { extract -counts 'one' -method 'zip' -name 'xpui.css' -add $css }
}

View File

@@ -894,26 +894,6 @@
"$1(--lyrics-color-maxmatch)!important"
]
},
"navaltfix": {
"version": {
"fr": "1.1.94",
"to": ""
},
"add": [
" .nav-alt .Root__top-container {background: #00000085;gap: 6px;padding: 8px;}",
" .nav-ylx .Root__top-container, .nav-ylx .ZQftYELq0aOsg6tPbVbV {background: #090909;}",
" .Root__fixed-top-bar {background-color: #00000000}",
" .Root__nav-bar{background-color: #0000}",
" .nav-ylx .sqKERfoKl4KwrtHqcKOd { background: #090909;}"
]
},
"leftsidebarfix": {
"version": {
"fr": "1.2.6",
"to": "1.2.6"
},
"add": " .yOKoknIYYzAE90pe7_SE.Yn2Ei5QZn19gria6LjZj {pointer-events: none;}"
},
"collaboration": {
"version": {
"fr": "1.1.73",