diff --git a/src/pages/app-about/app-about.ts b/src/pages/app-about/app-about.ts index e825583..cf77e0f 100644 --- a/src/pages/app-about/app-about.ts +++ b/src/pages/app-about/app-about.ts @@ -27,22 +27,23 @@ export class AppAbout extends LitElement {

What am I looking at?

- This is a micro-nostr client that can be installed to your desktop or smartphone - home screen. Something like this can be used as an alternative to big tech - platforms that exploit your data. It pulls my profile data and notes from one - of the relays I run. + This is a personal micro-social media client that can be installed to + your desktop or smartphone home screen. You can sign in via an extension + to display your profile data and notes from preprogrammed relays. You + can compose a letter to me using a rich text editor I built with Prosemirror.

-

What is Nostr?

-

Nostr stands for Notes and Other Stuff Transmitted Over Relays. It's a simple open source - social media protocol that enables anybody to implement some basic social media functionalities + + +

How do I install this on my home screen?

+

Look for "Add to Home Screen" in your browser toolbar and + to save it to your homescreen.

+ +

What is Nostr?

+

Notes and Other Stuff Transmitted Over Relays is a simple open source + social media protocol that enables anybody to implement social media functionalities into their websites.

-

How can I install this on my home screen?

-

If you are on a PC browser, check for a download buttom inside the URL box - flushed against the right side. Click on it

- -

Technology Used

diff --git a/src/pages/app-home.ts b/src/pages/app-home.ts index 8f85eca..9aaa88d 100644 --- a/src/pages/app-home.ts +++ b/src/pages/app-home.ts @@ -204,7 +204,6 @@ Profile Picture Container

${this.bio || 'Welcome, guest! Please sign in to view your profile.'}

-

View My: Pics | Videos

${'share' in navigator diff --git a/src/pages/note-wall.ts b/src/pages/note-wall.ts index f9d8ef7..21ffb8e 100644 --- a/src/pages/note-wall.ts +++ b/src/pages/note-wall.ts @@ -1,8 +1,6 @@ import { LitElement, css, html } from 'lit'; import { property, customElement } from 'lit/decorators.js'; -import { resolveRouterPath } from '../router'; import { Relay } from 'nostr-tools'; -import axios from 'axios'; import '@shoelace-style/shoelace/dist/components/card/card.js'; import '@shoelace-style/shoelace/dist/components/button/button.js'; @@ -10,12 +8,16 @@ import '@shoelace-style/shoelace/dist/components/button/button.js'; import { styles } from '../styles/shared-styles'; + + @customElement('note-wall') export class NoteWall extends LitElement { @property({ type: Array }) notes: { content: string; date: string }[] = []; +@property({ type: String }) relayName: string = ''; +note = ''; // store notes static styles = [ styles, @@ -88,10 +90,12 @@ export class NoteWall extends LitElement { `]; - note = ''; // store notes + getUserLang() { + return navigator.language || 'en'; + } async firstUpdated() { @@ -106,7 +110,6 @@ export class NoteWall extends LitElement { this.fetchNotes(), ]); - console.log('initial notes:', this.notes); } @@ -128,13 +131,19 @@ export class NoteWall extends LitElement { async fetchNotes() { // const ifcaRelay = await Relay.connect('wss://hi.myvoiceourstory.org'); + const migsRelay = await Relay.connect('wss://notes.miguelalmodo.com'); console.log(`connected to ${migsRelay.url}`); - // console.log(`connected to ${migsRelay.url}`); + + +// store the relay name + this.relayName = migsRelay.url; + + const sub = migsRelay.subscribe([ { kinds: [30023], // short and long form notes - limit: 10, + limit: 5, } ], { onevent: async (event) => { @@ -155,6 +164,10 @@ async fetchNotes() { } +async displayLongNotes() { + +} + @@ -163,7 +176,7 @@ async fetchNotes() { (navigator as any).share({ title: 'Nostr Micro Client', text: 'Share this with your homie!', - url: 'https://miguelalmodo.com', + url: 'https://miguelalmodo.com/', }); } } @@ -176,7 +189,7 @@ async fetchNotes() {
-

Recent Notes from IFCA

+

Recent Notes from ${this.relayName}

@@ -188,6 +201,7 @@ async fetchNotes() { const urlMatch = note.content.match(/https?:\/\/[^\s]+/); const textContent = note.content.replace(urlMatch?.[0] || '', '').trim(); + // Check for yt links and extract video ID const youtubeRegex = /(?:https?:\/\/(?:www\.)?youtube\.com\/watch\?v=|https?:\/\/youtu\.be\/)([a-zA-Z0-9_-]{11})/; const youtubeMatch = urlMatch?.[0].match(youtubeRegex); @@ -199,8 +213,8 @@ async fetchNotes() { : null; //check for image links - const imgRegex = /(https?:\/\/[^\s]+\.(?:jpg|jpeg|png|gif))/i; - const imgMatch = urlMatch?.find(url => imgRegex.test(url)); + const imgRegex = /(https?:\/\/[^\s]+\.(?:jpg|jpeg|png|gif))/i; + const imgMatch = urlMatch?.find(url => imgRegex.test(url)); return html` @@ -217,7 +231,6 @@ async fetchNotes() { `; })} -
import('./pages/note-wall.js')), + ], render: () => html`` }, {