From 7003a095c148ce00162b243ea4363abda7e06316 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:15:53 +0400 Subject: [PATCH 1/9] fix: Add icon urls to social links --- api/models/socials.py | 2 ++ config.py | 46 ++++++++++++++++++++++++++++++++----------- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/api/models/socials.py b/api/models/socials.py index 45edad01..5feb4fd2 100644 --- a/api/models/socials.py +++ b/api/models/socials.py @@ -8,6 +8,8 @@ class SocialFields(BaseModel): name: str url: str + icon_light: str + icon_dark: str preferred: bool diff --git a/config.py b/config.py index aee86103..f964795d 100644 --- a/config.py +++ b/config.py @@ -78,18 +78,42 @@ # Social Links -social_links: list[dict[str, str | bool]] = [ - {"name": "Website", "url": "https://revanced.app", "preferred": True}, - {"name": "GitHub", "url": "https://github.com/revanced", "preferred": False}, - {"name": "Twitter", "url": "https://twitter.com/revancedapp", "preferred": False}, - {"name": "Discord", "url": "https://revanced.app/discord", "preferred": True}, - { - "name": "Reddit", +social_links: list[dict[str, str, str, str | bool]] = [ + {"name": "Website", + "url": "https://revanced.app", + "icon_light": "https://revanced.app/favicon.ico", + "icon_dark": "https://revanced.app/favicon.ico", + "preferred": True}, + {"name": "Discord", + "url": "https://revanced.app/discord", + "icon_light": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", + "icon_dark": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", + "preferred": True}, + {"name": "Reddit", "url": "https://www.reddit.com/r/revancedapp", - "preferred": False, - }, - {"name": "Telegram", "url": "https://t.me/app_revanced", "preferred": False}, - {"name": "YouTube", "url": "https://www.youtube.com/@ReVanced", "preferred": False}, + "icon_light": "https://www.redditstatic.com/shreddit/assets/favicon/192x192.png", + "icon_dark": "https://www.redditstatic.com/shreddit/assets/favicon/192x192.png", + "preferred": False }, + {"name": "Twitter", + "url": "https://twitter.com/revancedapp", + "icon_light": "https://abs.twimg.com/responsive-web/client-web/icon-ios.77d25eba.png", + "icon_dark": "https://abs.twimg.com/responsive-web/client-web/icon-ios.77d25eba.png", + "preferred": False}, + {"name": "Telegram", + "url": "https://t.me/app_revanced", + "icon_light": "https://web.telegram.org/k/assets/img/android-chrome-192x192.png", + "icon_dark": "https://web.telegram.org/k/assets/img/android-chrome-192x192.png", + "preferred": False}, + {"name": "GitHub", + "url": "https://github.com/revanced", + "icon_light": "https://github.githubassets.com/favicons/favicon.svg", + "icon_dark": "https://github.githubassets.com/favicons/favicon-dark.svg", + "preferred": False}, + {"name": "YouTube", + "url": "https://www.youtube.com/@ReVanced", + "icon_light": "https://www.youtube.com/s/desktop/3ee2b817/img/favicon_144x144.png", + "icon_dark": "https://www.youtube.com/s/desktop/3ee2b817/img/favicon_144x144.png", + "preferred": False}, ] # Donation info From cbb475cf51f2fd761024c52a9da7af1a8baca13b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 12:20:22 +0000 Subject: [PATCH 2/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- config.py | 42 ++++++++++++++++++++++++++++-------------- requirements.txt | 4 ++-- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/config.py b/config.py index f964795d..226b4366 100644 --- a/config.py +++ b/config.py @@ -79,41 +79,55 @@ # Social Links social_links: list[dict[str, str, str, str | bool]] = [ - {"name": "Website", + { + "name": "Website", "url": "https://revanced.app", "icon_light": "https://revanced.app/favicon.ico", "icon_dark": "https://revanced.app/favicon.ico", - "preferred": True}, - {"name": "Discord", + "preferred": True, + }, + { + "name": "Discord", "url": "https://revanced.app/discord", "icon_light": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", "icon_dark": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", - "preferred": True}, - {"name": "Reddit", + "preferred": True, + }, + { + "name": "Reddit", "url": "https://www.reddit.com/r/revancedapp", "icon_light": "https://www.redditstatic.com/shreddit/assets/favicon/192x192.png", "icon_dark": "https://www.redditstatic.com/shreddit/assets/favicon/192x192.png", - "preferred": False }, - {"name": "Twitter", + "preferred": False, + }, + { + "name": "Twitter", "url": "https://twitter.com/revancedapp", "icon_light": "https://abs.twimg.com/responsive-web/client-web/icon-ios.77d25eba.png", "icon_dark": "https://abs.twimg.com/responsive-web/client-web/icon-ios.77d25eba.png", - "preferred": False}, - {"name": "Telegram", + "preferred": False, + }, + { + "name": "Telegram", "url": "https://t.me/app_revanced", "icon_light": "https://web.telegram.org/k/assets/img/android-chrome-192x192.png", "icon_dark": "https://web.telegram.org/k/assets/img/android-chrome-192x192.png", - "preferred": False}, - {"name": "GitHub", + "preferred": False, + }, + { + "name": "GitHub", "url": "https://github.com/revanced", "icon_light": "https://github.githubassets.com/favicons/favicon.svg", "icon_dark": "https://github.githubassets.com/favicons/favicon-dark.svg", - "preferred": False}, - {"name": "YouTube", + "preferred": False, + }, + { + "name": "YouTube", "url": "https://www.youtube.com/@ReVanced", "icon_light": "https://www.youtube.com/s/desktop/3ee2b817/img/favicon_144x144.png", "icon_dark": "https://www.youtube.com/s/desktop/3ee2b817/img/favicon_144x144.png", - "preferred": False}, + "preferred": False, + }, ] # Donation info diff --git a/requirements.txt b/requirements.txt index c93aedb5..9efe91f2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,8 @@ aiodns==3.1.1 ; (sys_platform == "linux" or sys_platform == "darwin") and python aiofiles==23.2.1 ; python_version >= "3.11" and python_version < "3.13" aiohttp[speedups]==3.9.1 ; python_version >= "3.11" and python_version < "3.13" aiosignal==1.3.1 ; python_version >= "3.11" and python_version < "3.13" -argon2-cffi-bindings==21.2.0 ; python_version >= "3.11" and python_version < "3.13" argon2-cffi==23.1.0 ; python_version >= "3.11" and python_version < "3.13" +argon2-cffi-bindings==21.2.0 ; python_version >= "3.11" and python_version < "3.13" asyncstdlib==3.12.0 ; python_version >= "3.11" and python_version < "3.13" attrs==23.2.0 ; python_version >= "3.11" and python_version < "3.13" beautifulsoup4==4.12.2 ; python_version >= "3.11" and python_version < "3.13" @@ -40,11 +40,11 @@ pyjwt==2.8.0 ; python_version >= "3.11" and python_version < "3.13" pyseto==1.7.7 ; python_version >= "3.11" and python_version < "3.13" python-dateutil==2.8.2 ; python_version >= "3.11" and python_version < "3.13" pyyaml==6.0.1 ; python_version >= "3.11" and python_version < "3.13" +sanic==23.12.1 ; python_version >= "3.11" and python_version < "3.13" sanic-beskar==2.3.2 ; python_version >= "3.11" and python_version < "3.13" sanic-ext==23.12.0 ; python_version >= "3.11" and python_version < "3.13" sanic-limiter @ git+https://github.com/Omegastick/sanic-limiter@843e13144aa21d843ce212a7c1db31b72ce8a103 ; python_version >= "3.11" and python_version < "3.13" sanic-routing==23.12.0 ; python_version >= "3.11" and python_version < "3.13" -sanic==23.12.1 ; python_version >= "3.11" and python_version < "3.13" sanic[ext]==23.12.1 ; python_version >= "3.11" and python_version < "3.13" sentry-sdk[sanic]==1.39.2 ; python_version >= "3.11" and python_version < "3.13" six==1.16.0 ; python_version >= "3.11" and python_version < "3.13" From 6c8cc6ded45c3ad320cc11198b6a5c8cd8332502 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:06:23 +0400 Subject: [PATCH 3/9] fix: Use rounded Twitter icon, more specific other icons --- config.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config.py b/config.py index 226b4366..d8cafe8d 100644 --- a/config.py +++ b/config.py @@ -103,8 +103,8 @@ { "name": "Twitter", "url": "https://twitter.com/revancedapp", - "icon_light": "https://abs.twimg.com/responsive-web/client-web/icon-ios.77d25eba.png", - "icon_dark": "https://abs.twimg.com/responsive-web/client-web/icon-ios.77d25eba.png", + "icon_light": "https://abs.twimg.com/responsive-web/client-web/icon-default.522d363a.png", + "icon_dark": "https://abs.twimg.com/responsive-web/client-web/icon-default.522d363a.png", "preferred": False, }, { @@ -116,16 +116,16 @@ }, { "name": "GitHub", - "url": "https://github.com/revanced", + "url": "https://github.com/ReVanced", "icon_light": "https://github.githubassets.com/favicons/favicon.svg", "icon_dark": "https://github.githubassets.com/favicons/favicon-dark.svg", "preferred": False, }, { "name": "YouTube", - "url": "https://www.youtube.com/@ReVanced", - "icon_light": "https://www.youtube.com/s/desktop/3ee2b817/img/favicon_144x144.png", - "icon_dark": "https://www.youtube.com/s/desktop/3ee2b817/img/favicon_144x144.png", + "url": "https://youtube.com/@ReVanced", + "icon_light": "https://www.gstatic.com/youtube/img/branding/favicon/favicon_192x192.png", + "icon_dark": "https://www.gstatic.com/youtube/img/branding/favicon/favicon_192x192.png", "preferred": False, }, ] From 77168fdecee3a5428ae5acba2ec631aa0dec2655 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 8 Apr 2024 23:20:17 +0400 Subject: [PATCH 4/9] fix: Use same discord link as Manager. Group Telegram after Reddit (same as website) --- config.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config.py b/config.py index d8cafe8d..b4ecd6cf 100644 --- a/config.py +++ b/config.py @@ -88,7 +88,7 @@ }, { "name": "Discord", - "url": "https://revanced.app/discord", + "url": "https://discord.gg/revanced", "icon_light": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", "icon_dark": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", "preferred": True, @@ -100,13 +100,6 @@ "icon_dark": "https://www.redditstatic.com/shreddit/assets/favicon/192x192.png", "preferred": False, }, - { - "name": "Twitter", - "url": "https://twitter.com/revancedapp", - "icon_light": "https://abs.twimg.com/responsive-web/client-web/icon-default.522d363a.png", - "icon_dark": "https://abs.twimg.com/responsive-web/client-web/icon-default.522d363a.png", - "preferred": False, - }, { "name": "Telegram", "url": "https://t.me/app_revanced", @@ -114,6 +107,13 @@ "icon_dark": "https://web.telegram.org/k/assets/img/android-chrome-192x192.png", "preferred": False, }, + { + "name": "Twitter", + "url": "https://twitter.com/revancedapp", + "icon_light": "https://abs.twimg.com/responsive-web/client-web/icon-default.522d363a.png", + "icon_dark": "https://abs.twimg.com/responsive-web/client-web/icon-default.522d363a.png", + "preferred": False, + }, { "name": "GitHub", "url": "https://github.com/ReVanced", From 00babef4afcd35e583cd47bc8da0ded8a2cd38c6 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 8 Apr 2024 23:29:15 +0400 Subject: [PATCH 5/9] fix: Use more larger and more reliable icon urls --- config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config.py b/config.py index b4ecd6cf..ff04bb9e 100644 --- a/config.py +++ b/config.py @@ -89,8 +89,8 @@ { "name": "Discord", "url": "https://discord.gg/revanced", - "icon_light": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", - "icon_dark": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", + "icon_light": "https://discord.com/assets/images/favicon.ico", + "icon_dark": "https://discord.com/assets/images/favicon.ico", "preferred": True, }, { @@ -110,8 +110,8 @@ { "name": "Twitter", "url": "https://twitter.com/revancedapp", - "icon_light": "https://abs.twimg.com/responsive-web/client-web/icon-default.522d363a.png", - "icon_dark": "https://abs.twimg.com/responsive-web/client-web/icon-default.522d363a.png", + "icon_light": "https://abs.twimg.com/responsive-web/client-web/icon-default-large.9ab12c3a.png", + "icon_dark": "https://abs.twimg.com/responsive-web/client-web/icon-default-large.9ab12c3a.png", "preferred": False, }, { From d32f4f450790ce3e88efaab27d142eef490c5ea8 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 9 Apr 2024 00:06:51 +0400 Subject: [PATCH 6/9] fix: Simple discord url does not load in Android embedded web view (but will load using curl and Android Chrome) --- config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index ff04bb9e..2b3662db 100644 --- a/config.py +++ b/config.py @@ -89,8 +89,10 @@ { "name": "Discord", "url": "https://discord.gg/revanced", - "icon_light": "https://discord.com/assets/images/favicon.ico", - "icon_dark": "https://discord.com/assets/images/favicon.ico", + # Icon is also at https://discord.com/assets/images/favicon.ico + # but that url fails to load from an Android embedded web view (unknown why). + "icon_light": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", + "icon_dark": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", "preferred": True, }, { From a4fbe7eb28b11040738cded108fd954207c5e4c5 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 9 Apr 2024 21:50:29 +0400 Subject: [PATCH 7/9] comments --- config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/config.py b/config.py index 2b3662db..69ef3b5f 100644 --- a/config.py +++ b/config.py @@ -91,6 +91,7 @@ "url": "https://discord.gg/revanced", # Icon is also at https://discord.com/assets/images/favicon.ico # but that url fails to load from an Android embedded web view (unknown why). + # this 'website-files' url is what Discord uses in their own root index.html, and it loads on Android without issues. "icon_light": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", "icon_dark": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", "preferred": True, From 809ead92c815a80f6bac9d2b33375964f1be723f Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 9 Apr 2024 23:34:00 +0400 Subject: [PATCH 8/9] fix: For now, remove icons. --- api/models/socials.py | 2 -- config.py | 19 +------------------ 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/api/models/socials.py b/api/models/socials.py index 5feb4fd2..45edad01 100644 --- a/api/models/socials.py +++ b/api/models/socials.py @@ -8,8 +8,6 @@ class SocialFields(BaseModel): name: str url: str - icon_light: str - icon_dark: str preferred: bool diff --git a/config.py b/config.py index 69ef3b5f..d47c8780 100644 --- a/config.py +++ b/config.py @@ -82,53 +82,36 @@ { "name": "Website", "url": "https://revanced.app", - "icon_light": "https://revanced.app/favicon.ico", - "icon_dark": "https://revanced.app/favicon.ico", "preferred": True, }, { "name": "Discord", "url": "https://discord.gg/revanced", - # Icon is also at https://discord.com/assets/images/favicon.ico - # but that url fails to load from an Android embedded web view (unknown why). - # this 'website-files' url is what Discord uses in their own root index.html, and it loads on Android without issues. - "icon_light": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", - "icon_dark": "https://assets-global.website-files.com/6257adef93867e50d84d30e2/6266bc493fb42d4e27bb8393_847541504914fd33810e70a0ea73177e.ico", "preferred": True, }, { "name": "Reddit", - "url": "https://www.reddit.com/r/revancedapp", - "icon_light": "https://www.redditstatic.com/shreddit/assets/favicon/192x192.png", - "icon_dark": "https://www.redditstatic.com/shreddit/assets/favicon/192x192.png", + "url": "https://reddit.com/r/revancedapp", "preferred": False, }, { "name": "Telegram", "url": "https://t.me/app_revanced", - "icon_light": "https://web.telegram.org/k/assets/img/android-chrome-192x192.png", - "icon_dark": "https://web.telegram.org/k/assets/img/android-chrome-192x192.png", "preferred": False, }, { "name": "Twitter", "url": "https://twitter.com/revancedapp", - "icon_light": "https://abs.twimg.com/responsive-web/client-web/icon-default-large.9ab12c3a.png", - "icon_dark": "https://abs.twimg.com/responsive-web/client-web/icon-default-large.9ab12c3a.png", "preferred": False, }, { "name": "GitHub", "url": "https://github.com/ReVanced", - "icon_light": "https://github.githubassets.com/favicons/favicon.svg", - "icon_dark": "https://github.githubassets.com/favicons/favicon-dark.svg", "preferred": False, }, { "name": "YouTube", "url": "https://youtube.com/@ReVanced", - "icon_light": "https://www.gstatic.com/youtube/img/branding/favicon/favicon_192x192.png", - "icon_dark": "https://www.gstatic.com/youtube/img/branding/favicon/favicon_192x192.png", "preferred": False, }, ] From 56c1f59ebbcf68e8f4c0c01d35ba7f257fab74e9 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Wed, 10 Apr 2024 18:55:12 +0400 Subject: [PATCH 9/9] Update config.py Co-authored-by: oSumAtrIX --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index d47c8780..ef58d269 100644 --- a/config.py +++ b/config.py @@ -86,7 +86,7 @@ }, { "name": "Discord", - "url": "https://discord.gg/revanced", + "url": "https://revanced.app/discord", "preferred": True, }, {