feat: Centralize configuration management for Nostr and API settings
- Introduce a new config module to manage Nostr relays, admin pubkeys, and API settings. - Update components to utilize the centralized config instead of environment variables directly. - Refactor relevant files to improve maintainability and reduce reliance on environment variables.
This commit is contained in:
parent
17a1504771
commit
0324cf8ec5
6 changed files with 83 additions and 13 deletions
|
|
@ -8,8 +8,9 @@ import { Toaster } from 'vue-sonner'
|
|||
import { useNostr } from '@/composables/useNostr'
|
||||
import { identity } from '@/composables/useIdentity'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { config } from '@/lib/config'
|
||||
|
||||
const relays = JSON.parse(import.meta.env.VITE_NOSTR_RELAYS as string)
|
||||
const relays = config.nostr.relays
|
||||
const { isConnected, isConnecting, error, connect, disconnect } = useNostr({ relays })
|
||||
|
||||
const showPasswordDialog = ref(false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue