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:
parent
c05f40f1ec
commit
cc6ba2612d
4 changed files with 46 additions and 23 deletions
|
|
@ -7,7 +7,6 @@ import { Input } from '@/components/ui/input'
|
|||
import { Label } from '@/components/ui/label'
|
||||
import { Textarea } from '@/components/ui/textarea'
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { Key, Download, Upload, Copy, Check } from 'lucide-vue-next'
|
||||
import { identity } from '@/composables/useIdentity'
|
||||
import { toast } from 'vue-sonner'
|
||||
|
|
@ -20,7 +19,7 @@ interface Emits {
|
|||
(e: 'update:isOpen', value: boolean): void
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
defineProps<Props>()
|
||||
const emit = defineEmits<Emits>()
|
||||
|
||||
|
||||
|
|
@ -64,7 +63,14 @@ async function handleGenerate() {
|
|||
// Initialize profile form with current data
|
||||
const profile = identity.currentProfile.value
|
||||
if (profile) {
|
||||
profileForm.value = { ...profile }
|
||||
profileForm.value = {
|
||||
name: profile.name || '',
|
||||
display_name: profile.display_name || '',
|
||||
about: profile.about || '',
|
||||
picture: profile.picture || '',
|
||||
website: profile.website || '',
|
||||
lud16: profile.lud16 || ''
|
||||
}
|
||||
}
|
||||
|
||||
toast.success('Identity generated successfully!')
|
||||
|
|
@ -82,7 +88,14 @@ async function handleImport() {
|
|||
// Initialize profile form with current data
|
||||
const profile = identity.currentProfile.value
|
||||
if (profile) {
|
||||
profileForm.value = { ...profile }
|
||||
profileForm.value = {
|
||||
name: profile.name || '',
|
||||
display_name: profile.display_name || '',
|
||||
about: profile.about || '',
|
||||
picture: profile.picture || '',
|
||||
website: profile.website || '',
|
||||
lud16: profile.lud16 || ''
|
||||
}
|
||||
}
|
||||
|
||||
toast.success('Identity imported successfully!')
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ interface Emits {
|
|||
(e: 'cancel'): void
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
withDefaults(defineProps<Props>(), {
|
||||
title: 'Enter Password',
|
||||
description: 'Your identity is encrypted. Please enter your password to continue.'
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ export default defineConfig(({ mode }) => ({
|
|||
},
|
||||
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'mask-icon.svg'],
|
||||
manifest: {
|
||||
name: 'Vue Shadcn App',
|
||||
short_name: 'Vue App',
|
||||
description: 'A Vue 3 app with Shadcn UI',
|
||||
theme_color: '#ffffff',
|
||||
name: 'Ario - Nostr Community Hub',
|
||||
short_name: 'Ario',
|
||||
description: 'Nostr-based community platform with Lightning Network integration for events and announcements',
|
||||
theme_color: '#1f2937',
|
||||
background_color: '#ffffff',
|
||||
display: 'standalone',
|
||||
orientation: 'portrait',
|
||||
orientation: 'portrait-primary',
|
||||
start_url: '/',
|
||||
scope: '/',
|
||||
id: 'ario-nostr-hub',
|
||||
|
|
@ -43,18 +43,28 @@ export default defineConfig(({ mode }) => ({
|
|||
{
|
||||
src: 'pwa-192x192.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png'
|
||||
},
|
||||
{
|
||||
src: 'pwa-512x512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png'
|
||||
type: 'image/png',
|
||||
purpose: 'any'
|
||||
},
|
||||
{
|
||||
src: 'pwa-512x512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
purpose: 'any maskable'
|
||||
purpose: 'any'
|
||||
},
|
||||
{
|
||||
src: 'pwa-512x512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
purpose: 'maskable'
|
||||
}
|
||||
],
|
||||
screenshots: [
|
||||
{
|
||||
src: 'splash.png',
|
||||
sizes: '1080x1920',
|
||||
type: 'image/png',
|
||||
form_factor: 'narrow'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue