From 6c63da2a96150c6861524981d33abd5d50f60335 Mon Sep 17 00:00:00 2001 From: codytseng Date: Sat, 15 Feb 2025 12:29:29 +0800 Subject: [PATCH] feat: update nstart modal --- package-lock.json | 8 ++++---- package.json | 2 +- src/components/AccountManager/index.tsx | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 899bbfcb..b9e84cc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 7c1aee90..00272c9a 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/AccountManager/index.tsx b/src/components/AccountManager/index.tsx index 2d7353e7..5c26249a 100644 --- a/src/components/AccountManager/index.tsx +++ b/src/components/AccountManager/index.tsx @@ -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