Skip to content

Commit

Permalink
feat(YouTube/Custom branding icon): add patch option `YouTube (Minima…
Browse files Browse the repository at this point in the history
…l header)` (inotia00#83)

* add minimal yt icon

* add minimal yt icon

* Update VisualPreferencesIconsPatch.kt

* add new choice for settings icon

* repalce png turned vector drawables with vector drawables

* add splash

* add splash

* make premium header minimal

* rename to yt_minimal

* change patch option name

* fix compile error

* fix: match icons

* use more appropriate icon

---------

Co-authored-by: inotia00 <[email protected]>
  • Loading branch information
MondayNitro and inotia00 authored Sep 23, 2024
1 parent 9cbc019 commit 29f4e06
Show file tree
Hide file tree
Showing 49 changed files with 478 additions and 9,614 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ object CustomBrandingIconPatch : BaseResourcePatch(
"MMT" to "mmt",
"Revancify Blue" to DEFAULT_ICON,
"Revancify Red" to "revancify_red",
"YouTube" to "youtube"
"YouTube" to "youtube",
"YouTube (Minimal header)" to "youtube_minimal_header"
)

private val sizeArray = arrayOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ object VisualPreferencesIconsPatch : BaseResourcePatch(
"Custom branding icon" to "custom_branding_icon",
"Extension" to DEFAULT_ICON,
"Gear" to "gear",
"YT alt" to "yt_alt",
"ReVanced" to "revanced",
"ReVanced Colored" to "revanced_colored",
),
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/app/revanced/util/ResourceUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ fun PatchOption<String>.lowerCaseOrThrow() = valueOrThrow()

fun PatchOption<String>.underBarOrThrow() = lowerCaseOrThrow()
.replace(" ", "_")
.replace("(", "")
.replace(")", "")

fun Node.adoptChild(tagName: String, block: Element.() -> Unit) {
val child = ownerDocument.createElement(tagName)
Expand Down
Loading

0 comments on commit 29f4e06

Please sign in to comment.