File size: 1,184 Bytes
de4b571 11fcc5a de4b571 11fcc5a de4b571 11fcc5a de4b571 11fcc5a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
<script lang="ts">
import { t } from "$lib/i18n/translations";
import { createDialog } from "$lib/state/dialogs";
import { resetSettings } from "$lib/state/settings";
import IconRestore from "@tabler/icons-svelte/IconRestore.svelte";
import DataSettingsButton from "$components/settings/DataSettingsButton.svelte";
const resetDialog = () => {
createDialog({
id: "wipe-confirm",
type: "small",
icon: "warn-red",
title: $t("dialog.reset_settings.title"),
bodyText: $t("dialog.reset_settings.body"),
buttons: [
{
text: $t("button.cancel"),
main: false,
action: () => {},
},
{
text: $t("button.reset"),
color: "red",
main: true,
timeout: 2000,
action: () => resetSettings(),
},
],
});
};
</script>
<DataSettingsButton id="reset-settings" click={resetDialog} danger>
<IconRestore />
{$t("button.reset")}
</DataSettingsButton>
|