feat: pass language parameter to nstart-modal

This commit is contained in:
codytseng
2025-04-17 22:50:19 +08:00
parent 319ae5a0ba
commit f0fc9a7ccf
3 changed files with 7 additions and 6 deletions

8
package-lock.json generated
View File

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

View File

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

View File

@@ -41,7 +41,7 @@ function AccountManagerNav({
setPage: (page: TAccountManagerPage) => void setPage: (page: TAccountManagerPage) => void
close?: () => void close?: () => void
}) { }) {
const { t } = useTranslation() const { t, i18n } = useTranslation()
const { themeSetting } = useTheme() const { themeSetting } = useTheme()
const { nip07Login, bunkerLogin, nsecLogin, ncryptsecLogin, accounts } = useNostr() const { nip07Login, bunkerLogin, nsecLogin, ncryptsecLogin, accounts } = useNostr()
@@ -81,6 +81,7 @@ function AccountManagerNav({
baseUrl: 'https://nstart.me', baseUrl: 'https://nstart.me',
an: 'Jumble', an: 'Jumble',
am: themeSetting, am: themeSetting,
al: i18n.language.slice(0, 2),
onComplete: ({ nostrLogin }) => { onComplete: ({ nostrLogin }) => {
if (!nostrLogin) return if (!nostrLogin) return