git flow activate yeeeee
This commit is contained in:
parent
f68fab11eb
commit
9fd3d47d25
4 changed files with 29 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -47,19 +47,28 @@ export class AppAbout extends LitElement {
|
|||
<app-header ?enableBack="${true}"></app-header>
|
||||
|
||||
<main><div id="welcomeBar">
|
||||
<h2>About Page</h2>
|
||||
<h2>Frequently Asked Questions</h2>
|
||||
|
||||
<sl-card id="welcomeCard">
|
||||
<h2>Did you know?</h2>
|
||||
<h3>What am I looking at?</h3>
|
||||
|
||||
<p>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!
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>Check out <a
|
||||
href="https://docs.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/handle-files">these
|
||||
docs</a> to learn more about the advanced features that you can use in your PWA</p>
|
||||
<h3>What is Nostr?</h3>
|
||||
<p>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.</p>
|
||||
|
||||
<h3>How can I install this on my home screen?</h3>
|
||||
<p>If you are on a PC browser, check for a download buttom inside the URL box
|
||||
flushed against the right side. Click on it </p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2>Technology Used</h2>
|
||||
|
||||
|
@ -69,7 +78,7 @@ export class AppAbout extends LitElement {
|
|||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://lit.dev">Web Components</a>
|
||||
<a href="https://lit.dev">Lit Web Components Library</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue