aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Settings
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Settings')
-rw-r--r--src/lib/Settings/Categories/Debug.svelte26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/lib/Settings/Categories/Debug.svelte b/src/lib/Settings/Categories/Debug.svelte
index 5f6be96b..c21b6dd7 100644
--- a/src/lib/Settings/Categories/Debug.svelte
+++ b/src/lib/Settings/Categories/Debug.svelte
@@ -1,16 +1,38 @@
<script lang="ts">
import settings from '$stores/settings';
+ import { getNotificationsContext } from 'svelte-notifications';
import SettingHint from '../SettingHint.svelte';
+ import { options } from '$lib/Notification/options';
+
+ const { addNotification } = getNotificationsContext();
</script>
-<button on:click={settings.reset}>Reset <b>ALL</b> settings</button>
+<button
+ on:click={() => {
+ settings.reset();
+ addNotification(
+ options({
+ heading: 'All settings successfully reset'
+ })
+ );
+ }}>Reset <b>ALL</b> settings</button
+>
<SettingHint lineBreak>
Resets all settings present on this page to their default values
</SettingHint>
<p />
-<button on:click={() => localStorage.clear()}>Clear <code>localStorage</code></button>
+<button
+ on:click={() => {
+ localStorage.clear();
+ addNotification(
+ options({
+ heading: '<code>localStorage</code> successfully cleared'
+ })
+ );
+ }}>Clear <code>localStorage</code></button
+>
<SettingHint lineBreak>
Resets all of your settings to their default values and clears both AniList media list and manga
data caches