feat: Update app configuration and enhance identity management

- Change app manifest details to reflect new branding for "Ario - Nostr Community Hub".
- Add new properties to the manifest, including categories and language support.
- Refactor identity handling in IdentityDialog and PasswordDialog components for improved profile initialization.
- Update event creation functions in events.ts to use the correct event type from nostr-tools.
This commit is contained in:
padreug 2025-07-03 08:34:26 +02:00
parent c05f40f1ec
commit cc6ba2612d
4 changed files with 46 additions and 23 deletions

View file

@ -1,4 +1,4 @@
import { finalizeEvent, type EventTemplate, type UnsignedEvent } from 'nostr-tools'
import { finalizeEvent, type EventTemplate, type Event } from 'nostr-tools'
import type { NostrIdentity } from './identity'
import { hexToBytes } from '@/lib/utils/crypto'
@ -18,7 +18,7 @@ export const EventKinds = {
/**
* Create a text note event
*/
export function createTextNote(content: string, identity: NostrIdentity, replyTo?: string): UnsignedEvent {
export function createTextNote(content: string, identity: NostrIdentity, replyTo?: string): Event {
const eventTemplate: EventTemplate = {
kind: EventKinds.TEXT_NOTE,
created_at: Math.floor(Date.now() / 1000),
@ -42,7 +42,7 @@ export function createReaction(
targetAuthor: string,
reaction: string,
identity: NostrIdentity
): UnsignedEvent {
): Event {
const eventTemplate: EventTemplate = {
kind: EventKinds.REACTION,
created_at: Math.floor(Date.now() / 1000),
@ -59,7 +59,7 @@ export function createReaction(
/**
* Create a profile metadata event
*/
export function createProfileMetadata(profile: Record<string, any>, identity: NostrIdentity): UnsignedEvent {
export function createProfileMetadata(profile: Record<string, any>, identity: NostrIdentity): Event {
const eventTemplate: EventTemplate = {
kind: EventKinds.PROFILE_METADATA,
created_at: Math.floor(Date.now() / 1000),
@ -73,7 +73,7 @@ export function createProfileMetadata(profile: Record<string, any>, identity: No
/**
* Create a contact list event (following)
*/
export function createContactList(contacts: string[], identity: NostrIdentity): UnsignedEvent {
export function createContactList(contacts: string[], identity: NostrIdentity): Event {
const eventTemplate: EventTemplate = {
kind: EventKinds.CONTACT_LIST,
created_at: Math.floor(Date.now() / 1000),
@ -87,7 +87,7 @@ export function createContactList(contacts: string[], identity: NostrIdentity):
/**
* Create a delete event
*/
export function createDeleteEvent(eventIds: string[], identity: NostrIdentity, reason?: string): UnsignedEvent {
export function createDeleteEvent(eventIds: string[], identity: NostrIdentity, reason?: string): Event {
const eventTemplate: EventTemplate = {
kind: EventKinds.DELETE,
created_at: Math.floor(Date.now() / 1000),