diff --git a/src/i18n/en/translations.ts b/src/i18n/en/translations.ts index bdc3651..00f7223 100644 --- a/src/i18n/en/translations.ts +++ b/src/i18n/en/translations.ts @@ -437,6 +437,8 @@ export default { lsp_label: "LSP", lsp_caption: "Lightning Service Provider. Automatically opens channels to you for inbound liquidity. Also wraps invoices for privacy.", + storage_label: "Storage", + storage_caption: "Encrypted VSS backup service.", error_lsp: "That doesn't look like a URL", save: "Save" }, diff --git a/src/root.tsx b/src/root.tsx index a6a687c..b1c96e0 100644 --- a/src/root.tsx +++ b/src/root.tsx @@ -8,15 +8,14 @@ import { Link, Meta, Scripts, - Title, + Title } from "solid-start"; import "./root.css"; - import { ErrorDisplay, I18nProvider } from "~/components"; -import { Provider as MegaStoreProvider } from "~/state/megaStore"; import { Router } from "~/router"; +import { Provider as MegaStoreProvider } from "~/state/megaStore"; export default function Root() { return ( diff --git a/src/routes/settings/Servers.tsx b/src/routes/settings/Servers.tsx index 7b622f3..ebb3f9d 100644 --- a/src/routes/settings/Servers.tsx +++ b/src/routes/settings/Servers.tsx @@ -1,4 +1,5 @@ import { createForm, url } from "@modular-forms/solid"; +import { createResource, Match, Suspense, Switch } from "solid-js"; import { BackLink, @@ -7,27 +8,29 @@ import { DefaultMain, ExternalLink, LargeHeader, - MutinyWalletGuard, + LoadingShimmer, NavBar, NiceP, SafeArea, showToast, + SimpleErrorDisplay, TextField } from "~/components"; import { useI18n } from "~/i18n/context"; import { + getSettings, MutinyWalletSettingStrings, setSettings } from "~/logic/mutinyWalletSetup"; -import { useMegaStore } from "~/state/megaStore"; import { eify } from "~/utils"; -export function SettingsStringsEditor() { +export function SettingsStringsEditor(props: { + initialSettings: MutinyWalletSettingStrings; +}) { const i18n = useI18n(); - const [state, _actions] = useMegaStore(); const [settingsForm, { Form, Field }] = createForm({ - initialValues: state.settings + initialValues: props.initialSettings }); async function handleSubmit(values: MutinyWalletSettingStrings) { @@ -105,6 +108,20 @@ export function SettingsStringsEditor() { /> )} + + {(field, props) => ( + + )} +