diff --git a/README.md b/README.md index e6856c0..c8caccd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# noxtr +# nox -Nostr SPA built with TypeScript + Vite. +nox is a relay-first SPA built with TypeScript + Vite. This README is for developers working on this repository. ## Stack diff --git a/package.json b/package.json index ad37ec5..65a2b4f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "nostr-spa", + "name": "nox", "version": "1.0.0", - "description": "Simple Nostr SPA", + "description": "nox relay-first client", "type": "module", "scripts": { "dev": "vite", diff --git a/src/common/meta.ts b/src/common/meta.ts index 88db1e0..c771831 100644 --- a/src/common/meta.ts +++ b/src/common/meta.ts @@ -49,7 +49,7 @@ export function setEventMeta( event: { id: string; content: string; created_at: number; pubkey: string }, npub: Npub, ): void { - const title: string = `noxtr - Event ${event.id.slice(0, 8)}`; + const title: string = `nox - Event ${event.id.slice(0, 8)}`; const description: string = event.content.length > 140 ? `${event.content.slice(0, 140)}...` diff --git a/src/common/navigation.ts b/src/common/navigation.ts index fde66d2..4323817 100644 --- a/src/common/navigation.ts +++ b/src/common/navigation.ts @@ -59,6 +59,9 @@ export function setupNavigation(options: NavigationOptions): void { document.getElementById('nav-reactions'); const relaysButton: HTMLElement | null = document.getElementById('nav-relays'); + const profileLink: HTMLAnchorElement | null = document.getElementById( + 'nav-profile', + ) as HTMLAnchorElement | null; const settingsButton: HTMLElement | null = document.getElementById('nav-settings'); const aboutButton: HTMLElement | null = document.getElementById('nav-about'); @@ -186,6 +189,21 @@ export function setupNavigation(options: NavigationOptions): void { ); } + if (profileLink) { + profileLink.addEventListener('click', (event: MouseEvent): void => { + const href: string | null = profileLink.getAttribute('href'); + if (!href || !href.startsWith('/')) { + closeMobileMenu(); + return; + } + + event.preventDefault(); + wrapNavigationHandler((): void => { + options.navigateTo(href); + })(); + }); + } + if (relaysButton) { relaysButton.addEventListener( 'click', diff --git a/src/features/about/about-page.ts b/src/features/about/about-page.ts index ff4d16a..ee2aee0 100644 --- a/src/features/about/about-page.ts +++ b/src/features/about/about-page.ts @@ -40,7 +40,7 @@ export function loadAboutPage(options: AboutPageOptions): void { const postsHeader: HTMLElement | null = document.getElementById('posts-header'); if (postsHeader) { - postsHeader.textContent = 'About noxtr'; + postsHeader.textContent = 'About nox'; postsHeader.style.display = ''; } @@ -56,16 +56,16 @@ export function loadAboutPage(options: AboutPageOptions): void { options.output.innerHTML = `
-

A Practical Nostr Client

+

A Practical Relay Client

- noxtr is built as a fast single-page web client focused on reliability and day-to-day use. + nox is built as a fast single-page web client focused on reliability and day-to-day use. It keeps the protocol visible, avoids heavy abstractions, and gives you direct control over relays, identity, and timelines.

-

What Makes noxtr Different

+

What Makes nox Different