diff --git a/pages/admin/settings.vue b/pages/admin/settings.vue index 8014c6b3..1fc98a5c 100644 --- a/pages/admin/settings.vue +++ b/pages/admin/settings.vue @@ -20,24 +20,9 @@ -
- -
@@ -55,13 +40,7 @@ const tabs = [ const rest = useRestApi(); -const updatingSettings: Ref = ref(false); const settings: Ref = ref(null); -const settingsChanges: Ref = ref(null); - -watch([settings], () => { - clearChanges(); -}); onMounted(() => { getAdminSettings(); @@ -74,30 +53,6 @@ function getAdminSettings () { }); } -function saveSettings () { - updatingSettings.value = true; - - rest.value.settings.updateSettings(settingsChanges.value) - .then((v) => { - settings.value = v; - - updatingSettings.value = false; - - getSettings(); - }) - .catch(() => { - updatingSettings.value = false; - }); -} - -function clearChanges () { - // This is how you clone without references in JS... - settingsChanges.value = JSON.parse(JSON.stringify(settings.value)); -} - -function madeChanges (): boolean { - return JSON.stringify(settingsChanges.value) !== JSON.stringify(settings.value); -}