diff --git a/src/components/SettingsInput.svelte b/src/components/SettingsInput.svelte
new file mode 100644
index 0000000..f95650b
--- /dev/null
+++ b/src/components/SettingsInput.svelte
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+ {#if suffix}
+ {suffix}
+ {/if}
+
+
+ {#if helpText}
+ {helpText}
+ {/if}
+
+
diff --git a/src/components/SettingsSelect.svelte b/src/components/SettingsSelect.svelte
new file mode 100644
index 0000000..ef34fec
--- /dev/null
+++ b/src/components/SettingsSelect.svelte
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ {#each options as [key, val]}
+
+ {/each}
+
+ {#if helpText}
+ {helpText}
+ {/if}
+
+
diff --git a/src/components/SettingsSwitch.svelte b/src/components/SettingsSwitch.svelte
new file mode 100644
index 0000000..27a3156
--- /dev/null
+++ b/src/components/SettingsSwitch.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/src/routes/Settings.svelte b/src/routes/Settings.svelte
index fe9591c..fe8a084 100644
--- a/src/routes/Settings.svelte
+++ b/src/routes/Settings.svelte
@@ -3,6 +3,7 @@
import { PUBLIC_BASE_URL } from '$lib/config';
import { uiSettings } from '$lib/uiSettings';
import { createEventDispatcher } from 'svelte';
+ import SettingsSwitch from '../components/SettingsSwitch.svelte';
import { _ } from 'svelte-i18n';
import {
@@ -13,12 +14,6 @@
CardTitle,
Col,
Form,
- FormText,
- Input,
- InputGroup,
- InputGroupText,
- Label,
- Tooltip,
Row
} from '@sveltestrap/sveltestrap';
@@ -27,6 +22,8 @@
import { derived } from 'svelte/store';
import ToggleHeader from '../components/ToggleHeader.svelte';
+ import SettingsInput from '../components/SettingsInput.svelte';
+ import SettingsSelect from '../components/SettingsSelect.svelte';
export let settings;
@@ -156,7 +153,7 @@
}
};
- const checkValidNostrPubkey = (key) => {
+ const checkValidNostrPubkey = (key: string) => {
if (isValidNpub($settings[key])) {
dispatch('showToast', {
color: 'info',
@@ -258,6 +255,7 @@
{$_('section.settings.title', { default: 'Settings' })}
+