diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..07f15f6 --- /dev/null +++ b/TODO.md @@ -0,0 +1,12 @@ +# TODO + +- Avatar display is laggy, needs caching +- video mute icon position needs to be better arranged +- add zap/like to the scroll view +- grid profile: add banner/bio, maybe name to the right of the logo +- turn settings dialog into a "search" and improve display on mbile +- bring back the desktop view of the details dialog +- nip-46 nsecbunker login +- think about use of ui framework, and redesign settings dialog +- move NSFW block list into a list event on an slidestr.net profile +- direct link to profile (from nostrudel) should go to the grid. diff --git a/src/components/env.ts b/src/components/env.ts index 334f447..fddf503 100644 --- a/src/components/env.ts +++ b/src/components/env.ts @@ -184,6 +184,7 @@ export const adultNPubs = [ 'npub1ylrnf0xfp9wsmqthxlqjqyqj9yy27pnchjwjq93v3mq66ts7ftjs6x7dcq', // Welcome To The Jungle 'npub1z0xv9t5w6evrcg860kmgqq5tfj55mz84ta40uszjnfp9uhw2clkq63yrak', // ??? 'npub1935j9y7lzyu8mx0zm8mcr4njzrsautl66ms0w3z7wyea04zh85psqdc3v6', + 'npub183tgfk2u2zt7tzqwfsvd6wa3d6d9z474v3874wvuv0y3l8z54faskufdh4', // Goon Master 'npub1t07mr7m65lg3ecr5eapu6qe4ayt2wgjpqjs8x58m5kx2r2cutsyqyzzzs9', // NOT NSFW but spammy ai pictures 'npub1curnt7jtq8mhl9fcswnwvuvc9ccm6lvsdv4kzydx75v92kldrvdqh7sq09', // NOT NSFW but spammy ai pictures diff --git a/src/components/nostrImageDownload.ts b/src/components/nostrImageDownload.ts index 1c93b4b..d130849 100644 --- a/src/components/nostrImageDownload.ts +++ b/src/components/nostrImageDownload.ts @@ -1,7 +1,7 @@ import { NDKEvent, NDKFilter, NDKTag } from '@nostr-dev-kit/ndk'; import { nip19 } from 'nostr-tools'; import { adultContentTags, adultPublicKeys, mixedAdultNPubs } from './env'; -import uniq from 'lodash/uniq'; +import uniq from 'lodash/uniq'; export type Post = { event: NDKEvent; @@ -24,7 +24,7 @@ export type NostrImage = { export const buildFilter = (tags: string[], npubs: string[], withReposts = false) => { const filter: NDKFilter = { kinds: [1, 1063] as number[], - limit: 500 + limit: npubs.length > 0 ? 1000 : 500, }; if (withReposts) { @@ -54,14 +54,16 @@ export const urlFix = (url: string) => { if (url == undefined || url.endsWith('.mp4') || url.endsWith('.webm')) return url; // remove google lens prefix (used in meme posts) - url = url.replace(/https:\/\/lens.google.com\/uploadbyurl\?url=/,''); + url = url.replace(/https:\/\/lens.google.com\/uploadbyurl\?url=/, ''); // remove fuzzysearch prefix (used in meme posts) url = url.replace(/https:\/\/fuzzysearch.net\/#url=/, ''); + // redirect on www.nogood.store does not work properly + url = url.replace(/https:\/\/www.nogood.store/, 'https://www.nogood.studio'); + // use cdn for nostr.build return url.replace(/https?:\/\/nostr.build/, 'https://cdn.nostr.build'); - }; export const extractImageUrls = (text: string): string[] => { @@ -115,7 +117,6 @@ export const isVideo = (url: string) => { }; export const createImgProxyUrl = (url: string, width = 200, height = 200) => { - if ( url.includes('imgur.com') /* || @@ -129,7 +130,7 @@ export const createImgProxyUrl = (url: string, width = 200, height = 200) => { url.includes('file.misskey.design') */ ) return url; - + const heightParam = height < 0 ? '' : ':' + height; return `https://imgproxy.slidestr.net/insecure/f:webp/rs:fill:${width}${heightParam}/plain/${url}`;