From 1a2ef05ac41b23cc197c02d045c8296887bf476b Mon Sep 17 00:00:00 2001 From: florian <> Date: Sat, 17 Aug 2024 12:55:24 +0200 Subject: [PATCH] chore: Updated some nsfw npubs --- .../AuthorProfile/AuthorProfile.tsx | 1 + src/components/InfoPanel/InfoPanel.tsx | 28 ++++++++----------- src/components/SlideShow.css | 1 - src/components/SlideView/index.tsx | 15 +++++----- src/components/env.ts | 11 ++++++++ src/utils/useAuthorsFromList.ts | 2 +- src/utils/useImageSizes.ts | 8 +++++- 7 files changed, 38 insertions(+), 28 deletions(-) diff --git a/src/components/AuthorProfile/AuthorProfile.tsx b/src/components/AuthorProfile/AuthorProfile.tsx index b2092d9..c4c309b 100644 --- a/src/components/AuthorProfile/AuthorProfile.tsx +++ b/src/components/AuthorProfile/AuthorProfile.tsx @@ -44,6 +44,7 @@ const AuthorProfile = ({ }} style={{ backgroundImage: avatarLoaded && src ? `url(${createImgProxyUrl(src, 80, 80)})` : 'none', + backgroundColor: '#222', }} > const [state] = useGlobalState(); const { activeProfile, activeNpub } = useActiveProfile(settings, state.activeImage); - const profile = activeProfile && ( + const profile = ( return (
- {profile && ( -
- {profile} - {image.post.event.id && ( - - - - )} -
- )} +
+ {profile} + {image.post.event.id && ( + + + + )} +
{image?.content}
diff --git a/src/components/SlideShow.css b/src/components/SlideShow.css index a68fd5a..0be44ec 100644 --- a/src/components/SlideShow.css +++ b/src/components/SlideShow.css @@ -252,7 +252,6 @@ animation: bump 1s ease-in-out; } - @media screen and (max-width: 768px) { .controls { top: 2em; diff --git a/src/components/SlideView/index.tsx b/src/components/SlideView/index.tsx index 9435e16..4a13a2a 100644 --- a/src/components/SlideView/index.tsx +++ b/src/components/SlideView/index.tsx @@ -169,14 +169,13 @@ const SlideView = ({ settings, images, setViewMode }: SlideViewProps) => {
{activeContent}
)} - {activeProfile && ( - - )} + + {activeImages.map(image => ( diff --git a/src/components/env.ts b/src/components/env.ts index fedb0dd..eb478ff 100644 --- a/src/components/env.ts +++ b/src/components/env.ts @@ -59,6 +59,8 @@ export const adultContentTags = [ 'titstr', 'xxx', 'nostrqueen', + 'cum', + 'masturbation', ]; export const topics: { [key: string]: Topic } = { @@ -365,6 +367,12 @@ export const adultNPubs = [ 'npub1z0xv9t5w6evrcg860kmgqq5tfj55mz84ta40uszjnfp9uhw2clkq63yrak', // ??? 'npub1zfm8u0rkgng5uflv9a0nl2gr76cuj7mzsltrur6z9zc8jcykyefskxrvhz', // mikee 'npub1q3znd3tumjlpwn8z8uq4f9tvjh2xryc6z5d8vy2kku69a7xgperqfv38ez', + 'npub1rwh4musdpv9xryua2tucsgfmqhua70ct36gxqrr84ddty30un7xsmpmjcy', + 'npub18puyr2ltlzfqutj3pl6dm50zu7p5ar2t38wdcj9qhsplfl04easqudrc67', + 'npub1zzgzsp0czctjwe6cmnsn0vyjtskyajghsl9rc22y5uqc0ym5qcrqrrwr02', + 'npub1cgchvzcsemalc0tm4e0z6k6quthpw98ljr9h3l8lgzagyy3d62lq5sf0qk', + 'npub1rxsxj8egpr3emylfdld0wgh63w048tjh5zaua84h2qjscswn68ysdlt68s', + 'npub13lpdphw06d5hy5h7n0xsun9sfpwqsna9gsg0y0d4ukktks048nrseedtx9', ]; export const adultPublicKeys = adultNPubs.map(npub => (nip19.decode(npub).data as string).toLowerCase()); @@ -396,6 +404,9 @@ export const blockedNPubs = [ 'npub1r668uwlt7vslu306q0saxt656zl45j8n2ztacal40r90dfl3lv3s6eq8wn', 'npub1cw626vmllzzeej5k8zehpnhjevc8stqctstdswmlnqa85xx0gf0scr4qfu', 'npub1krldgpd3tkz4565s69evjk7gee9arkgyz3ts0aekrhc7ru37am8qx43ncv', + 'npub1tt3n7nm548jf4jsgy9vwt25khz2n47d8um0lam0nmpk034zzlp2sfpc7tq', + 'npub1yrqtnr4qxvjqj4zs45sw3xlrflzks86dhy0y4hzj9jweujflksfszhsp06', + 'npub13mnfsm49p8hka246khma4gdzd9w8ygyt3udrcxmgmmhd5cyt5y3q879pvy', ]; export const blockedPublicKeys = blockedNPubs.map(npub => (nip19.decode(npub).data as string).toLowerCase()); diff --git a/src/utils/useAuthorsFromList.ts b/src/utils/useAuthorsFromList.ts index 6205ba1..feb807a 100644 --- a/src/utils/useAuthorsFromList.ts +++ b/src/utils/useAuthorsFromList.ts @@ -12,7 +12,7 @@ const useAuthorsFromList = (listAddr?: string): string[] => { const listEvent = useEvent( { kinds: [30000], authors: authorFilter, '#d': identFilter }, - { disable: !validListAttr || !addrIsDefined || authorFilter.length == 0 || identFilter.length == 0} + { disable: !validListAttr || !addrIsDefined || authorFilter.length == 0 || identFilter.length == 0 } ); const authors: string[] = useMemo(() => { diff --git a/src/utils/useImageSizes.ts b/src/utils/useImageSizes.ts index d74a9cc..434d91f 100644 --- a/src/utils/useImageSizes.ts +++ b/src/utils/useImageSizes.ts @@ -10,7 +10,13 @@ const useImageSizes = (imageUrl: string) => { const imageUrl1920w = useMemo(() => createImgProxyUrl(imageUrl, 1920, -1), [imageUrl]); const optimalImageUrl = useMemo(() => { - return width == undefined ? imageUrl320w : width <= 640 ? imageUrl320w : width < 1500 ? imageUrl800w : imageUrl1920w; + return width == undefined + ? imageUrl320w + : width <= 640 + ? imageUrl320w + : width < 1500 + ? imageUrl800w + : imageUrl1920w; }, [width, imageUrl320w, imageUrl800w, imageUrl1920w]); return {