Browse Source

fix: 🐛

imwald
codytseng 1 year ago
parent
commit
9bc5fcb642
  1. 10
      src/components/MailboxSetting/index.tsx
  2. 3
      src/i18n/en.ts
  3. 3
      src/i18n/zh.ts

10
src/components/MailboxSetting/index.tsx

@ -11,7 +11,7 @@ import SaveButton from './SaveButton' @@ -11,7 +11,7 @@ import SaveButton from './SaveButton'
export default function MailboxSetting() {
const { t } = useTranslation()
const { pubkey, relayList } = useNostr()
const { pubkey, relayList, checkLogin } = useNostr()
const [relays, setRelays] = useState<TMailboxRelay[]>([])
const [hasChange, setHasChange] = useState(false)
@ -22,7 +22,13 @@ export default function MailboxSetting() { @@ -22,7 +22,13 @@ export default function MailboxSetting() {
}, [relayList])
if (!pubkey) {
return <Button size="lg">Login to set</Button>
return (
<div className="flex flex-col w-full items-center">
<Button size="lg" onClick={() => checkLogin()}>
{t('Login to set')}
</Button>
</div>
)
}
if (!relayList) {

3
src/i18n/en.ts

@ -159,6 +159,7 @@ export default { @@ -159,6 +159,7 @@ export default {
Append: 'Append',
'Select relays to append': 'Select relays to append',
'calculating...': 'calculating...',
'Calculate optimal read relays': 'Calculate optimal read relays'
'Calculate optimal read relays': 'Calculate optimal read relays',
'Login to set': 'Login to set'
}
}

3
src/i18n/zh.ts

@ -160,6 +160,7 @@ export default { @@ -160,6 +160,7 @@ export default {
Append: '追加',
'Select relays to append': '选择要追加的服务器',
'calculating...': '计算中...',
'Calculate optimal read relays': '计算最佳读服务器'
'Calculate optimal read relays': '计算最佳读服务器',
'Login to set': '登录后设置'
}
}

Loading…
Cancel
Save