From 3a037a2646bbf49dbc177adb9de8339b0bb2b070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20Mint=C4=9Bl?= Date: Fri, 8 Nov 2024 20:55:10 +0100 Subject: [PATCH] Reformat --- frontend/src/components/Loader.vue | 82 +++---- frontend/src/components/Notifications.vue | 204 ++++++++++-------- frontend/src/components/SuspensionWrapper.vue | 18 +- frontend/src/utilities/notifications.ts | 6 +- frontend/src/utilities/utils.ts | 1 + 5 files changed, 171 insertions(+), 140 deletions(-) diff --git a/frontend/src/components/Loader.vue b/frontend/src/components/Loader.vue index 7992d4ce..f3d5acd0 100644 --- a/frontend/src/components/Loader.vue +++ b/frontend/src/components/Loader.vue @@ -7,62 +7,64 @@ const unit = 'px'; diff --git a/frontend/src/components/Notifications.vue b/frontend/src/components/Notifications.vue index f2001cda..95215502 100644 --- a/frontend/src/components/Notifications.vue +++ b/frontend/src/components/Notifications.vue @@ -1,120 +1,148 @@ diff --git a/frontend/src/components/SuspensionWrapper.vue b/frontend/src/components/SuspensionWrapper.vue index bf9d3f7c..60b6b406 100644 --- a/frontend/src/components/SuspensionWrapper.vue +++ b/frontend/src/components/SuspensionWrapper.vue @@ -2,17 +2,17 @@ import Loader from './Loader.vue'; defineProps<{ - childComponent: object; + childComponent: object; }>(); diff --git a/frontend/src/utilities/notifications.ts b/frontend/src/utilities/notifications.ts index 798a098e..98ba644b 100644 --- a/frontend/src/utilities/notifications.ts +++ b/frontend/src/utilities/notifications.ts @@ -1,4 +1,4 @@ -import { computed } from '@vue/reactivity'; +import { computed } from 'vue'; import { ref } from 'vue'; import { getDataWithCSRF } from './utils'; @@ -24,7 +24,7 @@ export type Notification = { target?: string; }; -export const notifications = (function() { +export const notifications = (function () { const notificationsRef = ref([]); const refresh = async () => { @@ -53,7 +53,7 @@ export const notifications = (function() { }; })(); -export const pushNotifications = (function() { +export const pushNotifications = (function () { const pushNotificationsStatus = ref({ supported: false, enabled: null diff --git a/frontend/src/utilities/utils.ts b/frontend/src/utilities/utils.ts index db7d70ae..f03e1636 100644 --- a/frontend/src/utilities/utils.ts +++ b/frontend/src/utilities/utils.ts @@ -82,6 +82,7 @@ const localStorageStores: Record> = {}; * * @param key Key of localStorage item * @param initialValue Initial value of item + * * @returns {@link Ref} to localStorage value */ export const localStorageStore = <$Type>(key: string, initialValue: $Type): Ref<$Type> => {