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.
|
using nostr-tools and pwabuilder to play with notes and display them on an installable personal web page.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Jump Right In
|
## Jump Right In
|
||||||
|
|
||||||
try installing to your smartphone home screen
|
try installing to your smartphone home screen
|
||||||
|
|
|
@ -47,20 +47,29 @@ export class AppAbout extends LitElement {
|
||||||
<app-header ?enableBack="${true}"></app-header>
|
<app-header ?enableBack="${true}"></app-header>
|
||||||
|
|
||||||
<main><div id="welcomeBar">
|
<main><div id="welcomeBar">
|
||||||
<h2>About Page</h2>
|
<h2>Frequently Asked Questions</h2>
|
||||||
|
|
||||||
<sl-card id="welcomeCard">
|
<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
|
<p>
|
||||||
APIs have enabled many new types of apps that can be built as PWAs, such as advanced graphics editing apps, games,
|
This is a micro-nostr client that can be installed to your desktop or smartphone
|
||||||
apps that use machine learning and more!
|
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>
|
||||||
|
|
||||||
<p>Check out <a
|
<h3>What is Nostr?</h3>
|
||||||
href="https://docs.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/handle-files">these
|
<p>Nostr stands for Notes and Other Stuff Transmitted Over Relays. It's a simple open source
|
||||||
docs</a> to learn more about the advanced features that you can use in your PWA</p>
|
social media protocol that enables anybody to implement some basic social media functionalities
|
||||||
<hr>
|
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>
|
<h2>Technology Used</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -69,7 +78,7 @@ export class AppAbout extends LitElement {
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="https://lit.dev">Web Components</a>
|
<a href="https://lit.dev">Lit Web Components Library</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -111,7 +111,7 @@ Profile Picture Container
|
||||||
async firstUpdated() {
|
async firstUpdated() {
|
||||||
// this method is a lifecycle event in lit
|
// this method is a lifecycle event in lit
|
||||||
// for more info check out the lit docs https://lit.dev/docs/components/lifecycle/
|
// 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 {
|
try {
|
||||||
const response = await axios.post('https://api-free.deepl.com/v2/translate', {
|
const response = await axios.post('https://api-free.deepl.com/v2/translate', {
|
||||||
text, target_lang: targetLang });
|
text, target_lang: targetLang });
|
||||||
|
@ -174,16 +174,16 @@ async translateText(text: string, targetLang: string) {
|
||||||
console.error('Error during translation:', error.response?.data || error.message);
|
console.error('Error during translation:', error.response?.data || error.message);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async fetchNotes() {
|
async fetchNotes() {
|
||||||
const ifcaRelay = await Relay.connect('wss://hi.myvoiceourstory.org');
|
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 ${ifcaRelay.url}`);
|
||||||
console.log(`connected to ${migsRelay.url}`);
|
// console.log(`connected to ${migsRelay.url}`);
|
||||||
|
|
||||||
const sub = ifcaRelay.subscribe([
|
const sub = ifcaRelay.subscribe([
|
||||||
{
|
{
|
||||||
|
@ -192,14 +192,14 @@ async fetchNotes() {
|
||||||
}
|
}
|
||||||
], {
|
], {
|
||||||
onevent: async (event) => {
|
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 userLang = this.getUserLang();
|
||||||
const translatedContent = await this.translateText(event.content, userLang);
|
// const translatedContent = await this.translateText(event.content, userLang);
|
||||||
|
|
||||||
this.notes.push({
|
this.notes.push({
|
||||||
content: translatedContent,
|
content: translatedContent,
|
||||||
date: new Date(event.created_at * 1000).toLocaleDateString(),
|
date: new Date(event.created_at * 1000).toLocaleDateString(),
|
||||||
});
|
}); */
|
||||||
|
|
||||||
this.requestUpdate();
|
this.requestUpdate();
|
||||||
console.log(event);
|
console.log(event);
|
||||||
|
|
Loading…
Reference in a new issue