Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onboarding for node_required accounts #3248

Merged
merged 8 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/screens/Home/DefaultView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const DefaultView: FC<Props> = (props) => {
</Alert>
)}
{account?.nodeRequired ? (
<Alert type="warn">
<Alert type="info">
<div className="flex items-center gap-2">
<div className="shrink-0">
<PopiconsCircleExclamationLine className="w-5 h-5" />
Expand All @@ -186,7 +186,7 @@ const DefaultView: FC<Props> = (props) => {
// eslint-disable-next-line react/jsx-key
<a
className="underline"
href="https://getalby.com"
href="https://getalby.com/onboarding/node/new"
target="_blank"
rel="noreferrer"
/>,
Expand Down
39 changes: 35 additions & 4 deletions src/app/screens/Options/TestConnection/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import Button from "@components/Button";
import Loading from "@components/Loading";
import { PopiconsBadgeCheckSolid } from "@popicons/react";
import {
PopiconsBadgeCheckSolid,
PopiconsCircleExclamationLine,
} from "@popicons/react";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { Trans, useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import Alert from "~/app/components/Alert";
import { useAccount } from "~/app/context/AccountContext";
import { useAccounts } from "~/app/context/AccountsContext";
import { useSettings } from "~/app/context/SettingsContext";
Expand All @@ -14,7 +18,7 @@ import type { AccountInfo } from "~/types";

export default function TestConnection() {
const { getFormattedInCurrency } = useSettings();
const { setAccountId, fetchAccountInfo } = useAccount();
const { account, setAccountId, fetchAccountInfo } = useAccount();
const { getAccounts } = useAccounts();

const [accountInfo, setAccountInfo] = useState<{
Expand Down Expand Up @@ -78,7 +82,7 @@ export default function TestConnection() {

return (
<div>
<div className="relative mt-14 lg:grid lg:grid-cols-2 lg:gap-8 bg-white dark:bg-surface-02dp p-12 shadow rounded-lg">
<div className="relative mt-14 lg:grid lg:grid-cols-1 lg:gap-8 bg-white dark:bg-surface-02dp p-12 shadow rounded-lg">
<div className="relative">
<div>
{errorMessage && (
Expand Down Expand Up @@ -115,6 +119,33 @@ export default function TestConnection() {
<p className="mt-6 dark:text-gray-400"></p>
<p className="mt-6 dark:text-neutral-400">{t("ready")}</p>
pavanjoshi914 marked this conversation as resolved.
Show resolved Hide resolved

{account?.nodeRequired && (
<div className="mt-6">
<Alert type="info">
<div className="flex items-center gap-2">
<div className="shrink-0">
<PopiconsCircleExclamationLine className="w-5 h-5" />
</div>
<span className="text-sm">
<Trans
i18nKey={"node_required"}
t={t}
components={[
// eslint-disable-next-line react/jsx-key
<a
className="underline"
href="https://getalby.com/onboarding/node/new"
target="_blank"
rel="noreferrer"
/>,
]}
/>
</span>
</div>
</Alert>
</div>
)}

<div className="mt-6">
<TestConnectionResultCard
color="bg-gray-100"
Expand Down
1 change: 0 additions & 1 deletion src/i18n/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@
"description": "Kümmer dich um deinen Master Key oder importiere dein bestehendes Nostr-Konto"
}
},
"node_required": "Ihr Alby-Konto benötigt eine Brieftasche. Verbinde deine Brieftasche mit deinem Konto auf <0>getalby.com</0>",
"upgrade_account": "Du verwendest die alte LNDHub-Einstellung. <0>Bitte verbinde dich erneut</0> mit deinem Alby-Konto, um Zugang zu den neuesten Funktionen zu erhalten."
},
"allowance_view": {
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{

Check warning on line 1 in src/i18n/locales/en/translation.json

View workflow job for this annotation

GitHub Actions / Check source translation file for changes

Translation source translation.home.default_view.node_required has changed

Consider running `node scripts/remove-outdated-translations.js translation.home.default_view.node_required` to reset existing translations.
"translation": {
"welcome": {
"set_password": {
Expand All @@ -24,6 +24,7 @@
"review_connection_details": "Please review your connection details.",
"connection_taking_long": "Trying to connect takes longer than expected... Are your details correct? Is your node reachable?",
"contact_support": "If you need help please contact support@getalby.com",
"node_required": "The extension is configured, but to be able to send and receive payments finish the wallet configuration for your <0>Alby account</0>.",
pavanjoshi914 marked this conversation as resolved.
Show resolved Hide resolved
"actions": {
"delete_edit_account": "Delete invalid account and edit again"
}
Expand Down Expand Up @@ -406,7 +407,7 @@
"description": "Fund your account and receive via your lightning address or an invoice"
}
},
"node_required": "Your Alby Account needs a wallet. Connect a wallet to your account on <0>getalby.com</0>",
"node_required": "Your Alby Account does not have a wallet configured. To be able to send and receive payments finish the wallet configuration for your <0>Alby account</0>.",
"upgrade_account": "You are using the old LNDHub setup. <0>Please re-connect</0> your Alby account to get access to the latest features."
}
},
Expand Down
1 change: 0 additions & 1 deletion src/i18n/locales/fi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@
"description": "Rahoita tiliäsi ja vastaanota Lightning-osoitteesi tai laskun kautta"
}
},
"node_required": "Alby-tilisi tarvitsee lompakon. Yhdistä lompakko tiliisi <0>getalby.com</0>:ssa",
"upgrade_account": "Käytät vanhaa LNDHub-kokoonpanoa. <0>Yhdistä uudelleen</0> Alby-tilisi, jotta pääset käyttämään uusimpia ominaisuuksia.",
"no_transactions": "Ei vielä tapahtumia tällä tilillä.",
"block_removed": "Käytössä {{host}}. Ole hyvä ja lataa verkkosivusto uudelleen.",
Expand Down
139 changes: 69 additions & 70 deletions src/i18n/locales/zh_Hans/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@
"default_view": {
"is_blocked_hint": "Alby 目前在 {{host}} 上被禁用",
"block_removed": "启用了{{host}}。请重新加载网站。",
"node_required": "你的 Albby 账户需要设置一个钱包。前往 <0>getalby.com</0> 连接你的钱包",
"actions": {
"setup_keys": {
"description": "保管你的主密钥或导入已有 Nostr 账户",
Expand Down Expand Up @@ -732,66 +731,38 @@
"content": "该网站要求你签署:",
"block_added": "已将{{host}}添加到屏蔽列表,请重新加载网站。",
"kinds": {
"0": {
"title": "更新资料",
"description": "更新你的用户名、描述、头像、Nostr 地址和其他资料元数据。"
},
"1": {
"title": "短文本消息",
"description": "签署短文本消息"
},
"5": {
"title": "删除",
"description": "请求中继删除事件"
},
"44": {
"description": "隐藏特定 Nostr 公钥用户的所有消息",
"title": "静音频道用户"
},
"30009": {
"description": "创建新徽章",
"title": "创建徽章"
},
"10000": {
"title": "静音列表",
"description": "从消息列表阻止垃圾消息发送者和其他坏人"
},
"10002": {
"title": "中继列表",
"description": "更新用于接收和发送你的和其他人的笔记的中继偏好"
},
"27235": {
"description": "HTTP 验证",
"title": "HTTP 验证"
},
"10003": {
"title": "书签",
"description": "为用户贴文加书签"
},
"24133": {
"description": "远程请求和签署事件",
"title": "远程签名"
},
"30023": {
"description": "签署类似文章的长篇内容",
"title": "长篇内容"
},
"30078": {
"title": "应用数据",
"description": "签署特定应用专用的数据"
},
"10000135": {
"title": "上传块",
"description": "以块的形式上传数据"
"2": {
"description": "分享推荐的中继",
"title": "推荐中继"
},
"3": {
"description": "更新你的关注列表中的账户",
"title": "更新关注列表"
},
"7": {
"title": "回应",
"description": "签署对笔记的回应"
},
"4": {
"title": "私信",
"description": "发送加密私信"
},
"5": {
"title": "删除",
"description": "请求中继删除事件"
},
"6": {
"description": "转发笔记",
"title": "转发"
},
"7": {
"title": "回应",
"description": "签署对笔记的回应"
},
"8": {
"description": "授予一个徽章给一个 Nostr 账户",
"title": "徽章授予"
Expand All @@ -800,14 +771,26 @@
"title": "创建频道",
"description": "创建一个公共聊天频道"
},
"43": {
"description": "隐藏频道中的文本消息",
"title": "隐藏频道消息"
"41": {
"title": "更新频道",
"description": "更新频道的名称、描述、头像和其他额外元数据"
},
"42": {
"title": "发送频道消息",
"description": "发送文本消息到频道"
},
"43": {
"description": "隐藏频道中的文本消息",
"title": "隐藏频道消息"
},
"44": {
"description": "隐藏特定 Nostr 公钥用户的所有消息",
"title": "静音频道用户"
},
"1984": {
"title": "举报笔记",
"description": "举报笔记(垃圾、违法或露骨内容)"
},
"9734": {
"title": "请求打闪",
"description": "请求一个闪电网络付款"
Expand All @@ -816,37 +799,53 @@
"description": "显示已支付的闪电发票的确认消息",
"title": "打闪收据"
},
"10000": {
"title": "静音列表",
"description": "从消息列表阻止垃圾消息发送者和其他坏人"
},
"10002": {
"title": "中继列表",
"description": "更新用于接收和发送你的和其他人的笔记的中继偏好"
},
"10003": {
"title": "书签",
"description": "为用户贴文加书签"
},
"22242": {
"description": "对中继进行身份验证",
"title": "客户端验证"
},
"24133": {
"description": "远程请求和签署事件",
"title": "远程签名"
},
"27235": {
"description": "HTTP 验证",
"title": "HTTP 验证"
},
"30008": {
"description": "接受、拒绝徽章和修改徽章显示顺序",
"title": "徽章"
},
"unknown": {
"description": "未知操作",
"title": "kind {{kind}}"
},
"0": {
"title": "更新资料",
"description": "更新你的用户名、描述、头像、Nostr 地址和其他资料元数据。"
"30009": {
"description": "创建新徽章",
"title": "创建徽章"
},
"2": {
"description": "分享推荐的中继",
"title": "推荐中继"
"30023": {
"description": "签署类似文章的长篇内容",
"title": "长篇内容"
},
"6": {
"description": "转发笔记",
"title": "转发"
"30078": {
"title": "应用数据",
"description": "签署特定应用专用的数据"
},
"41": {
"title": "更新频道",
"description": "更新频道的名称、描述、头像和其他额外元数据"
"10000135": {
"title": "上传块",
"description": "以块的形式上传数据"
},
"1984": {
"title": "举报笔记",
"description": "举报笔记(垃圾、违法或露骨内容)"
"unknown": {
"description": "未知操作",
"title": "kind {{kind}}"
}
},
"recipient": "收件人",
Expand Down
Loading