/* Ensure normal Unicode emojis (text characters) are displayed correctly */
/* Ensure normal Unicode emojis (text characters) are displayed correctly */
/* Use emoji-friendly fonts and ensure they're not filtered */
/* Monospace font is already applied globally via body and * { font-family: inherit } */
body,.markdown-content,.post-content{
/* Emojis will still display correctly in monospace fonts */
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Color Emoji","Apple Color Emoji","Segoe UI Emoji",sans-serif;
/* Normal emojis are text, not images, so no filter should apply */
}
/* Emoji picker buttons - apply grayscale filter to buttons that open the picker */
/* Emoji picker buttons - apply grayscale filter to buttons that open the picker */
/* But NOT to emojis inside the picker drawer or rendered content */
/* But NOT to emojis inside the picker drawer or rendered content */
<title>Aitherboard - Decentralized Messageboard on Nostr</title>
<title>aitherboard - Decentralized Messageboard on Nostr</title>
<metaname="title"content="Aitherboard - Decentralized Messageboard on Nostr"/>
<metaname="title"content="aitherboard - Decentralized Messageboard on Nostr"/>
<metaname="description"content="A decentralized messageboard built on the Nostr protocol. Create threads, comment, react, and zap in a censorship-resistant environment."/>
<metaname="description"content="A decentralized messageboard built on the Nostr protocol. Create threads, comment, react, and zap in a censorship-resistant environment."/>
<metaname="keywords"content="nostr, decentralized, messageboard, forum, social media, censorship resistant"/>
<metaname="keywords"content="nostr, decentralized, messageboard, forum, social media, censorship resistant"/>
<metaproperty="og:title"content="Aitherboard - Decentralized Messageboard on Nostr"/>
<metaproperty="og:title"content="aitherboard - Decentralized Messageboard on Nostr"/>
<metaproperty="og:description"content="A decentralized messageboard built on the Nostr protocol. Create threads, comment, react, and zap in a censorship-resistant environment."/>
<metaproperty="og:description"content="A decentralized messageboard built on the Nostr protocol. Create threads, comment, react, and zap in a censorship-resistant environment."/>
<metaname="twitter:title"content="Aitherboard - Decentralized Messageboard on Nostr"/>
<metaname="twitter:title"content="aitherboard - Decentralized Messageboard on Nostr"/>
<metaname="twitter:description"content="A decentralized messageboard built on the Nostr protocol. Create threads, comment, react, and zap in a censorship-resistant environment."/>
<metaname="twitter:description"content="A decentralized messageboard built on the Nostr protocol. Create threads, comment, react, and zap in a censorship-resistant environment."/>
import {authenticateWithNIP07} from '../../lib/services/nostr/auth-handler.js';
import {authenticateWithNIP07,authenticateWithNsec,authenticateAsAnonymous,authenticateWithStoredNsec,authenticateWithStoredAnonymous} from '../../lib/services/nostr/auth-handler.js';
import {isNIP07Available} from '../../lib/services/auth/nip07-signer.js';
import {isNIP07Available} from '../../lib/services/auth/nip07-signer.js';
import {goto} from '$app/navigation';
import {goto} from '$app/navigation';
import {onMount} from 'svelte';
import {onMount} from 'svelte';
import {nostrClient} from '../../lib/services/nostr/nostr-client.js';
import {nostrClient} from '../../lib/services/nostr/nostr-client.js';
import {nip19} from 'nostr-tools';
import {listNsecKeys} from '../../lib/services/cache/nsec-key-store.js';
import {listAnonymousKeys} from '../../lib/services/cache/anonymous-key-store.js';
onMount(async () => {
onMount(async () => {
await nostrClient.initialize();
await nostrClient.initialize();
await loadStoredKeys();
});
});
let error = $state<string|null>(null);
let error = $state<string|null>(null);
let loading = $state(false);
let loading = $state(false);
let activeTab = $state<'nip07' | 'nsec' | 'anonymous'>('nip07');
// Stored keys
let storedNsecKeys = $state<Array<{pubkey: string;created_at: number;keyType?:'nsec'|'anonymous'}>>([]);
let storedAnonymousKeys = $state<Array<{pubkey: string;created_at: number;keyType?:'nsec'|'anonymous'}>>([]);
// Nsec form state
let nsecInput = $state('');
let nsecPassword = $state('');
let nsecPasswordConfirm = $state('');
let selectedNsecKey = $state<string|null>(null);
let showNewNsecForm = $state(false);
// Anonymous form state
let anonymousPassword = $state('');
let anonymousPasswordConfirm = $state('');
let selectedAnonymousKey = $state<string|null>(null);
let showNewAnonymousForm = $state(false);
async function loadStoredKeys() {
try {
storedNsecKeys = await listNsecKeys();
storedAnonymousKeys = await listAnonymousKeys();
// If we have stored keys, default to showing them (not the new form)