diff --git a/web/i18n/en/dialog.json b/web/i18n/en/dialog.json new file mode 100644 index 00000000..96a552ec --- /dev/null +++ b/web/i18n/en/dialog.json @@ -0,0 +1,8 @@ +{ + "button.gotit": "got it", + "button.cancel": "cancel", + "button.erase": "erase", + + "erase.title": "erase all settings?", + "erase.body": "are you sure you want to reset all settings? this action is immediate and irreversible." +} diff --git a/web/i18n/en/general.json b/web/i18n/en/general.json index 5a371ff8..6ea5e8a0 100644 --- a/web/i18n/en/general.json +++ b/web/i18n/en/general.json @@ -1,4 +1,3 @@ { - "cobalt": "cobalt", - "gotit": "got it" + "cobalt": "cobalt" } diff --git a/web/i18n/en/settings.json b/web/i18n/en/settings.json index 4df36dc5..0d20cc15 100644 --- a/web/i18n/en/settings.json +++ b/web/i18n/en/settings.json @@ -93,5 +93,7 @@ "advanced.debug": "debug", "advanced.debug.title": "enable debug features", "advanced.debug.description": "gives you access to a page with app & device info useful for debugging.", + + "advanced.data": "settings data", "advanced.reset": "erase all settings" } diff --git a/web/src/components/buttons/ResetSettingsButton.svelte b/web/src/components/buttons/ResetSettingsButton.svelte index 85a2139d..0434c84d 100644 --- a/web/src/components/buttons/ResetSettingsButton.svelte +++ b/web/src/components/buttons/ResetSettingsButton.svelte @@ -1,22 +1,55 @@ - diff --git a/web/src/components/dialog/DialogHolder.svelte b/web/src/components/dialog/DialogHolder.svelte index 7d6ef1dd..1f306c6b 100644 --- a/web/src/components/dialog/DialogHolder.svelte +++ b/web/src/components/dialog/DialogHolder.svelte @@ -12,6 +12,7 @@ id={dialog.id} title={dialog.title} meowbalt={dialog.meowbalt} + icon={dialog.icon} bodyText={dialog.bodyText} bodySubText={dialog.bodySubText} buttons={dialog.buttons} diff --git a/web/src/components/dialog/SmallDialog.svelte b/web/src/components/dialog/SmallDialog.svelte index 3820c88e..4aa12b72 100644 --- a/web/src/components/dialog/SmallDialog.svelte +++ b/web/src/components/dialog/SmallDialog.svelte @@ -2,13 +2,16 @@ import { tick } from "svelte"; import { killDialog } from "$lib/dialogs"; - import type { DialogButton } from "$lib/types/dialog"; + import type { DialogButton, SmallDialogIcons } from "$lib/types/dialog"; import Meowbalt from "$components/misc/Meowbalt.svelte"; import type { MeowbaltEmotions } from "$lib/types/meowbalt"; + import IconAlertTriangle from "@tabler/icons-svelte/IconAlertTriangle.svelte"; + export let id: string; - export let meowbalt: MeowbaltEmotions; + export let meowbalt: MeowbaltEmotions | undefined; + export let icon: SmallDialogIcons | undefined; export let title: string = ""; export let bodyText: string = ""; export let bodySubText: string = ""; @@ -45,12 +48,19 @@ {/if} - {#if title} - - {/if}