From a001dda4a447f94c3e5cc3e20ae518d31bfc1f08 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 10 Oct 2023 10:43:23 +0200 Subject: [PATCH 1/4] feat: Add `preferred` field for socials --- config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.py b/config.py index b59ab1f8..5d5b12ea 100644 --- a/config.py +++ b/config.py @@ -55,11 +55,11 @@ # Social Links -social_links: list[dict[str, str]] = [ - {"name": "Website", "url": "https://revanced.app"}, +social_links: list[dict[str, str | bool]] = [ + {"name": "Website", "preferred": False, "url": "https://revanced.app"}, {"name": "GitHub", "url": "https://github.com/revanced"}, {"name": "Twitter", "url": "https://twitter.com/revancedapp"}, - {"name": "Discord", "url": "https://revanced.app/discord"}, + {"name": "Discord", "preferred": False, "url": "https://revanced.app/discord"}, {"name": "Reddit", "url": "https://www.reddit.com/r/revancedapp"}, {"name": "Telegram", "url": "https://t.me/app_revanced"}, {"name": "YouTube", "url": "https://www.youtube.com/@ReVanced"}, From 5df91648c82af2e4098d00e52d54a72f92ebf2c7 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 10 Oct 2023 11:02:44 +0200 Subject: [PATCH 2/4] fix: Prefer the socials --- config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 5d5b12ea..af83c8b1 100644 --- a/config.py +++ b/config.py @@ -56,10 +56,10 @@ # Social Links social_links: list[dict[str, str | bool]] = [ - {"name": "Website", "preferred": False, "url": "https://revanced.app"}, + {"name": "Website", "preferred": True, "url": "https://revanced.app"}, {"name": "GitHub", "url": "https://github.com/revanced"}, {"name": "Twitter", "url": "https://twitter.com/revancedapp"}, - {"name": "Discord", "preferred": False, "url": "https://revanced.app/discord"}, + {"name": "Discord", "preferred": True, "url": "https://revanced.app/discord"}, {"name": "Reddit", "url": "https://www.reddit.com/r/revancedapp"}, {"name": "Telegram", "url": "https://t.me/app_revanced"}, {"name": "YouTube", "url": "https://www.youtube.com/@ReVanced"}, From 4454720a84c515611d554cae9372a7a4da84fa98 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 10 Oct 2023 11:05:58 +0200 Subject: [PATCH 3/4] fix: Add field to model --- api/models/socials.py | 1 + config.py | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/api/models/socials.py b/api/models/socials.py index 1a0929f9..45edad01 100644 --- a/api/models/socials.py +++ b/api/models/socials.py @@ -8,6 +8,7 @@ class SocialFields(BaseModel): name: str url: str + preferred: bool class SocialsResponseModel(BaseModel): diff --git a/config.py b/config.py index af83c8b1..8e858569 100644 --- a/config.py +++ b/config.py @@ -56,13 +56,13 @@ # Social Links social_links: list[dict[str, str | bool]] = [ - {"name": "Website", "preferred": True, "url": "https://revanced.app"}, - {"name": "GitHub", "url": "https://github.com/revanced"}, - {"name": "Twitter", "url": "https://twitter.com/revancedapp"}, - {"name": "Discord", "preferred": True, "url": "https://revanced.app/discord"}, - {"name": "Reddit", "url": "https://www.reddit.com/r/revancedapp"}, - {"name": "Telegram", "url": "https://t.me/app_revanced"}, - {"name": "YouTube", "url": "https://www.youtube.com/@ReVanced"}, + {"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", "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 }, ] # Donation info From a04b74b02f23ec94496e0978db3a011c928b0e86 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 09:06:08 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- config.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/config.py b/config.py index 8e858569..51bebd91 100644 --- a/config.py +++ b/config.py @@ -56,13 +56,17 @@ # Social Links social_links: list[dict[str, str | bool]] = [ - {"name": "Website", "url": "https://revanced.app", "preferred": True }, + {"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", "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 }, + {"name": "Twitter", "url": "https://twitter.com/revancedapp", "preferred": False}, + {"name": "Discord", "url": "https://revanced.app/discord", "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}, ] # Donation info