feat: update nstart modal

This commit is contained in:
codytseng
2025-02-15 12:29:29 +08:00
parent 5fa50fecd3
commit 6c63da2a96
3 changed files with 8 additions and 5 deletions

8
package-lock.json generated
View File

@@ -36,7 +36,7 @@
"lru-cache": "^11.0.2",
"lucide-react": "^0.469.0",
"nostr-tools": "^2.10.4",
"nstart-modal": "^0.2.0",
"nstart-modal": "^1.4.0",
"path-to-regexp": "^8.2.0",
"qrcode.react": "^4.2.0",
"react": "^18.3.1",
@@ -7018,9 +7018,9 @@
"optional": true
},
"node_modules/nstart-modal": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/nstart-modal/-/nstart-modal-0.2.0.tgz",
"integrity": "sha512-rfgsSGjakAUud3Csy8xWQqjFPATvXzUfebJM4kpWbc4ljABqW0STKBYnwr7TJ5bXftWZi/X9TnSug3nziX+vhw=="
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/nstart-modal/-/nstart-modal-1.4.0.tgz",
"integrity": "sha512-ple+SOi4HW4gm+0wgPIPs9XMo/41dAFYv067NmMts0hw00rJ1sUGw0dZEXEnwG2Z4TunTecvT27A+c3uA38g6A=="
},
"node_modules/object-assign": {
"version": "4.1.1",

View File

@@ -46,7 +46,7 @@
"lru-cache": "^11.0.2",
"lucide-react": "^0.469.0",
"nostr-tools": "^2.10.4",
"nstart-modal": "^0.2.0",
"nstart-modal": "^1.4.0",
"path-to-regexp": "^8.2.0",
"qrcode.react": "^4.2.0",
"react": "^18.3.1",

View File

@@ -1,6 +1,7 @@
import { Button } from '@/components/ui/button'
import { Separator } from '@/components/ui/separator'
import { useNostr } from '@/providers/NostrProvider'
import { useTheme } from '@/providers/ThemeProvider'
import { NstartModal } from 'nstart-modal'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
@@ -37,6 +38,7 @@ function AccountManagerNav({
close?: () => void
}) {
const { t } = useTranslation()
const { themeSetting } = useTheme()
const { nip07Login, bunkerLogin, nsecLogin, ncryptsecLogin, accounts } = useNostr()
return (
@@ -69,6 +71,7 @@ function AccountManagerNav({
const wizard = new NstartModal({
baseUrl: 'https://start.njump.me',
an: 'Jumble',
am: themeSetting,
onComplete: ({ nostrLogin }) => {
if (!nostrLogin) return