From e2139d61ed9d1e54fc4f6fccdfddabf2b625f966 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Sat, 14 Dec 2024 21:45:26 +0100 Subject: [PATCH 01/25] Update settings.module.css --- src/views/settings/settings.module.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/views/settings/settings.module.css b/src/views/settings/settings.module.css index ad735c95..5fe523e0 100644 --- a/src/views/settings/settings.module.css +++ b/src/views/settings/settings.module.css @@ -99,10 +99,6 @@ .categoryTitle { flex: 0 0 65px; } - - .categorySettings input { - width: 35vw; - } } .highlightedSetting { From 6a1576d013534ff4cda82a2d07c3f48477fd71a1 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Sat, 14 Dec 2024 22:04:50 +0100 Subject: [PATCH 02/25] fix responsiveness --- src/components/header/header.module.css | 2 +- src/views/home/home.module.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/header/header.module.css b/src/components/header/header.module.css index 083b45c2..43a96a36 100644 --- a/src/components/header/header.module.css +++ b/src/components/header/header.module.css @@ -149,7 +149,7 @@ } } -@media (max-width: 640px) { +@media (max-width: 639px) { .tabMenu { order: 1; } diff --git a/src/views/home/home.module.css b/src/views/home/home.module.css index 326b14b9..50cbb925 100644 --- a/src/views/home/home.module.css +++ b/src/views/home/home.module.css @@ -32,7 +32,7 @@ position: relative; } -@media (max-width: 640px) { +@media (max-width: 639px) { .content { padding: 7px 2px 0px 2px; } From 338edfdfe4ef4e81f35f96df310293dc31458d80 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Sun, 15 Dec 2024 14:55:26 +0100 Subject: [PATCH 03/25] fix outline --- src/components/topbar/topbar.module.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/topbar/topbar.module.css b/src/components/topbar/topbar.module.css index 47d9d175..4ce5a5b8 100644 --- a/src/components/topbar/topbar.module.css +++ b/src/components/topbar/topbar.module.css @@ -145,7 +145,7 @@ } .homeButton { - padding-left: 5px; + margin-left: 5px; } .moreLink { @@ -162,7 +162,7 @@ @media (min-width: 640px) { .homeButton { - padding-left: 10px; + margin-left: 10px; } } From c34455e7412c48b7ca6b9972efd011f7e264710c Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Sun, 15 Dec 2024 16:02:05 +0100 Subject: [PATCH 04/25] Update post.tsx --- src/components/post/post.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/post/post.tsx b/src/components/post/post.tsx index 6138c29a..d21459b9 100644 --- a/src/components/post/post.tsx +++ b/src/components/post/post.tsx @@ -177,7 +177,7 @@ const Post = ({ index, post = {} }: PostProps) => {
- {!isMobile &&
{pinned ? undefined : rank}
} + {!isMobile && !isInPostPageView &&
{pinned ? undefined : rank}
}
From 9ff01c33c6fa04c5d9c70e7c37aa5b035a8cd8bb Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Sun, 15 Dec 2024 16:17:58 +0100 Subject: [PATCH 05/25] perf(media): fix thumbnails getting stuck due to incorrect memoization --- src/hooks/use-comment-media-info.ts | 36 +++++++++++++++-------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/hooks/use-comment-media-info.ts b/src/hooks/use-comment-media-info.ts index 1d2600c0..ca61e531 100644 --- a/src/hooks/use-comment-media-info.ts +++ b/src/hooks/use-comment-media-info.ts @@ -1,4 +1,4 @@ -import { useCallback, useEffect, useMemo, useState } from 'react'; +import { useCallback, useEffect } from 'react'; import { useLocation, useParams } from 'react-router-dom'; import { Comment } from '@plebbit/plebbit-react-hooks'; import { getCommentMediaInfo, fetchWebpageThumbnailIfNeeded } from '../lib/utils/media-utils'; @@ -9,21 +9,23 @@ export const useCommentMediaInfo = (comment: Comment) => { const params = useParams(); const isInPostPageView = isPostPageView(location.pathname, params); const isInPendingPostView = isPendingPostView(location.pathname, params); - // some sites have CORS access, so the thumbnail can be fetched client-side, which is helpful if subplebbit.settings.fetchThumbnailUrls is false - const initialCommentMediaInfo = useMemo(() => getCommentMediaInfo(comment), [comment]); - const [commentMediaInfo, setCommentMediaInfo] = useState(initialCommentMediaInfo); - const fetchThumbnail = useCallback(async () => { - if (!isInPostPageView && !isInPendingPostView) { - return; // don't fetch in feed view, it displaces the posts - } - if (initialCommentMediaInfo?.type === 'webpage' && !initialCommentMediaInfo.thumbnail) { - const newMediaInfo = await fetchWebpageThumbnailIfNeeded(initialCommentMediaInfo); - setCommentMediaInfo(newMediaInfo); - } - }, [initialCommentMediaInfo, isInPostPageView, isInPendingPostView]); - useEffect(() => { - fetchThumbnail(); - }, [fetchThumbnail]); - return commentMediaInfo; + // some sites have CORS access, so the thumbnail can be fetched client-side, which is helpful if subplebbit.settings.fetchThumbnailUrls is false + const fetchThumbnail = useCallback(async () => { + let commentMediaInfo = getCommentMediaInfo(comment); + if (commentMediaInfo?.type === 'webpage' && !commentMediaInfo.thumbnail) { + const newMediaInfo = await fetchWebpageThumbnailIfNeeded(commentMediaInfo); + commentMediaInfo = newMediaInfo; + } + return commentMediaInfo; + }, [comment]); + + useEffect(() => { + // don't fetch in feed view, it displaces the posts + if (isInPostPageView || isInPendingPostView) { + fetchThumbnail(); + } + }, [fetchThumbnail, isInPostPageView, isInPendingPostView]); + + return getCommentMediaInfo(comment); }; From 1a0e82f980b6322374632bfe42ad4c77d65fb2a9 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Sun, 15 Dec 2024 17:16:09 +0100 Subject: [PATCH 06/25] style(communities page): add placeholders to subplebbits without avatar --- src/views/subplebbits/subplebbits.module.css | 15 +++++++++++++++ src/views/subplebbits/subplebbits.tsx | 12 +++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/views/subplebbits/subplebbits.module.css b/src/views/subplebbits/subplebbits.module.css index 174222cf..8539019f 100644 --- a/src/views/subplebbits/subplebbits.module.css +++ b/src/views/subplebbits/subplebbits.module.css @@ -72,6 +72,16 @@ float: left; margin-right: 5px; margin-top: 5px; + display: flex; + justify-content: center; + align-items: center; +} + +.defaultAvatar { + width: 70px; + display: flex; + justify-content: center; + align-items: center; } .avatar img { @@ -80,6 +90,11 @@ max-height: 70px; } +.defaultAvatar img { + width: 50px; + height: 50px; +} + .entry { overflow: hidden; opacity: 1; diff --git a/src/views/subplebbits/subplebbits.tsx b/src/views/subplebbits/subplebbits.tsx index be5caeaa..fd129894 100644 --- a/src/views/subplebbits/subplebbits.tsx +++ b/src/views/subplebbits/subplebbits.tsx @@ -146,13 +146,11 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => {
- {suggested?.avatarUrl && ( -
- - {address} - -
- )} +
+ + {address} + +
From 79423c31d710c45f4cfcdfb0908fe1a16c1d4cbf Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Sun, 15 Dec 2024 23:01:45 +0100 Subject: [PATCH 07/25] perf(index.html): preload UI assets and CSS add preload tags for assets and css to fetch them before javascript execution begins, thus improving initial load performance --- public/assets/buttons/search-submit-hover.png | Bin 831 -> 0 bytes public/assets/buttons/search-submit.png | Bin 835 -> 0 bytes public/index.html | 63 ++++++++++++++++++ 3 files changed, 63 insertions(+) delete mode 100644 public/assets/buttons/search-submit-hover.png delete mode 100644 public/assets/buttons/search-submit.png diff --git a/public/assets/buttons/search-submit-hover.png b/public/assets/buttons/search-submit-hover.png deleted file mode 100644 index 64e2f0ec7a413fdf69f9fd22cfe30c1279324a8d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 831 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2@q#X;^)4C~IxyaaLrQX@Rme0>?T zfNTy1CPpC!W{?sfWN6Q1U;(ok7}S6?0|WB{MuhAFCb%r`0%imoq;R*m*#@8?k(nV8 zB@w}FfdWk9dNvV1jxdk8v3^o;3KxS@gNuokUZcbjYRfVk*ScMgk4HDK@QUEI{ z$+lIB@C{IK&M!(;Fw-;8Gf=YQQczH^DN0GR3UYCSY6tRcl`=|73as??%gf94%8m8% zi_-NCEiEne4UF`SjC6r2bc-wVN)jt{^NN)rhQQ2mNi9w;$}A|!%+FH*nVXoDUs__T zqy(}E4j}F<$xK7olvfP(7SMzGAQ^o_Jp+BX*+8u}AWsb3~j(FQN*D3 z*yw{SM{*3rr(jW_SM9iL^x?r~$0Zr}kR2Gv7M?DSAsV8+6Bqg&aS&)LH(wI&eJ)8# zWFET%qxgm^0&$B)WjuwOGU6Fpofe%mWjx3&pyK#oLr1Y{zV$~iEC|7ZhDg@S+vJM z;7ac8JomsYeW4e9WF~%}`(>ADZDyzVD-}<^%O-zc86UG*^}`|d&MTXX*}*rHi~Lg9 z7SCSJ%&55dkl#n+n%E8PtQ``!juigsian}er`Of=EAGfNpUWn*Z-nwZD(;N>q!GEg z@Z8+ht#z~KFs481zPyO<{;#z*C(|X3(-x@4eQ4rrJ+$uMb=hIe2$+CFjwe?55C(f)+6wnknFm0N%@Re3+BYver)9qco{xpf-)BgCAcM?zSqi4+@ Q9)psjr>mdKI;Vst08g15%m4rY diff --git a/public/assets/buttons/search-submit.png b/public/assets/buttons/search-submit.png deleted file mode 100644 index 29e9fa7a72059d6adffcb4b0778d67c6f5e9fd00..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 835 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2@q#X;^)4C~IxyaaLrQX@Rme0>?T zfNTy1CPpC!W{?sfWN6Q1U;(ok7}S6?0|WB{MuhAFCb%r`0%imoq;R*m*#@8?k(nV8 zB@w}FfdWk9dNvV1jxdk8v3^o;3KxS@gNuokUZcbjYRfVk*ScMgk4HDK@QUEI{ z$+lIB@C{IK&M!(;Fw-;8Gf=YQQczH^DN0GR3UYCSY6tRcl`=|73as??%gf94%8m8% zi_-NCEiEne4UF`SjC6r2bc-wVN)jt{^NN)rhQQ2mNi9w;$}A|!%+FH*nVXoDUs__T zqy(}E4j}F<$xK7olvfP(7SMzGAQ^o_Jp+BX*+8u}AWsb3~j(FQN*D3 z*yw{SM{*3rr(jW_SM9iL^x?r~$0Zr}kR2GvHl8kyAsV8+6Yaf@1PC1aJSk!C+^N0S z1G4oWFy@pb9yFREFu_DoacNVlLIs0u!&b)p1kFQXWnz<(PRj3(uh3t&x|R9xnb|Y* z_sy(4wmC@T=(_j6msh>>PQS#TdH4HY-$^R#KdBp5q(;g~C3EeJ4t{n!lK1e0BZYrn zI2|*(!z{2t>~`w)($fkYWhv)H>?f={Qt?E>+4>Sk#;ml7sge2C`#KT>L$8`Tn9e*s zZ}R7*Zyp@nz^3q|voheL=su}8iGmI~Zw-aYg0DR?HeFiBQmEQ5yJ7aDM@hd*CO53n zOvzL|mTjewU(Mqt`})M+9rNz_zd7Jx5W#Rg`T1mxu6ZB-fA+tkczRoI|7DZf`Ntma zzfzmG-Xxj*cRv5G#oUcIDp~v#qAVYJzopr0O2kj&j0`b diff --git a/public/index.html b/public/index.html index 7bafd59b..73904d21 100644 --- a/public/index.html +++ b/public/index.html @@ -25,6 +25,69 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + seedit From a1007fa025315a0a3eefb787bc27658f04026af2 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Mon, 16 Dec 2024 16:27:05 +0100 Subject: [PATCH 08/25] Update index.html --- public/index.html | 106 +++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 57 deletions(-) diff --git a/public/index.html b/public/index.html index 73904d21..cba07777 100644 --- a/public/index.html +++ b/public/index.html @@ -26,67 +26,59 @@ Learn how to configure a non-root public URL by running `npm run build`. --> - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + seedit From 6ec4f57894928e7ddabe3d27bad1a4279dd3b3dd Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Tue, 17 Dec 2024 12:20:29 +0100 Subject: [PATCH 09/25] feat: add p/mod feed for communities the user is moderating --- public/translations/ar/default.json | 3 +- public/translations/bn/default.json | 3 +- public/translations/cs/default.json | 3 +- public/translations/da/default.json | 3 +- public/translations/de/default.json | 3 +- public/translations/el/default.json | 3 +- public/translations/en/default.json | 3 +- public/translations/es/default.json | 3 +- public/translations/fa/default.json | 3 +- public/translations/fi/default.json | 3 +- public/translations/fil/default.json | 3 +- public/translations/fr/default.json | 3 +- public/translations/he/default.json | 3 +- public/translations/hi/default.json | 3 +- public/translations/hu/default.json | 3 +- public/translations/id/default.json | 3 +- public/translations/it/default.json | 3 +- public/translations/ja/default.json | 3 +- public/translations/ko/default.json | 3 +- public/translations/mr/default.json | 3 +- public/translations/nl/default.json | 3 +- public/translations/no/default.json | 3 +- public/translations/pl/default.json | 3 +- public/translations/pt/default.json | 3 +- public/translations/ro/default.json | 3 +- public/translations/ru/default.json | 3 +- public/translations/sq/default.json | 3 +- public/translations/sv/default.json | 3 +- public/translations/te/default.json | 3 +- public/translations/th/default.json | 3 +- public/translations/tr/default.json | 3 +- public/translations/uk/default.json | 3 +- public/translations/ur/default.json | 3 +- public/translations/vi/default.json | 3 +- public/translations/zh/default.json | 3 +- src/app.tsx | 11 +- src/components/header/header.tsx | 14 ++- src/components/sidebar/sidebar.tsx | 10 +- src/components/topbar/topbar.tsx | 18 +++- src/lib/utils/view-utils.ts | 6 +- src/views/all/all.tsx | 13 ++- src/views/home/home.tsx | 6 +- src/views/mod/index.ts | 1 + src/views/mod/mod.tsx | 146 +++++++++++++++++++++++++++ 44 files changed, 271 insertions(+), 59 deletions(-) create mode 100644 src/views/mod/index.ts create mode 100644 src/views/mod/mod.tsx diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 477f0bc3..eb3602e6 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -330,5 +330,6 @@ "a_short_title": "عنوان قصير لمجتمعك", "anti_spam_challenges": "تحديات مكافحة البريد العشوائي", "anti_spam_challenges_subtitle": "اختر تحدي أو أكثر لمنع الرسائل غير المرغوب فيها", - "add_a_challenge": "إضافة تحدي" + "add_a_challenge": "إضافة تحدي", + "communities_you_moderate": "المجتمعات التي تشرف عليها" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 37e813d5..a71b263b 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -330,5 +330,6 @@ "a_short_title": "আপনার সম্প্রদায়ের জন্য একটি সংক্ষিপ্ত শিরোনাম", "anti_spam_challenges": "অ্যান্টি-স্প্যাম চ্যালেঞ্জ", "anti_spam_challenges_subtitle": "স্প্যাম প্রতিরোধ করতে এক বা একাধিক চ্যালেঞ্জ নির্বাচন করুন", - "add_a_challenge": "একটি চ্যালেঞ্জ যোগ করুন" + "add_a_challenge": "একটি চ্যালেঞ্জ যোগ করুন", + "communities_you_moderate": "আপনি যে কমিউনিটিগুলি পরিচালনা করেন" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 5c82a0f9..2a9e5dde 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -330,5 +330,6 @@ "a_short_title": "Krátký název pro vaši komunitu", "anti_spam_challenges": "Anti-spam výzvy", "anti_spam_challenges_subtitle": "Vyberte jednu nebo více výzev k prevenci spamu", - "add_a_challenge": "Přidat výzvu" + "add_a_challenge": "Přidat výzvu", + "communities_you_moderate": "Komunity, které moderujete" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 7c39ef43..40630669 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -330,5 +330,6 @@ "a_short_title": "En kort titel til dit fællesskab", "anti_spam_challenges": "Anti-spam udfordringer", "anti_spam_challenges_subtitle": "Vælg en eller flere udfordringer for at forhindre spam", - "add_a_challenge": "Tilføj en udfordring" + "add_a_challenge": "Tilføj en udfordring", + "communities_you_moderate": "De samfund, du modererer" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index 84ca7b72..4543b4b4 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -330,5 +330,6 @@ "a_short_title": "Ein kurzer Titel für deine Gemeinschaft", "anti_spam_challenges": "Anti-Spam-Herausforderungen", "anti_spam_challenges_subtitle": "Wählen Sie eine oder mehrere Herausforderungen zur Vermeidung von Spam", - "add_a_challenge": "Herausforderung hinzufügen" + "add_a_challenge": "Herausforderung hinzufügen", + "communities_you_moderate": "Gemeinschaften, die du moderierst" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 09ec87a8..218f0619 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -330,5 +330,6 @@ "a_short_title": "Ένας σύντομος τίτλος για την κοινότητά σας", "anti_spam_challenges": "Προκλήσεις κατά του spam", "anti_spam_challenges_subtitle": "Επιλέξτε μία ή περισσότερες προκλήσεις για την αποτροπή των spam", - "add_a_challenge": "Προσθήκη πρόκλησης" + "add_a_challenge": "Προσθήκη πρόκλησης", + "communities_you_moderate": "Κοινότητες που moderates" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index 5cc9ef85..5644c382 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -330,5 +330,6 @@ "a_short_title": "A short title for your community", "anti_spam_challenges": "Anti-spam challenges", "anti_spam_challenges_subtitle": "Choose one or more challenges to prevent spam", - "add_a_challenge": "Add a challenge" + "add_a_challenge": "Add a challenge", + "communities_you_moderate": "Communities you moderate" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index 5a8a2b65..85d1b463 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -330,5 +330,6 @@ "a_short_title": "Un título corto para tu comunidad", "anti_spam_challenges": "Desafíos anti-spam", "anti_spam_challenges_subtitle": "Elige uno o más desafíos para prevenir el spam", - "add_a_challenge": "Añadir un desafío" + "add_a_challenge": "Añadir un desafío", + "communities_you_moderate": "Comunidades que moderas" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index fcb45d34..7ad6a43a 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -330,5 +330,6 @@ "a_short_title": "یک عنوان کوتاه برای جامعه شما", "anti_spam_challenges": "چالش‌های ضد هرزنامه", "anti_spam_challenges_subtitle": "یک یا چند چالش برای جلوگیری از هرزنامه انتخاب کنید", - "add_a_challenge": "یک چالش اضافه کنید" + "add_a_challenge": "یک چالش اضافه کنید", + "communities_you_moderate": "انجمن‌هایی که شما مدیریت می‌کنید" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 9296fb19..a5dd52ca 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -330,5 +330,6 @@ "a_short_title": "Lyhyt otsikko yhteisöllesi", "anti_spam_challenges": "Vasta-roskapostin haasteet", "anti_spam_challenges_subtitle": "Valitse yksi tai useampi haaste estämään roskapostia", - "add_a_challenge": "Lisää haaste" + "add_a_challenge": "Lisää haaste", + "communities_you_moderate": "Yhteisöt, joita moderoinnit" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index 71ce149d..78ddc04e 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -330,5 +330,6 @@ "a_short_title": "Isang maikling pamagat para sa iyong komunidad", "anti_spam_challenges": "Mga anti-spam na hamon", "anti_spam_challenges_subtitle": "Pumili ng isa o higit pang mga hamon upang maiwasan ang spam", - "add_a_challenge": "Magdagdag ng hamon" + "add_a_challenge": "Magdagdag ng hamon", + "communities_you_moderate": "Mga komunidad na iyong mino-moderate" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 479e00b5..4371951c 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -330,5 +330,6 @@ "a_short_title": "Un titre court pour votre communauté", "anti_spam_challenges": "Défis anti-spam", "anti_spam_challenges_subtitle": "Choisissez un ou plusieurs défis pour prévenir le spam", - "add_a_challenge": "Ajouter un défi" + "add_a_challenge": "Ajouter un défi", + "communities_you_moderate": "Communautés que vous modérez" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index d018e232..28d6f30f 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -330,5 +330,6 @@ "a_short_title": "כותרת קצרה עבור הקהילה שלך", "anti_spam_challenges": "אתגרים נגד ספאם", "anti_spam_challenges_subtitle": "בחר אתגר אחד או יותר כדי למנוע דואר זבל", - "add_a_challenge": "הוסף אתגר" + "add_a_challenge": "הוסף אתגר", + "communities_you_moderate": "קהילות שאתה מנהל" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index 384b4bbf..bceeb16d 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -330,5 +330,6 @@ "a_short_title": "आपके समुदाय के लिए एक छोटा शीर्षक", "anti_spam_challenges": "एंटी-स्पैम चुनौतियाँ", "anti_spam_challenges_subtitle": "स्पैम को रोकने के लिए एक या अधिक चुनौतियाँ चुनें", - "add_a_challenge": "एक चुनौती जोड़ें" + "add_a_challenge": "एक चुनौती जोड़ें", + "communities_you_moderate": "आप जो समुदाय मॉडरेट करते हैं" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index a509f306..bddd1d20 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -330,5 +330,6 @@ "a_short_title": "Egy rövid cím a közösségednek", "anti_spam_challenges": "Anti-spam kihívások", "anti_spam_challenges_subtitle": "Válasszon egy vagy több kihívást a spam megelőzésére", - "add_a_challenge": "Hozzáad egy kihívást" + "add_a_challenge": "Hozzáad egy kihívást", + "communities_you_moderate": "Közösségek, amelyeket moderálsz" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index 3b75a8e0..edf388f2 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -330,5 +330,6 @@ "a_short_title": "Judul singkat untuk komunitas Anda", "anti_spam_challenges": "Tantangan anti-spam", "anti_spam_challenges_subtitle": "Pilih satu atau lebih tantangan untuk mencegah spam", - "add_a_challenge": "Tambahkan tantangan" + "add_a_challenge": "Tambahkan tantangan", + "communities_you_moderate": "Komunitas yang Anda moderasi" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 2453b9de..18047925 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -330,5 +330,6 @@ "a_short_title": "Un titolo breve per la tua comunità", "anti_spam_challenges": "challenge anti-spam", "anti_spam_challenges_subtitle": "Scegli una o più challenge per prevenire lo spam", - "add_a_challenge": "Aggiungi un challenge" + "add_a_challenge": "Aggiungi un challenge", + "communities_you_moderate": "Comunità che moderi" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index af487f09..7fc987ba 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -330,5 +330,6 @@ "a_short_title": "あなたのコミュニティのための短いタイトル", "anti_spam_challenges": "アンチスパムチャレンジ", "anti_spam_challenges_subtitle": "スパムを防ぐために1つ以上のチャレンジを選択してください", - "add_a_challenge": "チャレンジを追加" + "add_a_challenge": "チャレンジを追加", + "communities_you_moderate": "あなたが管理するコミュニティ" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index 501cd2a3..4e206106 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -330,5 +330,6 @@ "a_short_title": "귀하의 커뮤니티를 위한 짧은 제목", "anti_spam_challenges": "스팸 방지 챌린지", "anti_spam_challenges_subtitle": "스팸을 방지하기 위해 하나 이상의 챌린지를 선택하세요", - "add_a_challenge": "도전 추가" + "add_a_challenge": "도전 추가", + "communities_you_moderate": "당신이 관리하는 커뮤니티" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index c523a939..bfaa32b9 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -330,5 +330,6 @@ "a_short_title": "तुमच्या समुदायासाठी एक छोटा शीर्षक", "anti_spam_challenges": "ॲंटी-स्पॅम चॅलेंजेस", "anti_spam_challenges_subtitle": "स्पॅम रोखण्यासाठी एक किंवा अधिक आव्हाने निवडा", - "add_a_challenge": "एक आव्हान जोडा" + "add_a_challenge": "एक आव्हान जोडा", + "communities_you_moderate": "तुम्ही ज्या समुदायाचे व्यवस्थापन करता" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 490ccbe9..f6450817 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -330,5 +330,6 @@ "a_short_title": "Een korte titel voor je gemeenschap", "anti_spam_challenges": "Anti-spam uitdagingen", "anti_spam_challenges_subtitle": "Kies een of meer uitdagingen om spam te voorkomen", - "add_a_challenge": "Voeg een uitdaging toe" + "add_a_challenge": "Voeg een uitdaging toe", + "communities_you_moderate": "Gemeenschappen die je modereert" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index a9f9ed0a..0f5dcef0 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -330,5 +330,6 @@ "a_short_title": "En kort tittel for ditt fellesskap", "anti_spam_challenges": "Anti-spam utfordringer", "anti_spam_challenges_subtitle": "Velg en eller flere utfordringer for å hindre spam", - "add_a_challenge": "Legg til en utfordring" + "add_a_challenge": "Legg til en utfordring", + "communities_you_moderate": "Samfunnene du modererer" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 298e62f9..6fdd6b03 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -330,5 +330,6 @@ "a_short_title": "Krótki tytuł dla twojej społeczności", "anti_spam_challenges": "Wyzwania przeciw spamowi", "anti_spam_challenges_subtitle": "Wybierz jedno lub więcej wyzwań, aby zapobiec spamowi", - "add_a_challenge": "Dodaj wyzwanie" + "add_a_challenge": "Dodaj wyzwanie", + "communities_you_moderate": "Społeczności, którymi moderujesz" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index a81fdbb2..c7fbc1d8 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -330,5 +330,6 @@ "a_short_title": "Um título curto para sua comunidade", "anti_spam_challenges": "Desafios anti-spam", "anti_spam_challenges_subtitle": "Escolha um ou mais desafios para evitar spam", - "add_a_challenge": "Adicionar um desafio" + "add_a_challenge": "Adicionar um desafio", + "communities_you_moderate": "Comunidades que você modera" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index 56ee2c29..5db1e72c 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -330,5 +330,6 @@ "a_short_title": "Un titlu scurt pentru comunitatea ta", "anti_spam_challenges": "Provocări anti-spam", "anti_spam_challenges_subtitle": "Alegeți unul sau mai multe provocări pentru a preveni spamul", - "add_a_challenge": "Adăugați o provocare" + "add_a_challenge": "Adăugați o provocare", + "communities_you_moderate": "Comunități pe care le moderezi" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index c5c08932..c27af1b8 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -330,5 +330,6 @@ "a_short_title": "Короткое название для вашего сообщества", "anti_spam_challenges": "Антиспам вызовы", "anti_spam_challenges_subtitle": "Выберите одну или несколько задач для предотвращения спама", - "add_a_challenge": "Добавить задачу" + "add_a_challenge": "Добавить задачу", + "communities_you_moderate": "Сообщества, которые вы модерируете" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index bacde557..272f6d1c 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -330,5 +330,6 @@ "a_short_title": "Një titull i shkurtër për komunitetin tuaj", "anti_spam_challenges": "challenget anti-spam", "anti_spam_challenges_subtitle": "Zgjidhni një ose më shumë challenge për të parandaluar spam", - "add_a_challenge": "Shtoni një sfidë" + "add_a_challenge": "Shtoni një sfidë", + "communities_you_moderate": "Komunitetet që moderoni" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 7ceb1481..755d100e 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -330,5 +330,6 @@ "a_short_title": "En kort titel för ditt samhälle", "anti_spam_challenges": "Anti-spam-utmaningar", "anti_spam_challenges_subtitle": "Välj en eller flera utmaningar för att förhindra spam", - "add_a_challenge": "Lägg till en utmaning" + "add_a_challenge": "Lägg till en utmaning", + "communities_you_moderate": "Gemenskaper du modererar" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 24a96505..60474cbf 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -330,5 +330,6 @@ "a_short_title": "మీ సముదాయం కోసం ఒక చిన్న శీర్షిక", "anti_spam_challenges": "ఏంటి-స్పామ్ సవాళ్ళు", "anti_spam_challenges_subtitle": "స్పామ్ ను నివారించడానికి ఒకటి లేదా ఎక్కువ సవాళ్లను ఎంచుకోండి", - "add_a_challenge": "ఒక సవాలు జోడించండి" + "add_a_challenge": "ఒక సవాలు జోడించండి", + "communities_you_moderate": "మీరు నిర్వహించే కమ్యూనిటీలు" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index 0fc5bd5d..bced7b55 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -330,5 +330,6 @@ "a_short_title": "ชื่อเรื่องสั้นๆ สำหรับชุมชนของคุณ", "anti_spam_challenges": "ความท้าทายต่อต้านสแปม", "anti_spam_challenges_subtitle": "เลือกความท้าทายหนึ่งหรือหลายรายการเพื่อป้องกันสแปม", - "add_a_challenge": "เพิ่มความท้าทาย" + "add_a_challenge": "เพิ่มความท้าทาย", + "communities_you_moderate": "ชุมชนที่คุณเป็นผู้ดูแล" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 81326c16..728a158f 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -330,5 +330,6 @@ "a_short_title": "Topluluğunuz için kısa bir başlık", "anti_spam_challenges": "Anti-spam zorlukları", "anti_spam_challenges_subtitle": "Spam önlemek için bir veya daha fazla zorluk seçin", - "add_a_challenge": "Bir zorluk ekle" + "add_a_challenge": "Bir zorluk ekle", + "communities_you_moderate": "Moderatörlük yaptığınız topluluklar" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 69abcae3..de8489bd 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -330,5 +330,6 @@ "a_short_title": "Короткий заголовок для вашої спільноти", "anti_spam_challenges": "Антиспам виклики", "anti_spam_challenges_subtitle": "Виберіть одне або кілька завдань для запобігання спаму", - "add_a_challenge": "Додати завдання" + "add_a_challenge": "Додати завдання", + "communities_you_moderate": "Спільноти, які ви модеруєте" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 1c896a37..116debb8 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -330,5 +330,6 @@ "a_short_title": "آپ کی کمیونٹی کے لیے ایک مختصر عنوان", "anti_spam_challenges": "اینٹی اسپام چیلنجز", "anti_spam_challenges_subtitle": "اسپام کو روکنے کے لیے ایک یا زیادہ چیلنجز منتخب کریں", - "add_a_challenge": "ایک چیلنج شامل کریں" + "add_a_challenge": "ایک چیلنج شامل کریں", + "communities_you_moderate": "کمیونٹیز جو آپ ماڈریٹ کرتے ہیں" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 45bf6896..909e69ae 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -330,5 +330,6 @@ "a_short_title": "Một tiêu đề ngắn cho cộng đồng của bạn", "anti_spam_challenges": "Thử thách chống spam", "anti_spam_challenges_subtitle": "Chọn một hoặc nhiều thử thách để ngừng spam", - "add_a_challenge": "Thêm một thử thách" + "add_a_challenge": "Thêm một thử thách", + "communities_you_moderate": "Cộng đồng bạn quản lý" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index b6d752b4..d0721285 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -330,5 +330,6 @@ "a_short_title": "为您的社区提供一个简短的标题", "anti_spam_challenges": "反垃圾邮件挑战", "anti_spam_challenges_subtitle": "选择一个或多个挑战来防止垃圾邮件", - "add_a_challenge": "添加一个挑战" + "add_a_challenge": "添加一个挑战", + "communities_you_moderate": "您管理的社区" } \ No newline at end of file diff --git a/src/app.tsx b/src/app.tsx index 6ecd3773..6d0eb084 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -3,12 +3,12 @@ import { Outlet, Route, Routes, useLocation, useNavigate } from 'react-router-do import useTheme from './hooks/use-theme'; import useValidateRouteParams from './hooks/use-validate-route-params'; import styles from './app.module.css'; -import About from './views/about'; +import AboutView from './views/about'; import All from './views/all'; import Author from './views/author'; import Home from './views/home'; import Inbox from './views/inbox'; -import AboutView from './views/about'; +import Mod from './views/mod'; import NotFound from './views/not-found'; import PendingPost from './views/pending-post'; import PostPage from './views/post-page'; @@ -84,11 +84,8 @@ const App = () => { - } /> - } /> } /> - - } /> + } /> } /> } /> @@ -129,6 +126,8 @@ const App = () => { } /> + } /> + } /> } /> diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx index e249cd44..098ee4d8 100644 --- a/src/components/header/header.tsx +++ b/src/components/header/header.tsx @@ -15,6 +15,7 @@ import { isHomeAboutView, isHomeView, isInboxView, + isModView, isPendingPostView, isPostPageView, isProfileView, @@ -79,6 +80,7 @@ const SortItems = () => { const isInHomeAboutView = isHomeAboutView(location.pathname); const isInSubplebbitAboutView = isSubplebbitAboutView(location.pathname, params); const isInAllView = isAllView(location.pathname); + const isInModView = isModView(location.pathname); const isInSubplebbitView = isSubplebbitView(location.pathname, params); const sortLabels = [t('hot'), t('new'), t('active'), t('controversial'), t('top')]; const [selectedSortType, setSelectedSortType] = useState(params.sortType || '/hot'); @@ -95,7 +97,7 @@ const SortItems = () => { }, [params.sortType, isInHomeAboutView, isInSubplebbitAboutView]); return sortTypes.map((sortType, index) => { - let sortLink = isInSubplebbitView ? `/p/${params.subplebbitAddress}/${sortType}` : isInAllView ? `p/all/${sortType}` : sortType; + let sortLink = isInSubplebbitView ? `/p/${params.subplebbitAddress}/${sortType}` : isInAllView ? `p/all/${sortType}` : isInModView ? `p/mod/${sortType}` : sortType; if (timeFilterName) { sortLink = sortLink + `/${timeFilterName}`; } @@ -242,6 +244,7 @@ const HeaderTabs = () => { const isInHomeAboutView = isHomeAboutView(location.pathname); const isInHomeView = isHomeView(location.pathname); const isInInboxView = isInboxView(location.pathname); + const isInModView = isModView(location.pathname); const isInPendingPostView = isPendingPostView(location.pathname, params); const isInPostPageView = isPostPageView(location.pathname, params); const isInProfileView = isProfileView(location.pathname); @@ -255,7 +258,7 @@ const HeaderTabs = () => { if (isInPostPageView) { return ; - } else if (isInHomeView || isInHomeAboutView || (isInSubplebbitView && !isInSubplebbitSubmitView && !isInSubplebbitSettingsView) || isInAllView) { + } else if (isInHomeView || isInHomeAboutView || (isInSubplebbitView && !isInSubplebbitSubmitView && !isInSubplebbitSettingsView) || isInAllView || isInModView) { return ; } else if ((isInProfileView || isInAuthorView) && !isInPendingPostView) { return ; @@ -279,6 +282,7 @@ const HeaderTitle = ({ title, shortAddress }: { title: string; shortAddress: str const isInAllView = isAllView(location.pathname); const isInAuthorView = isAuthorView(location.pathname); const isInInboxView = isInboxView(location.pathname); + const isInModView = isModView(location.pathname); const isInPostPageView = isPostPageView(location.pathname, params); const isInProfileView = isProfileView(location.pathname); const isInSettingsView = isSettingsView(location.pathname); @@ -328,6 +332,8 @@ const HeaderTitle = ({ title, shortAddress }: { title: string; shortAddress: str return {t('page_not_found')}; } else if (isInAllView) { return t('all'); + } else if (isInModView) { + return {t('communities_you_moderate')}; } return null; }; @@ -346,6 +352,7 @@ const Header = () => { const isInHomeView = isHomeView(location.pathname); const isInHomeAboutView = isHomeAboutView(location.pathname); const isInInboxView = isInboxView(location.pathname); + const isInModView = isModView(location.pathname); const isInPostPageView = isPostPageView(location.pathname, params); const isInProfileView = isProfileView(location.pathname); const isInSettingsView = isSettingsView(location.pathname); @@ -364,6 +371,7 @@ const Header = () => { (isInSubplebbitView && !isInSubplebbitSubmitView && !isInSubplebbitSettingsView && !isInPostPageView && !isInHomeAboutView && !isInSubplebbitAboutView) || (isInProfileView && !isInHomeAboutView) || (isInAllView && !isInAllAboutView) || + (isInModView && !isInHomeAboutView) || (isInAuthorView && !isInHomeAboutView); const logoSrc = isInSubplebbitView && suggested?.avatarUrl ? suggested?.avatarUrl : 'assets/logo/seedit.png'; const logoIsAvatar = isInSubplebbitView && suggested?.avatarUrl; @@ -406,7 +414,7 @@ const Header = () => { {isMobile && !isInSubplebbitSubmitView && (
    - {(isInHomeView || isInHomeAboutView || isInSubplebbitView || isInHomeAboutView || isInAllView || isInPostPageView) && } + {(isInHomeView || isInHomeAboutView || isInSubplebbitView || isInHomeAboutView || isInPostPageView) && }
)}
diff --git a/src/components/sidebar/sidebar.tsx b/src/components/sidebar/sidebar.tsx index 798c265e..92c036d7 100644 --- a/src/components/sidebar/sidebar.tsx +++ b/src/components/sidebar/sidebar.tsx @@ -13,6 +13,7 @@ import { isAllView, isHomeAboutView, isHomeView, + isModView, isPendingPostView, isPostPageView, isSubplebbitAboutView, @@ -220,6 +221,7 @@ const Sidebar = ({ comment, isSubCreatedButNotYetPublished, settings, subplebbit const isInAllView = isAllView(location.pathname); const isInHomeAboutView = isHomeAboutView(location.pathname); const isInHomeView = isHomeView(location.pathname); + const isInModView = isModView(location.pathname); const isInPendingPostView = isPendingPostView(location.pathname, params); const isInPostPageView = isPostPageView(location.pathname, params); const isInSubplebbitsView = isSubplebbitsView(location.pathname); @@ -230,7 +232,11 @@ const Sidebar = ({ comment, isSubCreatedButNotYetPublished, settings, subplebbit const subplebbitCreator = findSubplebbitCreator(roles); const creatorAddress = subplebbitCreator === 'anonymous' ? 'anonymous' : `${Plebbit.getShortAddress(subplebbitCreator)}`; const submitRoute = - isInHomeView || isInHomeAboutView || isInAllView ? '/submit' : isInPendingPostView ? `/p/${pendingPost?.subplebbitAddress}/submit` : `/p/${address}/submit`; + isInHomeView || isInHomeAboutView || isInAllView || isInModView + ? '/submit' + : isInPendingPostView + ? `/p/${pendingPost?.subplebbitAddress}/submit` + : `/p/${address}/submit`; const { blocked, unblock, block } = useBlock({ address }); @@ -287,7 +293,7 @@ const Sidebar = ({ comment, isSubCreatedButNotYetPublished, settings, subplebbit
- {!isInHomeView && !isInHomeAboutView && !isInAllView && !isInPendingPostView && !isInSubplebbitsView && !isInHomeAboutView && ( + {!isInHomeView && !isInHomeAboutView && !isInAllView && !isInModView && !isInPendingPostView && !isInSubplebbitsView && !isInHomeAboutView && (
{subplebbit?.address} diff --git a/src/components/topbar/topbar.tsx b/src/components/topbar/topbar.tsx index d32f5cfe..0fa69f0e 100644 --- a/src/components/topbar/topbar.tsx +++ b/src/components/topbar/topbar.tsx @@ -1,12 +1,12 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { Link, useLocation, useNavigate, useParams } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { useAccount } from '@plebbit/plebbit-react-hooks'; +import { useAccount, useAccountSubplebbits } from '@plebbit/plebbit-react-hooks'; import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js'; import styles from './topbar.module.css'; import { useDefaultSubplebbitAddresses } from '../../hooks/use-default-subplebbits'; import useTimeFilter from '../../hooks/use-time-filter'; -import { isAllView, isHomeView, isSubplebbitView } from '../../lib/utils/view-utils'; +import { isAllView, isHomeView, isModView, isSubplebbitView } from '../../lib/utils/view-utils'; const sortTypes = ['hot', 'new', 'active', 'controversialAll', 'topAll']; const isElectron = window.isElectron === true; @@ -20,9 +20,13 @@ const TopBar = () => { const subscriptions = account?.subscriptions; const isinAllView = isAllView(location.pathname); const isInHomeView = isHomeView(location.pathname); + const isInModView = isModView(location.pathname); const isInSubplebbitView = isSubplebbitView(location.pathname, params); const homeButtonClass = isInHomeView ? styles.selected : styles.choice; + const { accountSubplebbits } = useAccountSubplebbits(); + const accountSubplebbitAddresses = Object.keys(accountSubplebbits); + const { timeFilterName, timeFilterNames } = useTimeFilter(); const selectedTimeFilter = timeFilterName || (isInSubplebbitView ? 'all' : timeFilterName); @@ -52,6 +56,8 @@ const TopBar = () => { ? `/p/${params.subplebbitAddress}/${selectedSortType}/${timeFilterName}` : isinAllView ? `p/all/${selectedSortType}/${timeFilterName}` + : isInModView + ? `/p/mod/${selectedSortType}/${timeFilterName}` : `/${selectedSortType}/${timeFilterName}`; }; @@ -174,6 +180,14 @@ const TopBar = () => { {t('all')} + {accountSubplebbitAddresses.length > 0 && ( +
  • + - + + {t('mod')} + +
  • + )} | {subplebbitAddresses?.map((address, index) => { const displayAddress = address.endsWith('.eth') ? address.slice(0, -4) : address.endsWith('.sol') ? address.slice(0, -4) : address; diff --git a/src/lib/utils/view-utils.ts b/src/lib/utils/view-utils.ts index 898e0605..07b11eca 100644 --- a/src/lib/utils/view-utils.ts +++ b/src/lib/utils/view-utils.ts @@ -30,7 +30,7 @@ export const getAboutLink = (pathname: string, params: ParamsType): string => { }; export const isAllView = (pathname: string): boolean => { - return pathname.startsWith('/p/all'); + return pathname === '/p/all' || pathname.startsWith('/p/all/'); }; export const isAllAboutView = (pathname: string): boolean => { @@ -85,6 +85,10 @@ export const isInboxUnreadView = (pathname: string): boolean => { return pathname === `/inbox/unread`; }; +export const isModView = (pathname: string): boolean => { + return pathname === `/p/mod` || pathname.startsWith(`/p/mod/`); +}; + export const isPendingPostView = (pathname: string, params: ParamsType): boolean => { return pathname === `/profile/${params.accountCommentIndex}`; }; diff --git a/src/views/all/all.tsx b/src/views/all/all.tsx index eb83301d..121b2617 100644 --- a/src/views/all/all.tsx +++ b/src/views/all/all.tsx @@ -18,8 +18,7 @@ const All = () => { const subplebbitAddresses = useDefaultSubplebbitAddresses(); const params = useParams<{ sortType?: string; timeFilterName?: string }>(); const sortType = params?.sortType || 'hot'; - const timeFilterName = params.timeFilterName; - const { timeFilterSeconds } = useTimeFilter(); + const { timeFilterName, timeFilterSeconds } = useTimeFilter(); const { feed, hasMore, loadMore, reset, subplebbitAddressesWithNewerPosts } = useFeed({ subplebbitAddresses, sortType, newerThan: timeFilterSeconds }); const { t } = useTranslation(); @@ -49,7 +48,7 @@ const All = () => { if (feed.length === 0) { footerContent = t('no_posts'); } - if (hasMore || (subplebbitAddresses && subplebbitAddresses.length === 0)) { + if (hasMore || subplebbitAddresses.length > 0 || (subplebbitAddresses && subplebbitAddresses.length === 0)) { footerContent = ( <> {subplebbitAddressesWithNewerPosts.length > 0 ? ( @@ -69,7 +68,7 @@ const All = () => { i18nKey='more_posts_last_week' values={{ currentTimeFilterName }} components={{ - 1: , + 1: , }} />
    @@ -79,7 +78,7 @@ const All = () => { i18nKey='more_posts_last_month' values={{ currentTimeFilterName }} components={{ - 1: , + 1: , }} />
    @@ -111,7 +110,7 @@ const All = () => { const setLastVirtuosoState = () => { virtuosoRef.current?.getState((snapshot: StateSnapshot) => { if (snapshot?.ranges?.length) { - lastVirtuosoStates[sortType + timeFilterName] = snapshot; + lastVirtuosoStates[sortType + timeFilterName + 'all'] = snapshot; } }); }; @@ -119,7 +118,7 @@ const All = () => { return () => window.removeEventListener('scroll', setLastVirtuosoState); }, [sortType, timeFilterName]); - const lastVirtuosoState = lastVirtuosoStates?.[sortType + timeFilterName]; + const lastVirtuosoState = lastVirtuosoStates?.[sortType + timeFilterName + 'all']; return (
    diff --git a/src/views/home/home.tsx b/src/views/home/home.tsx index 3828c5b6..b76815f1 100644 --- a/src/views/home/home.tsx +++ b/src/views/home/home.tsx @@ -48,7 +48,7 @@ const Home = () => { if (feed.length === 0) { footerContent = t('no_posts'); } - if (hasMore || (subplebbitAddresses && subplebbitAddresses.length === 0)) { + if (hasMore || subplebbitAddresses.length > 0 || (subplebbitAddresses && subplebbitAddresses.length === 0)) { footerContent = ( <> {subplebbitAddressesWithNewerPosts.length > 0 ? ( @@ -99,7 +99,7 @@ const Home = () => { const setLastVirtuosoState = () => { virtuosoRef.current?.getState((snapshot: StateSnapshot) => { if (snapshot?.ranges?.length) { - lastVirtuosoStates[sortType + timeFilterName] = snapshot; + lastVirtuosoStates[sortType + timeFilterName + 'home'] = snapshot; } }); }; @@ -107,7 +107,7 @@ const Home = () => { return () => window.removeEventListener('scroll', setLastVirtuosoState); }, [sortType, timeFilterName]); - const lastVirtuosoState = lastVirtuosoStates?.[sortType + timeFilterName]; + const lastVirtuosoState = lastVirtuosoStates?.[sortType + timeFilterName + 'home']; useEffect(() => { document.title = `Seedit`; diff --git a/src/views/mod/index.ts b/src/views/mod/index.ts new file mode 100644 index 00000000..80452253 --- /dev/null +++ b/src/views/mod/index.ts @@ -0,0 +1 @@ +export { default } from './mod'; diff --git a/src/views/mod/mod.tsx b/src/views/mod/mod.tsx new file mode 100644 index 00000000..d4e0f0d2 --- /dev/null +++ b/src/views/mod/mod.tsx @@ -0,0 +1,146 @@ +import { useEffect, useRef } from 'react'; +import { Link, useParams } from 'react-router-dom'; +import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso'; +import { useAccountSubplebbits, useFeed } from '@plebbit/plebbit-react-hooks'; +import { Trans, useTranslation } from 'react-i18next'; +import styles from '../home/home.module.css'; +import LoadingEllipsis from '../../components/loading-ellipsis'; +import Post from '../../components/post'; +import Sidebar from '../../components/sidebar'; +import useFeedStateString from '../../hooks/use-feed-state-string'; +import useTimeFilter from '../../hooks/use-time-filter'; +import _ from 'lodash'; + +const lastVirtuosoStates: { [key: string]: StateSnapshot } = {}; + +const Mod = () => { + const { accountSubplebbits } = useAccountSubplebbits(); + const subplebbitAddresses = Object.keys(accountSubplebbits); + const params = useParams<{ sortType?: string; timeFilterName?: string }>(); + const sortType = params?.sortType || 'hot'; + const { timeFilterName, timeFilterSeconds } = useTimeFilter(); + const { feed, hasMore, loadMore, reset, subplebbitAddressesWithNewerPosts } = useFeed({ subplebbitAddresses, sortType, newerThan: timeFilterSeconds }); + const { t } = useTranslation(); + + // suggest the user to change time filter if there aren't enough posts + const { feed: weeklyFeed } = useFeed({ subplebbitAddresses, sortType, newerThan: 60 * 60 * 24 * 7 }); + const { feed: monthlyFeed } = useFeed({ subplebbitAddresses, sortType, newerThan: 60 * 60 * 24 * 30 }); + + const loadingStateString = useFeedStateString(subplebbitAddresses) || t('loading'); + + const handleNewerPostsButtonClick = () => { + window.scrollTo({ top: 0, left: 0, behavior: 'smooth' }); + setTimeout(() => { + reset(); + }, 300); + }; + + const currentTimeFilterName = params.timeFilterName || timeFilterName; + + const documentTitle = _.capitalize(t('Mod')) + ' - Seedit'; + useEffect(() => { + document.title = documentTitle; + }, [documentTitle]); + + const Footer = () => { + let footerContent; + + if (feed.length === 0) { + footerContent = t('no_posts'); + } + if (hasMore || subplebbitAddresses.length > 0 || (subplebbitAddresses && subplebbitAddresses.length === 0)) { + footerContent = ( + <> + {subplebbitAddressesWithNewerPosts.length > 0 ? ( +
    + , + }} + /> +
    + ) : ( + monthlyFeed.length > feed.length && + (weeklyFeed.length > feed.length ? ( +
    + , + }} + /> +
    + ) : ( +
    + , + }} + /> +
    + )) + )} +
    + {subplebbitAddresses.length === 0 ? ( +
    + https://github.com/plebbit/temporary-default-subplebbits]} + /> +
    + {t('connect_community_notice')} +
    + ) : ( + + )} +
    + + ); + } + return
    {footerContent}
    ; + }; + + const virtuosoRef = useRef(null); + + useEffect(() => { + const setLastVirtuosoState = () => { + virtuosoRef.current?.getState((snapshot: StateSnapshot) => { + if (snapshot?.ranges?.length) { + lastVirtuosoStates[sortType + timeFilterName + 'mod'] = snapshot; + } + }); + }; + window.addEventListener('scroll', setLastVirtuosoState); + return () => window.removeEventListener('scroll', setLastVirtuosoState); + }, [sortType, timeFilterName]); + + const lastVirtuosoState = lastVirtuosoStates?.[sortType + timeFilterName + 'mod']; + + return ( +
    +
    +
    + +
    + } + useWindowScroll={true} + components={{ Footer }} + endReached={loadMore} + ref={virtuosoRef} + restoreStateFrom={lastVirtuosoState} + initialScrollTop={lastVirtuosoState?.scrollTop} + /> +
    +
    + ); +}; + +export default Mod; From 61e7c1d92c4d8925253513d34275bfc5d1188f57 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Tue, 17 Dec 2024 12:37:12 +0100 Subject: [PATCH 10/25] fix(header): special page title goes on top of header tabs, unlike a community's title --- src/components/header/header.module.css | 19 ++++++++++++++++++- src/components/header/header.tsx | 7 ++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/components/header/header.module.css b/src/components/header/header.module.css index 43a96a36..e8760a4f 100644 --- a/src/components/header/header.module.css +++ b/src/components/header/header.module.css @@ -71,7 +71,6 @@ .pageName { font-weight: bold; - padding-right: 1ex; font-variant: small-caps; font-size: 1.2em; color: var(--text); @@ -92,6 +91,12 @@ padding-left: 10px; } +.allOrModPageName { + position: absolute; + top: 26px; + left: 140px; +} + .submitTitle { text-transform: uppercase; font-size: 11px @@ -103,6 +108,18 @@ display: flex; align-items: flex-end; text-transform: lowercase; + padding-left: 10px; +} + +@media (max-width: 640px) { + .tabMenu { + padding-left: 0; + } + + .allOrModPageName { + top: 46px; + left: 138px; + } } .tabMenu li { diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx index 098ee4d8..1129bb5b 100644 --- a/src/components/header/header.tsx +++ b/src/components/header/header.tsx @@ -394,11 +394,16 @@ const Header = () => { )}
    - {!isInHomeView && !isInHomeAboutView && ( + {!isInHomeView && !isInHomeAboutView && !isInModView && !isInAllView && ( )} + {(isInModView || isInAllView) && ( +
    + +
    + )} {isInSubplebbitView && !isInSubplebbitSubmitView && ( From a1b64f4296955c6bde4157e1cf5426eebd1c073d Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Tue, 17 Dec 2024 17:44:26 +0100 Subject: [PATCH 11/25] feat(post): add nsfw label and thumbnail --- public/assets/thumbnail-icon-nsfw-dark.png | Bin 0 -> 4686 bytes public/assets/thumbnail-icon-nsfw.png | Bin 0 -> 4070 bytes public/index.html | 2 ++ .../post/comment-tools/comment-tools.tsx | 6 +++++- src/components/post/label/label.module.css | 12 ++++++++++-- src/components/post/label/label.tsx | 6 +++++- src/components/post/post.tsx | 5 ++++- .../post/thumbnail/thumbnail.module.css | 6 +++++- src/components/post/thumbnail/thumbnail.tsx | 8 +++++++- src/themes.css | 8 ++++++-- 10 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 public/assets/thumbnail-icon-nsfw-dark.png create mode 100644 public/assets/thumbnail-icon-nsfw.png diff --git a/public/assets/thumbnail-icon-nsfw-dark.png b/public/assets/thumbnail-icon-nsfw-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..b6da5cb70adc6231f292dc56de010f790a1e669b GIT binary patch literal 4686 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 rR8o9CU&n~y-Jg{vn6NF8ew}N6?qtUUr literal 0 HcmV?d00001 diff --git a/public/assets/thumbnail-icon-nsfw.png b/public/assets/thumbnail-icon-nsfw.png new file mode 100644 index 0000000000000000000000000000000000000000..7c5c8ea26a0571efc92200aff59821c7d153163a GIT binary patch literal 4070 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 literal 0 HcmV?d00001 diff --git a/public/index.html b/public/index.html index cba07777..cef0185c 100644 --- a/public/index.html +++ b/public/index.html @@ -75,6 +75,8 @@ + + diff --git a/src/components/post/comment-tools/comment-tools.tsx b/src/components/post/comment-tools/comment-tools.tsx index a5692ac8..097ad922 100644 --- a/src/components/post/comment-tools/comment-tools.tsx +++ b/src/components/post/comment-tools/comment-tools.tsx @@ -22,6 +22,7 @@ interface CommentToolsProps { isCommentAuthorMod?: boolean; isReply?: boolean; isSingleReply?: boolean; + nsfw?: boolean; parentCid?: string; postCid?: string; removed?: boolean; @@ -215,7 +216,7 @@ const SingleReplyTools = ({ ); }; -const CommentToolsLabel = ({ cid, deleted, failed, editState, isReply, removed, spoiler }: CommentToolsProps) => { +const CommentToolsLabel = ({ cid, deleted, failed, editState, isReply, nsfw, removed, spoiler }: CommentToolsProps) => { const { t } = useTranslation(); const pending = cid === undefined && !isReply && !failed; const failedEdit = editState === 'failed'; @@ -223,6 +224,7 @@ const CommentToolsLabel = ({ cid, deleted, failed, editState, isReply, removed, return ( <> + {nsfw &&
    diff --git a/src/views/home/home.module.css b/src/views/home/home.module.css index 50cbb925..9de76656 100644 --- a/src/views/home/home.module.css +++ b/src/views/home/home.module.css @@ -11,6 +11,13 @@ padding-bottom: 15px; } +@media (max-width: 640px) { + .morePostsSuggestion { + font-size: 11px; + padding-bottom: 10px; + } +} + .morePostsSuggestion a, .link { color: var(--text-primary); text-decoration: none; From 5a078e772de0fcd7e91f2f220771cbf1ece16e9b Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 11:46:18 +0100 Subject: [PATCH 14/25] feat(settings): add nsfw filters and filtering community by nsfw tag --- .../post/expando/expando.module.css | 1 + src/components/post/expando/expando.tsx | 27 ++++++++---- src/components/post/post.tsx | 2 +- src/components/post/thumbnail/thumbnail.tsx | 5 ++- src/hooks/use-default-subplebbits.ts | 19 ++++---- src/stores/use-filter-settings-store.ts | 33 ++++++++++++++ src/views/settings/settings.module.css | 14 ++++++ src/views/settings/settings.tsx | 44 ++++++++++++++++++- 8 files changed, 124 insertions(+), 21 deletions(-) create mode 100644 src/stores/use-filter-settings-store.ts diff --git a/src/components/post/expando/expando.module.css b/src/components/post/expando/expando.module.css index 28d1fc66..e7846b47 100644 --- a/src/components/post/expando/expando.module.css +++ b/src/components/post/expando/expando.module.css @@ -177,6 +177,7 @@ unicode-bidi: isolate; font-size: small; margin-bottom: 10px; + display: inline-block; } .alwaysShowNsfwNotice p { diff --git a/src/components/post/expando/expando.tsx b/src/components/post/expando/expando.tsx index 085e8ec9..a6daff89 100644 --- a/src/components/post/expando/expando.tsx +++ b/src/components/post/expando/expando.tsx @@ -5,6 +5,7 @@ import Embed from '../embed'; import { CommentMediaInfo } from '../../../lib/utils/media-utils'; import Markdown from '../../markdown'; import { useTranslation } from 'react-i18next'; +import useFilterSettingsStore from '../../../stores/use-filter-settings-store'; interface ExpandoProps { authorEditReason?: string; @@ -36,8 +37,8 @@ const Expando = ({ toggleExpanded, }: ExpandoProps) => { const { t } = useTranslation(); - - const [hideContent, setHideContent] = useState(true); + const { blurNsfwThumbnails, setBlurNsfwThumbnails } = useFilterSettingsStore(); + const [hideContent, setHideContent] = useState(blurNsfwThumbnails); const [alwaysShowNsfw, setAlwaysShowNsfw] = useState(false); useEffect(() => { @@ -46,6 +47,12 @@ const Expando = ({ } }, [expanded]); + const handleAlwaysShowNsfw = () => { + setBlurNsfwThumbnails(false); + setHideContent(false); + setAlwaysShowNsfw(true); + }; + let mediaComponent = null; if (commentMediaInfo?.type === 'image' || commentMediaInfo?.type === 'gif') { @@ -64,13 +71,13 @@ const Expando = ({
    {link && !removed && commentMediaInfo?.type !== 'webpage' && (
    setHideContent(false)}> - {(nsfw || spoiler) && hideContent && link && commentMediaInfo?.type !== 'webpage' && !(deleted || removed) && ( + {((nsfw && blurNsfwThumbnails) || spoiler) && hideContent && link && commentMediaInfo?.type !== 'webpage' && !(deleted || removed) && ( <>
    - {nsfw && spoiler ? 'CLICK TO SEE NSFW SPOILER' : spoiler ? t('view_spoiler') : nsfw ? 'CLICK TO SEE NSFW' : ''} + {nsfw && spoiler ? t('see_nsfw_spoiler') : spoiler ? t('view_spoiler') : nsfw ? t('see_nsfw') : ''} {nsfw && ( - setAlwaysShowNsfw(!alwaysShowNsfw)}> - Always show NSFW media? + + {t('always_show_nsfw')} )} @@ -89,9 +96,11 @@ const Expando = ({
    )} {alwaysShowNsfw && ( -
    -

    Ok, we changed your preferences to always show NSFW media.

    - +
    +
    +

    {t('always_show_nsfw_notice')}

    + +
    )} {content && showContent && ( diff --git a/src/components/post/post.tsx b/src/components/post/post.tsx index c751d53e..a0305ae0 100644 --- a/src/components/post/post.tsx +++ b/src/components/post/post.tsx @@ -96,7 +96,6 @@ const Post = ({ index, post = {} }: PostProps) => { link, linkHeight, linkWidth, - nsfw, pinned, reason, removed, @@ -108,6 +107,7 @@ const Post = ({ index, post = {} }: PostProps) => { title, upvoteCount, } = post || {}; + const nsfw = true; const { displayName, shortAddress } = author || {}; const { shortAuthorAddress, authorAddressChanged } = useAuthorAddress({ comment: post }); diff --git a/src/components/post/thumbnail/thumbnail.tsx b/src/components/post/thumbnail/thumbnail.tsx index 2ec24eab..ac3af336 100644 --- a/src/components/post/thumbnail/thumbnail.tsx +++ b/src/components/post/thumbnail/thumbnail.tsx @@ -2,6 +2,7 @@ import styles from './thumbnail.module.css'; import { Link } from 'react-router-dom'; import { CommentMediaInfo } from '../../../lib/utils/media-utils'; import useFetchGifFirstFrame from '../../../hooks/use-fetch-gif-first-frame'; +import useFilterSettingsStore from '../../../stores/use-filter-settings-store'; interface ThumbnailProps { cid?: string; @@ -84,7 +85,9 @@ const Thumbnail = ({ mediaComponent = ; } - if (isNsfw) { + const { blurNsfwThumbnails } = useFilterSettingsStore(); + + if (isNsfw && blurNsfwThumbnails) { mediaComponent = ; } diff --git a/src/hooks/use-default-subplebbits.ts b/src/hooks/use-default-subplebbits.ts index 99f27b28..3b588b26 100644 --- a/src/hooks/use-default-subplebbits.ts +++ b/src/hooks/use-default-subplebbits.ts @@ -2,6 +2,7 @@ import { useEffect, useMemo, useState } from 'react'; import { useParams } from 'react-router-dom'; import { useAccount } from '@plebbit/plebbit-react-hooks'; import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js'; +import useFilterSettingsStore from '../stores/use-filter-settings-store'; interface Subplebbit { title?: string; @@ -28,10 +29,9 @@ export const categorizeSubplebbits = (subplebbits: Subplebbit[]) => { return { plebbitSubs, interestsSubs, randomSubs, internationalSubs, projectsSubs }; }; -const nsfwTags = ['gore', 'adult', 'anti']; - export const useDefaultSubplebbits = () => { const [subplebbits, setSubplebbits] = useState([]); + const { hideAdultCommunities, hideGoreCommunities, hideAntiCommunities } = useFilterSettingsStore(); useEffect(() => { if (cache) { @@ -39,13 +39,16 @@ export const useDefaultSubplebbits = () => { } (async () => { try { - const multisub = await fetch( - 'https://raw.githubusercontent.com/plebbit/temporary-default-subplebbits/master/multisub.json', - // { cache: 'no-cache' } - ).then((res) => res.json()); + const multisub = await fetch('https://raw.githubusercontent.com/plebbit/temporary-default-subplebbits/master/multisub.json').then((res) => res.json()); const filteredSubplebbits = multisub.subplebbits.filter((subplebbit: Subplebbit) => { - return !subplebbit.tags?.some((tag) => nsfwTags.includes(tag)); + const tags = subplebbit.tags || []; + + if (hideAdultCommunities && tags.includes('adult')) return false; + if (hideGoreCommunities && tags.includes('gore')) return false; + if (hideAntiCommunities && tags.includes('anti')) return false; + + return true; }); cache = filteredSubplebbits; @@ -54,7 +57,7 @@ export const useDefaultSubplebbits = () => { console.warn(e); } })(); - }, []); + }, [hideAdultCommunities, hideGoreCommunities, hideAntiCommunities]); return cache || subplebbits; }; diff --git a/src/stores/use-filter-settings-store.ts b/src/stores/use-filter-settings-store.ts new file mode 100644 index 00000000..db7aa63f --- /dev/null +++ b/src/stores/use-filter-settings-store.ts @@ -0,0 +1,33 @@ +import { create } from 'zustand'; +import { persist } from 'zustand/middleware'; + +interface FilterSettingsState { + blurNsfwThumbnails: boolean; + hideAdultCommunities: boolean; + hideGoreCommunities: boolean; + hideAntiCommunities: boolean; + setBlurNsfwThumbnails: (blur: boolean) => void; + setHideAdultCommunities: (hide: boolean) => void; + setHideGoreCommunities: (hide: boolean) => void; + setHideAntiCommunities: (hide: boolean) => void; +} + +const useFilterSettingsStore = create()( + persist( + (set) => ({ + blurNsfwThumbnails: true, + hideAdultCommunities: true, + hideGoreCommunities: true, + hideAntiCommunities: true, + setBlurNsfwThumbnails: (blur) => set({ blurNsfwThumbnails: blur }), + setHideAdultCommunities: (hide) => set({ hideAdultCommunities: hide }), + setHideGoreCommunities: (hide) => set({ hideGoreCommunities: hide }), + setHideAntiCommunities: (hide) => set({ hideAntiCommunities: hide }), + }), + { + name: 'filter-settings', + }, + ), +); + +export default useFilterSettingsStore; diff --git a/src/views/settings/settings.module.css b/src/views/settings/settings.module.css index 5fe523e0..a1650964 100644 --- a/src/views/settings/settings.module.css +++ b/src/views/settings/settings.module.css @@ -104,3 +104,17 @@ .highlightedSetting { background-color: var(--yellow-highlight); } + +.filterSettingTitle { + font-style: italic; + text-transform: capitalize; +} + +.filters input[type='checkbox'] { + margin: 2px 0.5em 0 0; +} + +.filters label { + margin-top: 5px; + margin-right: 5px; +} diff --git a/src/views/settings/settings.tsx b/src/views/settings/settings.tsx index 2b180587..fafada4a 100644 --- a/src/views/settings/settings.tsx +++ b/src/views/settings/settings.tsx @@ -3,13 +3,14 @@ import { useLocation } from 'react-router-dom'; import { Trans, useTranslation } from 'react-i18next'; import { setAccount, useAccount } from '@plebbit/plebbit-react-hooks'; import { isSettingsPlebbitOptionsView } from '../../lib/utils/view-utils'; -import styles from './settings.module.css'; +import useFilterSettingsStore from '../../stores/use-filter-settings-store'; +import useTheme from '../../hooks/use-theme'; import AccountSettings from './account-settings'; import AddressSettings from './address-settings'; import AvatarSettings from './avatar-settings'; import PlebbitOptions from './plebbit-options'; import WalletSettings from './wallet-settings'; -import useTheme from '../../hooks/use-theme'; +import styles from './settings.module.css'; import packageJson from '../../../package.json'; import _ from 'lodash'; @@ -111,6 +112,39 @@ const ThemeSettings = () => { ); }; +const FiltersSettings = () => { + const { t } = useTranslation(); + const { + blurNsfwThumbnails, + hideAdultCommunities, + hideGoreCommunities, + hideAntiCommunities, + setBlurNsfwThumbnails, + setHideAdultCommunities, + setHideGoreCommunities, + setHideAntiCommunities, + } = useFilterSettingsStore(); + + return ( +
    +
    {t('nsfw_content')}
    + setBlurNsfwThumbnails(e.target.checked)} /> + +
    +
    +
    {t('nsfw_communities')}
    + setHideAdultCommunities(e.target.checked)} /> + +
    + setHideGoreCommunities(e.target.checked)} /> + +
    + setHideAntiCommunities(e.target.checked)} /> + +
    + ); +}; + const DisplayNameSetting = () => { const { t } = useTranslation(); const account = useAccount(); @@ -192,6 +226,12 @@ const GeneralSettings = () => {
    +
    + {t('filters')} + + + +
    {t('avatar')} From 9244e9437bb27edda18408895f1f02ad8001f7db Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 11:46:25 +0100 Subject: [PATCH 15/25] add translations --- public/translations/ar/default.json | 13 ++++++++++++- public/translations/bn/default.json | 13 ++++++++++++- public/translations/cs/default.json | 13 ++++++++++++- public/translations/da/default.json | 13 ++++++++++++- public/translations/de/default.json | 13 ++++++++++++- public/translations/el/default.json | 13 ++++++++++++- public/translations/en/default.json | 13 ++++++++++++- public/translations/es/default.json | 13 ++++++++++++- public/translations/fa/default.json | 13 ++++++++++++- public/translations/fi/default.json | 13 ++++++++++++- public/translations/fil/default.json | 13 ++++++++++++- public/translations/fr/default.json | 13 ++++++++++++- public/translations/he/default.json | 13 ++++++++++++- public/translations/hi/default.json | 13 ++++++++++++- public/translations/hu/default.json | 13 ++++++++++++- public/translations/id/default.json | 13 ++++++++++++- public/translations/it/default.json | 13 ++++++++++++- public/translations/ja/default.json | 13 ++++++++++++- public/translations/ko/default.json | 13 ++++++++++++- public/translations/mr/default.json | 13 ++++++++++++- public/translations/nl/default.json | 13 ++++++++++++- public/translations/no/default.json | 13 ++++++++++++- public/translations/pl/default.json | 13 ++++++++++++- public/translations/pt/default.json | 13 ++++++++++++- public/translations/ro/default.json | 13 ++++++++++++- public/translations/ru/default.json | 13 ++++++++++++- public/translations/sq/default.json | 13 ++++++++++++- public/translations/sv/default.json | 13 ++++++++++++- public/translations/te/default.json | 13 ++++++++++++- public/translations/th/default.json | 13 ++++++++++++- public/translations/tr/default.json | 13 ++++++++++++- public/translations/uk/default.json | 13 ++++++++++++- public/translations/ur/default.json | 13 ++++++++++++- public/translations/vi/default.json | 13 ++++++++++++- public/translations/zh/default.json | 13 ++++++++++++- 35 files changed, 420 insertions(+), 35 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index eb3602e6..5e553af1 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "تحديات مكافحة البريد العشوائي", "anti_spam_challenges_subtitle": "اختر تحدي أو أكثر لمنع الرسائل غير المرغوب فيها", "add_a_challenge": "إضافة تحدي", - "communities_you_moderate": "المجتمعات التي تشرف عليها" + "communities_you_moderate": "المجتمعات التي تشرف عليها", + "blur_media": "تمويه الوسائط المعلمة كـ NSFW/18+", + "nsfw_content": "محتوى NSFW", + "nsfw_communities": "مجتمعات NSFW", + "hide_adult": "إخفاء المجتمعات المعلَمة كـ \"بالغ\"", + "hide_gore": "إخفاء المجتمعات المعلَمة كـ \"دموي\"", + "hide_anti": "إخفاء المجتمعات المعلَمة كـ \"مناهض\"", + "filters": "مرشحات", + "see_nsfw": "انقر لرؤية NSFW", + "see_nsfw_spoiler": "انقر لرؤية NSFW المفسد", + "always_show_nsfw": "هل تريد دائمًا عرض وسائل الإعلام NSFW؟", + "always_show_nsfw_notice": "حسنًا، لقد غيرنا تفضيلاتك لعرض وسائل الإعلام NSFW دائمًا." } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index a71b263b..1cf8958b 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "অ্যান্টি-স্প্যাম চ্যালেঞ্জ", "anti_spam_challenges_subtitle": "স্প্যাম প্রতিরোধ করতে এক বা একাধিক চ্যালেঞ্জ নির্বাচন করুন", "add_a_challenge": "একটি চ্যালেঞ্জ যোগ করুন", - "communities_you_moderate": "আপনি যে কমিউনিটিগুলি পরিচালনা করেন" + "communities_you_moderate": "আপনি যে কমিউনিটিগুলি পরিচালনা করেন", + "blur_media": "NSFW/18+ হিসেবে চিহ্নিত মিডিয়া ব্লার করুন", + "nsfw_content": "NSFW কনটেন্ট", + "nsfw_communities": "NSFW কমিউনিটিজ", + "hide_adult": "এডাল্ট হিসেবে ট্যাগ করা কমিউনিটিগুলি লুকান", + "hide_gore": "গোর হিসেবে ট্যাগ করা কমিউনিটিগুলি লুকান", + "hide_anti": "অ্যান্টি হিসেবে ট্যাগ করা কমিউনিটিগুলি লুকান", + "filters": "ফিল্টার", + "see_nsfw": "NSFW দেখতে ক্লিক করুন", + "see_nsfw_spoiler": "NSFW স্পয়লার দেখতে ক্লিক করুন", + "always_show_nsfw": "আপনি কি সর্বদা NSFW মিডিয়া দেখাতে চান?", + "always_show_nsfw_notice": "ওকে, আমরা আপনার পছন্দগুলি সর্বদা NSFW মিডিয়া দেখাতে পরিবর্তন করেছি।" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 2a9e5dde..27b919d3 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Anti-spam výzvy", "anti_spam_challenges_subtitle": "Vyberte jednu nebo více výzev k prevenci spamu", "add_a_challenge": "Přidat výzvu", - "communities_you_moderate": "Komunity, které moderujete" + "communities_you_moderate": "Komunity, které moderujete", + "blur_media": "Zamázat média označená jako NSFW/18+", + "nsfw_content": "NSFW obsah", + "nsfw_communities": "NSFW komunity", + "hide_adult": "Skrýt komunity označené jako \"dospělý\"", + "hide_gore": "Skrýt komunity označené jako \"gore\"", + "hide_anti": "Skrýt komunity označené jako \"anti\"", + "filters": "Filtry", + "see_nsfw": "Klikněte pro zobrazení NSFW", + "see_nsfw_spoiler": "Klikněte pro zobrazení NSFW spoileru", + "always_show_nsfw": "Chcete vždy zobrazit NSFW média?", + "always_show_nsfw_notice": "Dobře, změnili jsme vaše preference na vždy zobrazovat NSFW média." } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 40630669..62bccf57 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Anti-spam udfordringer", "anti_spam_challenges_subtitle": "Vælg en eller flere udfordringer for at forhindre spam", "add_a_challenge": "Tilføj en udfordring", - "communities_you_moderate": "De samfund, du modererer" + "communities_you_moderate": "De samfund, du modererer", + "blur_media": "Slør medier markeret som NSFW/18+", + "nsfw_content": "NSFW indhold", + "nsfw_communities": "NSFW fællesskaber", + "hide_adult": "Skjul samfund markeret som \"voksen\"", + "hide_gore": "Skjul samfund markeret som \"gore\"", + "hide_anti": "Skjul samfund markeret som \"anti\"", + "filters": "Filtre", + "see_nsfw": "Klik for at se NSFW", + "see_nsfw_spoiler": "Klik for at se NSFW spoiler", + "always_show_nsfw": "Vil du altid vise NSFW medier?", + "always_show_nsfw_notice": "Okay, vi har ændret dine præferencer til altid at vise NSFW medier." } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index 4543b4b4..cb61b0f4 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Anti-Spam-Herausforderungen", "anti_spam_challenges_subtitle": "Wählen Sie eine oder mehrere Herausforderungen zur Vermeidung von Spam", "add_a_challenge": "Herausforderung hinzufügen", - "communities_you_moderate": "Gemeinschaften, die du moderierst" + "communities_you_moderate": "Gemeinschaften, die du moderierst", + "blur_media": "Unschärfe Medien, die als NSFW/18+ markiert sind", + "nsfw_content": "NSFW-Inhalt", + "nsfw_communities": "NSFW-Communities", + "hide_adult": "Verstecke Communities, die als \"Erwachsene\" markiert sind", + "hide_gore": "Verstecke Communities, die als \"Gore\" markiert sind", + "hide_anti": "Verstecke Communities, die als \"Anti\" markiert sind", + "filters": "Filter", + "see_nsfw": "Klicken Sie, um NSFW zu sehen", + "see_nsfw_spoiler": "Klicken Sie, um den NSFW Spoiler zu sehen", + "always_show_nsfw": "Möchten Sie immer NSFW-Medien anzeigen?", + "always_show_nsfw_notice": "Okay, wir haben deine Präferenzen geändert, um immer NSFW-Medien anzuzeigen." } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 218f0619..732b1f3a 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Προκλήσεις κατά του spam", "anti_spam_challenges_subtitle": "Επιλέξτε μία ή περισσότερες προκλήσεις για την αποτροπή των spam", "add_a_challenge": "Προσθήκη πρόκλησης", - "communities_you_moderate": "Κοινότητες που moderates" + "communities_you_moderate": "Κοινότητες που moderates", + "blur_media": "Θολώστε τα μέσα που είναι επισημασμένα ως NSFW/18+", + "nsfw_content": "Περιεχόμενο NSFW", + "nsfw_communities": "Κοινότητες NSFW", + "hide_adult": "Απόκρυψη κοινοτήτων που είναι επισημασμένες ως \"ενήλικες\"", + "hide_gore": "Απόκρυψη κοινοτήτων που είναι επισημασμένες ως \"gore\"", + "hide_anti": "Απόκρυψη κοινοτήτων που είναι επισημασμένες ως \"αντι\"", + "filters": "Φίλτρα", + "see_nsfw": "Κλικ για να δείτε το NSFW", + "see_nsfw_spoiler": "Κλικ για να δείτε το NSFW spoiler", + "always_show_nsfw": "Θέλετε να εμφανίζετε πάντα τα μέσα NSFW;", + "always_show_nsfw_notice": "Εντάξει, αλλάξαμε τις προτιμήσεις σας για να εμφανίζετε πάντα τα μέσα NSFW." } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index 5644c382..29e12b81 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Anti-spam challenges", "anti_spam_challenges_subtitle": "Choose one or more challenges to prevent spam", "add_a_challenge": "Add a challenge", - "communities_you_moderate": "Communities you moderate" + "communities_you_moderate": "Communities you moderate", + "blur_media": "Blur media marked as NSFW/18+", + "nsfw_content": "NSFW content", + "nsfw_communities": "NSFW communities", + "hide_adult": "Hide communities tagged as \"adult\"", + "hide_gore": "Hide communities tagged as \"gore\"", + "hide_anti": "Hide communities tagged as \"anti\"", + "filters": "Filters", + "see_nsfw": "Click to see nsfw", + "see_nsfw_spoiler": "Click to see nsfw spoiler", + "always_show_nsfw": "Always show NSFW media?", + "always_show_nsfw_notice": "Ok, we changed your preferences to always show NSFW media." } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index 85d1b463..cca798c6 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Desafíos anti-spam", "anti_spam_challenges_subtitle": "Elige uno o más desafíos para prevenir el spam", "add_a_challenge": "Añadir un desafío", - "communities_you_moderate": "Comunidades que moderas" + "communities_you_moderate": "Comunidades que moderas", + "blur_media": "Difuminar los medios marcados como NSFW/18+", + "nsfw_content": "Contenido NSFW", + "nsfw_communities": "Comunidades NSFW", + "hide_adult": "Ocultar comunidades etiquetadas como \"adulto\"", + "hide_gore": "Ocultar comunidades etiquetadas como \"gore\"", + "hide_anti": "Ocultar comunidades etiquetadas como \"anti\"", + "filters": "Filtros", + "see_nsfw": "Haz clic para ver NSFW", + "see_nsfw_spoiler": "Haz clic para ver el spoiler NSFW", + "always_show_nsfw": "¿Siempre mostrar medios NSFW?", + "always_show_nsfw_notice": "Ok, cambiamos tus preferencias para mostrar siempre medios NSFW." } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 7ad6a43a..78635eee 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "چالش‌های ضد هرزنامه", "anti_spam_challenges_subtitle": "یک یا چند چالش برای جلوگیری از هرزنامه انتخاب کنید", "add_a_challenge": "یک چالش اضافه کنید", - "communities_you_moderate": "انجمن‌هایی که شما مدیریت می‌کنید" + "communities_you_moderate": "انجمن‌هایی که شما مدیریت می‌کنید", + "blur_media": "پوشاندن رسانه‌های علامت‌گذاری شده به عنوان NSFW/18+", + "nsfw_content": "محتوای NSFW", + "nsfw_communities": "انجمن‌های NSFW", + "hide_adult": "پنهان کردن جوامع برچسب‌خورده به عنوان \"بزرگسال\"", + "hide_gore": "پنهان کردن جوامع برچسب‌خورده به عنوان \"گور\"", + "hide_anti": "پنهان کردن جوامع برچسب‌خورده به عنوان \"ضد\"", + "filters": "فیلترها", + "see_nsfw": "برای مشاهده NSFW کلیک کنید", + "see_nsfw_spoiler": "برای مشاهده NSFW اسپویلر کلیک کنید", + "always_show_nsfw": "آیا می‌خواهید همیشه رسانه‌های NSFW را نمایش دهید؟", + "always_show_nsfw_notice": "باشه، ما تنظیمات شما را برای نمایش دائمی رسانه‌های NSFW تغییر دادیم." } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index a5dd52ca..5618fca8 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Vasta-roskapostin haasteet", "anti_spam_challenges_subtitle": "Valitse yksi tai useampi haaste estämään roskapostia", "add_a_challenge": "Lisää haaste", - "communities_you_moderate": "Yhteisöt, joita moderoinnit" + "communities_you_moderate": "Yhteisöt, joita moderoinnit", + "blur_media": "Sumenna media, jotka on merkitty NSFW/18+", + "nsfw_content": "NSFW-sisältö", + "nsfw_communities": "NSFW-yhteisöt", + "hide_adult": "Piilota yhteisöt, jotka on merkitty \"aikuiseksi\"", + "hide_gore": "Piilota yhteisöt, jotka on merkitty \"gore\"", + "hide_anti": "Piilota yhteisöt, jotka on merkitty \"anti\"", + "filters": "Suodattimet", + "see_nsfw": "Napsauta nähdäksesi NSFW", + "see_nsfw_spoiler": "Napsauta nähdäksesi NSFW-spoilerin", + "always_show_nsfw": "Haluatko aina näyttää NSFW-mediaa?", + "always_show_nsfw_notice": "Ok, muutimme asetuksesi aina näyttääksesi NSFW-mediaa." } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index 78ddc04e..e0253394 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Mga anti-spam na hamon", "anti_spam_challenges_subtitle": "Pumili ng isa o higit pang mga hamon upang maiwasan ang spam", "add_a_challenge": "Magdagdag ng hamon", - "communities_you_moderate": "Mga komunidad na iyong mino-moderate" + "communities_you_moderate": "Mga komunidad na iyong mino-moderate", + "blur_media": "I-blur ang media na minarkahan bilang NSFW/18+", + "nsfw_content": "Nilalaman ng NSFW", + "nsfw_communities": "NSFW na komunidad", + "hide_adult": "Itago ang mga komunidad na minarkahan bilang \"adult\"", + "hide_gore": "Itago ang mga komunidad na minarkahan bilang \"gore\"", + "hide_anti": "Itago ang mga komunidad na minarkahan bilang \"anti\"", + "filters": "Mga filter", + "see_nsfw": "I-click upang makita ang NSFW", + "see_nsfw_spoiler": "I-click upang makita ang NSFW spoiler", + "always_show_nsfw": "Palaging ipakita ang mga media ng NSFW?", + "always_show_nsfw_notice": "Okay, binago namin ang iyong mga preference upang palaging ipakita ang NSFW media." } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 4371951c..7bf605ce 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Défis anti-spam", "anti_spam_challenges_subtitle": "Choisissez un ou plusieurs défis pour prévenir le spam", "add_a_challenge": "Ajouter un défi", - "communities_you_moderate": "Communautés que vous modérez" + "communities_you_moderate": "Communautés que vous modérez", + "blur_media": "Flouter les médias marqués comme NSFW/18+", + "nsfw_content": "Contenu NSFW", + "nsfw_communities": "Communautés NSFW", + "hide_adult": "Cacher les communautés étiquetées comme \"adulte\"", + "hide_gore": "Cacher les communautés étiquetées comme \"gore\"", + "hide_anti": "Cacher les communautés étiquetées comme \"anti\"", + "filters": "Filtres", + "see_nsfw": "Cliquez pour voir le NSFW", + "see_nsfw_spoiler": "Cliquez pour voir le spoiler NSFW", + "always_show_nsfw": "Voulez-vous toujours afficher les médias NSFW ?", + "always_show_nsfw_notice": "D'accord, nous avons modifié vos préférences pour afficher toujours les médias NSFW." } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 28d6f30f..aef7b25d 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "אתגרים נגד ספאם", "anti_spam_challenges_subtitle": "בחר אתגר אחד או יותר כדי למנוע דואר זבל", "add_a_challenge": "הוסף אתגר", - "communities_you_moderate": "קהילות שאתה מנהל" + "communities_you_moderate": "קהילות שאתה מנהל", + "blur_media": "הטשטש מדיה שסומנה כ-NSFW/18+", + "nsfw_content": "תוכן NSFW", + "nsfw_communities": "קהילות NSFW", + "hide_adult": "הסתר קהילות שסומנו כ\"מבוגר\"", + "hide_gore": "הסתר קהילות שסומנו כ\"גור\"", + "hide_anti": "הסתר קהילות שסומנו כ\"נגד\"", + "filters": "סינונים", + "see_nsfw": "לחץ כדי לראות NSFW", + "see_nsfw_spoiler": "לחץ כדי לראות את ה-NSFW ספוילר", + "always_show_nsfw": "האם תמיד להציג מדיה NSFW?", + "always_show_nsfw_notice": "אוקי, שינינו את ההעדפות שלך להציג תמיד מדיה NSFW." } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index bceeb16d..53336f9e 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "एंटी-स्पैम चुनौतियाँ", "anti_spam_challenges_subtitle": "स्पैम को रोकने के लिए एक या अधिक चुनौतियाँ चुनें", "add_a_challenge": "एक चुनौती जोड़ें", - "communities_you_moderate": "आप जो समुदाय मॉडरेट करते हैं" + "communities_you_moderate": "आप जो समुदाय मॉडरेट करते हैं", + "blur_media": "NSFW/18+ के रूप में चिह्नित मीडिया को ब्लर करें", + "nsfw_content": "NSFW सामग्री", + "nsfw_communities": "NSFW समुदाय", + "hide_adult": "जो \"वयस्क\" के रूप में टैग की गई समुदायों को छिपाएं", + "hide_gore": "जो \"गोर\" के रूप में टैग की गई समुदायों को छिपाएं", + "hide_anti": "जो \"एंटी\" के रूप में टैग की गई समुदायों को छिपाएं", + "filters": "फ़िल्टर", + "see_nsfw": "NSFW देखने के लिए क्लिक करें", + "see_nsfw_spoiler": "NSFW स्पॉयलर देखने के लिए क्लिक करें", + "always_show_nsfw": "क्या आप हमेशा NSFW मीडिया दिखाना चाहते हैं?", + "always_show_nsfw_notice": "ठीक है, हमने आपकी प्राथमिकताएँ हमेशा NSFW मीडिया दिखाने के लिए बदल दी हैं।" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index bddd1d20..e4f7443a 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Anti-spam kihívások", "anti_spam_challenges_subtitle": "Válasszon egy vagy több kihívást a spam megelőzésére", "add_a_challenge": "Hozzáad egy kihívást", - "communities_you_moderate": "Közösségek, amelyeket moderálsz" + "communities_you_moderate": "Közösségek, amelyeket moderálsz", + "blur_media": "Elhomályosítja az NSFW/18+ jelöléssel ellátott médiát", + "nsfw_content": "NSFW tartalom", + "nsfw_communities": "NSFW közösségek", + "hide_adult": "Rejtse el a \"felnőtt\" címkével ellátott közösségeket", + "hide_gore": "Rejtse el a \"gore\" címkével ellátott közösségeket", + "hide_anti": "Rejtse el a \"anti\" címkével ellátott közösségeket", + "filters": "Szűrők", + "see_nsfw": "Kattintson a NSFW megtekintéséhez", + "see_nsfw_spoiler": "Kattintson a NSFW spoiler megtekintéséhez", + "always_show_nsfw": "Mindig meg szeretné jeleníteni az NSFW médiát?", + "always_show_nsfw_notice": "Rendben, megváltoztattuk az preferenciáit, hogy mindig megjelenítse az NSFW médiát." } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index edf388f2..d3fc28f8 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Tantangan anti-spam", "anti_spam_challenges_subtitle": "Pilih satu atau lebih tantangan untuk mencegah spam", "add_a_challenge": "Tambahkan tantangan", - "communities_you_moderate": "Komunitas yang Anda moderasi" + "communities_you_moderate": "Komunitas yang Anda moderasi", + "blur_media": "Blur media yang ditandai sebagai NSFW/18+", + "nsfw_content": "Konten NSFW", + "nsfw_communities": "Komunitas NSFW", + "hide_adult": "Sembunyikan komunitas yang diberi label \"dewasa\"", + "hide_gore": "Sembunyikan komunitas yang diberi label \"gore\"", + "hide_anti": "Sembunyikan komunitas yang diberi label \"anti\"", + "filters": "Filter", + "see_nsfw": "Klik untuk melihat NSFW", + "see_nsfw_spoiler": "Klik untuk melihat NSFW spoiler", + "always_show_nsfw": "Apakah Anda ingin selalu menampilkan media NSFW?", + "always_show_nsfw_notice": "Oke, kami mengubah preferensi Anda untuk selalu menampilkan media NSFW." } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 18047925..dedf38ef 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "challenge anti-spam", "anti_spam_challenges_subtitle": "Scegli una o più challenge per prevenire lo spam", "add_a_challenge": "Aggiungi un challenge", - "communities_you_moderate": "Comunità che moderi" + "communities_you_moderate": "Comunità che moderi", + "blur_media": "Offusca media contrassegnati come NSFW/18+", + "nsfw_content": "Contenuti NSFW", + "nsfw_communities": "Comunità NSFW", + "hide_adult": "Nascondi le comunità contrassegnate come \"adulto\"", + "hide_gore": "Nascondi le comunità contrassegnate come \"gore\"", + "hide_anti": "Nascondi le comunità contrassegnate come \"anti\"", + "filters": "Filtri", + "see_nsfw": "Clicca per vedere NSFW", + "see_nsfw_spoiler": "Clicca per vedere il spoiler NSFW", + "always_show_nsfw": "Mostrare sempre i media NSFW?", + "always_show_nsfw_notice": "Ok, abbiamo cambiato le tue preferenze per mostrare sempre i media NSFW." } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 7fc987ba..0c30cc62 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "アンチスパムチャレンジ", "anti_spam_challenges_subtitle": "スパムを防ぐために1つ以上のチャレンジを選択してください", "add_a_challenge": "チャレンジを追加", - "communities_you_moderate": "あなたが管理するコミュニティ" + "communities_you_moderate": "あなたが管理するコミュニティ", + "blur_media": "NSFW/18+としてマークされたメディアをぼかす", + "nsfw_content": "NSFWコンテンツ", + "nsfw_communities": "NSFWコミュニティ", + "hide_adult": "\"成人\"としてタグ付けされたコミュニティを非表示にする", + "hide_gore": "\"ゴア\"としてタグ付けされたコミュニティを非表示にする", + "hide_anti": "\"アンチ\"としてタグ付けされたコミュニティを非表示にする", + "filters": "フィルター", + "see_nsfw": "NSFWを見るにはクリック", + "see_nsfw_spoiler": "NSFWのネタバレを見るにはクリック", + "always_show_nsfw": "常にNSFWメディアを表示しますか?", + "always_show_nsfw_notice": "はい、NSFWメディアを常に表示するように設定を変更しました。" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index 4e206106..c2a40570 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "스팸 방지 챌린지", "anti_spam_challenges_subtitle": "스팸을 방지하기 위해 하나 이상의 챌린지를 선택하세요", "add_a_challenge": "도전 추가", - "communities_you_moderate": "당신이 관리하는 커뮤니티" + "communities_you_moderate": "당신이 관리하는 커뮤니티", + "blur_media": "NSFW/18+로 표시된 미디어 흐리게 처리", + "nsfw_content": "NSFW 콘텐츠", + "nsfw_communities": "NSFW 커뮤니티", + "hide_adult": "\"성인\"으로 태그된 커뮤니티 숨기기", + "hide_gore": "\"고어\"로 태그된 커뮤니티 숨기기", + "hide_anti": "\"반대\"로 태그된 커뮤니티 숨기기", + "filters": "필터", + "see_nsfw": "NSFW를 보려면 클릭", + "see_nsfw_spoiler": "NSFW 스포일러를 보려면 클릭", + "always_show_nsfw": "항상 NSFW 미디어를 표시하시겠습니까?", + "always_show_nsfw_notice": "알겠습니다, 항상 NSFW 미디어를 표시하도록 기본 설정을 변경했습니다." } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index bfaa32b9..414e8608 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "ॲंटी-स्पॅम चॅलेंजेस", "anti_spam_challenges_subtitle": "स्पॅम रोखण्यासाठी एक किंवा अधिक आव्हाने निवडा", "add_a_challenge": "एक आव्हान जोडा", - "communities_you_moderate": "तुम्ही ज्या समुदायाचे व्यवस्थापन करता" + "communities_you_moderate": "तुम्ही ज्या समुदायाचे व्यवस्थापन करता", + "blur_media": "NSFW/18+ म्हणून चिन्हांकित केलेली मीडिया धूसर करा", + "nsfw_content": "NSFW सामग्री", + "nsfw_communities": "NSFW समुदाय", + "hide_adult": "\"प्रौढ़\" म्हणून टॅग केलेल्या समुदायांना लपवा", + "hide_gore": "\"गोर\" म्हणून टॅग केलेल्या समुदायांना लपवा", + "hide_anti": "\"अँटी\" म्हणून टॅग केलेल्या समुदायांना लपवा", + "filters": "फिल्टर", + "see_nsfw": "NSFW पाहण्यासाठी क्लिक करा", + "see_nsfw_spoiler": "NSFW स्पॉयलर पाहण्यासाठी क्लिक करा", + "always_show_nsfw": "तुम्ही नेहमी NSFW मीडिया दाखवू इच्छिता का?", + "always_show_nsfw_notice": "ठीक आहे, आम्ही तुमची प्राधान्ये नेहमी NSFW मीडिया दर्शवण्यासाठी बदलली आहेत." } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index f6450817..8681b13f 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Anti-spam uitdagingen", "anti_spam_challenges_subtitle": "Kies een of meer uitdagingen om spam te voorkomen", "add_a_challenge": "Voeg een uitdaging toe", - "communities_you_moderate": "Gemeenschappen die je modereert" + "communities_you_moderate": "Gemeenschappen die je modereert", + "blur_media": "Vervagen media gemarkeerd als NSFW/18+", + "nsfw_content": "NSFW-inhoud", + "nsfw_communities": "NSFW-gemeenschappen", + "hide_adult": "Verberg gemeenschappen die zijn gemarkeerd als \"volwassen\"", + "hide_gore": "Verberg gemeenschappen die zijn gemarkeerd als \"gore\"", + "hide_anti": "Verberg gemeenschappen die zijn gemarkeerd als \"anti\"", + "filters": "Filters", + "see_nsfw": "Klik om NSFW te zien", + "see_nsfw_spoiler": "Klik om NSFW spoiler te zien", + "always_show_nsfw": "Altijd NSFW-media weergeven?", + "always_show_nsfw_notice": "Oké, we hebben je voorkeuren veranderd om altijd NSFW-media weer te geven." } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index 0f5dcef0..e5b34264 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Anti-spam utfordringer", "anti_spam_challenges_subtitle": "Velg en eller flere utfordringer for å hindre spam", "add_a_challenge": "Legg til en utfordring", - "communities_you_moderate": "Samfunnene du modererer" + "communities_you_moderate": "Samfunnene du modererer", + "blur_media": "Uskarpe media merket som NSFW/18+", + "nsfw_content": "NSFW-innhold", + "nsfw_communities": "NSFW-fellesskap", + "hide_adult": "Skjul samfunn merket som \"voksen\"", + "hide_gore": "Skjul samfunn merket som \"gore\"", + "hide_anti": "Skjul samfunn merket som \"anti\"", + "filters": "Filtre", + "see_nsfw": "Klikk for å se NSFW", + "see_nsfw_spoiler": "Klikk for å se NSFW-spoiler", + "always_show_nsfw": "Vil du alltid vise NSFW-media?", + "always_show_nsfw_notice": "Ok, vi har endret preferansene dine for å alltid vise NSFW-media." } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 6fdd6b03..a84a68df 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Wyzwania przeciw spamowi", "anti_spam_challenges_subtitle": "Wybierz jedno lub więcej wyzwań, aby zapobiec spamowi", "add_a_challenge": "Dodaj wyzwanie", - "communities_you_moderate": "Społeczności, którymi moderujesz" + "communities_you_moderate": "Społeczności, którymi moderujesz", + "blur_media": "Rozmyj media oznaczone jako NSFW/18+", + "nsfw_content": "Treść NSFW", + "nsfw_communities": "Społeczności NSFW", + "hide_adult": "Ukryj społeczności oznaczone jako \"dorosły\"", + "hide_gore": "Ukryj społeczności oznaczone jako \"gore\"", + "hide_anti": "Ukryj społeczności oznaczone jako \"anti\"", + "filters": "Filtry", + "see_nsfw": "Kliknij, aby zobaczyć NSFW", + "see_nsfw_spoiler": "Kliknij, aby zobaczyć spoiler NSFW", + "always_show_nsfw": "Zawsze wyświetlać media NSFW?", + "always_show_nsfw_notice": "Ok, zmieniliśmy twoje preferencje, aby zawsze wyświetlać media NSFW." } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index c7fbc1d8..7e0dfffd 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Desafios anti-spam", "anti_spam_challenges_subtitle": "Escolha um ou mais desafios para evitar spam", "add_a_challenge": "Adicionar um desafio", - "communities_you_moderate": "Comunidades que você modera" + "communities_you_moderate": "Comunidades que você modera", + "blur_media": "Desfoque mídias marcadas como NSFW/18+", + "nsfw_content": "Conteúdo NSFW", + "nsfw_communities": "Comunidades NSFW", + "hide_adult": "Ocultar comunidades marcadas como \"adulto\"", + "hide_gore": "Ocultar comunidades marcadas como \"gore\"", + "hide_anti": "Ocultar comunidades marcadas como \"anti\"", + "filters": "Filtros", + "see_nsfw": "Clique para ver NSFW", + "see_nsfw_spoiler": "Clique para ver o spoiler NSFW", + "always_show_nsfw": "Sempre mostrar mídias NSFW?", + "always_show_nsfw_notice": "Ok, mudamos suas preferências para mostrar sempre mídias NSFW." } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index 5db1e72c..56ec1e8e 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Provocări anti-spam", "anti_spam_challenges_subtitle": "Alegeți unul sau mai multe provocări pentru a preveni spamul", "add_a_challenge": "Adăugați o provocare", - "communities_you_moderate": "Comunități pe care le moderezi" + "communities_you_moderate": "Comunități pe care le moderezi", + "blur_media": "Estompați media marcate ca NSFW/18+", + "nsfw_content": "Conținut NSFW", + "nsfw_communities": "Comunități NSFW", + "hide_adult": "Ascunde comunitățile etichetate ca \"adult\"", + "hide_gore": "Ascunde comunitățile etichetate ca \"gore\"", + "hide_anti": "Ascunde comunitățile etichetate ca \"anti\"", + "filters": "Filtre", + "see_nsfw": "Faceți clic pentru a vedea NSFW", + "see_nsfw_spoiler": "Faceți clic pentru a vedea spoilerul NSFW", + "always_show_nsfw": "Doriți să arătați întotdeauna media NSFW?", + "always_show_nsfw_notice": "Ok, am schimbat preferințele tale pentru a arăta întotdeauna media NSFW." } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index c27af1b8..f1242848 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Антиспам вызовы", "anti_spam_challenges_subtitle": "Выберите одну или несколько задач для предотвращения спама", "add_a_challenge": "Добавить задачу", - "communities_you_moderate": "Сообщества, которые вы модерируете" + "communities_you_moderate": "Сообщества, которые вы модерируете", + "blur_media": "Размыть медиа, помеченные как NSFW/18+", + "nsfw_content": "Контент NSFW", + "nsfw_communities": "NSFW сообщества", + "hide_adult": "Скрыть сообщества, помеченные как \"взрослый\"", + "hide_gore": "Скрыть сообщества, помеченные как \"горе\"", + "hide_anti": "Скрыть сообщества, помеченные как \"анти\"", + "filters": "Фильтры", + "see_nsfw": "Нажмите, чтобы увидеть NSFW", + "see_nsfw_spoiler": "Нажмите, чтобы увидеть NSFW спойлер", + "always_show_nsfw": "Хотите всегда показывать NSFW медиа?", + "always_show_nsfw_notice": "Окей, мы изменили ваши предпочтения, чтобы всегда показывать медиа NSFW." } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 272f6d1c..f85c71d9 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "challenget anti-spam", "anti_spam_challenges_subtitle": "Zgjidhni një ose më shumë challenge për të parandaluar spam", "add_a_challenge": "Shtoni një sfidë", - "communities_you_moderate": "Komunitetet që moderoni" + "communities_you_moderate": "Komunitetet që moderoni", + "blur_media": "Bluroni mediat e shënuara si NSFW/18+", + "nsfw_content": "Përmbajtje NSFW", + "nsfw_communities": "Komunitete NSFW", + "hide_adult": "Fsheh komunitetet e etiketuar si \"të rritur\"", + "hide_gore": "Fsheh komunitetet e etiketuar si \"gore\"", + "hide_anti": "Fsheh komunitetet e etiketuar si \"anti\"", + "filters": "Filtra", + "see_nsfw": "Klikoni për të parë NSFW", + "see_nsfw_spoiler": "Klikoni për të parë NSFW spoiler", + "always_show_nsfw": "A dëshironi të shfaqni gjithmonë mediat NSFW?", + "always_show_nsfw_notice": "Ok, ne ndryshuam preferencat tuaja për të shfaqur gjithmonë mediat NSFW." } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 755d100e..06225b0a 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Anti-spam-utmaningar", "anti_spam_challenges_subtitle": "Välj en eller flera utmaningar för att förhindra spam", "add_a_challenge": "Lägg till en utmaning", - "communities_you_moderate": "Gemenskaper du modererar" + "communities_you_moderate": "Gemenskaper du modererar", + "blur_media": "Sudda ut media markerade som NSFW/18+", + "nsfw_content": "NSFW-innehåll", + "nsfw_communities": "NSFW-gemenskaper", + "hide_adult": "Dölj samhällen märkta som \"vuxen\"", + "hide_gore": "Dölj samhällen märkta som \"gore\"", + "hide_anti": "Dölj samhällen märkta som \"anti\"", + "filters": "Filter", + "see_nsfw": "Klicka för att se NSFW", + "see_nsfw_spoiler": "Klicka för att se NSFW-spoiler", + "always_show_nsfw": "Vill du alltid visa NSFW-media?", + "always_show_nsfw_notice": "Okej, vi har ändrat dina inställningar för att alltid visa NSFW-media." } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 60474cbf..0464f321 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "ఏంటి-స్పామ్ సవాళ్ళు", "anti_spam_challenges_subtitle": "స్పామ్ ను నివారించడానికి ఒకటి లేదా ఎక్కువ సవాళ్లను ఎంచుకోండి", "add_a_challenge": "ఒక సవాలు జోడించండి", - "communities_you_moderate": "మీరు నిర్వహించే కమ్యూనిటీలు" + "communities_you_moderate": "మీరు నిర్వహించే కమ్యూనిటీలు", + "blur_media": "NSFW/18+ గా గుర్తించిన మీడియాను బ్లర్ చేయండి", + "nsfw_content": "NSFW కంటెంట్", + "nsfw_communities": "NSFW కమ్యూనిటీల", + "hide_adult": "\"వయస్సు\" గా ట్యాగ్ చేసిన సమాజాలను దాచండి", + "hide_gore": "\"గోర్\" గా ట్యాగ్ చేసిన సమాజాలను దాచండి", + "hide_anti": "\"ఎంటీ\" గా ట్యాగ్ చేసిన సమాజాలను దాచండి", + "filters": "ఫిల్టర్లు", + "see_nsfw": "NSFW చూడటానికి క్లిక్ చేయండి", + "see_nsfw_spoiler": "NSFW స్పోయిలర్ చూడటానికి క్లిక్ చేయండి", + "always_show_nsfw": "ఎల్లప్పుడూ NSFW మీడియాను చూపాలా?", + "always_show_nsfw_notice": "సరే, మేము మీ ఇష్టాలను ఎల్లప్పుడూ NSFW మీడియా చూపించడానికి మార్చాము." } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index bced7b55..fbcc133e 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "ความท้าทายต่อต้านสแปม", "anti_spam_challenges_subtitle": "เลือกความท้าทายหนึ่งหรือหลายรายการเพื่อป้องกันสแปม", "add_a_challenge": "เพิ่มความท้าทาย", - "communities_you_moderate": "ชุมชนที่คุณเป็นผู้ดูแล" + "communities_you_moderate": "ชุมชนที่คุณเป็นผู้ดูแล", + "blur_media": "เบลอเนื้อหาที่ถูกทำเครื่องหมายว่า NSFW/18+", + "nsfw_content": "เนื้อหา NSFW", + "nsfw_communities": "ชุมชน NSFW", + "hide_adult": "ซ่อนชุมชนที่ถูกแท็กว่า \"ผู้ใหญ่\"", + "hide_gore": "ซ่อนชุมชนที่ถูกแท็กว่า \"กอร์\"", + "hide_anti": "ซ่อนชุมชนที่ถูกแท็กว่า \"ต่อต้าน\"", + "filters": "ตัวกรอง", + "see_nsfw": "คลิกเพื่อดู NSFW", + "see_nsfw_spoiler": "คลิกเพื่อดู NSFW สปอยเลอร์", + "always_show_nsfw": "คุณต้องการแสดงสื่อ NSFW ตลอดเวลาหรือไม่?", + "always_show_nsfw_notice": "ตกลง, เราเปลี่ยนการตั้งค่าของคุณเพื่อแสดงสื่อ NSFW ตลอดเวลา" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 728a158f..40e3e544 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Anti-spam zorlukları", "anti_spam_challenges_subtitle": "Spam önlemek için bir veya daha fazla zorluk seçin", "add_a_challenge": "Bir zorluk ekle", - "communities_you_moderate": "Moderatörlük yaptığınız topluluklar" + "communities_you_moderate": "Moderatörlük yaptığınız topluluklar", + "blur_media": "NSFW/18+ olarak işaretlenmiş medyayı bulanıklaştırın", + "nsfw_content": "NSFW içeriği", + "nsfw_communities": "NSFW toplulukları", + "hide_adult": "\"Yetişkin\" olarak etiketlenen toplulukları gizle", + "hide_gore": "\"Gore\" olarak etiketlenen toplulukları gizle", + "hide_anti": "\"Anti\" olarak etiketlenen toplulukları gizle", + "filters": "Filtreler", + "see_nsfw": "NSFW görmek için tıklayın", + "see_nsfw_spoiler": "NSFW spoiler görmek için tıklayın", + "always_show_nsfw": "Her zaman NSFW medyasını göstermek ister misiniz?", + "always_show_nsfw_notice": "Tamam, tercihlerinizi her zaman NSFW medyasını gösterecek şekilde değiştirdik." } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index de8489bd..0d2ef511 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Антиспам виклики", "anti_spam_challenges_subtitle": "Виберіть одне або кілька завдань для запобігання спаму", "add_a_challenge": "Додати завдання", - "communities_you_moderate": "Спільноти, які ви модеруєте" + "communities_you_moderate": "Спільноти, які ви модеруєте", + "blur_media": "Розмити медіа, позначені як NSFW/18+", + "nsfw_content": "Контент NSFW", + "nsfw_communities": "NSFW спільноти", + "hide_adult": "Сховати спільноти, позначені як \"дорослі\"", + "hide_gore": "Сховати спільноти, позначені як \"горе\"", + "hide_anti": "Сховати спільноти, позначені як \"анти\"", + "filters": "Фільтри", + "see_nsfw": "Натисніть, щоб побачити NSFW", + "see_nsfw_spoiler": "Натисніть, щоб побачити NSFW спойлер", + "always_show_nsfw": "Чи хочете ви завжди показувати медіа NSFW?", + "always_show_nsfw_notice": "Добре, ми змінили ваші налаштування, щоб завжди показувати медіа NSFW." } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 116debb8..7fffbf4a 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "اینٹی اسپام چیلنجز", "anti_spam_challenges_subtitle": "اسپام کو روکنے کے لیے ایک یا زیادہ چیلنجز منتخب کریں", "add_a_challenge": "ایک چیلنج شامل کریں", - "communities_you_moderate": "کمیونٹیز جو آپ ماڈریٹ کرتے ہیں" + "communities_you_moderate": "کمیونٹیز جو آپ ماڈریٹ کرتے ہیں", + "blur_media": "NSFW/18+ کے طور پر نشان زد میڈیا کو دھندلا کریں", + "nsfw_content": "NSFW مواد", + "nsfw_communities": "NSFW کمیونٹیز", + "hide_adult": "\"بالغ\" کے طور پر ٹیگ کی گئی کمیونٹیز کو چھپائیں", + "hide_gore": "\"گور\" کے طور پر ٹیگ کی گئی کمیونٹیز کو چھپائیں", + "hide_anti": "\"اینٹی\" کے طور پر ٹیگ کی گئی کمیونٹیز کو چھپائیں", + "filters": "فلٹرز", + "see_nsfw": "NSFW دیکھنے کے لیے کلک کریں", + "see_nsfw_spoiler": "NSFW سپوائلر دیکھنے کے لیے کلک کریں", + "always_show_nsfw": "کیا آپ ہمیشہ NSFW میڈیا دکھانا چاہتے ہیں؟", + "always_show_nsfw_notice": "اوکے، ہم نے آپ کی ترجیحات ہمیشہ کے لئے NSFW میڈیا دکھانے کے لئے تبدیل کر دی ہیں۔" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 909e69ae..b1cce9c6 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "Thử thách chống spam", "anti_spam_challenges_subtitle": "Chọn một hoặc nhiều thử thách để ngừng spam", "add_a_challenge": "Thêm một thử thách", - "communities_you_moderate": "Cộng đồng bạn quản lý" + "communities_you_moderate": "Cộng đồng bạn quản lý", + "blur_media": "Mờ phương tiện được đánh dấu là NSFW/18+", + "nsfw_content": "Nội dung NSFW", + "nsfw_communities": "Cộng đồng NSFW", + "hide_adult": "Ẩn cộng đồng được gắn thẻ là \"người lớn\"", + "hide_gore": "Ẩn cộng đồng được gắn thẻ là \"gore\"", + "hide_anti": "Ẩn cộng đồng được gắn thẻ là \"anti\"", + "filters": "Bộ lọc", + "see_nsfw": "Nhấp để xem NSFW", + "see_nsfw_spoiler": "Nhấp để xem NSFW spoiler", + "always_show_nsfw": "Luôn hiển thị media NSFW?", + "always_show_nsfw_notice": "Được rồi, chúng tôi đã thay đổi sở thích của bạn để luôn hiển thị media NSFW." } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index d0721285..59e7b89b 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -331,5 +331,16 @@ "anti_spam_challenges": "反垃圾邮件挑战", "anti_spam_challenges_subtitle": "选择一个或多个挑战来防止垃圾邮件", "add_a_challenge": "添加一个挑战", - "communities_you_moderate": "您管理的社区" + "communities_you_moderate": "您管理的社区", + "blur_media": "模糊标记为NSFW/18+的媒体", + "nsfw_content": "NSFW 内容", + "nsfw_communities": "NSFW 社区", + "hide_adult": "隐藏标记为“成人”的社区", + "hide_gore": "隐藏标记为“gore”的社区", + "hide_anti": "隐藏标记为“anti”的社区", + "filters": "过滤器", + "see_nsfw": "点击查看 NSFW", + "see_nsfw_spoiler": "点击查看 NSFW 剧透", + "always_show_nsfw": "始终显示NSFW媒体?", + "always_show_nsfw_notice": "好的,我们已将您的偏好更改为始终显示NSFW媒体。" } \ No newline at end of file From fd904afec24ef2ff55acd6dc048995a65a75f66b Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 13:05:18 +0100 Subject: [PATCH 16/25] add translations, add vulgar tag setting --- public/translations/ar/default.json | 4 +++- public/translations/bn/default.json | 4 +++- public/translations/cs/default.json | 4 +++- public/translations/da/default.json | 4 +++- public/translations/de/default.json | 4 +++- public/translations/el/default.json | 4 +++- public/translations/en/default.json | 4 +++- public/translations/es/default.json | 4 +++- public/translations/fa/default.json | 4 +++- public/translations/fi/default.json | 4 +++- public/translations/fil/default.json | 4 +++- public/translations/fr/default.json | 4 +++- public/translations/he/default.json | 4 +++- public/translations/hi/default.json | 4 +++- public/translations/hu/default.json | 4 +++- public/translations/id/default.json | 4 +++- public/translations/it/default.json | 4 +++- public/translations/ja/default.json | 4 +++- public/translations/ko/default.json | 4 +++- public/translations/mr/default.json | 4 +++- public/translations/nl/default.json | 4 +++- public/translations/no/default.json | 4 +++- public/translations/pl/default.json | 4 +++- public/translations/pt/default.json | 4 +++- public/translations/ro/default.json | 4 +++- public/translations/ru/default.json | 4 +++- public/translations/sq/default.json | 4 +++- public/translations/sv/default.json | 4 +++- public/translations/te/default.json | 4 +++- public/translations/th/default.json | 4 +++- public/translations/tr/default.json | 4 +++- public/translations/uk/default.json | 4 +++- public/translations/ur/default.json | 4 +++- public/translations/vi/default.json | 4 +++- public/translations/zh/default.json | 4 +++- src/components/post/post.tsx | 2 +- src/hooks/use-default-subplebbits.ts | 6 +++--- src/stores/use-filter-settings-store.ts | 4 ++++ src/views/settings/settings.tsx | 21 +++++++++++++-------- 39 files changed, 126 insertions(+), 47 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 5e553af1..3901fe9f 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -342,5 +342,7 @@ "see_nsfw": "انقر لرؤية NSFW", "see_nsfw_spoiler": "انقر لرؤية NSFW المفسد", "always_show_nsfw": "هل تريد دائمًا عرض وسائل الإعلام NSFW؟", - "always_show_nsfw_notice": "حسنًا، لقد غيرنا تفضيلاتك لعرض وسائل الإعلام NSFW دائمًا." + "always_show_nsfw_notice": "حسنًا، لقد غيرنا تفضيلاتك لعرض وسائل الإعلام NSFW دائمًا.", + "content_options": "خيارات المحتوى", + "hide_vulgar": "إخفاء المجتمعات المعلَمة كـ \"فاحش\"" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 1cf8958b..8c31fa36 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -342,5 +342,7 @@ "see_nsfw": "NSFW দেখতে ক্লিক করুন", "see_nsfw_spoiler": "NSFW স্পয়লার দেখতে ক্লিক করুন", "always_show_nsfw": "আপনি কি সর্বদা NSFW মিডিয়া দেখাতে চান?", - "always_show_nsfw_notice": "ওকে, আমরা আপনার পছন্দগুলি সর্বদা NSFW মিডিয়া দেখাতে পরিবর্তন করেছি।" + "always_show_nsfw_notice": "ওকে, আমরা আপনার পছন্দগুলি সর্বদা NSFW মিডিয়া দেখাতে পরিবর্তন করেছি।", + "content_options": "সামগ্রী বিকল্প", + "hide_vulgar": "ভুলগার হিসেবে ট্যাগ করা কমিউনিটিগুলি লুকান" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 27b919d3..84ddcbe8 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Klikněte pro zobrazení NSFW", "see_nsfw_spoiler": "Klikněte pro zobrazení NSFW spoileru", "always_show_nsfw": "Chcete vždy zobrazit NSFW média?", - "always_show_nsfw_notice": "Dobře, změnili jsme vaše preference na vždy zobrazovat NSFW média." + "always_show_nsfw_notice": "Dobře, změnili jsme vaše preference na vždy zobrazovat NSFW média.", + "content_options": "Možnosti obsahu", + "hide_vulgar": "Skrýt komunity označené jako \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 62bccf57..d573f265 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Klik for at se NSFW", "see_nsfw_spoiler": "Klik for at se NSFW spoiler", "always_show_nsfw": "Vil du altid vise NSFW medier?", - "always_show_nsfw_notice": "Okay, vi har ændret dine præferencer til altid at vise NSFW medier." + "always_show_nsfw_notice": "Okay, vi har ændret dine præferencer til altid at vise NSFW medier.", + "content_options": "Indholdsindstillinger", + "hide_vulgar": "Skjul samfund markeret som \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index cb61b0f4..f17076f8 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Klicken Sie, um NSFW zu sehen", "see_nsfw_spoiler": "Klicken Sie, um den NSFW Spoiler zu sehen", "always_show_nsfw": "Möchten Sie immer NSFW-Medien anzeigen?", - "always_show_nsfw_notice": "Okay, wir haben deine Präferenzen geändert, um immer NSFW-Medien anzuzeigen." + "always_show_nsfw_notice": "Okay, wir haben deine Präferenzen geändert, um immer NSFW-Medien anzuzeigen.", + "content_options": "Inhaltsoptionen", + "hide_vulgar": "Verstecke Communities, die als \"Vulgar\" markiert sind" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 732b1f3a..25c2b3ae 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Κλικ για να δείτε το NSFW", "see_nsfw_spoiler": "Κλικ για να δείτε το NSFW spoiler", "always_show_nsfw": "Θέλετε να εμφανίζετε πάντα τα μέσα NSFW;", - "always_show_nsfw_notice": "Εντάξει, αλλάξαμε τις προτιμήσεις σας για να εμφανίζετε πάντα τα μέσα NSFW." + "always_show_nsfw_notice": "Εντάξει, αλλάξαμε τις προτιμήσεις σας για να εμφανίζετε πάντα τα μέσα NSFW.", + "content_options": "Επιλογές περιεχομένου", + "hide_vulgar": "Απόκρυψη κοινοτήτων που είναι επισημασμένες ως \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index 29e12b81..d179123a 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Click to see nsfw", "see_nsfw_spoiler": "Click to see nsfw spoiler", "always_show_nsfw": "Always show NSFW media?", - "always_show_nsfw_notice": "Ok, we changed your preferences to always show NSFW media." + "always_show_nsfw_notice": "Ok, we changed your preferences to always show NSFW media.", + "content_options": "Content options", + "hide_vulgar": "Hide communities tagged as \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index cca798c6..2b088ed5 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Haz clic para ver NSFW", "see_nsfw_spoiler": "Haz clic para ver el spoiler NSFW", "always_show_nsfw": "¿Siempre mostrar medios NSFW?", - "always_show_nsfw_notice": "Ok, cambiamos tus preferencias para mostrar siempre medios NSFW." + "always_show_nsfw_notice": "Ok, cambiamos tus preferencias para mostrar siempre medios NSFW.", + "content_options": "Opciones de contenido", + "hide_vulgar": "Ocultar comunidades etiquetadas como \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 78635eee..1941c727 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -342,5 +342,7 @@ "see_nsfw": "برای مشاهده NSFW کلیک کنید", "see_nsfw_spoiler": "برای مشاهده NSFW اسپویلر کلیک کنید", "always_show_nsfw": "آیا می‌خواهید همیشه رسانه‌های NSFW را نمایش دهید؟", - "always_show_nsfw_notice": "باشه، ما تنظیمات شما را برای نمایش دائمی رسانه‌های NSFW تغییر دادیم." + "always_show_nsfw_notice": "باشه، ما تنظیمات شما را برای نمایش دائمی رسانه‌های NSFW تغییر دادیم.", + "content_options": "گزینه‌های محتوا", + "hide_vulgar": "پنهان کردن جوامع برچسب‌خورده به عنوان \"زشت\"" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 5618fca8..547a015b 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Napsauta nähdäksesi NSFW", "see_nsfw_spoiler": "Napsauta nähdäksesi NSFW-spoilerin", "always_show_nsfw": "Haluatko aina näyttää NSFW-mediaa?", - "always_show_nsfw_notice": "Ok, muutimme asetuksesi aina näyttääksesi NSFW-mediaa." + "always_show_nsfw_notice": "Ok, muutimme asetuksesi aina näyttääksesi NSFW-mediaa.", + "content_options": "Sisältöasetukset", + "hide_vulgar": "Piilota yhteisöt, jotka on merkitty \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index e0253394..c2f6ccfa 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -342,5 +342,7 @@ "see_nsfw": "I-click upang makita ang NSFW", "see_nsfw_spoiler": "I-click upang makita ang NSFW spoiler", "always_show_nsfw": "Palaging ipakita ang mga media ng NSFW?", - "always_show_nsfw_notice": "Okay, binago namin ang iyong mga preference upang palaging ipakita ang NSFW media." + "always_show_nsfw_notice": "Okay, binago namin ang iyong mga preference upang palaging ipakita ang NSFW media.", + "content_options": "Mga opsyon sa nilalaman", + "hide_vulgar": "Itago ang mga komunidad na minarkahan bilang \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 7bf605ce..0dd55b5d 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Cliquez pour voir le NSFW", "see_nsfw_spoiler": "Cliquez pour voir le spoiler NSFW", "always_show_nsfw": "Voulez-vous toujours afficher les médias NSFW ?", - "always_show_nsfw_notice": "D'accord, nous avons modifié vos préférences pour afficher toujours les médias NSFW." + "always_show_nsfw_notice": "D'accord, nous avons modifié vos préférences pour afficher toujours les médias NSFW.", + "content_options": "Options de contenu", + "hide_vulgar": "Cacher les communautés étiquetées comme \"vulgaire\"" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index aef7b25d..788afb6c 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -342,5 +342,7 @@ "see_nsfw": "לחץ כדי לראות NSFW", "see_nsfw_spoiler": "לחץ כדי לראות את ה-NSFW ספוילר", "always_show_nsfw": "האם תמיד להציג מדיה NSFW?", - "always_show_nsfw_notice": "אוקי, שינינו את ההעדפות שלך להציג תמיד מדיה NSFW." + "always_show_nsfw_notice": "אוקי, שינינו את ההעדפות שלך להציג תמיד מדיה NSFW.", + "content_options": "אפשרויות תוכן", + "hide_vulgar": "הסתר קהילות שסומנו כ\"גס\"" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index 53336f9e..85aaa972 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -342,5 +342,7 @@ "see_nsfw": "NSFW देखने के लिए क्लिक करें", "see_nsfw_spoiler": "NSFW स्पॉयलर देखने के लिए क्लिक करें", "always_show_nsfw": "क्या आप हमेशा NSFW मीडिया दिखाना चाहते हैं?", - "always_show_nsfw_notice": "ठीक है, हमने आपकी प्राथमिकताएँ हमेशा NSFW मीडिया दिखाने के लिए बदल दी हैं।" + "always_show_nsfw_notice": "ठीक है, हमने आपकी प्राथमिकताएँ हमेशा NSFW मीडिया दिखाने के लिए बदल दी हैं।", + "content_options": "सामग्री विकल्प", + "hide_vulgar": "जो \"वुल्गर\" के रूप में टैग की गई समुदायों को छिपाएं" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index e4f7443a..78106932 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Kattintson a NSFW megtekintéséhez", "see_nsfw_spoiler": "Kattintson a NSFW spoiler megtekintéséhez", "always_show_nsfw": "Mindig meg szeretné jeleníteni az NSFW médiát?", - "always_show_nsfw_notice": "Rendben, megváltoztattuk az preferenciáit, hogy mindig megjelenítse az NSFW médiát." + "always_show_nsfw_notice": "Rendben, megváltoztattuk az preferenciáit, hogy mindig megjelenítse az NSFW médiát.", + "content_options": "Tartalombeállítások", + "hide_vulgar": "Rejtse el a \"vulgar\" címkével ellátott közösségeket" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index d3fc28f8..8bcf4449 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Klik untuk melihat NSFW", "see_nsfw_spoiler": "Klik untuk melihat NSFW spoiler", "always_show_nsfw": "Apakah Anda ingin selalu menampilkan media NSFW?", - "always_show_nsfw_notice": "Oke, kami mengubah preferensi Anda untuk selalu menampilkan media NSFW." + "always_show_nsfw_notice": "Oke, kami mengubah preferensi Anda untuk selalu menampilkan media NSFW.", + "content_options": "Opsi konten", + "hide_vulgar": "Sembunyikan komunitas yang diberi label \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index dedf38ef..8f2ca2e2 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Clicca per vedere NSFW", "see_nsfw_spoiler": "Clicca per vedere il spoiler NSFW", "always_show_nsfw": "Mostrare sempre i media NSFW?", - "always_show_nsfw_notice": "Ok, abbiamo cambiato le tue preferenze per mostrare sempre i media NSFW." + "always_show_nsfw_notice": "Ok, abbiamo cambiato le tue preferenze per mostrare sempre i media NSFW.", + "content_options": "Opzioni dei contenuti", + "hide_vulgar": "Nascondi le comunità contrassegnate come \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 0c30cc62..0c974e2a 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -342,5 +342,7 @@ "see_nsfw": "NSFWを見るにはクリック", "see_nsfw_spoiler": "NSFWのネタバレを見るにはクリック", "always_show_nsfw": "常にNSFWメディアを表示しますか?", - "always_show_nsfw_notice": "はい、NSFWメディアを常に表示するように設定を変更しました。" + "always_show_nsfw_notice": "はい、NSFWメディアを常に表示するように設定を変更しました。", + "content_options": "コンテンツオプション", + "hide_vulgar": "\"ヴァルガー\"としてタグ付けされたコミュニティを非表示にする" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index c2a40570..1dd8d194 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -342,5 +342,7 @@ "see_nsfw": "NSFW를 보려면 클릭", "see_nsfw_spoiler": "NSFW 스포일러를 보려면 클릭", "always_show_nsfw": "항상 NSFW 미디어를 표시하시겠습니까?", - "always_show_nsfw_notice": "알겠습니다, 항상 NSFW 미디어를 표시하도록 기본 설정을 변경했습니다." + "always_show_nsfw_notice": "알겠습니다, 항상 NSFW 미디어를 표시하도록 기본 설정을 변경했습니다.", + "content_options": "콘텐츠 옵션", + "hide_vulgar": "\"벌거벗은\"으로 태그된 커뮤니티 숨기기" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 414e8608..61b48c2d 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -342,5 +342,7 @@ "see_nsfw": "NSFW पाहण्यासाठी क्लिक करा", "see_nsfw_spoiler": "NSFW स्पॉयलर पाहण्यासाठी क्लिक करा", "always_show_nsfw": "तुम्ही नेहमी NSFW मीडिया दाखवू इच्छिता का?", - "always_show_nsfw_notice": "ठीक आहे, आम्ही तुमची प्राधान्ये नेहमी NSFW मीडिया दर्शवण्यासाठी बदलली आहेत." + "always_show_nsfw_notice": "ठीक आहे, आम्ही तुमची प्राधान्ये नेहमी NSFW मीडिया दर्शवण्यासाठी बदलली आहेत.", + "content_options": "सामग्री पर्याय", + "hide_vulgar": "\"वुल्गर\" म्हणून टॅग केलेल्या समुदायांना लपवा" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 8681b13f..cdab8ccb 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Klik om NSFW te zien", "see_nsfw_spoiler": "Klik om NSFW spoiler te zien", "always_show_nsfw": "Altijd NSFW-media weergeven?", - "always_show_nsfw_notice": "Oké, we hebben je voorkeuren veranderd om altijd NSFW-media weer te geven." + "always_show_nsfw_notice": "Oké, we hebben je voorkeuren veranderd om altijd NSFW-media weer te geven.", + "content_options": "Inhoudsopties", + "hide_vulgar": "Verberg gemeenschappen die zijn gemarkeerd als \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index e5b34264..bf166128 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Klikk for å se NSFW", "see_nsfw_spoiler": "Klikk for å se NSFW-spoiler", "always_show_nsfw": "Vil du alltid vise NSFW-media?", - "always_show_nsfw_notice": "Ok, vi har endret preferansene dine for å alltid vise NSFW-media." + "always_show_nsfw_notice": "Ok, vi har endret preferansene dine for å alltid vise NSFW-media.", + "content_options": "Innstillinger for innhold", + "hide_vulgar": "Skjul samfunn merket som \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index a84a68df..f9ff0ba9 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Kliknij, aby zobaczyć NSFW", "see_nsfw_spoiler": "Kliknij, aby zobaczyć spoiler NSFW", "always_show_nsfw": "Zawsze wyświetlać media NSFW?", - "always_show_nsfw_notice": "Ok, zmieniliśmy twoje preferencje, aby zawsze wyświetlać media NSFW." + "always_show_nsfw_notice": "Ok, zmieniliśmy twoje preferencje, aby zawsze wyświetlać media NSFW.", + "content_options": "Opcje treści", + "hide_vulgar": "Ukryj społeczności oznaczone jako \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index 7e0dfffd..854fae64 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Clique para ver NSFW", "see_nsfw_spoiler": "Clique para ver o spoiler NSFW", "always_show_nsfw": "Sempre mostrar mídias NSFW?", - "always_show_nsfw_notice": "Ok, mudamos suas preferências para mostrar sempre mídias NSFW." + "always_show_nsfw_notice": "Ok, mudamos suas preferências para mostrar sempre mídias NSFW.", + "content_options": "Opções de conteúdo", + "hide_vulgar": "Ocultar comunidades marcadas como \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index 56ec1e8e..bf2c71fa 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Faceți clic pentru a vedea NSFW", "see_nsfw_spoiler": "Faceți clic pentru a vedea spoilerul NSFW", "always_show_nsfw": "Doriți să arătați întotdeauna media NSFW?", - "always_show_nsfw_notice": "Ok, am schimbat preferințele tale pentru a arăta întotdeauna media NSFW." + "always_show_nsfw_notice": "Ok, am schimbat preferințele tale pentru a arăta întotdeauna media NSFW.", + "content_options": "Opțiuni de conținut", + "hide_vulgar": "Ascunde comunitățile etichetate ca \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index f1242848..b3c0f443 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Нажмите, чтобы увидеть NSFW", "see_nsfw_spoiler": "Нажмите, чтобы увидеть NSFW спойлер", "always_show_nsfw": "Хотите всегда показывать NSFW медиа?", - "always_show_nsfw_notice": "Окей, мы изменили ваши предпочтения, чтобы всегда показывать медиа NSFW." + "always_show_nsfw_notice": "Окей, мы изменили ваши предпочтения, чтобы всегда показывать медиа NSFW.", + "content_options": "Параметры контента", + "hide_vulgar": "Скрыть сообщества, помеченные как \"вульгарные\"" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index f85c71d9..40c63bdd 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Klikoni për të parë NSFW", "see_nsfw_spoiler": "Klikoni për të parë NSFW spoiler", "always_show_nsfw": "A dëshironi të shfaqni gjithmonë mediat NSFW?", - "always_show_nsfw_notice": "Ok, ne ndryshuam preferencat tuaja për të shfaqur gjithmonë mediat NSFW." + "always_show_nsfw_notice": "Ok, ne ndryshuam preferencat tuaja për të shfaqur gjithmonë mediat NSFW.", + "content_options": "Opsionet e përmbajtjes", + "hide_vulgar": "Fsheh komunitetet e etiketuar si \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 06225b0a..d290d8fd 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Klicka för att se NSFW", "see_nsfw_spoiler": "Klicka för att se NSFW-spoiler", "always_show_nsfw": "Vill du alltid visa NSFW-media?", - "always_show_nsfw_notice": "Okej, vi har ändrat dina inställningar för att alltid visa NSFW-media." + "always_show_nsfw_notice": "Okej, vi har ändrat dina inställningar för att alltid visa NSFW-media.", + "content_options": "Innehållsoptioner", + "hide_vulgar": "Dölj samhällen märkta som \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 0464f321..8fc8f45b 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -342,5 +342,7 @@ "see_nsfw": "NSFW చూడటానికి క్లిక్ చేయండి", "see_nsfw_spoiler": "NSFW స్పోయిలర్ చూడటానికి క్లిక్ చేయండి", "always_show_nsfw": "ఎల్లప్పుడూ NSFW మీడియాను చూపాలా?", - "always_show_nsfw_notice": "సరే, మేము మీ ఇష్టాలను ఎల్లప్పుడూ NSFW మీడియా చూపించడానికి మార్చాము." + "always_show_nsfw_notice": "సరే, మేము మీ ఇష్టాలను ఎల్లప్పుడూ NSFW మీడియా చూపించడానికి మార్చాము.", + "content_options": "కంటెంట్ ఎంపికలు", + "hide_vulgar": "\"వుల్‌గర్\" గా ట్యాగ్ చేసిన సమాజాలను దాచండి" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index fbcc133e..a0d8d78e 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -342,5 +342,7 @@ "see_nsfw": "คลิกเพื่อดู NSFW", "see_nsfw_spoiler": "คลิกเพื่อดู NSFW สปอยเลอร์", "always_show_nsfw": "คุณต้องการแสดงสื่อ NSFW ตลอดเวลาหรือไม่?", - "always_show_nsfw_notice": "ตกลง, เราเปลี่ยนการตั้งค่าของคุณเพื่อแสดงสื่อ NSFW ตลอดเวลา" + "always_show_nsfw_notice": "ตกลง, เราเปลี่ยนการตั้งค่าของคุณเพื่อแสดงสื่อ NSFW ตลอดเวลา", + "content_options": "ตัวเลือกเนื้อหา", + "hide_vulgar": "ซ่อนชุมชนที่ถูกแท็กว่า \"หยาบคาย\"" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 40e3e544..e15ddbc3 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -342,5 +342,7 @@ "see_nsfw": "NSFW görmek için tıklayın", "see_nsfw_spoiler": "NSFW spoiler görmek için tıklayın", "always_show_nsfw": "Her zaman NSFW medyasını göstermek ister misiniz?", - "always_show_nsfw_notice": "Tamam, tercihlerinizi her zaman NSFW medyasını gösterecek şekilde değiştirdik." + "always_show_nsfw_notice": "Tamam, tercihlerinizi her zaman NSFW medyasını gösterecek şekilde değiştirdik.", + "content_options": "İçerik seçenekleri", + "hide_vulgar": "\"Vulgar\" olarak etiketlenen toplulukları gizle" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 0d2ef511..5523ef6f 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Натисніть, щоб побачити NSFW", "see_nsfw_spoiler": "Натисніть, щоб побачити NSFW спойлер", "always_show_nsfw": "Чи хочете ви завжди показувати медіа NSFW?", - "always_show_nsfw_notice": "Добре, ми змінили ваші налаштування, щоб завжди показувати медіа NSFW." + "always_show_nsfw_notice": "Добре, ми змінили ваші налаштування, щоб завжди показувати медіа NSFW.", + "content_options": "Параметри контенту", + "hide_vulgar": "Сховати спільноти, позначені як \"вульгарні\"" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 7fffbf4a..3f2124e7 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -342,5 +342,7 @@ "see_nsfw": "NSFW دیکھنے کے لیے کلک کریں", "see_nsfw_spoiler": "NSFW سپوائلر دیکھنے کے لیے کلک کریں", "always_show_nsfw": "کیا آپ ہمیشہ NSFW میڈیا دکھانا چاہتے ہیں؟", - "always_show_nsfw_notice": "اوکے، ہم نے آپ کی ترجیحات ہمیشہ کے لئے NSFW میڈیا دکھانے کے لئے تبدیل کر دی ہیں۔" + "always_show_nsfw_notice": "اوکے، ہم نے آپ کی ترجیحات ہمیشہ کے لئے NSFW میڈیا دکھانے کے لئے تبدیل کر دی ہیں۔", + "content_options": "مواد کے اختیارات", + "hide_vulgar": "\"ولگر\" کے طور پر ٹیگ کی گئی کمیونٹیز کو چھپائیں" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index b1cce9c6..c3732b67 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -342,5 +342,7 @@ "see_nsfw": "Nhấp để xem NSFW", "see_nsfw_spoiler": "Nhấp để xem NSFW spoiler", "always_show_nsfw": "Luôn hiển thị media NSFW?", - "always_show_nsfw_notice": "Được rồi, chúng tôi đã thay đổi sở thích của bạn để luôn hiển thị media NSFW." + "always_show_nsfw_notice": "Được rồi, chúng tôi đã thay đổi sở thích của bạn để luôn hiển thị media NSFW.", + "content_options": "Tùy chọn nội dung", + "hide_vulgar": "Ẩn cộng đồng được gắn thẻ là \"vulgar\"" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 59e7b89b..490b1e22 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -342,5 +342,7 @@ "see_nsfw": "点击查看 NSFW", "see_nsfw_spoiler": "点击查看 NSFW 剧透", "always_show_nsfw": "始终显示NSFW媒体?", - "always_show_nsfw_notice": "好的,我们已将您的偏好更改为始终显示NSFW媒体。" + "always_show_nsfw_notice": "好的,我们已将您的偏好更改为始终显示NSFW媒体。", + "content_options": "内容选项", + "hide_vulgar": "隐藏标记为“vulgar”的社区" } \ No newline at end of file diff --git a/src/components/post/post.tsx b/src/components/post/post.tsx index a0305ae0..c751d53e 100644 --- a/src/components/post/post.tsx +++ b/src/components/post/post.tsx @@ -96,6 +96,7 @@ const Post = ({ index, post = {} }: PostProps) => { link, linkHeight, linkWidth, + nsfw, pinned, reason, removed, @@ -107,7 +108,6 @@ const Post = ({ index, post = {} }: PostProps) => { title, upvoteCount, } = post || {}; - const nsfw = true; const { displayName, shortAddress } = author || {}; const { shortAuthorAddress, authorAddressChanged } = useAuthorAddress({ comment: post }); diff --git a/src/hooks/use-default-subplebbits.ts b/src/hooks/use-default-subplebbits.ts index 3b588b26..441409be 100644 --- a/src/hooks/use-default-subplebbits.ts +++ b/src/hooks/use-default-subplebbits.ts @@ -31,7 +31,7 @@ export const categorizeSubplebbits = (subplebbits: Subplebbit[]) => { export const useDefaultSubplebbits = () => { const [subplebbits, setSubplebbits] = useState([]); - const { hideAdultCommunities, hideGoreCommunities, hideAntiCommunities } = useFilterSettingsStore(); + const { hideAdultCommunities, hideGoreCommunities, hideAntiCommunities, hideVulgarCommunities } = useFilterSettingsStore(); useEffect(() => { if (cache) { @@ -47,7 +47,7 @@ export const useDefaultSubplebbits = () => { if (hideAdultCommunities && tags.includes('adult')) return false; if (hideGoreCommunities && tags.includes('gore')) return false; if (hideAntiCommunities && tags.includes('anti')) return false; - + if (hideVulgarCommunities && tags.includes('vulgar')) return false; return true; }); @@ -57,7 +57,7 @@ export const useDefaultSubplebbits = () => { console.warn(e); } })(); - }, [hideAdultCommunities, hideGoreCommunities, hideAntiCommunities]); + }, [hideAdultCommunities, hideGoreCommunities, hideAntiCommunities, hideVulgarCommunities]); return cache || subplebbits; }; diff --git a/src/stores/use-filter-settings-store.ts b/src/stores/use-filter-settings-store.ts index db7aa63f..ca1d8e1a 100644 --- a/src/stores/use-filter-settings-store.ts +++ b/src/stores/use-filter-settings-store.ts @@ -6,10 +6,12 @@ interface FilterSettingsState { hideAdultCommunities: boolean; hideGoreCommunities: boolean; hideAntiCommunities: boolean; + hideVulgarCommunities: boolean; setBlurNsfwThumbnails: (blur: boolean) => void; setHideAdultCommunities: (hide: boolean) => void; setHideGoreCommunities: (hide: boolean) => void; setHideAntiCommunities: (hide: boolean) => void; + setHideVulgarCommunities: (hide: boolean) => void; } const useFilterSettingsStore = create()( @@ -19,10 +21,12 @@ const useFilterSettingsStore = create()( hideAdultCommunities: true, hideGoreCommunities: true, hideAntiCommunities: true, + hideVulgarCommunities: true, setBlurNsfwThumbnails: (blur) => set({ blurNsfwThumbnails: blur }), setHideAdultCommunities: (hide) => set({ hideAdultCommunities: hide }), setHideGoreCommunities: (hide) => set({ hideGoreCommunities: hide }), setHideAntiCommunities: (hide) => set({ hideAntiCommunities: hide }), + setHideVulgarCommunities: (hide) => set({ hideVulgarCommunities: hide }), }), { name: 'filter-settings', diff --git a/src/views/settings/settings.tsx b/src/views/settings/settings.tsx index fafada4a..9113f97f 100644 --- a/src/views/settings/settings.tsx +++ b/src/views/settings/settings.tsx @@ -112,17 +112,19 @@ const ThemeSettings = () => { ); }; -const FiltersSettings = () => { +const ContentOptions = () => { const { t } = useTranslation(); const { blurNsfwThumbnails, hideAdultCommunities, hideGoreCommunities, hideAntiCommunities, + hideVulgarCommunities, setBlurNsfwThumbnails, setHideAdultCommunities, setHideGoreCommunities, setHideAntiCommunities, + setHideVulgarCommunities, } = useFilterSettingsStore(); return ( @@ -132,15 +134,18 @@ const FiltersSettings = () => {

    -
    {t('nsfw_communities')}
    +
    {t('communities')}
    setHideAdultCommunities(e.target.checked)} /> - -
    - setHideGoreCommunities(e.target.checked)} /> - +
    setHideAntiCommunities(e.target.checked)} /> +
    + setHideGoreCommunities(e.target.checked)} /> + +
    + setHideVulgarCommunities(e.target.checked)} /> +
    ); }; @@ -227,9 +232,9 @@ const GeneralSettings = () => {
    - {t('filters')} + {t('content_options')} - +
    From a0d119c580c56dd5eb7d559d297d4b7f6643523f Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 13:11:42 +0100 Subject: [PATCH 17/25] always mark post as nsfw if it belongs to an adult or gore sub --- src/components/post/post.tsx | 7 ++++++- src/hooks/use-is-nsfw-subplebbit.ts | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/hooks/use-is-nsfw-subplebbit.ts diff --git a/src/components/post/post.tsx b/src/components/post/post.tsx index c751d53e..f7f678cb 100644 --- a/src/components/post/post.tsx +++ b/src/components/post/post.tsx @@ -21,6 +21,7 @@ import _ from 'lodash'; import useIsMobile from '../../hooks/use-is-mobile'; import { usePinnedPostsStore } from '../../stores/use-pinned-posts-store'; import useWindowWidth from '../../hooks/use-window-width'; +import { useIsNsfwSubplebbit } from '../../hooks/use-is-nsfw-subplebbit'; interface PostAuthorProps { authorAddress: string; @@ -96,7 +97,6 @@ const Post = ({ index, post = {} }: PostProps) => { link, linkHeight, linkWidth, - nsfw, pinned, reason, removed, @@ -108,6 +108,11 @@ const Post = ({ index, post = {} }: PostProps) => { title, upvoteCount, } = post || {}; + + // Check if the subplebbit is NSFW based on its tags + const isNsfwSubplebbit = useIsNsfwSubplebbit(subplebbitAddress); + const nsfw = post?.nsfw || isNsfwSubplebbit; + const { displayName, shortAddress } = author || {}; const { shortAuthorAddress, authorAddressChanged } = useAuthorAddress({ comment: post }); diff --git a/src/hooks/use-is-nsfw-subplebbit.ts b/src/hooks/use-is-nsfw-subplebbit.ts new file mode 100644 index 00000000..b11ddd04 --- /dev/null +++ b/src/hooks/use-is-nsfw-subplebbit.ts @@ -0,0 +1,16 @@ +import { useMemo } from 'react'; +import { useDefaultSubplebbits } from './use-default-subplebbits'; + +export const useIsNsfwSubplebbit = (subplebbitAddress: string) => { + const defaultSubplebbits = useDefaultSubplebbits(); + + return useMemo(() => { + if (!subplebbitAddress || !defaultSubplebbits) return false; + + // Find the subplebbit in the default list + const subplebbit = defaultSubplebbits.find((sub) => sub.address === subplebbitAddress); + + // Check if the subplebbit has adult or gore tags + return Boolean(subplebbit?.tags?.includes('adult') || subplebbit?.tags?.includes('gore')); + }, [subplebbitAddress, defaultSubplebbits]); +}; From 95d10a3719ac9d165ba376cb965edba658f338bf Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 13:21:41 +0100 Subject: [PATCH 18/25] don't blur nsfw content inside of nsfw sub nsfw meaning a sub tagged as "adult" or "gore" --- src/components/post/expando/expando.tsx | 14 +++++++++----- src/components/post/thumbnail/thumbnail.tsx | 13 ++++++++----- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/components/post/expando/expando.tsx b/src/components/post/expando/expando.tsx index a6daff89..e700c36f 100644 --- a/src/components/post/expando/expando.tsx +++ b/src/components/post/expando/expando.tsx @@ -1,11 +1,12 @@ import { useEffect, useState } from 'react'; -import { Link } from 'react-router-dom'; +import { Link, useParams } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; +import { CommentMediaInfo } from '../../../lib/utils/media-utils'; +import useFilterSettingsStore from '../../../stores/use-filter-settings-store'; +import { useIsNsfwSubplebbit } from '../../../hooks/use-is-nsfw-subplebbit'; import styles from './expando.module.css'; import Embed from '../embed'; -import { CommentMediaInfo } from '../../../lib/utils/media-utils'; import Markdown from '../../markdown'; -import { useTranslation } from 'react-i18next'; -import useFilterSettingsStore from '../../../stores/use-filter-settings-store'; interface ExpandoProps { authorEditReason?: string; @@ -67,11 +68,14 @@ const Expando = ({ mediaComponent = ; } + const pageSubplebbitAddress = useParams().subplebbitAddress; + const isNsfwSubplebbit = useIsNsfwSubplebbit(pageSubplebbitAddress || ''); + return (
    {link && !removed && commentMediaInfo?.type !== 'webpage' && (
    setHideContent(false)}> - {((nsfw && blurNsfwThumbnails) || spoiler) && hideContent && link && commentMediaInfo?.type !== 'webpage' && !(deleted || removed) && ( + {((nsfw && blurNsfwThumbnails && !isNsfwSubplebbit) || spoiler) && hideContent && link && commentMediaInfo?.type !== 'webpage' && !(deleted || removed) && ( <>
    {nsfw && spoiler ? t('see_nsfw_spoiler') : spoiler ? t('view_spoiler') : nsfw ? t('see_nsfw') : ''} diff --git a/src/components/post/thumbnail/thumbnail.tsx b/src/components/post/thumbnail/thumbnail.tsx index ac3af336..028279a8 100644 --- a/src/components/post/thumbnail/thumbnail.tsx +++ b/src/components/post/thumbnail/thumbnail.tsx @@ -1,8 +1,9 @@ import styles from './thumbnail.module.css'; -import { Link } from 'react-router-dom'; +import { Link, useParams } from 'react-router-dom'; import { CommentMediaInfo } from '../../../lib/utils/media-utils'; import useFetchGifFirstFrame from '../../../hooks/use-fetch-gif-first-frame'; import useFilterSettingsStore from '../../../stores/use-filter-settings-store'; +import { useIsNsfwSubplebbit } from '../../../hooks/use-is-nsfw-subplebbit'; interface ThumbnailProps { cid?: string; @@ -39,6 +40,10 @@ const Thumbnail = ({ let displayWidth, displayHeight, hasLinkDimensions; const thumbnailClass = expanded ? styles.thumbnailHidden : styles.thumbnailVisible; + const { blurNsfwThumbnails } = useFilterSettingsStore(); + const pageSubplebbitAddress = useParams().subplebbitAddress; + const isNsfwSubplebbit = useIsNsfwSubplebbit(pageSubplebbitAddress || ''); + if (linkWidth && linkHeight) { let scale = Math.min(1, 70 / Math.max(linkWidth, linkHeight)); displayWidth = `${linkWidth * scale}px`; @@ -50,7 +55,7 @@ const Thumbnail = ({ hasLinkDimensions = false; } - if (isText || isLink || isSpoiler || isNsfw) { + if (isText || isLink || isSpoiler || (isNsfw && !isNsfwSubplebbit)) { displayWidth = '50px'; displayHeight = '50px'; hasLinkDimensions = true; @@ -85,9 +90,7 @@ const Thumbnail = ({ mediaComponent = ; } - const { blurNsfwThumbnails } = useFilterSettingsStore(); - - if (isNsfw && blurNsfwThumbnails) { + if (isNsfw && blurNsfwThumbnails && !isNsfwSubplebbit) { mediaComponent = ; } From 76a6fc69b5bc650222de7a68130c766de2eb8f37 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 14:35:29 +0100 Subject: [PATCH 19/25] feat(subplebbit): show "are you over 18?" alert on communities tagged as nsfw clicking "continue" disables it, checking the filters again in the settings re-enables it --- public/assets/over18.png | Bin 0 -> 7612 bytes public/index.html | 1 + src/components/header/header.tsx | 45 +++++-- src/components/post/expando/expando.tsx | 4 +- src/components/post/thumbnail/thumbnail.tsx | 4 +- src/hooks/use-default-subplebbits.ts | 36 ++--- src/hooks/use-is-broadly-nsfw-subplebbit.ts | 18 +++ ...-store.ts => use-content-options-store.ts} | 8 +- src/themes.css | 4 + src/views/home/home.module.css | 127 +++++++++++++++++- src/views/settings/settings.tsx | 4 +- src/views/subplebbit/subplebbit.tsx | 37 ++++- 12 files changed, 248 insertions(+), 40 deletions(-) create mode 100644 public/assets/over18.png create mode 100644 src/hooks/use-is-broadly-nsfw-subplebbit.ts rename src/stores/{use-filter-settings-store.ts => use-content-options-store.ts} (87%) diff --git a/public/assets/over18.png b/public/assets/over18.png new file mode 100644 index 0000000000000000000000000000000000000000..fd3f799cb8af801ea6e454b651d5ee57bacc667c GIT binary patch literal 7612 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 Vys;*IavTdVHMBCQ)4Lw`{{REW@k9Us literal 0 HcmV?d00001 diff --git a/public/index.html b/public/index.html index cef0185c..a9a6bb18 100644 --- a/public/index.html +++ b/public/index.html @@ -73,6 +73,7 @@ + diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx index 1129bb5b..9ca151df 100644 --- a/src/components/header/header.tsx +++ b/src/components/header/header.tsx @@ -43,6 +43,8 @@ import useTheme from '../../hooks/use-theme'; import useWindowWidth from '../../hooks/use-window-width'; import styles from './header.module.css'; import SubscribeButton from '../subscribe-button'; +import useContentOptionsStore from '../../stores/use-content-options-store'; +import { useIsBroadlyNsfwSubplebbit } from '../../hooks/use-is-broadly-nsfw-subplebbit'; const AboutButton = () => { const { t } = useTranslation(); @@ -295,12 +297,24 @@ const HeaderTitle = ({ title, shortAddress }: { title: string; shortAddress: str const isInCreateSubplebbitView = isCreateSubplebbitView(location.pathname); const isInNotFoundView = useNotFoundStore((state) => state.isNotFound); - const subplebbitTitle = {title || shortAddress}; + const subplebbitAddress = params.subplebbitAddress; + + const contentOptionsStore = useContentOptionsStore(); + const hasUnhiddenAnyNsfwCommunity = + !contentOptionsStore.hideAdultCommunities || + !contentOptionsStore.hideGoreCommunities || + !contentOptionsStore.hideAntiCommunities || + !contentOptionsStore.hideVulgarCommunities; + const isBroadlyNsfwSubplebbit = useIsBroadlyNsfwSubplebbit(subplebbitAddress || ''); + + const subplebbitTitle = {title || shortAddress}; const submitTitle = {t('submit')}; const profileTitle = {account?.author?.shortAddress}; const authorTitle = {params.authorAddress && Plebbit.getShortAddress(params.authorAddress)}; - if (isInSubplebbitSubmitView) { + if (isBroadlyNsfwSubplebbit && !hasUnhiddenAnyNsfwCommunity) { + return over 18?; + } else if (isInSubplebbitSubmitView) { return ( <> {subplebbitTitle}: {submitTitle} @@ -373,9 +387,20 @@ const Header = () => { (isInAllView && !isInAllAboutView) || (isInModView && !isInHomeAboutView) || (isInAuthorView && !isInHomeAboutView); - const logoSrc = isInSubplebbitView && suggested?.avatarUrl ? suggested?.avatarUrl : 'assets/logo/seedit.png'; - const logoIsAvatar = isInSubplebbitView && suggested?.avatarUrl; - const logoLink = isInSubplebbitView ? `/p/${params.subplebbitAddress}` : isInProfileView ? '/profile' : '/'; + + const subplebbitAddress = params.subplebbitAddress; + + const contentOptionsStore = useContentOptionsStore(); + const hasUnhiddenAnyNsfwCommunity = + !contentOptionsStore.hideAdultCommunities || + !contentOptionsStore.hideGoreCommunities || + !contentOptionsStore.hideAntiCommunities || + !contentOptionsStore.hideVulgarCommunities; + const isBroadlyNsfwSubplebbit = useIsBroadlyNsfwSubplebbit(subplebbitAddress || ''); + + const logoIsAvatar = isInSubplebbitView && suggested?.avatarUrl && !(isBroadlyNsfwSubplebbit && !hasUnhiddenAnyNsfwCommunity); + const logoSrc = logoIsAvatar ? suggested?.avatarUrl : 'assets/logo/seedit.png'; + const logoLink = isInSubplebbitView ? `/p/${subplebbitAddress}` : isInProfileView ? '/profile' : '/'; return (
    @@ -386,10 +411,10 @@ const Header = () => { >
    - {(logoIsAvatar || (!isInSubplebbitView && !isInProfileView && !isInAuthorView) || (isInSubplebbitView && !suggested?.avatarUrl)) && ( + {(logoIsAvatar || (!isInSubplebbitView && !isInProfileView && !isInAuthorView) || !logoIsAvatar) && ( )} - {((!isInSubplebbitView && !isInProfileView && !isInAuthorView) || (isInSubplebbitView && !suggested?.avatarUrl)) && ( + {((!isInSubplebbitView && !isInProfileView && !isInAuthorView) || !logoIsAvatar) && ( )} @@ -404,19 +429,19 @@ const Header = () => {
    )} - {isInSubplebbitView && !isInSubplebbitSubmitView && ( + {isInSubplebbitView && !isInSubplebbitSubmitView && !(isBroadlyNsfwSubplebbit && !hasUnhiddenAnyNsfwCommunity) && ( )} - {!isMobile && ( + {!isMobile && !(isBroadlyNsfwSubplebbit && !hasUnhiddenAnyNsfwCommunity) && (
      {(isInHomeView || isInHomeAboutView) && }
    )}
    - {isMobile && !isInSubplebbitSubmitView && ( + {isMobile && !isInSubplebbitSubmitView && !(isBroadlyNsfwSubplebbit && !hasUnhiddenAnyNsfwCommunity) && (
      {(isInHomeView || isInHomeAboutView || isInSubplebbitView || isInHomeAboutView || isInPostPageView) && } diff --git a/src/components/post/expando/expando.tsx b/src/components/post/expando/expando.tsx index e700c36f..6a77176d 100644 --- a/src/components/post/expando/expando.tsx +++ b/src/components/post/expando/expando.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'; import { Link, useParams } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { CommentMediaInfo } from '../../../lib/utils/media-utils'; -import useFilterSettingsStore from '../../../stores/use-filter-settings-store'; +import useContentOptionsStore from '../../../stores/use-content-options-store'; import { useIsNsfwSubplebbit } from '../../../hooks/use-is-nsfw-subplebbit'; import styles from './expando.module.css'; import Embed from '../embed'; @@ -38,7 +38,7 @@ const Expando = ({ toggleExpanded, }: ExpandoProps) => { const { t } = useTranslation(); - const { blurNsfwThumbnails, setBlurNsfwThumbnails } = useFilterSettingsStore(); + const { blurNsfwThumbnails, setBlurNsfwThumbnails } = useContentOptionsStore(); const [hideContent, setHideContent] = useState(blurNsfwThumbnails); const [alwaysShowNsfw, setAlwaysShowNsfw] = useState(false); diff --git a/src/components/post/thumbnail/thumbnail.tsx b/src/components/post/thumbnail/thumbnail.tsx index 028279a8..49bf7158 100644 --- a/src/components/post/thumbnail/thumbnail.tsx +++ b/src/components/post/thumbnail/thumbnail.tsx @@ -2,7 +2,7 @@ import styles from './thumbnail.module.css'; import { Link, useParams } from 'react-router-dom'; import { CommentMediaInfo } from '../../../lib/utils/media-utils'; import useFetchGifFirstFrame from '../../../hooks/use-fetch-gif-first-frame'; -import useFilterSettingsStore from '../../../stores/use-filter-settings-store'; +import useContentOptionsStore from '../../../stores/use-content-options-store'; import { useIsNsfwSubplebbit } from '../../../hooks/use-is-nsfw-subplebbit'; interface ThumbnailProps { @@ -40,7 +40,7 @@ const Thumbnail = ({ let displayWidth, displayHeight, hasLinkDimensions; const thumbnailClass = expanded ? styles.thumbnailHidden : styles.thumbnailVisible; - const { blurNsfwThumbnails } = useFilterSettingsStore(); + const { blurNsfwThumbnails } = useContentOptionsStore(); const pageSubplebbitAddress = useParams().subplebbitAddress; const isNsfwSubplebbit = useIsNsfwSubplebbit(pageSubplebbitAddress || ''); diff --git a/src/hooks/use-default-subplebbits.ts b/src/hooks/use-default-subplebbits.ts index 441409be..4f2a5b86 100644 --- a/src/hooks/use-default-subplebbits.ts +++ b/src/hooks/use-default-subplebbits.ts @@ -2,7 +2,7 @@ import { useEffect, useMemo, useState } from 'react'; import { useParams } from 'react-router-dom'; import { useAccount } from '@plebbit/plebbit-react-hooks'; import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js'; -import useFilterSettingsStore from '../stores/use-filter-settings-store'; +import useContentOptionsStore from '../stores/use-content-options-store'; interface Subplebbit { title?: string; @@ -31,7 +31,6 @@ export const categorizeSubplebbits = (subplebbits: Subplebbit[]) => { export const useDefaultSubplebbits = () => { const [subplebbits, setSubplebbits] = useState([]); - const { hideAdultCommunities, hideGoreCommunities, hideAntiCommunities, hideVulgarCommunities } = useFilterSettingsStore(); useEffect(() => { if (cache) { @@ -40,31 +39,34 @@ export const useDefaultSubplebbits = () => { (async () => { try { const multisub = await fetch('https://raw.githubusercontent.com/plebbit/temporary-default-subplebbits/master/multisub.json').then((res) => res.json()); - - const filteredSubplebbits = multisub.subplebbits.filter((subplebbit: Subplebbit) => { - const tags = subplebbit.tags || []; - - if (hideAdultCommunities && tags.includes('adult')) return false; - if (hideGoreCommunities && tags.includes('gore')) return false; - if (hideAntiCommunities && tags.includes('anti')) return false; - if (hideVulgarCommunities && tags.includes('vulgar')) return false; - return true; - }); - - cache = filteredSubplebbits; - setSubplebbits(filteredSubplebbits); + cache = multisub.subplebbits; + setSubplebbits(multisub.subplebbits); } catch (e) { console.warn(e); } })(); - }, [hideAdultCommunities, hideGoreCommunities, hideAntiCommunities, hideVulgarCommunities]); + }, []); return cache || subplebbits; }; export const useDefaultSubplebbitAddresses = () => { const defaultSubplebbits = useDefaultSubplebbits(); - const categorizedSubplebbits = useMemo(() => categorizeSubplebbits(defaultSubplebbits), [defaultSubplebbits]); + const { hideAdultCommunities, hideGoreCommunities, hideAntiCommunities, hideVulgarCommunities } = useContentOptionsStore(); + + const filteredSubplebbits = useMemo(() => { + return defaultSubplebbits.filter((subplebbit: Subplebbit) => { + const tags = subplebbit.tags || []; + if (hideAdultCommunities && tags.includes('adult')) return false; + if (hideGoreCommunities && tags.includes('gore')) return false; + if (hideAntiCommunities && tags.includes('anti')) return false; + if (hideVulgarCommunities && tags.includes('vulgar')) return false; + return true; + }); + }, [defaultSubplebbits, hideAdultCommunities, hideGoreCommunities, hideAntiCommunities, hideVulgarCommunities]); + + const categorizedSubplebbits = useMemo(() => categorizeSubplebbits(filteredSubplebbits), [filteredSubplebbits]); + return useMemo( () => [ diff --git a/src/hooks/use-is-broadly-nsfw-subplebbit.ts b/src/hooks/use-is-broadly-nsfw-subplebbit.ts new file mode 100644 index 00000000..cbc8c297 --- /dev/null +++ b/src/hooks/use-is-broadly-nsfw-subplebbit.ts @@ -0,0 +1,18 @@ +import { useMemo } from 'react'; +import { useDefaultSubplebbits } from './use-default-subplebbits'; + +const SENSITIVE_TAGS = ['adult', 'gore', 'anti', 'vulgar']; + +export const useIsBroadlyNsfwSubplebbit = (subplebbitAddress: string) => { + const defaultSubplebbits = useDefaultSubplebbits(); + + return useMemo(() => { + if (!subplebbitAddress || !defaultSubplebbits) return false; + + // Find the subplebbit in the default list + const subplebbit = defaultSubplebbits.find((sub) => sub.address === subplebbitAddress); + + // Check if the subplebbit has any of the sensitive tags + return Boolean(subplebbit?.tags?.some((tag) => SENSITIVE_TAGS.includes(tag))); + }, [subplebbitAddress, defaultSubplebbits]); +}; diff --git a/src/stores/use-filter-settings-store.ts b/src/stores/use-content-options-store.ts similarity index 87% rename from src/stores/use-filter-settings-store.ts rename to src/stores/use-content-options-store.ts index ca1d8e1a..b7787614 100644 --- a/src/stores/use-filter-settings-store.ts +++ b/src/stores/use-content-options-store.ts @@ -1,7 +1,7 @@ import { create } from 'zustand'; import { persist } from 'zustand/middleware'; -interface FilterSettingsState { +interface ContentOptionsState { blurNsfwThumbnails: boolean; hideAdultCommunities: boolean; hideGoreCommunities: boolean; @@ -14,7 +14,7 @@ interface FilterSettingsState { setHideVulgarCommunities: (hide: boolean) => void; } -const useFilterSettingsStore = create()( +const useContentOptionsStore = create()( persist( (set) => ({ blurNsfwThumbnails: true, @@ -29,9 +29,9 @@ const useFilterSettingsStore = create()( setHideVulgarCommunities: (hide) => set({ hideVulgarCommunities: hide }), }), { - name: 'filter-settings', + name: 'content-options', }, ), ); -export default useFilterSettingsStore; +export default useContentOptionsStore; diff --git a/src/themes.css b/src/themes.css index ed7fadbe..1500e995 100644 --- a/src/themes.css +++ b/src/themes.css @@ -48,6 +48,8 @@ --markdown-blockquote-border: rgb(65, 70, 73); --markdown-link: rgb(74, 183, 255); --orange: #FF7500; + --over18image: url("/public/assets/over18.png"); + --over18-alert-color: #ffffff; --pagination-button-background: rgb(29, 31, 34); --pagination-button-border: 1px solid rgb(55, 59, 62); --pagination-button-border-hover: 1px solid #5a728a; @@ -125,6 +127,8 @@ --markdown-blockquote-border: #c5c1ad; --markdown-link: #0079d3; --orange: #FF7500; + --over18image: url("/public/assets/over18.png"); + --over18-alert-color: #ffffff; --pagination-button-background: #eee; --pagination-button-border: 1px solid #ddd; --pagination-button-border-hover: 1px solid #82A6C9; diff --git a/src/views/home/home.module.css b/src/views/home/home.module.css index 9de76656..5da22565 100644 --- a/src/views/home/home.module.css +++ b/src/views/home/home.module.css @@ -57,4 +57,129 @@ .stateString { max-width: calc(100% - 305px); } -} \ No newline at end of file +} + +.over18 { + font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif; + margin: auto; + text-align: center; + width: 100%; + max-width: 650px; + padding: 0 15px; + box-sizing: border-box; +} + +.over18 img { + margin-bottom: 20px; + margin-top: 60px; + height: 150px; + width: 150px; +} + +@media (max-width: 640px) { + .over18 img { + height: 100px; + width: 100px; + margin-top: 30px; + } + + .over18 h3 { + font-size: 18px; + } + + .over18 p { + font-size: 16px; + line-height: 22px; + } + + .over18 .warningButtons { + width: 100%; + flex-direction: column; + } + + .over18 .warningButtons button { + width: 100%; + margin: 5px 0; + } +} + +.over18 h3 { + font-size: 24px; + font-weight: bold; +} + +.over18 .warning { + unicode-bidi: isolate; + font-size: 14px; + color: var(--text-markdown); + max-width: 60em; + word-wrap: break-word; +} + +.over18 h3 { + font-size: 20px; + line-height: 1.25em; + margin-top: 1em; + margin-bottom: 1em; +} + +.over18 p { + font-weight: 300; + font-size: 18px; + line-height: 25px; + margin-top: 1em; + margin-bottom: 1em; +} + +.over18 .warningButtons { + display: flex; + justify-content: center; + margin-left: auto; + margin-right: auto; + margin-top: 30px; + width: 100%; + max-width: 400px; + padding: 0 15px; + box-sizing: border-box; +} + +.over18 .warningButtons button { + color: var(--over18-alert-color); + display: inline-block; + text-align: center; + text-transform: uppercase; + font-weight: 500; + cursor: pointer; + background-image: none; + border: 1px solid transparent; + white-space: nowrap; + padding: 8px 12px; + font-size: 12px; + line-height: 20px; + border-radius: 3px; + flex: 1; + margin: 3px 5px; + background-color: #4f86b5; + border-bottom: 2px solid #4270a2; + user-select: none; +} + +@media (max-width: 640px) { + .over18 .warningButtons { + padding: 0; + } + + .over18 .warningButtons button { + margin: 5px 0; + width: 100%; + } +} + +.over18 .warningButtons button:hover { + background-color: #4980ae; +} + +.over18 .warningButtons button a { + color: var(--over18-alert-color); + text-decoration: none; +} diff --git a/src/views/settings/settings.tsx b/src/views/settings/settings.tsx index 9113f97f..24194ab2 100644 --- a/src/views/settings/settings.tsx +++ b/src/views/settings/settings.tsx @@ -3,7 +3,7 @@ import { useLocation } from 'react-router-dom'; import { Trans, useTranslation } from 'react-i18next'; import { setAccount, useAccount } from '@plebbit/plebbit-react-hooks'; import { isSettingsPlebbitOptionsView } from '../../lib/utils/view-utils'; -import useFilterSettingsStore from '../../stores/use-filter-settings-store'; +import useContentOptionsStore from '../../stores/use-content-options-store'; import useTheme from '../../hooks/use-theme'; import AccountSettings from './account-settings'; import AddressSettings from './address-settings'; @@ -125,7 +125,7 @@ const ContentOptions = () => { setHideGoreCommunities, setHideAntiCommunities, setHideVulgarCommunities, - } = useFilterSettingsStore(); + } = useContentOptionsStore(); return (
      diff --git a/src/views/subplebbit/subplebbit.tsx b/src/views/subplebbit/subplebbit.tsx index 4349f313..c4a186cc 100644 --- a/src/views/subplebbit/subplebbit.tsx +++ b/src/views/subplebbit/subplebbit.tsx @@ -1,4 +1,4 @@ -import { useEffect, useMemo, useRef } from 'react'; +import { useEffect, useMemo, useRef, useState } from 'react'; import { Link, useParams } from 'react-router-dom'; import { useAccountComments, useBlock, useFeed, useSubplebbit } from '@plebbit/plebbit-react-hooks'; import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso'; @@ -10,6 +10,8 @@ import Sidebar from '../../components/sidebar'; import useFeedStateString from '../../hooks/use-feed-state-string'; import useTimeFilter from '../../hooks/use-time-filter'; import { usePinnedPostsStore } from '../../stores/use-pinned-posts-store'; +import { useIsBroadlyNsfwSubplebbit } from '../../hooks/use-is-broadly-nsfw-subplebbit'; +import useContentOptionsStore from '../../stores/use-content-options-store'; const lastVirtuosoStates: { [key: string]: StateSnapshot } = {}; @@ -19,6 +21,23 @@ const Subplebbit = () => { const subplebbitAddress = params.subplebbitAddress; const subplebbitAddresses = useMemo(() => [subplebbitAddress], [subplebbitAddress]) as string[]; + const contentOptionsStore = useContentOptionsStore(); + const hasUnhiddenAnyNsfwCommunity = + !contentOptionsStore.hideAdultCommunities || + !contentOptionsStore.hideGoreCommunities || + !contentOptionsStore.hideAntiCommunities || + !contentOptionsStore.hideVulgarCommunities; + const [hasAcceptedWarning, setHasAcceptedWarning] = useState(hasUnhiddenAnyNsfwCommunity); + const isBroadlyNsfwSubplebbit = useIsBroadlyNsfwSubplebbit(subplebbitAddress || ''); + + const handleAcceptWarning = () => { + contentOptionsStore.setHideAdultCommunities(false); + contentOptionsStore.setHideGoreCommunities(false); + contentOptionsStore.setHideAntiCommunities(false); + contentOptionsStore.setHideVulgarCommunities(false); + setHasAcceptedWarning(true); + }; + const sortType = params?.sortType || 'hot'; const timeFilterName = params.timeFilterName || 'all'; const { timeFilterSeconds } = useTimeFilter(); @@ -162,7 +181,21 @@ const Subplebbit = () => { } }, [feed, setPinnedPostsCount]); - return ( + return isBroadlyNsfwSubplebbit && !hasAcceptedWarning ? ( +
      + over 18 +
      +

      You must be 18+ to view this community

      +

      You must be at least eighteen years old to view this content. Are you over eighteen and willing to see adult content?

      +
      +
      + + +
      +
      + ) : (
      From 81c29bfbe82b78f614d52d027b3543bf850eccca Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 14:42:18 +0100 Subject: [PATCH 20/25] add translations --- public/translations/ar/default.json | 7 ++++++- public/translations/bn/default.json | 7 ++++++- public/translations/cs/default.json | 7 ++++++- public/translations/da/default.json | 7 ++++++- public/translations/de/default.json | 7 ++++++- public/translations/el/default.json | 7 ++++++- public/translations/en/default.json | 7 ++++++- public/translations/es/default.json | 7 ++++++- public/translations/fa/default.json | 7 ++++++- public/translations/fi/default.json | 7 ++++++- public/translations/fil/default.json | 7 ++++++- public/translations/fr/default.json | 7 ++++++- public/translations/he/default.json | 7 ++++++- public/translations/hi/default.json | 7 ++++++- public/translations/hu/default.json | 7 ++++++- public/translations/id/default.json | 7 ++++++- public/translations/it/default.json | 7 ++++++- public/translations/ja/default.json | 7 ++++++- public/translations/ko/default.json | 7 ++++++- public/translations/mr/default.json | 7 ++++++- public/translations/nl/default.json | 7 ++++++- public/translations/no/default.json | 7 ++++++- public/translations/pl/default.json | 7 ++++++- public/translations/pt/default.json | 7 ++++++- public/translations/ro/default.json | 7 ++++++- public/translations/ru/default.json | 7 ++++++- public/translations/sq/default.json | 7 ++++++- public/translations/sv/default.json | 7 ++++++- public/translations/te/default.json | 7 ++++++- public/translations/th/default.json | 7 ++++++- public/translations/tr/default.json | 7 ++++++- public/translations/uk/default.json | 7 ++++++- public/translations/ur/default.json | 7 ++++++- public/translations/vi/default.json | 7 ++++++- public/translations/zh/default.json | 7 ++++++- src/components/header/header.tsx | 2 +- src/views/subplebbit/subplebbit.tsx | 8 ++++---- 37 files changed, 215 insertions(+), 40 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 3901fe9f..258dbbcc 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "هل تريد دائمًا عرض وسائل الإعلام NSFW؟", "always_show_nsfw_notice": "حسنًا، لقد غيرنا تفضيلاتك لعرض وسائل الإعلام NSFW دائمًا.", "content_options": "خيارات المحتوى", - "hide_vulgar": "إخفاء المجتمعات المعلَمة كـ \"فاحش\"" + "hide_vulgar": "إخفاء المجتمعات المعلَمة كـ \"فاحش\"", + "over_18": "أكثر من 18؟", + "must_be_over_18": "يجب أن تكون فوق 18 عامًا لعرض هذه المجتمع", + "must_be_over_18_explanation": "يجب أن تكون في سن 18 عامًا على الأقل لعرض هذا المحتوى. هل أنت فوق 18 عامًا ومستعد لرؤية المحتوى البالغ؟", + "no_thank_you": "لا، شكرًا", + "continue": "استمر" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 8c31fa36..b5643709 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "আপনি কি সর্বদা NSFW মিডিয়া দেখাতে চান?", "always_show_nsfw_notice": "ওকে, আমরা আপনার পছন্দগুলি সর্বদা NSFW মিডিয়া দেখাতে পরিবর্তন করেছি।", "content_options": "সামগ্রী বিকল্প", - "hide_vulgar": "ভুলগার হিসেবে ট্যাগ করা কমিউনিটিগুলি লুকান" + "hide_vulgar": "ভুলগার হিসেবে ট্যাগ করা কমিউনিটিগুলি লুকান", + "over_18": "১৮ এর উপরে?", + "must_be_over_18": "এই কমিউনিটি দেখতে আপনাকে ১৮+ হতে হবে", + "must_be_over_18_explanation": "এই কন্টেন্ট দেখতে আপনাকে অন্তত ১৮ বছর বয়সী হতে হবে। আপনি কি ১৮ বছরের উপরে এবং প্রাপ্তবয়স্ক কন্টেন্ট দেখতে ইচ্ছুক?", + "no_thank_you": "না, ধন্যবাদ", + "continue": "অবস্থান করুন" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 84ddcbe8..0c96b45a 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Chcete vždy zobrazit NSFW média?", "always_show_nsfw_notice": "Dobře, změnili jsme vaše preference na vždy zobrazovat NSFW média.", "content_options": "Možnosti obsahu", - "hide_vulgar": "Skrýt komunity označené jako \"vulgar\"" + "hide_vulgar": "Skrýt komunity označené jako \"vulgar\"", + "over_18": "Více než 18?", + "must_be_over_18": "Musíte být starší 18 let, abyste si mohli prohlédnout tuto komunitu", + "must_be_over_18_explanation": "Musíte být alespoň 18 let starý/á, abyste si mohli prohlédnout tento obsah. Jste starší 18 let a ochotni vidět obsah pro dospělé?", + "no_thank_you": "Ne, děkuji", + "continue": "Pokračovat" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index d573f265..d5ac1021 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Vil du altid vise NSFW medier?", "always_show_nsfw_notice": "Okay, vi har ændret dine præferencer til altid at vise NSFW medier.", "content_options": "Indholdsindstillinger", - "hide_vulgar": "Skjul samfund markeret som \"vulgar\"" + "hide_vulgar": "Skjul samfund markeret som \"vulgar\"", + "over_18": "Over 18?", + "must_be_over_18": "Du skal være over 18 år for at se dette fællesskab", + "must_be_over_18_explanation": "Du skal være mindst 18 år gammel for at se dette indhold. Er du over 18 og villig til at se voksenindhold?", + "no_thank_you": "Nej, tak tak", + "continue": "Fortsæt" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index f17076f8..8ccb762b 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Möchten Sie immer NSFW-Medien anzeigen?", "always_show_nsfw_notice": "Okay, wir haben deine Präferenzen geändert, um immer NSFW-Medien anzuzeigen.", "content_options": "Inhaltsoptionen", - "hide_vulgar": "Verstecke Communities, die als \"Vulgar\" markiert sind" + "hide_vulgar": "Verstecke Communities, die als \"Vulgar\" markiert sind", + "over_18": "Über 18?", + "must_be_over_18": "Sie müssen über 18 Jahre alt sein, um diese Community zu sehen", + "must_be_over_18_explanation": "Sie müssen mindestens 18 Jahre alt sein, um diesen Inhalt zu sehen. Sind Sie über 18 Jahre alt und bereit, Erwachsenen-Inhalte zu sehen?", + "no_thank_you": "Nein, danke", + "continue": "Weiter" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 25c2b3ae..d4c799d1 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Θέλετε να εμφανίζετε πάντα τα μέσα NSFW;", "always_show_nsfw_notice": "Εντάξει, αλλάξαμε τις προτιμήσεις σας για να εμφανίζετε πάντα τα μέσα NSFW.", "content_options": "Επιλογές περιεχομένου", - "hide_vulgar": "Απόκρυψη κοινοτήτων που είναι επισημασμένες ως \"vulgar\"" + "hide_vulgar": "Απόκρυψη κοινοτήτων που είναι επισημασμένες ως \"vulgar\"", + "over_18": "Άνω των 18;", + "must_be_over_18": "Πρέπει να είστε άνω των 18 για να δείτε αυτήν την κοινότητα", + "must_be_over_18_explanation": "Πρέπει να είστε τουλάχιστον 18 ετών για να δείτε αυτό το περιεχόμενο. Είστε άνω των 18 και πρόθυμοι να δείτε περιεχόμενο για ενήλικες;", + "no_thank_you": "Όχι, ευχαριστώ", + "continue": "Συνέχεια" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index d179123a..f187ea58 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Always show NSFW media?", "always_show_nsfw_notice": "Ok, we changed your preferences to always show NSFW media.", "content_options": "Content options", - "hide_vulgar": "Hide communities tagged as \"vulgar\"" + "hide_vulgar": "Hide communities tagged as \"vulgar\"", + "over_18": "Over 18?", + "must_be_over_18": "You must be 18+ to view this community", + "must_be_over_18_explanation": "You must be at least eighteen years old to view this content. Are you over eighteen and willing to see adult content?", + "no_thank_you": "No thank you", + "continue": "Continue" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index 2b088ed5..cffc6224 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "¿Siempre mostrar medios NSFW?", "always_show_nsfw_notice": "Ok, cambiamos tus preferencias para mostrar siempre medios NSFW.", "content_options": "Opciones de contenido", - "hide_vulgar": "Ocultar comunidades etiquetadas como \"vulgar\"" + "hide_vulgar": "Ocultar comunidades etiquetadas como \"vulgar\"", + "over_18": "¿Más de 18?", + "must_be_over_18": "Debes tener más de 18 años para ver esta comunidad", + "must_be_over_18_explanation": "Debe tener al menos dieciocho años para ver este contenido. ¿Tienes más de dieciocho años y estás dispuesto a ver contenido para adultos?", + "no_thank_you": "No gracias", + "continue": "Continuar" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 1941c727..9fb56f74 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "آیا می‌خواهید همیشه رسانه‌های NSFW را نمایش دهید؟", "always_show_nsfw_notice": "باشه، ما تنظیمات شما را برای نمایش دائمی رسانه‌های NSFW تغییر دادیم.", "content_options": "گزینه‌های محتوا", - "hide_vulgar": "پنهان کردن جوامع برچسب‌خورده به عنوان \"زشت\"" + "hide_vulgar": "پنهان کردن جوامع برچسب‌خورده به عنوان \"زشت\"", + "over_18": "بالای 18؟", + "must_be_over_18": "برای مشاهده این جامعه باید بالای ۱۸ سال باشید", + "must_be_over_18_explanation": "برای مشاهده این محتوا باید حداقل هجده سال داشته باشید. آیا شما بالای هجده سال دارید و آماده مشاهده محتوای بزرگسالان هستید؟", + "no_thank_you": "نه، ممنون", + "continue": "ادامه بده" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 547a015b..da6cb011 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Haluatko aina näyttää NSFW-mediaa?", "always_show_nsfw_notice": "Ok, muutimme asetuksesi aina näyttääksesi NSFW-mediaa.", "content_options": "Sisältöasetukset", - "hide_vulgar": "Piilota yhteisöt, jotka on merkitty \"vulgar\"" + "hide_vulgar": "Piilota yhteisöt, jotka on merkitty \"vulgar\"", + "over_18": "Yli 18?", + "must_be_over_18": "Sinun täytyy olla yli 18-vuotias nähdäksesi tämän yhteisön", + "must_be_over_18_explanation": "Sinun täytyy olla vähintään kahdeksantoista vuotta vanha nähdäksesi tämän sisällön. Oletko yli 18-vuotias ja halukas katsomaan aikuisille tarkoitettua sisältöä?", + "no_thank_you": "Ei kiitos", + "continue": "Jatka" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index c2f6ccfa..c6a401f2 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Palaging ipakita ang mga media ng NSFW?", "always_show_nsfw_notice": "Okay, binago namin ang iyong mga preference upang palaging ipakita ang NSFW media.", "content_options": "Mga opsyon sa nilalaman", - "hide_vulgar": "Itago ang mga komunidad na minarkahan bilang \"vulgar\"" + "hide_vulgar": "Itago ang mga komunidad na minarkahan bilang \"vulgar\"", + "over_18": "Higit sa 18?", + "must_be_over_18": "Dapat kang 18+ upang makita ang komunidad na ito", + "must_be_over_18_explanation": "Dapat kang hindi bababa sa labing walong taon upang makita ang nilalamang ito. Ikaw ba ay higit sa labing walong taon at handang makita ang nilalamang pang-adulto?", + "no_thank_you": "Hindi, salamat", + "continue": "Magpatuloy" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 0dd55b5d..c6c8992f 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Voulez-vous toujours afficher les médias NSFW ?", "always_show_nsfw_notice": "D'accord, nous avons modifié vos préférences pour afficher toujours les médias NSFW.", "content_options": "Options de contenu", - "hide_vulgar": "Cacher les communautés étiquetées comme \"vulgaire\"" + "hide_vulgar": "Cacher les communautés étiquetées comme \"vulgaire\"", + "over_18": "Plus de 18?", + "must_be_over_18": "Vous devez avoir 18 ans ou plus pour voir cette communauté", + "must_be_over_18_explanation": "Vous devez avoir au moins dix-huit ans pour voir ce contenu. Avez-vous plus de dix-huit ans et êtes-vous prêt à voir du contenu pour adultes ?", + "no_thank_you": "Non merci", + "continue": "Continuer" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 788afb6c..f9bda0df 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "האם תמיד להציג מדיה NSFW?", "always_show_nsfw_notice": "אוקי, שינינו את ההעדפות שלך להציג תמיד מדיה NSFW.", "content_options": "אפשרויות תוכן", - "hide_vulgar": "הסתר קהילות שסומנו כ\"גס\"" + "hide_vulgar": "הסתר קהילות שסומנו כ\"גס\"", + "over_18": "מעל גיל 18?", + "must_be_over_18": "אתה חייב להיות מעל גיל 18 כדי לראות את הקהילה הזאת", + "must_be_over_18_explanation": "עליך להיות לפחות בן 18 על מנת לצפות בתוכן הזה. האם אתה מעל גיל 18 ומוכן לראות תוכן למבוגרים?", + "no_thank_you": "לא תודה", + "continue": "המשך" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index 85aaa972..bc20d05b 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "क्या आप हमेशा NSFW मीडिया दिखाना चाहते हैं?", "always_show_nsfw_notice": "ठीक है, हमने आपकी प्राथमिकताएँ हमेशा NSFW मीडिया दिखाने के लिए बदल दी हैं।", "content_options": "सामग्री विकल्प", - "hide_vulgar": "जो \"वुल्गर\" के रूप में टैग की गई समुदायों को छिपाएं" + "hide_vulgar": "जो \"वुल्गर\" के रूप में टैग की गई समुदायों को छिपाएं", + "over_18": "18 से ऊपर?", + "must_be_over_18": "आपको इस समुदाय को देखने के लिए 18+ होना चाहिए", + "must_be_over_18_explanation": "इस सामग्री को देखने के लिए आपको कम से कम अठारह साल का होना चाहिए। क्या आप अठारह साल से ऊपर हैं और वयस्क सामग्री देखने के इच्छुक हैं?", + "no_thank_you": "नहीं, धन्यवाद", + "continue": "जारी रखें" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index 78106932..5915425a 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Mindig meg szeretné jeleníteni az NSFW médiát?", "always_show_nsfw_notice": "Rendben, megváltoztattuk az preferenciáit, hogy mindig megjelenítse az NSFW médiát.", "content_options": "Tartalombeállítások", - "hide_vulgar": "Rejtse el a \"vulgar\" címkével ellátott közösségeket" + "hide_vulgar": "Rejtse el a \"vulgar\" címkével ellátott közösségeket", + "over_18": "18 felett?", + "must_be_over_18": "18 évesnek kell lenned ahhoz, hogy megnézd ezt a közösséget", + "must_be_over_18_explanation": "Legalább tizennyolc évesnek kell lenned ahhoz, hogy megtekinthesd ezt a tartalmat. Több mint tizennyolc éves vagy, és hajlandó vagy felnőtteknek szóló tartalmat nézni?", + "no_thank_you": "Nem, köszönöm", + "continue": "Folytatás" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index 8bcf4449..5b487dfe 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Apakah Anda ingin selalu menampilkan media NSFW?", "always_show_nsfw_notice": "Oke, kami mengubah preferensi Anda untuk selalu menampilkan media NSFW.", "content_options": "Opsi konten", - "hide_vulgar": "Sembunyikan komunitas yang diberi label \"vulgar\"" + "hide_vulgar": "Sembunyikan komunitas yang diberi label \"vulgar\"", + "over_18": "Di atas 18?", + "must_be_over_18": "Anda harus berusia 18+ untuk melihat komunitas ini", + "must_be_over_18_explanation": "Anda harus berusia minimal delapan belas tahun untuk melihat konten ini. Apakah Anda berusia lebih dari delapan belas tahun dan bersedia melihat konten dewasa?", + "no_thank_you": "Tidak, terima kasih", + "continue": "Lanjutkan" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 8f2ca2e2..ef5c6206 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Mostrare sempre i media NSFW?", "always_show_nsfw_notice": "Ok, abbiamo cambiato le tue preferenze per mostrare sempre i media NSFW.", "content_options": "Opzioni dei contenuti", - "hide_vulgar": "Nascondi le comunità contrassegnate come \"vulgar\"" + "hide_vulgar": "Nascondi le comunità contrassegnate come \"vulgar\"", + "over_18": "Sopra i 18?", + "must_be_over_18": "Devi avere più di 18 anni per visualizzare questa comunità", + "must_be_over_18_explanation": "Devi avere almeno diciotto anni per visualizzare questo contenuto. Hai più di diciotto anni e sei disposto a vedere contenuti per adulti?", + "no_thank_you": "No, grazie", + "continue": "Continua" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 0c974e2a..fbba67d4 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "常にNSFWメディアを表示しますか?", "always_show_nsfw_notice": "はい、NSFWメディアを常に表示するように設定を変更しました。", "content_options": "コンテンツオプション", - "hide_vulgar": "\"ヴァルガー\"としてタグ付けされたコミュニティを非表示にする" + "hide_vulgar": "\"ヴァルガー\"としてタグ付けされたコミュニティを非表示にする", + "over_18": "18歳以上?", + "must_be_over_18": "このコミュニティを見るには18歳以上でなければなりません", + "must_be_over_18_explanation": "このコンテンツを見るには少なくとも18歳でなければなりません。あなたは18歳以上で、成人向けコンテンツを見る準備ができていますか?", + "no_thank_you": "いいえ、ありがとう", + "continue": "続ける" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index 1dd8d194..9b7ae084 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "항상 NSFW 미디어를 표시하시겠습니까?", "always_show_nsfw_notice": "알겠습니다, 항상 NSFW 미디어를 표시하도록 기본 설정을 변경했습니다.", "content_options": "콘텐츠 옵션", - "hide_vulgar": "\"벌거벗은\"으로 태그된 커뮤니티 숨기기" + "hide_vulgar": "\"벌거벗은\"으로 태그된 커뮤니티 숨기기", + "over_18": "18세 이상?", + "must_be_over_18": "이 커뮤니티를 보려면 18세 이상이어야 합니다", + "must_be_over_18_explanation": "이 콘텐츠를 보려면 최소한 18세 이상이어야 합니다. 당신은 18세 이상이며 성인 콘텐츠를 볼 준비가 되셨나요?", + "no_thank_you": "아니요, 감사합니다", + "continue": "계속" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 61b48c2d..48e8446e 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "तुम्ही नेहमी NSFW मीडिया दाखवू इच्छिता का?", "always_show_nsfw_notice": "ठीक आहे, आम्ही तुमची प्राधान्ये नेहमी NSFW मीडिया दर्शवण्यासाठी बदलली आहेत.", "content_options": "सामग्री पर्याय", - "hide_vulgar": "\"वुल्गर\" म्हणून टॅग केलेल्या समुदायांना लपवा" + "hide_vulgar": "\"वुल्गर\" म्हणून टॅग केलेल्या समुदायांना लपवा", + "over_18": "१८ वर्षांपेक्षा जास्त?", + "must_be_over_18": "या समुदायाला पाहण्यासाठी तुम्ही १८+ असणे आवश्यक आहे", + "must_be_over_18_explanation": "या सामग्रीला पाहण्यासाठी तुम्हाला किमान अठरा वर्षे वयाचे असावे लागेल. तुम्ही अठरा वर्षे वयाच्या वरील आहात का आणि प्रौढ सामग्री पाहण्यास तयार आहात?", + "no_thank_you": "नाही, धन्यवाद", + "continue": "सुरू ठेवा" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index cdab8ccb..75b87adf 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Altijd NSFW-media weergeven?", "always_show_nsfw_notice": "Oké, we hebben je voorkeuren veranderd om altijd NSFW-media weer te geven.", "content_options": "Inhoudsopties", - "hide_vulgar": "Verberg gemeenschappen die zijn gemarkeerd als \"vulgar\"" + "hide_vulgar": "Verberg gemeenschappen die zijn gemarkeerd als \"vulgar\"", + "over_18": "Boven de 18?", + "must_be_over_18": "Je moet 18+ zijn om deze gemeenschap te bekijken", + "must_be_over_18_explanation": "Je moet minstens achttien jaar oud zijn om deze inhoud te bekijken. Ben je ouder dan achttien en bereid om volwassen inhoud te bekijken?", + "no_thank_you": "Nee, bedankt", + "continue": "Doorgaan" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index bf166128..f917313f 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Vil du alltid vise NSFW-media?", "always_show_nsfw_notice": "Ok, vi har endret preferansene dine for å alltid vise NSFW-media.", "content_options": "Innstillinger for innhold", - "hide_vulgar": "Skjul samfunn merket som \"vulgar\"" + "hide_vulgar": "Skjul samfunn merket som \"vulgar\"", + "over_18": "Over 18?", + "must_be_over_18": "Du må være over 18 for å se dette fellesskapet", + "must_be_over_18_explanation": "Du må være minst 18 år gammel for å se dette innholdet. Er du over 18 og villig til å se vokseninnhold?", + "no_thank_you": "Nei, takk", + "continue": "Fortsett" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index f9ff0ba9..92bfdc04 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Zawsze wyświetlać media NSFW?", "always_show_nsfw_notice": "Ok, zmieniliśmy twoje preferencje, aby zawsze wyświetlać media NSFW.", "content_options": "Opcje treści", - "hide_vulgar": "Ukryj społeczności oznaczone jako \"vulgar\"" + "hide_vulgar": "Ukryj społeczności oznaczone jako \"vulgar\"", + "over_18": "Powyżej 18?", + "must_be_over_18": "Musisz mieć więcej niż 18 lat, aby zobaczyć tę społeczność", + "must_be_over_18_explanation": "Musisz mieć co najmniej osiemnaście lat, aby oglądać tę treść. Masz ponad osiemnaście lat i chcesz oglądać treści dla dorosłych?", + "no_thank_you": "Nie, dziękuję", + "continue": "Kontynuować" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index 854fae64..f8e93e7c 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Sempre mostrar mídias NSFW?", "always_show_nsfw_notice": "Ok, mudamos suas preferências para mostrar sempre mídias NSFW.", "content_options": "Opções de conteúdo", - "hide_vulgar": "Ocultar comunidades marcadas como \"vulgar\"" + "hide_vulgar": "Ocultar comunidades marcadas como \"vulgar\"", + "over_18": "Acima de 18?", + "must_be_over_18": "Você precisa ter 18 anos ou mais para ver esta comunidade", + "must_be_over_18_explanation": "Você deve ter pelo menos dezoito anos para ver este conteúdo. Você tem mais de dezoito anos e está disposto a ver conteúdo para adultos?", + "no_thank_you": "Não, obrigado", + "continue": "Continuar" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index bf2c71fa..aa6f4a31 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Doriți să arătați întotdeauna media NSFW?", "always_show_nsfw_notice": "Ok, am schimbat preferințele tale pentru a arăta întotdeauna media NSFW.", "content_options": "Opțiuni de conținut", - "hide_vulgar": "Ascunde comunitățile etichetate ca \"vulgar\"" + "hide_vulgar": "Ascunde comunitățile etichetate ca \"vulgar\"", + "over_18": "Peste 18?", + "must_be_over_18": "Trebuie să ai 18+ ani pentru a vizualiza această comunitate", + "must_be_over_18_explanation": "Trebuie să ai cel puțin optsprezece ani pentru a vizualiza acest conținut. Ai peste optsprezece ani și ești dispus să vizionezi conținut pentru adulți?", + "no_thank_you": "Nu, mulțumesc", + "continue": "Continuă" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index b3c0f443..b0003a6e 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Хотите всегда показывать NSFW медиа?", "always_show_nsfw_notice": "Окей, мы изменили ваши предпочтения, чтобы всегда показывать медиа NSFW.", "content_options": "Параметры контента", - "hide_vulgar": "Скрыть сообщества, помеченные как \"вульгарные\"" + "hide_vulgar": "Скрыть сообщества, помеченные как \"вульгарные\"", + "over_18": "Больше 18?", + "must_be_over_18": "Вы должны быть старше 18 лет, чтобы просматривать это сообщество", + "must_be_over_18_explanation": "Вы должны быть как минимум восемнадцати лет, чтобы просматривать этот контент. Вам больше восемнадцати лет, и вы готовы просматривать контент для взрослых?", + "no_thank_you": "Нет, спасибо", + "continue": "Продолжить" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 40c63bdd..5ba1fb9c 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "A dëshironi të shfaqni gjithmonë mediat NSFW?", "always_show_nsfw_notice": "Ok, ne ndryshuam preferencat tuaja për të shfaqur gjithmonë mediat NSFW.", "content_options": "Opsionet e përmbajtjes", - "hide_vulgar": "Fsheh komunitetet e etiketuar si \"vulgar\"" + "hide_vulgar": "Fsheh komunitetet e etiketuar si \"vulgar\"", + "over_18": "Mbi 18?", + "must_be_over_18": "Duhet të jeni 18+ për të parë këtë komunitet", + "must_be_over_18_explanation": "Duhet të jeni të paktën tetëmbëdhjetë vjeç për të parë këtë përmbajtje. A jeni mbi tetëmbëdhjetë vjeç dhe jeni të gatshëm të shihni përmbajtje për të rritur?", + "no_thank_you": "Jo, faleminderit", + "continue": "Vazhdoni" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index d290d8fd..90bb355a 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Vill du alltid visa NSFW-media?", "always_show_nsfw_notice": "Okej, vi har ändrat dina inställningar för att alltid visa NSFW-media.", "content_options": "Innehållsoptioner", - "hide_vulgar": "Dölj samhällen märkta som \"vulgar\"" + "hide_vulgar": "Dölj samhällen märkta som \"vulgar\"", + "over_18": "Över 18?", + "must_be_over_18": "Du måste vara 18+ för att se denna gemenskap", + "must_be_over_18_explanation": "Du måste vara minst arton år gammal för att se detta innehåll. Är du över arton och villig att se vuxeninnehåll?", + "no_thank_you": "Nej, tack", + "continue": "Fortsätt" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 8fc8f45b..022d5409 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "ఎల్లప్పుడూ NSFW మీడియాను చూపాలా?", "always_show_nsfw_notice": "సరే, మేము మీ ఇష్టాలను ఎల్లప్పుడూ NSFW మీడియా చూపించడానికి మార్చాము.", "content_options": "కంటెంట్ ఎంపికలు", - "hide_vulgar": "\"వుల్‌గర్\" గా ట్యాగ్ చేసిన సమాజాలను దాచండి" + "hide_vulgar": "\"వుల్‌గర్\" గా ట్యాగ్ చేసిన సమాజాలను దాచండి", + "over_18": "18 సంవత్సరాలు పైగా?", + "must_be_over_18": "ఈ సమాజాన్ని చూడటానికి మీరు 18+ అవ్వాలి", + "must_be_over_18_explanation": "ఈ కంటెంట్‌ను చూడడానికి మీరు కనీసం పద్దెనిమిది సంవత్సరాలు వయస్సు ఉన్నట్లయితే కావాలి. మీరు పద్దెనిమిది సంవత్సరాలు పైగా ఉన్నారా మరియు వయస్సు ఆధారిత కంటెంట్ చూడడానికి సిద్ధంగా ఉన్నారా?", + "no_thank_you": "లేదు, ధన్యవాదాలు", + "continue": "కొనసాగించండి" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index a0d8d78e..ac5ceed0 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "คุณต้องการแสดงสื่อ NSFW ตลอดเวลาหรือไม่?", "always_show_nsfw_notice": "ตกลง, เราเปลี่ยนการตั้งค่าของคุณเพื่อแสดงสื่อ NSFW ตลอดเวลา", "content_options": "ตัวเลือกเนื้อหา", - "hide_vulgar": "ซ่อนชุมชนที่ถูกแท็กว่า \"หยาบคาย\"" + "hide_vulgar": "ซ่อนชุมชนที่ถูกแท็กว่า \"หยาบคาย\"", + "over_18": "เกิน 18?", + "must_be_over_18": "คุณต้องอายุ 18 ปีขึ้นไปเพื่อดูชุมชนนี้", + "must_be_over_18_explanation": "คุณต้องมีอายุอย่างน้อย 18 ปีเพื่อดูเนื้อหานี้ คุณอายุเกิน 18 ปีและพร้อมที่จะดูเนื้อหาผู้ใหญ่หรือไม่?", + "no_thank_you": "ไม่ ขอบคุณ", + "continue": "ดำเนินการต่อ" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index e15ddbc3..80a0af65 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Her zaman NSFW medyasını göstermek ister misiniz?", "always_show_nsfw_notice": "Tamam, tercihlerinizi her zaman NSFW medyasını gösterecek şekilde değiştirdik.", "content_options": "İçerik seçenekleri", - "hide_vulgar": "\"Vulgar\" olarak etiketlenen toplulukları gizle" + "hide_vulgar": "\"Vulgar\" olarak etiketlenen toplulukları gizle", + "over_18": "18 yaş üstü?", + "must_be_over_18": "Bu topluluğu görmek için 18 yaş ve üzeri olmalısınız", + "must_be_over_18_explanation": "Bu içeriği görmek için en az on sekiz yaşında olmanız gerekir. On sekiz yaşından büyük müsünüz ve yetişkin içeriği görmeye istekli misiniz?", + "no_thank_you": "Hayır, teşekkür ederim", + "continue": "Devam et" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 5523ef6f..047d0997 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Чи хочете ви завжди показувати медіа NSFW?", "always_show_nsfw_notice": "Добре, ми змінили ваші налаштування, щоб завжди показувати медіа NSFW.", "content_options": "Параметри контенту", - "hide_vulgar": "Сховати спільноти, позначені як \"вульгарні\"" + "hide_vulgar": "Сховати спільноти, позначені як \"вульгарні\"", + "over_18": "Понад 18?", + "must_be_over_18": "Ви повинні бути старше 18 років, щоб переглядати це співтовариство", + "must_be_over_18_explanation": "Ви повинні бути принаймні вісімнадцяти років, щоб переглядати цей контент. Вам більше вісімнадцяти років, і ви готові переглядати контент для дорослих?", + "no_thank_you": "Ні, дякую", + "continue": "Продовжити" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 3f2124e7..bbd757a7 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "کیا آپ ہمیشہ NSFW میڈیا دکھانا چاہتے ہیں؟", "always_show_nsfw_notice": "اوکے، ہم نے آپ کی ترجیحات ہمیشہ کے لئے NSFW میڈیا دکھانے کے لئے تبدیل کر دی ہیں۔", "content_options": "مواد کے اختیارات", - "hide_vulgar": "\"ولگر\" کے طور پر ٹیگ کی گئی کمیونٹیز کو چھپائیں" + "hide_vulgar": "\"ولگر\" کے طور پر ٹیگ کی گئی کمیونٹیز کو چھپائیں", + "over_18": "18 سال سے اوپر؟", + "must_be_over_18": "اس کمیونٹی کو دیکھنے کے لیے آپ کو 18+ ہونا ضروری ہے", + "must_be_over_18_explanation": "اس مواد کو دیکھنے کے لیے آپ کو کم از کم اٹھارہ سال کا ہونا ضروری ہے۔ کیا آپ اٹھارہ سال سے اوپر ہیں اور بالغ مواد دیکھنے کے لیے تیار ہیں؟", + "no_thank_you": "نہیں، شکریہ", + "continue": "جاری رکھیں" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index c3732b67..6db7cb25 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "Luôn hiển thị media NSFW?", "always_show_nsfw_notice": "Được rồi, chúng tôi đã thay đổi sở thích của bạn để luôn hiển thị media NSFW.", "content_options": "Tùy chọn nội dung", - "hide_vulgar": "Ẩn cộng đồng được gắn thẻ là \"vulgar\"" + "hide_vulgar": "Ẩn cộng đồng được gắn thẻ là \"vulgar\"", + "over_18": "Trên 18?", + "must_be_over_18": "Bạn phải trên 18 tuổi để xem cộng đồng này", + "must_be_over_18_explanation": "Bạn phải ít nhất mười tám tuổi để xem nội dung này. Bạn có trên mười tám tuổi và sẵn sàng xem nội dung người lớn không?", + "no_thank_you": "Không, cảm ơn", + "continue": "Tiếp tục" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 490b1e22..5c264ff5 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -344,5 +344,10 @@ "always_show_nsfw": "始终显示NSFW媒体?", "always_show_nsfw_notice": "好的,我们已将您的偏好更改为始终显示NSFW媒体。", "content_options": "内容选项", - "hide_vulgar": "隐藏标记为“vulgar”的社区" + "hide_vulgar": "隐藏标记为“vulgar”的社区", + "over_18": "超过18岁?", + "must_be_over_18": "您必须年满18岁才能查看此社区", + "must_be_over_18_explanation": "您必须至少年满18岁才能查看此内容。您是否已超过18岁并愿意查看成人内容?", + "no_thank_you": "不,谢谢", + "continue": "继续" } \ No newline at end of file diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx index 9ca151df..05823cc6 100644 --- a/src/components/header/header.tsx +++ b/src/components/header/header.tsx @@ -313,7 +313,7 @@ const HeaderTitle = ({ title, shortAddress }: { title: string; shortAddress: str const authorTitle = {params.authorAddress && Plebbit.getShortAddress(params.authorAddress)}; if (isBroadlyNsfwSubplebbit && !hasUnhiddenAnyNsfwCommunity) { - return over 18?; + return {t('over_18')}; } else if (isInSubplebbitSubmitView) { return ( <> diff --git a/src/views/subplebbit/subplebbit.tsx b/src/views/subplebbit/subplebbit.tsx index c4a186cc..b79c4069 100644 --- a/src/views/subplebbit/subplebbit.tsx +++ b/src/views/subplebbit/subplebbit.tsx @@ -185,14 +185,14 @@ const Subplebbit = () => {
      over 18
      -

      You must be 18+ to view this community

      -

      You must be at least eighteen years old to view this content. Are you over eighteen and willing to see adult content?

      +

      {t('must_be_over_18')}

      +

      {t('must_be_over_18_explanation')}

      - +
      ) : ( From d313a68003d78a03be5e1bd66dd370341e0b51ff Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 14:47:06 +0100 Subject: [PATCH 21/25] fix(profile): keep showing the welcome info bar for the first few visits previously, it would disappear immediately after the first visit --- src/views/profile/profile.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/profile/profile.tsx b/src/views/profile/profile.tsx index 3ad0ad24..8a3ebcf4 100644 --- a/src/views/profile/profile.tsx +++ b/src/views/profile/profile.tsx @@ -247,14 +247,14 @@ const Profile = () => { document.title = profileTitle + ' - Seedit'; }, [t, profileTitle]); - // only show infobar on first profile access and if the current account wasn't imported + // Show infobar for first 3 visits if account wasn't imported useEffect(() => { - const wasProfileAccessed = localStorage.getItem('wasProfileAccessed'); + const profileVisits = parseInt(localStorage.getItem('profileVisits') || '0'); const importedAccountAddress = localStorage.getItem('importedAccountAddress'); - if (!wasProfileAccessed && importedAccountAddress !== account?.author?.address) { + if (profileVisits < 4 && importedAccountAddress !== account?.author?.address) { setShowInfobar(true); - localStorage.setItem('wasProfileAccessed', 'true'); + localStorage.setItem('profileVisits', (profileVisits + 1).toString()); } }, [account?.author?.address]); From ee1c38d1eed34a8c868bbc1c263fa268d8bfd1f9 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 14:55:29 +0100 Subject: [PATCH 22/25] style(profile): add x button to close info bar before it disappears --- src/views/profile/profile.module.css | 7 +++++++ src/views/profile/profile.tsx | 28 +++++++++++++++++++--------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/views/profile/profile.module.css b/src/views/profile/profile.module.css index 2dbc528d..e67ba68f 100644 --- a/src/views/profile/profile.module.css +++ b/src/views/profile/profile.module.css @@ -134,4 +134,11 @@ div[data-viewport-type="window"] { font-family: verdana, Arial, Helvetica, sans-serif; margin-top: -2px; text-transform: lowercase; +} + +.closeButton { + cursor: pointer; + margin-left: 10px; + padding: 0 3px; + } \ No newline at end of file diff --git a/src/views/profile/profile.tsx b/src/views/profile/profile.tsx index 8a3ebcf4..771f1cbc 100644 --- a/src/views/profile/profile.tsx +++ b/src/views/profile/profile.tsx @@ -258,17 +258,27 @@ const Profile = () => { } }, [account?.author?.address]); + const handleCloseInfobar = useCallback(() => { + setShowInfobar(false); + localStorage.setItem('profileVisits', '4'); + }, []); + const infobar = showInfobar && (
      - , - 2: , - 3: , - }} - /> +
      + , + 2: , + 3: , + }} + /> + +
      ); From 7730f64a4e89f34c0f73b2f16cafb5ff0384bd93 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 14:56:26 +0100 Subject: [PATCH 23/25] fix perf --- src/views/profile/profile.tsx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/views/profile/profile.tsx b/src/views/profile/profile.tsx index 771f1cbc..59702553 100644 --- a/src/views/profile/profile.tsx +++ b/src/views/profile/profile.tsx @@ -240,24 +240,24 @@ const Profile = () => { const { t } = useTranslation(); const account = useAccount(); const isMobile = useWindowWidth() < 640; - const [showInfobar, setShowInfobar] = useState(false); + // Show infobar for first 3 visits if account wasn't imported + const [showInfobar, setShowInfobar] = useState(() => { + const profileVisits = parseInt(localStorage.getItem('profileVisits') || '0'); + const importedAccountAddress = localStorage.getItem('importedAccountAddress'); + const shouldShow = profileVisits < 4 && importedAccountAddress !== account?.author?.address; + + if (shouldShow) { + localStorage.setItem('profileVisits', (profileVisits + 1).toString()); + } + + return shouldShow; + }); const profileTitle = account?.author?.displayName ? `${account?.author?.displayName} (u/${account?.author?.shortAddress})` : `u/${account?.author?.shortAddress}`; useEffect(() => { document.title = profileTitle + ' - Seedit'; }, [t, profileTitle]); - // Show infobar for first 3 visits if account wasn't imported - useEffect(() => { - const profileVisits = parseInt(localStorage.getItem('profileVisits') || '0'); - const importedAccountAddress = localStorage.getItem('importedAccountAddress'); - - if (profileVisits < 4 && importedAccountAddress !== account?.author?.address) { - setShowInfobar(true); - localStorage.setItem('profileVisits', (profileVisits + 1).toString()); - } - }, [account?.author?.address]); - const handleCloseInfobar = useCallback(() => { setShowInfobar(false); localStorage.setItem('profileVisits', '4'); From 8399174914ce5dcf8d5cb60868efbb21cac7d58b Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 15:35:32 +0100 Subject: [PATCH 24/25] fix(settings): "check for update" button didn't include apk case, now it can download the latest apk --- public/translations/ar/default.json | 3 ++- public/translations/bn/default.json | 3 ++- public/translations/cs/default.json | 3 ++- public/translations/da/default.json | 3 ++- public/translations/de/default.json | 3 ++- public/translations/el/default.json | 3 ++- public/translations/en/default.json | 3 ++- public/translations/es/default.json | 3 ++- public/translations/fa/default.json | 3 ++- public/translations/fi/default.json | 3 ++- public/translations/fil/default.json | 3 ++- public/translations/fr/default.json | 3 ++- public/translations/he/default.json | 3 ++- public/translations/hi/default.json | 3 ++- public/translations/hu/default.json | 3 ++- public/translations/id/default.json | 3 ++- public/translations/it/default.json | 3 ++- public/translations/ja/default.json | 3 ++- public/translations/ko/default.json | 3 ++- public/translations/mr/default.json | 3 ++- public/translations/nl/default.json | 3 ++- public/translations/no/default.json | 3 ++- public/translations/pl/default.json | 3 ++- public/translations/pt/default.json | 3 ++- public/translations/ro/default.json | 3 ++- public/translations/ru/default.json | 3 ++- public/translations/sq/default.json | 3 ++- public/translations/sv/default.json | 3 ++- public/translations/te/default.json | 3 ++- public/translations/th/default.json | 3 ++- public/translations/tr/default.json | 3 ++- public/translations/uk/default.json | 3 ++- public/translations/ur/default.json | 3 ++- public/translations/vi/default.json | 3 ++- public/translations/zh/default.json | 3 ++- src/views/settings/settings.tsx | 12 +++++++++++- 36 files changed, 81 insertions(+), 36 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 258dbbcc..20083328 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "يجب أن تكون فوق 18 عامًا لعرض هذه المجتمع", "must_be_over_18_explanation": "يجب أن تكون في سن 18 عامًا على الأقل لعرض هذا المحتوى. هل أنت فوق 18 عامًا ومستعد لرؤية المحتوى البالغ؟", "no_thank_you": "لا، شكرًا", - "continue": "استمر" + "continue": "استمر", + "download_latest_android": "تحميل أحدث إصدار من أندرويد؟" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index b5643709..2f6b1346 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "এই কমিউনিটি দেখতে আপনাকে ১৮+ হতে হবে", "must_be_over_18_explanation": "এই কন্টেন্ট দেখতে আপনাকে অন্তত ১৮ বছর বয়সী হতে হবে। আপনি কি ১৮ বছরের উপরে এবং প্রাপ্তবয়স্ক কন্টেন্ট দেখতে ইচ্ছুক?", "no_thank_you": "না, ধন্যবাদ", - "continue": "অবস্থান করুন" + "continue": "অবস্থান করুন", + "download_latest_android": "সর্বশেষ অ্যান্ড্রয়েড সংস্করণ ডাউনলোড করুন?" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 0c96b45a..7838f289 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Musíte být starší 18 let, abyste si mohli prohlédnout tuto komunitu", "must_be_over_18_explanation": "Musíte být alespoň 18 let starý/á, abyste si mohli prohlédnout tento obsah. Jste starší 18 let a ochotni vidět obsah pro dospělé?", "no_thank_you": "Ne, děkuji", - "continue": "Pokračovat" + "continue": "Pokračovat", + "download_latest_android": "Stáhněte si nejnovější verzi Androidu?" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index d5ac1021..9d999514 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Du skal være over 18 år for at se dette fællesskab", "must_be_over_18_explanation": "Du skal være mindst 18 år gammel for at se dette indhold. Er du over 18 og villig til at se voksenindhold?", "no_thank_you": "Nej, tak tak", - "continue": "Fortsæt" + "continue": "Fortsæt", + "download_latest_android": "Download den nyeste Android-version?" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index 8ccb762b..7c0e2cf8 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Sie müssen über 18 Jahre alt sein, um diese Community zu sehen", "must_be_over_18_explanation": "Sie müssen mindestens 18 Jahre alt sein, um diesen Inhalt zu sehen. Sind Sie über 18 Jahre alt und bereit, Erwachsenen-Inhalte zu sehen?", "no_thank_you": "Nein, danke", - "continue": "Weiter" + "continue": "Weiter", + "download_latest_android": "Laden Sie die neueste Android-Version herunter?" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index d4c799d1..3072f3ed 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Πρέπει να είστε άνω των 18 για να δείτε αυτήν την κοινότητα", "must_be_over_18_explanation": "Πρέπει να είστε τουλάχιστον 18 ετών για να δείτε αυτό το περιεχόμενο. Είστε άνω των 18 και πρόθυμοι να δείτε περιεχόμενο για ενήλικες;", "no_thank_you": "Όχι, ευχαριστώ", - "continue": "Συνέχεια" + "continue": "Συνέχεια", + "download_latest_android": "Κατεβάστε την τελευταία έκδοση Android;" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index f187ea58..ffe5dc26 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "You must be 18+ to view this community", "must_be_over_18_explanation": "You must be at least eighteen years old to view this content. Are you over eighteen and willing to see adult content?", "no_thank_you": "No thank you", - "continue": "Continue" + "continue": "Continue", + "download_latest_android": "Download the latest android version?" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index cffc6224..560789ef 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Debes tener más de 18 años para ver esta comunidad", "must_be_over_18_explanation": "Debe tener al menos dieciocho años para ver este contenido. ¿Tienes más de dieciocho años y estás dispuesto a ver contenido para adultos?", "no_thank_you": "No gracias", - "continue": "Continuar" + "continue": "Continuar", + "download_latest_android": "¿Descargar la última versión de Android?" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 9fb56f74..382efa2e 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "برای مشاهده این جامعه باید بالای ۱۸ سال باشید", "must_be_over_18_explanation": "برای مشاهده این محتوا باید حداقل هجده سال داشته باشید. آیا شما بالای هجده سال دارید و آماده مشاهده محتوای بزرگسالان هستید؟", "no_thank_you": "نه، ممنون", - "continue": "ادامه بده" + "continue": "ادامه بده", + "download_latest_android": "دانلود آخرین نسخه اندروید؟" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index da6cb011..994e925f 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Sinun täytyy olla yli 18-vuotias nähdäksesi tämän yhteisön", "must_be_over_18_explanation": "Sinun täytyy olla vähintään kahdeksantoista vuotta vanha nähdäksesi tämän sisällön. Oletko yli 18-vuotias ja halukas katsomaan aikuisille tarkoitettua sisältöä?", "no_thank_you": "Ei kiitos", - "continue": "Jatka" + "continue": "Jatka", + "download_latest_android": "Lataa uusin Android-versio?" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index c6a401f2..54e45419 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Dapat kang 18+ upang makita ang komunidad na ito", "must_be_over_18_explanation": "Dapat kang hindi bababa sa labing walong taon upang makita ang nilalamang ito. Ikaw ba ay higit sa labing walong taon at handang makita ang nilalamang pang-adulto?", "no_thank_you": "Hindi, salamat", - "continue": "Magpatuloy" + "continue": "Magpatuloy", + "download_latest_android": "I-download ang pinakabagong bersyon ng Android?" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index c6c8992f..0e8de0aa 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Vous devez avoir 18 ans ou plus pour voir cette communauté", "must_be_over_18_explanation": "Vous devez avoir au moins dix-huit ans pour voir ce contenu. Avez-vous plus de dix-huit ans et êtes-vous prêt à voir du contenu pour adultes ?", "no_thank_you": "Non merci", - "continue": "Continuer" + "continue": "Continuer", + "download_latest_android": "Télécharger la dernière version d'Android ?" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index f9bda0df..83549b6f 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "אתה חייב להיות מעל גיל 18 כדי לראות את הקהילה הזאת", "must_be_over_18_explanation": "עליך להיות לפחות בן 18 על מנת לצפות בתוכן הזה. האם אתה מעל גיל 18 ומוכן לראות תוכן למבוגרים?", "no_thank_you": "לא תודה", - "continue": "המשך" + "continue": "המשך", + "download_latest_android": "להוריד את הגרסה האחרונה של אנדרואיד?" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index bc20d05b..f46d8a6a 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "आपको इस समुदाय को देखने के लिए 18+ होना चाहिए", "must_be_over_18_explanation": "इस सामग्री को देखने के लिए आपको कम से कम अठारह साल का होना चाहिए। क्या आप अठारह साल से ऊपर हैं और वयस्क सामग्री देखने के इच्छुक हैं?", "no_thank_you": "नहीं, धन्यवाद", - "continue": "जारी रखें" + "continue": "जारी रखें", + "download_latest_android": "नवीनतम एंड्रॉइड संस्करण डाउनलोड करें?" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index 5915425a..596d376b 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "18 évesnek kell lenned ahhoz, hogy megnézd ezt a közösséget", "must_be_over_18_explanation": "Legalább tizennyolc évesnek kell lenned ahhoz, hogy megtekinthesd ezt a tartalmat. Több mint tizennyolc éves vagy, és hajlandó vagy felnőtteknek szóló tartalmat nézni?", "no_thank_you": "Nem, köszönöm", - "continue": "Folytatás" + "continue": "Folytatás", + "download_latest_android": "Töltse le a legújabb Android verziót?" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index 5b487dfe..ce214e19 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Anda harus berusia 18+ untuk melihat komunitas ini", "must_be_over_18_explanation": "Anda harus berusia minimal delapan belas tahun untuk melihat konten ini. Apakah Anda berusia lebih dari delapan belas tahun dan bersedia melihat konten dewasa?", "no_thank_you": "Tidak, terima kasih", - "continue": "Lanjutkan" + "continue": "Lanjutkan", + "download_latest_android": "Unduh versi Android terbaru?" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index ef5c6206..72e26db5 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Devi avere più di 18 anni per visualizzare questa comunità", "must_be_over_18_explanation": "Devi avere almeno diciotto anni per visualizzare questo contenuto. Hai più di diciotto anni e sei disposto a vedere contenuti per adulti?", "no_thank_you": "No, grazie", - "continue": "Continua" + "continue": "Continua", + "download_latest_android": "Scarica l'ultima versione di Android?" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index fbba67d4..0d5f63bb 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "このコミュニティを見るには18歳以上でなければなりません", "must_be_over_18_explanation": "このコンテンツを見るには少なくとも18歳でなければなりません。あなたは18歳以上で、成人向けコンテンツを見る準備ができていますか?", "no_thank_you": "いいえ、ありがとう", - "continue": "続ける" + "continue": "続ける", + "download_latest_android": "最新のAndroidバージョンをダウンロードしますか?" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index 9b7ae084..df77475b 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "이 커뮤니티를 보려면 18세 이상이어야 합니다", "must_be_over_18_explanation": "이 콘텐츠를 보려면 최소한 18세 이상이어야 합니다. 당신은 18세 이상이며 성인 콘텐츠를 볼 준비가 되셨나요?", "no_thank_you": "아니요, 감사합니다", - "continue": "계속" + "continue": "계속", + "download_latest_android": "최신 Android 버전을 다운로드하시겠습니까?" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 48e8446e..909296ff 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "या समुदायाला पाहण्यासाठी तुम्ही १८+ असणे आवश्यक आहे", "must_be_over_18_explanation": "या सामग्रीला पाहण्यासाठी तुम्हाला किमान अठरा वर्षे वयाचे असावे लागेल. तुम्ही अठरा वर्षे वयाच्या वरील आहात का आणि प्रौढ सामग्री पाहण्यास तयार आहात?", "no_thank_you": "नाही, धन्यवाद", - "continue": "सुरू ठेवा" + "continue": "सुरू ठेवा", + "download_latest_android": "ताज्या Android आवृत्तीचे डाउनलोड करा?" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 75b87adf..20fae1a3 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Je moet 18+ zijn om deze gemeenschap te bekijken", "must_be_over_18_explanation": "Je moet minstens achttien jaar oud zijn om deze inhoud te bekijken. Ben je ouder dan achttien en bereid om volwassen inhoud te bekijken?", "no_thank_you": "Nee, bedankt", - "continue": "Doorgaan" + "continue": "Doorgaan", + "download_latest_android": "Download de nieuwste Android-versie?" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index f917313f..a2f21300 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Du må være over 18 for å se dette fellesskapet", "must_be_over_18_explanation": "Du må være minst 18 år gammel for å se dette innholdet. Er du over 18 og villig til å se vokseninnhold?", "no_thank_you": "Nei, takk", - "continue": "Fortsett" + "continue": "Fortsett", + "download_latest_android": "Last ned den nyeste Android-versjonen?" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 92bfdc04..625accb9 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Musisz mieć więcej niż 18 lat, aby zobaczyć tę społeczność", "must_be_over_18_explanation": "Musisz mieć co najmniej osiemnaście lat, aby oglądać tę treść. Masz ponad osiemnaście lat i chcesz oglądać treści dla dorosłych?", "no_thank_you": "Nie, dziękuję", - "continue": "Kontynuować" + "continue": "Kontynuować", + "download_latest_android": "Pobierz najnowszą wersję Androida?" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index f8e93e7c..faec01be 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Você precisa ter 18 anos ou mais para ver esta comunidade", "must_be_over_18_explanation": "Você deve ter pelo menos dezoito anos para ver este conteúdo. Você tem mais de dezoito anos e está disposto a ver conteúdo para adultos?", "no_thank_you": "Não, obrigado", - "continue": "Continuar" + "continue": "Continuar", + "download_latest_android": "Baixar a versão mais recente do Android?" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index aa6f4a31..6ae4f7c0 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Trebuie să ai 18+ ani pentru a vizualiza această comunitate", "must_be_over_18_explanation": "Trebuie să ai cel puțin optsprezece ani pentru a vizualiza acest conținut. Ai peste optsprezece ani și ești dispus să vizionezi conținut pentru adulți?", "no_thank_you": "Nu, mulțumesc", - "continue": "Continuă" + "continue": "Continuă", + "download_latest_android": "Descărcați cea mai recentă versiune Android?" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index b0003a6e..1af9221a 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Вы должны быть старше 18 лет, чтобы просматривать это сообщество", "must_be_over_18_explanation": "Вы должны быть как минимум восемнадцати лет, чтобы просматривать этот контент. Вам больше восемнадцати лет, и вы готовы просматривать контент для взрослых?", "no_thank_you": "Нет, спасибо", - "continue": "Продолжить" + "continue": "Продолжить", + "download_latest_android": "Скачать последнюю версию Android?" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 5ba1fb9c..8b97bf14 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Duhet të jeni 18+ për të parë këtë komunitet", "must_be_over_18_explanation": "Duhet të jeni të paktën tetëmbëdhjetë vjeç për të parë këtë përmbajtje. A jeni mbi tetëmbëdhjetë vjeç dhe jeni të gatshëm të shihni përmbajtje për të rritur?", "no_thank_you": "Jo, faleminderit", - "continue": "Vazhdoni" + "continue": "Vazhdoni", + "download_latest_android": "Shkarkoni versionin më të fundit të Android?" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 90bb355a..c49da174 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Du måste vara 18+ för att se denna gemenskap", "must_be_over_18_explanation": "Du måste vara minst arton år gammal för att se detta innehåll. Är du över arton och villig att se vuxeninnehåll?", "no_thank_you": "Nej, tack", - "continue": "Fortsätt" + "continue": "Fortsätt", + "download_latest_android": "Ladda ner den senaste Android-versionen?" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 022d5409..fc5ae3d9 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "ఈ సమాజాన్ని చూడటానికి మీరు 18+ అవ్వాలి", "must_be_over_18_explanation": "ఈ కంటెంట్‌ను చూడడానికి మీరు కనీసం పద్దెనిమిది సంవత్సరాలు వయస్సు ఉన్నట్లయితే కావాలి. మీరు పద్దెనిమిది సంవత్సరాలు పైగా ఉన్నారా మరియు వయస్సు ఆధారిత కంటెంట్ చూడడానికి సిద్ధంగా ఉన్నారా?", "no_thank_you": "లేదు, ధన్యవాదాలు", - "continue": "కొనసాగించండి" + "continue": "కొనసాగించండి", + "download_latest_android": "తాజా Android వెర్షన్ డౌన్‌లోడ్ చేసుకోండి?" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index ac5ceed0..9af3fa06 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "คุณต้องอายุ 18 ปีขึ้นไปเพื่อดูชุมชนนี้", "must_be_over_18_explanation": "คุณต้องมีอายุอย่างน้อย 18 ปีเพื่อดูเนื้อหานี้ คุณอายุเกิน 18 ปีและพร้อมที่จะดูเนื้อหาผู้ใหญ่หรือไม่?", "no_thank_you": "ไม่ ขอบคุณ", - "continue": "ดำเนินการต่อ" + "continue": "ดำเนินการต่อ", + "download_latest_android": "ดาวน์โหลดเวอร์ชันล่าสุดของ Android?" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 80a0af65..ad745a7b 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Bu topluluğu görmek için 18 yaş ve üzeri olmalısınız", "must_be_over_18_explanation": "Bu içeriği görmek için en az on sekiz yaşında olmanız gerekir. On sekiz yaşından büyük müsünüz ve yetişkin içeriği görmeye istekli misiniz?", "no_thank_you": "Hayır, teşekkür ederim", - "continue": "Devam et" + "continue": "Devam et", + "download_latest_android": "Son Android sürümünü indir?" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 047d0997..9d2b65cf 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Ви повинні бути старше 18 років, щоб переглядати це співтовариство", "must_be_over_18_explanation": "Ви повинні бути принаймні вісімнадцяти років, щоб переглядати цей контент. Вам більше вісімнадцяти років, і ви готові переглядати контент для дорослих?", "no_thank_you": "Ні, дякую", - "continue": "Продовжити" + "continue": "Продовжити", + "download_latest_android": "Завантажити останню версію Android?" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index bbd757a7..4c2b3151 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "اس کمیونٹی کو دیکھنے کے لیے آپ کو 18+ ہونا ضروری ہے", "must_be_over_18_explanation": "اس مواد کو دیکھنے کے لیے آپ کو کم از کم اٹھارہ سال کا ہونا ضروری ہے۔ کیا آپ اٹھارہ سال سے اوپر ہیں اور بالغ مواد دیکھنے کے لیے تیار ہیں؟", "no_thank_you": "نہیں، شکریہ", - "continue": "جاری رکھیں" + "continue": "جاری رکھیں", + "download_latest_android": "آخری Android ورژن ڈاؤن لوڈ کریں؟" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 6db7cb25..c8d0880c 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "Bạn phải trên 18 tuổi để xem cộng đồng này", "must_be_over_18_explanation": "Bạn phải ít nhất mười tám tuổi để xem nội dung này. Bạn có trên mười tám tuổi và sẵn sàng xem nội dung người lớn không?", "no_thank_you": "Không, cảm ơn", - "continue": "Tiếp tục" + "continue": "Tiếp tục", + "download_latest_android": "Tải phiên bản Android mới nhất?" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 5c264ff5..40046e6a 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -349,5 +349,6 @@ "must_be_over_18": "您必须年满18岁才能查看此社区", "must_be_over_18_explanation": "您必须至少年满18岁才能查看此内容。您是否已超过18岁并愿意查看成人内容?", "no_thank_you": "不,谢谢", - "continue": "继续" + "continue": "继续", + "download_latest_android": "下载最新的安卓版本?" } \ No newline at end of file diff --git a/src/views/settings/settings.tsx b/src/views/settings/settings.tsx index 24194ab2..abe2d707 100644 --- a/src/views/settings/settings.tsx +++ b/src/views/settings/settings.tsx @@ -1,6 +1,7 @@ import { useEffect, useState } from 'react'; import { useLocation } from 'react-router-dom'; import { Trans, useTranslation } from 'react-i18next'; +import { Capacitor } from '@capacitor/core'; import { setAccount, useAccount } from '@plebbit/plebbit-react-hooks'; import { isSettingsPlebbitOptionsView } from '../../lib/utils/view-utils'; import useContentOptionsStore from '../../stores/use-content-options-store'; @@ -16,6 +17,7 @@ import _ from 'lodash'; const commitRef = process.env.REACT_APP_COMMIT_REF; const isElectron = window.isElectron === true; +const isAndroid = Capacitor.getPlatform() === 'android'; const CheckForUpdates = () => { const { t } = useTranslation(); @@ -32,8 +34,16 @@ const CheckForUpdates = () => { const newVersionText = t('new_stable_version', { newVersion: packageData.version, oldVersion: packageJson.version }); const updateActionText = isElectron ? t('download_latest_desktop', { link: 'https://github.com/plebbit/seedit/releases/latest', interpolation: { escapeValue: false } }) + : isAndroid + ? t('download_latest_android') : t('refresh_to_update'); - alert(newVersionText + ' ' + updateActionText); + if (isAndroid) { + if (window.confirm(newVersionText + ' ' + updateActionText)) { + window.open(`https://github.com/plebbit/seedit/releases/download/v${packageData.version}/seedit-${packageData.version}.apk`, '_blank', 'noreferrer'); + } + } else { + alert(newVersionText + ' ' + updateActionText); + } updateAvailable = true; } From 59f1f1b572fb1f53d70458800c8497fd4bbc9f09 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 19 Dec 2024 15:57:04 +0100 Subject: [PATCH 25/25] feat(reply): add colored "submitter" "[S]" next to user name if reply author is also the post author --- public/translations/ar/default.json | 3 +- public/translations/bn/default.json | 3 +- public/translations/cs/default.json | 3 +- public/translations/da/default.json | 3 +- public/translations/de/default.json | 3 +- public/translations/el/default.json | 3 +- public/translations/en/default.json | 3 +- public/translations/es/default.json | 3 +- public/translations/fa/default.json | 3 +- public/translations/fi/default.json | 3 +- public/translations/fil/default.json | 3 +- public/translations/fr/default.json | 3 +- public/translations/he/default.json | 3 +- public/translations/hi/default.json | 3 +- public/translations/hu/default.json | 3 +- public/translations/id/default.json | 3 +- public/translations/it/default.json | 3 +- public/translations/ja/default.json | 3 +- public/translations/ko/default.json | 3 +- public/translations/mr/default.json | 3 +- public/translations/nl/default.json | 3 +- public/translations/no/default.json | 3 +- public/translations/pl/default.json | 3 +- public/translations/pt/default.json | 3 +- public/translations/ro/default.json | 3 +- public/translations/ru/default.json | 3 +- public/translations/sq/default.json | 3 +- public/translations/sv/default.json | 3 +- public/translations/te/default.json | 3 +- public/translations/th/default.json | 3 +- public/translations/tr/default.json | 3 +- public/translations/uk/default.json | 3 +- public/translations/ur/default.json | 3 +- public/translations/vi/default.json | 3 +- public/translations/zh/default.json | 3 +- src/components/reply/reply.module.css | 8 +++++ src/components/reply/reply.tsx | 45 ++++++++++++++++++++++----- src/themes.css | 2 ++ 38 files changed, 118 insertions(+), 42 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 20083328..129753f1 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "يجب أن تكون في سن 18 عامًا على الأقل لعرض هذا المحتوى. هل أنت فوق 18 عامًا ومستعد لرؤية المحتوى البالغ؟", "no_thank_you": "لا، شكرًا", "continue": "استمر", - "download_latest_android": "تحميل أحدث إصدار من أندرويد؟" + "download_latest_android": "تحميل أحدث إصدار من أندرويد؟", + "submitter": "مقدّم" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 2f6b1346..cf7e9133 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "এই কন্টেন্ট দেখতে আপনাকে অন্তত ১৮ বছর বয়সী হতে হবে। আপনি কি ১৮ বছরের উপরে এবং প্রাপ্তবয়স্ক কন্টেন্ট দেখতে ইচ্ছুক?", "no_thank_you": "না, ধন্যবাদ", "continue": "অবস্থান করুন", - "download_latest_android": "সর্বশেষ অ্যান্ড্রয়েড সংস্করণ ডাউনলোড করুন?" + "download_latest_android": "সর্বশেষ অ্যান্ড্রয়েড সংস্করণ ডাউনলোড করুন?", + "submitter": "জমাদাতা" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 7838f289..1b91e1bb 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Musíte být alespoň 18 let starý/á, abyste si mohli prohlédnout tento obsah. Jste starší 18 let a ochotni vidět obsah pro dospělé?", "no_thank_you": "Ne, děkuji", "continue": "Pokračovat", - "download_latest_android": "Stáhněte si nejnovější verzi Androidu?" + "download_latest_android": "Stáhněte si nejnovější verzi Androidu?", + "submitter": "Odesílatel" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 9d999514..1dc48c07 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Du skal være mindst 18 år gammel for at se dette indhold. Er du over 18 og villig til at se voksenindhold?", "no_thank_you": "Nej, tak tak", "continue": "Fortsæt", - "download_latest_android": "Download den nyeste Android-version?" + "download_latest_android": "Download den nyeste Android-version?", + "submitter": "Indsender" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index 7c0e2cf8..a0fcc4d3 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Sie müssen mindestens 18 Jahre alt sein, um diesen Inhalt zu sehen. Sind Sie über 18 Jahre alt und bereit, Erwachsenen-Inhalte zu sehen?", "no_thank_you": "Nein, danke", "continue": "Weiter", - "download_latest_android": "Laden Sie die neueste Android-Version herunter?" + "download_latest_android": "Laden Sie die neueste Android-Version herunter?", + "submitter": "Einreicher" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 3072f3ed..cfceed2c 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Πρέπει να είστε τουλάχιστον 18 ετών για να δείτε αυτό το περιεχόμενο. Είστε άνω των 18 και πρόθυμοι να δείτε περιεχόμενο για ενήλικες;", "no_thank_you": "Όχι, ευχαριστώ", "continue": "Συνέχεια", - "download_latest_android": "Κατεβάστε την τελευταία έκδοση Android;" + "download_latest_android": "Κατεβάστε την τελευταία έκδοση Android;", + "submitter": "Υποβολέας" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index ffe5dc26..80e2bc38 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "You must be at least eighteen years old to view this content. Are you over eighteen and willing to see adult content?", "no_thank_you": "No thank you", "continue": "Continue", - "download_latest_android": "Download the latest android version?" + "download_latest_android": "Download the latest android version?", + "submitter": "Submitter" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index 560789ef..b40077a0 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Debe tener al menos dieciocho años para ver este contenido. ¿Tienes más de dieciocho años y estás dispuesto a ver contenido para adultos?", "no_thank_you": "No gracias", "continue": "Continuar", - "download_latest_android": "¿Descargar la última versión de Android?" + "download_latest_android": "¿Descargar la última versión de Android?", + "submitter": "Remitente" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 382efa2e..9d1dd4d3 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "برای مشاهده این محتوا باید حداقل هجده سال داشته باشید. آیا شما بالای هجده سال دارید و آماده مشاهده محتوای بزرگسالان هستید؟", "no_thank_you": "نه، ممنون", "continue": "ادامه بده", - "download_latest_android": "دانلود آخرین نسخه اندروید؟" + "download_latest_android": "دانلود آخرین نسخه اندروید؟", + "submitter": "ارسال‌کننده" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 994e925f..7975991d 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Sinun täytyy olla vähintään kahdeksantoista vuotta vanha nähdäksesi tämän sisällön. Oletko yli 18-vuotias ja halukas katsomaan aikuisille tarkoitettua sisältöä?", "no_thank_you": "Ei kiitos", "continue": "Jatka", - "download_latest_android": "Lataa uusin Android-versio?" + "download_latest_android": "Lataa uusin Android-versio?", + "submitter": "Lähettäjä" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index 54e45419..d5bd197d 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Dapat kang hindi bababa sa labing walong taon upang makita ang nilalamang ito. Ikaw ba ay higit sa labing walong taon at handang makita ang nilalamang pang-adulto?", "no_thank_you": "Hindi, salamat", "continue": "Magpatuloy", - "download_latest_android": "I-download ang pinakabagong bersyon ng Android?" + "download_latest_android": "I-download ang pinakabagong bersyon ng Android?", + "submitter": "Nagpadala" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 0e8de0aa..bd972d4f 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Vous devez avoir au moins dix-huit ans pour voir ce contenu. Avez-vous plus de dix-huit ans et êtes-vous prêt à voir du contenu pour adultes ?", "no_thank_you": "Non merci", "continue": "Continuer", - "download_latest_android": "Télécharger la dernière version d'Android ?" + "download_latest_android": "Télécharger la dernière version d'Android ?", + "submitter": "Soumetteur" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 83549b6f..57ab1920 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "עליך להיות לפחות בן 18 על מנת לצפות בתוכן הזה. האם אתה מעל גיל 18 ומוכן לראות תוכן למבוגרים?", "no_thank_you": "לא תודה", "continue": "המשך", - "download_latest_android": "להוריד את הגרסה האחרונה של אנדרואיד?" + "download_latest_android": "להוריד את הגרסה האחרונה של אנדרואיד?", + "submitter": "שולח" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index f46d8a6a..d6111a24 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "इस सामग्री को देखने के लिए आपको कम से कम अठारह साल का होना चाहिए। क्या आप अठारह साल से ऊपर हैं और वयस्क सामग्री देखने के इच्छुक हैं?", "no_thank_you": "नहीं, धन्यवाद", "continue": "जारी रखें", - "download_latest_android": "नवीनतम एंड्रॉइड संस्करण डाउनलोड करें?" + "download_latest_android": "नवीनतम एंड्रॉइड संस्करण डाउनलोड करें?", + "submitter": "प्रस्तावक" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index 596d376b..18245fc4 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Legalább tizennyolc évesnek kell lenned ahhoz, hogy megtekinthesd ezt a tartalmat. Több mint tizennyolc éves vagy, és hajlandó vagy felnőtteknek szóló tartalmat nézni?", "no_thank_you": "Nem, köszönöm", "continue": "Folytatás", - "download_latest_android": "Töltse le a legújabb Android verziót?" + "download_latest_android": "Töltse le a legújabb Android verziót?", + "submitter": "Beküldő" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index ce214e19..8f238e4c 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Anda harus berusia minimal delapan belas tahun untuk melihat konten ini. Apakah Anda berusia lebih dari delapan belas tahun dan bersedia melihat konten dewasa?", "no_thank_you": "Tidak, terima kasih", "continue": "Lanjutkan", - "download_latest_android": "Unduh versi Android terbaru?" + "download_latest_android": "Unduh versi Android terbaru?", + "submitter": "Pengirim" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 72e26db5..8ebd2630 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Devi avere almeno diciotto anni per visualizzare questo contenuto. Hai più di diciotto anni e sei disposto a vedere contenuti per adulti?", "no_thank_you": "No, grazie", "continue": "Continua", - "download_latest_android": "Scarica l'ultima versione di Android?" + "download_latest_android": "Scarica l'ultima versione di Android?", + "submitter": "Inviatore" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 0d5f63bb..f1ef5573 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "このコンテンツを見るには少なくとも18歳でなければなりません。あなたは18歳以上で、成人向けコンテンツを見る準備ができていますか?", "no_thank_you": "いいえ、ありがとう", "continue": "続ける", - "download_latest_android": "最新のAndroidバージョンをダウンロードしますか?" + "download_latest_android": "最新のAndroidバージョンをダウンロードしますか?", + "submitter": "提出者" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index df77475b..d91cb002 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "이 콘텐츠를 보려면 최소한 18세 이상이어야 합니다. 당신은 18세 이상이며 성인 콘텐츠를 볼 준비가 되셨나요?", "no_thank_you": "아니요, 감사합니다", "continue": "계속", - "download_latest_android": "최신 Android 버전을 다운로드하시겠습니까?" + "download_latest_android": "최신 Android 버전을 다운로드하시겠습니까?", + "submitter": "제출자" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 909296ff..ee5df363 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "या सामग्रीला पाहण्यासाठी तुम्हाला किमान अठरा वर्षे वयाचे असावे लागेल. तुम्ही अठरा वर्षे वयाच्या वरील आहात का आणि प्रौढ सामग्री पाहण्यास तयार आहात?", "no_thank_you": "नाही, धन्यवाद", "continue": "सुरू ठेवा", - "download_latest_android": "ताज्या Android आवृत्तीचे डाउनलोड करा?" + "download_latest_android": "ताज्या Android आवृत्तीचे डाउनलोड करा?", + "submitter": "समीक्षक" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 20fae1a3..f5cc8ced 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Je moet minstens achttien jaar oud zijn om deze inhoud te bekijken. Ben je ouder dan achttien en bereid om volwassen inhoud te bekijken?", "no_thank_you": "Nee, bedankt", "continue": "Doorgaan", - "download_latest_android": "Download de nieuwste Android-versie?" + "download_latest_android": "Download de nieuwste Android-versie?", + "submitter": "Indiener" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index a2f21300..49705fc5 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Du må være minst 18 år gammel for å se dette innholdet. Er du over 18 og villig til å se vokseninnhold?", "no_thank_you": "Nei, takk", "continue": "Fortsett", - "download_latest_android": "Last ned den nyeste Android-versjonen?" + "download_latest_android": "Last ned den nyeste Android-versjonen?", + "submitter": "Innsender" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 625accb9..9a3bdc6d 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Musisz mieć co najmniej osiemnaście lat, aby oglądać tę treść. Masz ponad osiemnaście lat i chcesz oglądać treści dla dorosłych?", "no_thank_you": "Nie, dziękuję", "continue": "Kontynuować", - "download_latest_android": "Pobierz najnowszą wersję Androida?" + "download_latest_android": "Pobierz najnowszą wersję Androida?", + "submitter": "Nadawca" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index faec01be..0d17b79f 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Você deve ter pelo menos dezoito anos para ver este conteúdo. Você tem mais de dezoito anos e está disposto a ver conteúdo para adultos?", "no_thank_you": "Não, obrigado", "continue": "Continuar", - "download_latest_android": "Baixar a versão mais recente do Android?" + "download_latest_android": "Baixar a versão mais recente do Android?", + "submitter": "Submissor" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index 6ae4f7c0..8dbf385d 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Trebuie să ai cel puțin optsprezece ani pentru a vizualiza acest conținut. Ai peste optsprezece ani și ești dispus să vizionezi conținut pentru adulți?", "no_thank_you": "Nu, mulțumesc", "continue": "Continuă", - "download_latest_android": "Descărcați cea mai recentă versiune Android?" + "download_latest_android": "Descărcați cea mai recentă versiune Android?", + "submitter": "Trimis" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index 1af9221a..39d7b97e 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Вы должны быть как минимум восемнадцати лет, чтобы просматривать этот контент. Вам больше восемнадцати лет, и вы готовы просматривать контент для взрослых?", "no_thank_you": "Нет, спасибо", "continue": "Продолжить", - "download_latest_android": "Скачать последнюю версию Android?" + "download_latest_android": "Скачать последнюю версию Android?", + "submitter": "Отправитель" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 8b97bf14..59b52b1d 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Duhet të jeni të paktën tetëmbëdhjetë vjeç për të parë këtë përmbajtje. A jeni mbi tetëmbëdhjetë vjeç dhe jeni të gatshëm të shihni përmbajtje për të rritur?", "no_thank_you": "Jo, faleminderit", "continue": "Vazhdoni", - "download_latest_android": "Shkarkoni versionin më të fundit të Android?" + "download_latest_android": "Shkarkoni versionin më të fundit të Android?", + "submitter": "Dërguesi" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index c49da174..5cda9c8c 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Du måste vara minst arton år gammal för att se detta innehåll. Är du över arton och villig att se vuxeninnehåll?", "no_thank_you": "Nej, tack", "continue": "Fortsätt", - "download_latest_android": "Ladda ner den senaste Android-versionen?" + "download_latest_android": "Ladda ner den senaste Android-versionen?", + "submitter": "Inlämnare" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index fc5ae3d9..d8de3124 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "ఈ కంటెంట్‌ను చూడడానికి మీరు కనీసం పద్దెనిమిది సంవత్సరాలు వయస్సు ఉన్నట్లయితే కావాలి. మీరు పద్దెనిమిది సంవత్సరాలు పైగా ఉన్నారా మరియు వయస్సు ఆధారిత కంటెంట్ చూడడానికి సిద్ధంగా ఉన్నారా?", "no_thank_you": "లేదు, ధన్యవాదాలు", "continue": "కొనసాగించండి", - "download_latest_android": "తాజా Android వెర్షన్ డౌన్‌లోడ్ చేసుకోండి?" + "download_latest_android": "తాజా Android వెర్షన్ డౌన్‌లోడ్ చేసుకోండి?", + "submitter": "సమర్పకుడు" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index 9af3fa06..514eeecd 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "คุณต้องมีอายุอย่างน้อย 18 ปีเพื่อดูเนื้อหานี้ คุณอายุเกิน 18 ปีและพร้อมที่จะดูเนื้อหาผู้ใหญ่หรือไม่?", "no_thank_you": "ไม่ ขอบคุณ", "continue": "ดำเนินการต่อ", - "download_latest_android": "ดาวน์โหลดเวอร์ชันล่าสุดของ Android?" + "download_latest_android": "ดาวน์โหลดเวอร์ชันล่าสุดของ Android?", + "submitter": "ผู้ส่ง" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index ad745a7b..c630ff80 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Bu içeriği görmek için en az on sekiz yaşında olmanız gerekir. On sekiz yaşından büyük müsünüz ve yetişkin içeriği görmeye istekli misiniz?", "no_thank_you": "Hayır, teşekkür ederim", "continue": "Devam et", - "download_latest_android": "Son Android sürümünü indir?" + "download_latest_android": "Son Android sürümünü indir?", + "submitter": "Gönderen" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 9d2b65cf..e2eee812 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Ви повинні бути принаймні вісімнадцяти років, щоб переглядати цей контент. Вам більше вісімнадцяти років, і ви готові переглядати контент для дорослих?", "no_thank_you": "Ні, дякую", "continue": "Продовжити", - "download_latest_android": "Завантажити останню версію Android?" + "download_latest_android": "Завантажити останню версію Android?", + "submitter": "Відправник" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 4c2b3151..d773b3c3 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "اس مواد کو دیکھنے کے لیے آپ کو کم از کم اٹھارہ سال کا ہونا ضروری ہے۔ کیا آپ اٹھارہ سال سے اوپر ہیں اور بالغ مواد دیکھنے کے لیے تیار ہیں؟", "no_thank_you": "نہیں، شکریہ", "continue": "جاری رکھیں", - "download_latest_android": "آخری Android ورژن ڈاؤن لوڈ کریں؟" + "download_latest_android": "آخری Android ورژن ڈاؤن لوڈ کریں؟", + "submitter": "جمع کرانے والا" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index c8d0880c..9f499b57 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "Bạn phải ít nhất mười tám tuổi để xem nội dung này. Bạn có trên mười tám tuổi và sẵn sàng xem nội dung người lớn không?", "no_thank_you": "Không, cảm ơn", "continue": "Tiếp tục", - "download_latest_android": "Tải phiên bản Android mới nhất?" + "download_latest_android": "Tải phiên bản Android mới nhất?", + "submitter": "Người gửi" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 40046e6a..48aa2436 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -350,5 +350,6 @@ "must_be_over_18_explanation": "您必须至少年满18岁才能查看此内容。您是否已超过18岁并愿意查看成人内容?", "no_thank_you": "不,谢谢", "continue": "继续", - "download_latest_android": "下载最新的安卓版本?" + "download_latest_android": "下载最新的安卓版本?", + "submitter": "提交者" } \ No newline at end of file diff --git a/src/components/reply/reply.module.css b/src/components/reply/reply.module.css index 6ab77624..09a0527b 100644 --- a/src/components/reply/reply.module.css +++ b/src/components/reply/reply.module.css @@ -369,4 +369,12 @@ font-size: x-small; line-height: normal; vertical-align: middle; +} + +.submitter { + color: var(--submitter-color); +} + +.submitter:hover { + text-decoration: underline; } \ No newline at end of file diff --git a/src/components/reply/reply.tsx b/src/components/reply/reply.tsx index 0caa8945..d1d4cbf8 100644 --- a/src/components/reply/reply.tsx +++ b/src/components/reply/reply.tsx @@ -37,9 +37,25 @@ interface ReplyAuthorProps { isAvatarDefined: boolean; removed: boolean; shortAuthorAddress: string | undefined; + submitterAddress: string; + subplebbitAddress: string; + postCid: string; } -const ReplyAuthor = ({ address, authorRole, cid, deleted, displayName, imageUrl, isAvatarDefined, removed, shortAuthorAddress }: ReplyAuthorProps) => { +const ReplyAuthor = ({ + address, + authorRole, + cid, + deleted, + displayName, + imageUrl, + isAvatarDefined, + removed, + shortAuthorAddress, + submitterAddress, + subplebbitAddress, + postCid, +}: ReplyAuthorProps) => { const { t } = useTranslation(); const { hideAvatars } = useAvatarVisibilityStore(); const isAuthorAdmin = authorRole === 'admin'; @@ -48,6 +64,8 @@ const ReplyAuthor = ({ address, authorRole, cid, deleted, displayName, imageUrl, const authorRoleInitial = (isAuthorOwner && 'O') || (isAuthorAdmin && 'A') || (isAuthorModerator && 'M') || ''; const moderatorClass = `${isAuthorOwner ? styles.owner : isAuthorAdmin ? styles.admin : isAuthorModerator ? styles.moderator : ''}`; const shortDisplayName = displayName?.length > 20 ? displayName?.slice(0, 20) + '...' : displayName; + const isAuthorSubmitter = address === submitterAddress; + return ( <> {removed || deleted ? ( @@ -60,20 +78,28 @@ const ReplyAuthor = ({ address, authorRole, cid, deleted, displayName, imageUrl, )} {displayName && ( - + {shortDisplayName}{' '} )} - + {displayName ? `u/${shortAuthorAddress}` : shortAuthorAddress} - {authorRole && ( + {(authorRole || isAuthorSubmitter) && ( {' '} [ - - {authorRoleInitial} - + {isAuthorSubmitter && ( + + S + + )} + {isAuthorSubmitter && authorRole && ','} + {authorRole && ( + + {authorRoleInitial} + + )} ] )} @@ -348,6 +374,8 @@ const Reply = ({ cidOfReplyWithContext, depth = 0, isSingleComment, isSingleRepl ); + const post = useComment({ commentCid: postCid }); + return (
      {isSingleReply && !isInInboxView && } @@ -376,6 +404,9 @@ const Reply = ({ cidOfReplyWithContext, depth = 0, isSingleComment, isSingleRepl isAvatarDefined={!!author?.avatar} removed={removed} shortAuthorAddress={shortAuthorAddress} + submitterAddress={post?.author?.address} + subplebbitAddress={subplebbitAddress} + postCid={postCid} /> {scoreString}{' '} diff --git a/src/themes.css b/src/themes.css index 1500e995..e27eb621 100644 --- a/src/themes.css +++ b/src/themes.css @@ -58,6 +58,7 @@ --red: rgb(255, 21, 21); --red-nsfw: rgb(255, 55, 89); --removed-reply-backgrouhd-color: rgb(27, 30, 32); + --submitter-color: rgb(67, 166, 255); --text: #bfbfbf; --text-button: url("/public/assets/buttons/text-button-dark.png"); --text-button-hover: url("/public/assets/buttons/text-button-hover.png"); @@ -137,6 +138,7 @@ --red: red; --red-nsfw: #d10023; --removed-reply-backgrouhd-color: #f0f0f0; + --submitter-color: #0055df; --text: black; --text-button: url("/public/assets/buttons/text-button.png"); --text-button-hover: url("/public/assets/buttons/text-button-hover.png");