chore: increased limit for profiles, added TODOs

This commit is contained in:
florian 2024-01-19 11:07:30 +01:00
parent 7acb0fe6a5
commit b92bd99b1d
3 changed files with 20 additions and 6 deletions

12
TODO.md Normal file
View File

@ -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.

View File

@ -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

View File

@ -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') /* ||