diff --git a/public/i18n/en.json b/public/i18n/en.json index bea6ef3e..2e906896 100644 --- a/public/i18n/en.json +++ b/public/i18n/en.json @@ -383,8 +383,8 @@ "resets_every": "Resets every", "resubscribe_date": "Resubscribe on", "disable_connection": "Disable", - "disabled": "This subscription is disabled. Currently you can't re-enable subscriptions, but we're working to fix that. Check back soon!", - "disable_connection_confirm": "Are you sure you want to disable your subscription? Currently subscriptions can't be re-enabled, we're working to fix that." + "enable_connection": "Enable", + "disable_connection_confirm": "Are you sure you want to disable your subscription?" }, "emergency_kit": { "title": "Emergency Kit", diff --git a/src/routes/settings/Connections.tsx b/src/routes/settings/Connections.tsx index f10129a4..5295547f 100644 --- a/src/routes/settings/Connections.tsx +++ b/src/routes/settings/Connections.tsx @@ -35,6 +35,7 @@ import { NWCEditor } from "~/components/NWCEditor"; import { useI18n } from "~/i18n/context"; import { useMegaStore } from "~/state/megaStore"; import { createDeepSignal, openLinkProgrammatically } from "~/utils"; +import { enable_nwc_profile } from "~/workers/walletWorker"; function Spending(props: { spent: number; remaining: number }) { const i18n = useI18n(); @@ -95,6 +96,15 @@ function NwcDetails(props: { } } + async function enableProfile() { + try { + await sw.enable_nwc_profile(props.profile.index); + props.refetch(); + } catch (e) { + console.error(e); + } + } + async function openInNostrClient() { const uri = props.profile.nwc_uri; await openLinkProgrammatically(uri, { @@ -153,9 +163,13 @@ function NwcDetails(props: { - {i18n.t("settings.connections.disabled")} - + } >