From 9fd3d47d252b1e10cb6afdc6e1d2d9eb98b4c1ea Mon Sep 17 00:00:00 2001 From: miggymofongo Date: Thu, 5 Dec 2024 23:32:26 -0400 Subject: [PATCH] git flow activate yeeeee --- README.md | 2 ++ src/pages/app-about/app-about.ts | 29 +++++++++++++++++++---------- src/pages/app-home.ts | 2 +- src/pages/note-wall.ts | 14 +++++++------- 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index a40d028..5741946 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ using nostr-tools and pwabuilder to play with notes and display them on an installable personal web page. + + ## Jump Right In try installing to your smartphone home screen diff --git a/src/pages/app-about/app-about.ts b/src/pages/app-about/app-about.ts index 26e878f..4ee9564 100644 --- a/src/pages/app-about/app-about.ts +++ b/src/pages/app-about/app-about.ts @@ -47,20 +47,29 @@ export class AppAbout extends LitElement {
-

About Page

+

Frequently Asked Questions

-

Did you know?

+

What am I looking at?

-

PWAs have access to many useful APIs in modern browsers! These - APIs have enabled many new types of apps that can be built as PWAs, such as advanced graphics editing apps, games, - apps that use machine learning and more! +

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

-

Check out these - docs to learn more about the advanced features that you can use in your PWA

-
+

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

    @@ -69,7 +78,7 @@ export class AppAbout extends LitElement {
  • - Web Components + Lit Web Components Library
  • diff --git a/src/pages/app-home.ts b/src/pages/app-home.ts index 9105be3..26a0bdf 100644 --- a/src/pages/app-home.ts +++ b/src/pages/app-home.ts @@ -111,7 +111,7 @@ Profile Picture Container async firstUpdated() { // this method is a lifecycle event in lit // for more info check out the lit docs https://lit.dev/docs/components/lifecycle/ - console.log('This is your home page'); + console.log('Welcome to my home page'); } diff --git a/src/pages/note-wall.ts b/src/pages/note-wall.ts index d4af7d5..4845c3e 100644 --- a/src/pages/note-wall.ts +++ b/src/pages/note-wall.ts @@ -164,7 +164,7 @@ export class NoteWall extends LitElement { } -async translateText(text: string, targetLang: string) { +/* async translateText(text: string, targetLang: string) { try { const response = await axios.post('https://api-free.deepl.com/v2/translate', { text, target_lang: targetLang }); @@ -174,16 +174,16 @@ async translateText(text: string, targetLang: string) { console.error('Error during translation:', error.response?.data || error.message); return ''; } -} +} */ async fetchNotes() { const ifcaRelay = await Relay.connect('wss://hi.myvoiceourstory.org'); - const migsRelay = await Relay.connect('wss://notes.miguelalmodo.com'); + // const migsRelay = await Relay.connect('wss://notes.miguelalmodo.com'); console.log(`connected to ${ifcaRelay.url}`); - console.log(`connected to ${migsRelay.url}`); + // console.log(`connected to ${migsRelay.url}`); const sub = ifcaRelay.subscribe([ { @@ -192,14 +192,14 @@ async fetchNotes() { } ], { onevent: async (event) => { - // Translate the note content to the user's language + /* // Translate the note content to the user's language const userLang = this.getUserLang(); - const translatedContent = await this.translateText(event.content, userLang); + // const translatedContent = await this.translateText(event.content, userLang); this.notes.push({ content: translatedContent, date: new Date(event.created_at * 1000).toLocaleDateString(), - }); + }); */ this.requestUpdate(); console.log(event);