From ec96b32bbe2fa9335b9cafb28031039f983248cc Mon Sep 17 00:00:00 2001 From: Joep Date: Sat, 9 Sep 2023 13:10:18 +0200 Subject: [PATCH] Converted views/Settings.vue to composition api --- frontend/src/views/Settings.vue | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/frontend/src/views/Settings.vue b/frontend/src/views/Settings.vue index 5f093065..a0e756f2 100644 --- a/frontend/src/views/Settings.vue +++ b/frontend/src/views/Settings.vue @@ -10,17 +10,17 @@ {{ $t("settings.profileSettings") }} -
  • {{ $t("settings.shareManagement") }}
  • -
  • {{ $t("settings.globalSettings") }}
  • -
  • import { useAuthStore } from "@/stores/auth"; import { useLayoutStore } from "@/stores/layout"; import HeaderBar from "@/components/header/HeaderBar.vue"; +import { computed } from "vue"; + +const authStore = useAuthStore(); +const layoutStore = useLayoutStore(); + +const user = computed(() => authStore.user) +const loading = computed(() => layoutStore.loading) + -export default { - name: "settings", - components: { - HeaderBar, - }, - computed: { - ...mapState(useAuthStore, ["user"]), - ...mapState(useLayoutStore, ["loading"]), - }, -};