feat: Added food topic
This commit is contained in:
parent
1c03c37eb5
commit
efd4ee56c9
22
TODO.md
22
TODO.md
@ -1,36 +1,20 @@
|
||||
# TODO
|
||||
|
||||
|
||||
# delete the events when the filter changes
|
||||
|
||||
- mobile view for profile does not fit follow button
|
||||
- add load more, to load older events
|
||||
- repair auto login
|
||||
- store NIP46 secret key
|
||||
- Fix/Test zaps
|
||||
- Reimplement Likes/Zaps based in ngine code
|
||||
- Investigate profile caching
|
||||
- build masonary view only for desktop / window->columns
|
||||
- Avatar display is laggy, needs caching
|
||||
- move settings dialog to main start screen
|
||||
- replace search icon with nav back button
|
||||
- record demo explaination video
|
||||
- global can not be accessed any more
|
||||
|
||||
- hashtag view (single hasttag), header
|
||||
- masonry, mit subtitles (user displayname, tags (most imporant), desc?, date) (ggf. nur desktop)
|
||||
- NIP 46
|
||||
- header für multiple tags??
|
||||
- follow button für user view
|
||||
- different header for multiple tags??
|
||||
- navigation entry points:
|
||||
- Curated Topics, i.e. defined hashtags -> topic view
|
||||
- Search (custom hashtags, profile search, content search, community seaarch)
|
||||
- Global
|
||||
- community view
|
||||
- community links in detail view (/masonry)
|
||||
|
||||
- Avatar display is laggy, needs caching
|
||||
- turn settings dialog into a "search" and improve display on mbile
|
||||
- bring back the desktop view of the details dialog (maybe!?)
|
||||
- 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 (public nsfw mute list)
|
||||
- Add key/salt to imageproxy, see snort impl
|
||||
|
BIN
public/images/food.jpg
Normal file
BIN
public/images/food.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 536 KiB |
@ -30,6 +30,7 @@ const GridImage = ({ image, onClick, index }: GridImageProps) => {
|
||||
></video>
|
||||
) : (
|
||||
<img
|
||||
referrerPolicy="no-referrer"
|
||||
data-node-id={image.noteId}
|
||||
onError={(e: SyntheticEvent<HTMLImageElement>) => {
|
||||
console.log('not found: ', e.currentTarget.src);
|
||||
|
@ -30,7 +30,12 @@ const Layout = () => {
|
||||
<div className="top-right-controls">
|
||||
{state.userNPub && state.profile ? (
|
||||
state.profile.image && (
|
||||
<img className="profile" onClick={onLogout} src={createImgProxyUrl(state.profile.image, 80, 80)} />
|
||||
<img
|
||||
referrerPolicy="no-referrer"
|
||||
className="profile"
|
||||
onClick={onLogout}
|
||||
src={createImgProxyUrl(state.profile.image, 80, 80)}
|
||||
/>
|
||||
)
|
||||
) : (
|
||||
<button onClick={() => setShowLogin(true)} className="login">
|
||||
|
@ -62,6 +62,8 @@
|
||||
background-color: rgb(99, 19, 173);
|
||||
color: #fff;
|
||||
height: 3em;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
.login-dialog .login-extension {
|
||||
|
@ -42,6 +42,7 @@ const MasonryImage = ({ image, onClick, index }: MasonryImageProps) => {
|
||||
const description = image.content && image.content?.substring(0, 60) + (image.content.length > 60 ? ' ... ' : ' ');
|
||||
const showTags = useMemo(() => uniq(image.tags).slice(0, 5), [image.tags]);
|
||||
const now = unixNow();
|
||||
const showInfo = true;
|
||||
|
||||
return (
|
||||
<LazyLoad>
|
||||
@ -62,6 +63,7 @@ const MasonryImage = ({ image, onClick, index }: MasonryImageProps) => {
|
||||
) : (
|
||||
<>
|
||||
<img
|
||||
referrerPolicy="no-referrer"
|
||||
data-node-id={image.noteId}
|
||||
onError={(e: SyntheticEvent<HTMLImageElement>) => {
|
||||
console.log('not found: ', e.currentTarget.src);
|
||||
@ -81,7 +83,7 @@ const MasonryImage = ({ image, onClick, index }: MasonryImageProps) => {
|
||||
</>
|
||||
)}
|
||||
</a>
|
||||
{(showAuthor || description || showTags.length > 0) && (
|
||||
{showInfo && (showAuthor || description || showTags.length > 0) && (
|
||||
<div className="info-section">
|
||||
<div className="time">{image.timestamp && timeDifference(now, image.timestamp)}</div>
|
||||
{showAuthor && (
|
||||
|
@ -92,6 +92,7 @@ const ScrollImage = ({ image, currentImage, setCurrentImage, index }: ScrollImag
|
||||
></video>
|
||||
) : (
|
||||
<img
|
||||
referrerPolicy="no-referrer"
|
||||
data-node-id={image.noteId}
|
||||
onError={(e: SyntheticEvent<HTMLImageElement>) => {
|
||||
console.log('not found: ', e.currentTarget.src);
|
||||
|
@ -7,10 +7,6 @@ type Topic = {
|
||||
};
|
||||
|
||||
export const topics: { [key: string]: Topic } = {
|
||||
bitcoinatlantis: {
|
||||
name: 'Bitcoin Atlantis / Madeira',
|
||||
tags: ['atlantis', 'bitcoinatlantis', 'madeira', 'btcatlantis', 'soveng', 'funchal', 'freemadeira', 'ba24'],
|
||||
},
|
||||
art: {
|
||||
name: 'Art',
|
||||
tags: [
|
||||
@ -47,21 +43,48 @@ export const topics: { [key: string]: Topic } = {
|
||||
},
|
||||
lifestyle: {
|
||||
name: 'Lifestyle',
|
||||
tags: ['fashion', 'flowerstr', 'style', 'weedstr', 'travel', 'travelstr', 'happy', 'life', 'love', 'hiking'],
|
||||
},
|
||||
food: {
|
||||
name: 'Food / Cooking / Baking',
|
||||
tags: [
|
||||
'fashion',
|
||||
'flowerstr',
|
||||
'baking',
|
||||
'bbq',
|
||||
'breadstr',
|
||||
'breakfast',
|
||||
'cake',
|
||||
'carnivorediet',
|
||||
'cooking',
|
||||
'dessert',
|
||||
'dessertporn',
|
||||
'dinner',
|
||||
'ferment',
|
||||
'finedining',
|
||||
'foodchain',
|
||||
'foodie',
|
||||
'foodporn',
|
||||
'foodstr',
|
||||
'style',
|
||||
'weedstr',
|
||||
'travel',
|
||||
'travelstr',
|
||||
'happy',
|
||||
'life',
|
||||
'love',
|
||||
'hiking',
|
||||
'ketodiet',
|
||||
'lowcarb',
|
||||
'lunch',
|
||||
'lunchchain',
|
||||
'meatstr',
|
||||
'noodle',
|
||||
'pasta',
|
||||
'pizza',
|
||||
'plantbased',
|
||||
'proofofsteak',
|
||||
'sandwich',
|
||||
'sourdough',
|
||||
'vegan',
|
||||
'yumstr',
|
||||
],
|
||||
},
|
||||
gardenandfarm: { name: 'Gardening und Farming', tags: ['gardening', 'gardenstr', 'nature', 'farming', 'farmstr'] },
|
||||
bitcoinatlantis: {
|
||||
name: 'Bitcoin Atlantis / Madeira',
|
||||
tags: ['atlantis', 'bitcoinatlantis', 'madeira', 'btcatlantis', 'soveng', 'funchal', 'freemadeira', 'ba24'],
|
||||
},
|
||||
};
|
||||
|
||||
export const defaultHashTags = [
|
||||
@ -254,6 +277,9 @@ export const adultNPubs = [
|
||||
'npub1z0xv9t5w6evrcg860kmgqq5tfj55mz84ta40uszjnfp9uhw2clkq63yrak', // ???
|
||||
'npub1f3n7hq0a6vyfsjrv9vfdwtasa0g98ve96he68rxsvq9x6cl8tvxqmv6ca4', // Lady Sex (nude anime)
|
||||
'npub1ylq5s3xsdmzgzvgzll6ghcs3qa8a9ajl955hj4tcpmyruvjsl8nq5wqhd8', // Dnera
|
||||
'npub1vmd8l5h60wqzp5yyjdutleyntqlq86yqxhwxwayek488rngtaras2z99sh', // ANDREIITA
|
||||
'npub1d5ygkef6r0l7w29ek9l9c7hulsvdshms2qh74jp5qpfyad4g6h5s4ap6lz', // 莫谈国事
|
||||
'npub1fr8lj8ny89jm93lk977494le5u2qmhuxg55n7lmtm0e50khzdxxq5almwg', // terry
|
||||
|
||||
'npub1t07mr7m65lg3ecr5eapu6qe4ayt2wgjpqjs8x58m5kx2r2cutsyqyzzzs9', // NOT NSFW but spammy ai pictures
|
||||
'npub1curnt7jtq8mhl9fcswnwvuvc9ccm6lvsdv4kzydx75v92kldrvdqh7sq09', // NOT NSFW but spammy ai pictures
|
||||
|
@ -121,19 +121,12 @@ export const isVideo = (url: string) => {
|
||||
};
|
||||
|
||||
export const createImgProxyUrl = (url: string, width = 200, height = 200) => {
|
||||
if (
|
||||
url.includes('imgur.com') /* ||
|
||||
|
||||
url.includes('cdn.midjourney.com') ||
|
||||
url.includes('wasabisys.com') ||
|
||||
url.includes('files.mastodon.social') ||
|
||||
url.includes('files.mastodon.online') ||
|
||||
url.includes('media.mastodon.scot') ||
|
||||
url.includes('media.mas.to') ||
|
||||
url.includes('smutlandia.com') ||
|
||||
url.includes('file.misskey.design') */
|
||||
)
|
||||
// Imggur does not allow localhost as a referrer. Apparently the
|
||||
// imgproxy sets the Referrer header, that is why we disable the
|
||||
// imgproxy for imgur.com here.
|
||||
if (url.includes('imgur.com')) {
|
||||
return url;
|
||||
}
|
||||
|
||||
const heightParam = height < 0 ? '' : ':' + height;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user