mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-06-20 06:10:05 +10:00
themes for full screen lyrics
- added static themes for full screen lyrics #363
This commit is contained in:
+38
-12
@@ -403,6 +403,21 @@ function Unlock-Folder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function Mod-F {
|
||||||
|
param(
|
||||||
|
[string] $template,
|
||||||
|
[object[]] $arguments
|
||||||
|
)
|
||||||
|
|
||||||
|
$result = $template
|
||||||
|
for ($i = 0; $i -lt $arguments.Length; $i++) {
|
||||||
|
$placeholder = "{${i}}"
|
||||||
|
$value = $arguments[$i]
|
||||||
|
$result = $result -replace [regex]::Escape($placeholder), $value
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result
|
||||||
|
}
|
||||||
|
|
||||||
function downloadSp() {
|
function downloadSp() {
|
||||||
|
|
||||||
@@ -937,8 +952,14 @@ function Helper($paramname) {
|
|||||||
if ([version]$offline -lt [version]"1.1.99.871") { $lyrics = "lyricscolor1"; $contents = $lyrics }
|
if ([version]$offline -lt [version]"1.1.99.871") { $lyrics = "lyricscolor1"; $contents = $lyrics }
|
||||||
if ([version]$offline -ge [version]"1.1.99.871") { $lyrics = "lyricscolor2"; $contents = $lyrics }
|
if ([version]$offline -ge [version]"1.1.99.871") { $lyrics = "lyricscolor2"; $contents = $lyrics }
|
||||||
|
|
||||||
# xpui-routes-lyrics.js
|
# xpui.js or xpui-routes-lyrics.js
|
||||||
if ([version]$offline -ge [version]"1.1.99.871") {
|
if ([version]$offline -ge [version]"1.1.99.871") {
|
||||||
|
|
||||||
|
$full_previous = Mod-F -template $webjson.others.$lyrics.add[0] -arguments $pasttext
|
||||||
|
$full_current = Mod-F -template $webjson.others.$lyrics.add[1] -arguments $current
|
||||||
|
$full_next = Mod-F -template $webjson.others.$lyrics.add[2] -arguments $next
|
||||||
|
$full_lyrics = Mod-F -template $webjson.others.$lyrics.add[3] -arguments $full_previous, $full_current, $full_next
|
||||||
|
$webjson.others.$lyrics.add[3] = $full_lyrics
|
||||||
$webjson.others.$lyrics.replace[1] = '$1' + '"' + $pasttext + '"'
|
$webjson.others.$lyrics.replace[1] = '$1' + '"' + $pasttext + '"'
|
||||||
$webjson.others.$lyrics.replace[2] = '$1' + '"' + $current + '"'
|
$webjson.others.$lyrics.replace[2] = '$1' + '"' + $current + '"'
|
||||||
$webjson.others.$lyrics.replace[3] = '$1' + '"' + $next + '"'
|
$webjson.others.$lyrics.replace[3] = '$1' + '"' + $next + '"'
|
||||||
@@ -951,6 +972,9 @@ function Helper($paramname) {
|
|||||||
else {
|
else {
|
||||||
$webjson.others.$lyrics.match = $webjson.others.$lyrics.match | Where-Object { $_ -ne $webjson.others.$lyrics.match[7] }
|
$webjson.others.$lyrics.match = $webjson.others.$lyrics.match | Where-Object { $_ -ne $webjson.others.$lyrics.match[7] }
|
||||||
}
|
}
|
||||||
|
if ([version]$offline -ge [version]"1.2.3.1107") {
|
||||||
|
$webjson.others.$lyrics.replace[8] = $webjson.others.$lyrics.replace[8] -f $background
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# xpui-routes-lyrics.css
|
# xpui-routes-lyrics.css
|
||||||
@@ -1454,18 +1478,20 @@ If ($test_spa) {
|
|||||||
extract -counts 'more' -name '*.js' -helper 'MinJs'
|
extract -counts 'more' -name '*.js' -helper 'MinJs'
|
||||||
|
|
||||||
# xpui.css
|
# xpui.css
|
||||||
if ($new_theme -or !($premium)) {
|
if (!($premium)) {
|
||||||
if (!($premium)) {
|
# Hide download icon on different pages
|
||||||
# Hide download icon on different pages
|
$css += $webjson.others.downloadicon.add
|
||||||
$css += $webjson.others.downloadicon.add
|
# Hide submenu item "download"
|
||||||
# Hide submenu item "download"
|
$css += $webjson.others.submenudownload.add
|
||||||
$css += $webjson.others.submenudownload.add
|
# Hide very high quality streaming
|
||||||
# Hide very high quality streaming
|
$css += $webjson.others.veryhighstream.add
|
||||||
$css += $webjson.others.veryhighstream.add
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($null -ne $css ) { extract -counts 'one' -method 'zip' -name 'xpui.css' -add $css }
|
|
||||||
}
|
}
|
||||||
|
# Full screen lyrics
|
||||||
|
if ($lyrics_stat -and [version]$offline -ge [version]"1.2.3.1107") {
|
||||||
|
$css += $webjson.others.lyricscolor2.add[3]
|
||||||
|
}
|
||||||
|
if ($null -ne $css ) { extract -counts 'one' -method 'zip' -name 'xpui.css' -add $css }
|
||||||
|
|
||||||
|
|
||||||
# Old UI fix
|
# Old UI fix
|
||||||
$contents = "fix-old-theme"
|
$contents = "fix-old-theme"
|
||||||
|
|||||||
+10
-2
@@ -915,6 +915,12 @@
|
|||||||
"fr": "1.1.99",
|
"fr": "1.1.99",
|
||||||
"to": ""
|
"to": ""
|
||||||
},
|
},
|
||||||
|
"add": [
|
||||||
|
" .npv-lyrics__text-wrapper--previous .npv-lyrics__text {color:{0} !important;}",
|
||||||
|
" .npv-lyrics__text-wrapper--current .npv-lyrics__text {color:{0} !important;}",
|
||||||
|
" .npv-lyrics__text-wrapper--next .npv-lyrics__text {color:{0} !important;}",
|
||||||
|
"{0}{1}{2}"
|
||||||
|
],
|
||||||
"match": [
|
"match": [
|
||||||
"(.--lyrics-color-background.:(..|..colors.)background)",
|
"(.--lyrics-color-background.:(..|..colors.)background)",
|
||||||
"(.--lyrics-color-passed.:)(..passed|.{5,8}fromCSS.+?RGBA\\))",
|
"(.--lyrics-color-passed.:)(..passed|.{5,8}fromCSS.+?RGBA\\))",
|
||||||
@@ -923,7 +929,8 @@
|
|||||||
"(.--lyrics-color-background.:)((..|..colors.)background)",
|
"(.--lyrics-color-background.:)((..|..colors.)background)",
|
||||||
"(.--lyrics-color-hover.:)(\"xxx\")",
|
"(.--lyrics-color-hover.:)(\"xxx\")",
|
||||||
"(.--lyrics-color-maxmatch.:)(\"xxx\")",
|
"(.--lyrics-color-maxmatch.:)(\"xxx\")",
|
||||||
"(color:)(.{1,4}colors.text)(},children:.{1,8}get\\(\"web-player.lyrics.unsynced\"\\))"
|
"(color:)(.{1,4}colors.text)(},children:.{1,8}get\\(\"web-player.lyrics.unsynced\"\\))",
|
||||||
|
"\\?(.{1,2}\\.colors.background):"
|
||||||
],
|
],
|
||||||
"replace": [
|
"replace": [
|
||||||
"$1,\"--lyrics-color-hover\":\"xxx\",\"--lyrics-color-maxmatch\":\"xxx\"",
|
"$1,\"--lyrics-color-hover\":\"xxx\",\"--lyrics-color-maxmatch\":\"xxx\"",
|
||||||
@@ -933,7 +940,8 @@
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
""
|
"",
|
||||||
|
"?\"{0}\":"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"fixcsslyricscolor2": {
|
"fixcsslyricscolor2": {
|
||||||
|
|||||||
Reference in New Issue
Block a user