From e1a4a097cd540337037ee679969209ea27df3d1e Mon Sep 17 00:00:00 2001 From: escapedcat Date: Sat, 15 Jul 2023 14:49:10 +0800 Subject: [PATCH] feat(alby): add link and work around flex headline issue #632 --- src/i18n/langs/en.json | 2 +- src/pages/Settings/ActionBox.tsx | 8 +++++--- src/pages/Settings/index.tsx | 19 +++++++++++++++++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 6cffb22b..d887f493 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -198,7 +198,7 @@ "debug_report_done": "Debug Report created!", "connection_info_error": "Could not get connection info", "alby": { - "title": "Add LND account to Alby", + "title": "Add LND account to <0>Alby", "label": "Add account", "connection": { "hint": "Please install the Alby extension first", diff --git a/src/pages/Settings/ActionBox.tsx b/src/pages/Settings/ActionBox.tsx index 3d3925b9..ee8eadcc 100644 --- a/src/pages/Settings/ActionBox.tsx +++ b/src/pages/Settings/ActionBox.tsx @@ -1,7 +1,7 @@ -import type { FC } from "react"; +import type { FC, ReactElement } from "react"; export type Props = { - name: string; + name: string | ReactElement; actionName: string; action: () => void; }; @@ -11,7 +11,9 @@ const ActionBox: FC = ({ name, action, actionName }) => {
-

{name}

+

+ {name} +

diff --git a/src/pages/Settings/index.tsx b/src/pages/Settings/index.tsx index 8d1af7e0..ad26bd66 100644 --- a/src/pages/Settings/index.tsx +++ b/src/pages/Settings/index.tsx @@ -1,5 +1,5 @@ import { FC, useEffect, useState } from "react"; -import { useTranslation } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import ConfirmModal from "../../components/ConfirmModal"; import useSSE from "../../hooks/use-sse"; import { enableGutter } from "../../utils"; @@ -124,8 +124,23 @@ const Settings: FC = () => { confirmEndpoint="/system/shutdown" /> )} + , + ]} + /> + } actionName={t("settings.alby.label")} action={addAlbyAccountHandler} />