From 5009ea00023d6bf6e84b31fef63badccb87ce324 Mon Sep 17 00:00:00 2001 From: Julian Leucker <leuckerj@gmail.com> Date: Sat, 14 Jan 2023 21:47:25 +0100 Subject: [PATCH] Run linter/reformatter --- aleksis/core/assets/app/apollo.js | 1 - .../components/person/AdditionalImage.vue | 9 +---- aleksis/core/assets/index.js | 2 +- aleksis/core/assets/mixins/menus.js | 2 +- aleksis/core/assets/mixins/offline.js | 4 +-- aleksis/core/assets/plugins/aleksis.js | 36 +++++++++++++------ aleksis/core/assets/routeValidators.js | 2 +- aleksis/core/assets/routes.js | 2 +- aleksis/core/vite.config.js | 8 +++-- 9 files changed, 38 insertions(+), 28 deletions(-) diff --git a/aleksis/core/assets/app/apollo.js b/aleksis/core/assets/app/apollo.js index 5d0860f7c..84c47c6bb 100644 --- a/aleksis/core/assets/app/apollo.js +++ b/aleksis/core/assets/app/apollo.js @@ -99,7 +99,6 @@ const links = [ }), ]; - /** Upstream Apollo GraphQL client */ const apolloClient = new ApolloClient({ typeDefs, diff --git a/aleksis/core/assets/components/person/AdditionalImage.vue b/aleksis/core/assets/components/person/AdditionalImage.vue index 943c8a198..f48370580 100644 --- a/aleksis/core/assets/components/person/AdditionalImage.vue +++ b/aleksis/core/assets/components/person/AdditionalImage.vue @@ -13,14 +13,7 @@ </v-card> </template> <v-sheet - class=" - d-flex - justify-center - align-center - flex-column - text-center - transparent - " + class="d-flex justify-center align-center flex-column text-center transparent" > <v-img :src="src" diff --git a/aleksis/core/assets/index.js b/aleksis/core/assets/index.js index d681aca2f..459978ed1 100644 --- a/aleksis/core/assets/index.js +++ b/aleksis/core/assets/index.js @@ -1,6 +1,6 @@ /* * Main entrypoint of AlekSIS0-ore. - * + * * This script sets up all necessary Vue plugins and defines the Vue app. */ diff --git a/aleksis/core/assets/mixins/menus.js b/aleksis/core/assets/mixins/menus.js index a7bace279..8afed7f42 100644 --- a/aleksis/core/assets/mixins/menus.js +++ b/aleksis/core/assets/mixins/menus.js @@ -2,7 +2,7 @@ import gqlCustomMenu from "../components/app/customMenu.graphql"; /** * Vue mixin containing menu generation code. - * + * * Only used by main App component, but factored out for readability. */ const menusMixin = { diff --git a/aleksis/core/assets/mixins/offline.js b/aleksis/core/assets/mixins/offline.js index 40b10b3b4..7bdd551a3 100644 --- a/aleksis/core/assets/mixins/offline.js +++ b/aleksis/core/assets/mixins/offline.js @@ -2,12 +2,12 @@ import gqlPing from "../components/app/ping.graphql"; /** * Mixin for handling of offline state / background queries. - * + * * This handles three scenarios: * - The navigator reports that it is in offline mode * - The global offline flag was set due to network errors from queries * - The navigator reports the page to be invisible - * + * * The main goal is to save bandwidth, energy and server load in error * conditions, or when the page is not in focus. This is achieved by a * fallback strategy, where all background queries are stopped in offline diff --git a/aleksis/core/assets/plugins/aleksis.js b/aleksis/core/assets/plugins/aleksis.js index c12bf8b76..0273a5f74 100644 --- a/aleksis/core/assets/plugins/aleksis.js +++ b/aleksis/core/assets/plugins/aleksis.js @@ -11,14 +11,14 @@ const AleksisVue = {}; AleksisVue.install = function (Vue, options) { /** * The browser title when the app was loaded. - * + * * Thus, it is injected from Django in the vue_index template. */ Vue.$pageBaseTitle = document.title; /** * Configure Sentry if desired. - * + * * It depends on Sentry settings being passed as a DOM object by Django * in the vue_index template. */ @@ -49,20 +49,34 @@ AleksisVue.install = function (Vue, options) { * Register all global components that shall be reusable by apps. */ Vue.$registerGlobalComponents = function () { - Vue.component("message-box", () => import("../components/generic/MessageBox.vue")); - Vue.component("small-container", () => import("../components/generic/BackButton.vue")); - Vue.component("back-button", () => import("../components/generic/BackButton.vue")); - Vue.component("avatar-clickbox", () => import("../components/generic/AvatarClickbox.vue")); - Vue.component("detail-view", () => import("../components/generic/DetailView.vue")); - Vue.component("list-view", () => import("../components/generic/ListView.vue")); - Vue.component("button-menu", () => import("../components/generic/ButtonMenu.vue")); + Vue.component("message-box", () => + import("../components/generic/MessageBox.vue") + ); + Vue.component("small-container", () => + import("../components/generic/BackButton.vue") + ); + Vue.component("back-button", () => + import("../components/generic/BackButton.vue") + ); + Vue.component("avatar-clickbox", () => + import("../components/generic/AvatarClickbox.vue") + ); + Vue.component("detail-view", () => + import("../components/generic/DetailView.vue") + ); + Vue.component("list-view", () => + import("../components/generic/ListView.vue") + ); + Vue.component("button-menu", () => + import("../components/generic/ButtonMenu.vue") + ); }; /** * Set the page title. - * + * * This will automatically add the base title discovered at app loading time. - * + * * @param {string} title Specific title to set, or null. * @param {Object} route Route to discover title from, or null. */ diff --git a/aleksis/core/assets/routeValidators.js b/aleksis/core/assets/routeValidators.js index af9a2ad41..1df949d03 100644 --- a/aleksis/core/assets/routeValidators.js +++ b/aleksis/core/assets/routeValidators.js @@ -1,6 +1,6 @@ /** * Check whether the user is logged in on the AlekSIS server. - * + * * @param {Object} whoAmI The person object as returned by the whoAmI query * @returns true if the user is logged in, false if not */ diff --git a/aleksis/core/assets/routes.js b/aleksis/core/assets/routes.js index 064e913cc..a2e1a07b0 100644 --- a/aleksis/core/assets/routes.js +++ b/aleksis/core/assets/routes.js @@ -1,6 +1,6 @@ /* * Vue router definitions for all of AlekSIS. - * + * * This module defines the routes of AlekSIS-Core and also loads * and adds all routes from known apps. */ diff --git a/aleksis/core/vite.config.js b/aleksis/core/vite.config.js index 3f1865212..7954a54fb 100644 --- a/aleksis/core/vite.config.js +++ b/aleksis/core/vite.config.js @@ -147,7 +147,9 @@ export default defineConfig({ base: "/", workbox: { navigateFallback: "/", - navigateFallbackAllowlist: [new RegExp("^/(?!(django|admin|graphql|__icons__))[^.]*$")], + navigateFallbackAllowlist: [ + new RegExp("^/(?!(django|admin|graphql|__icons__))[^.]*$"), + ], additionalManifestEntries: ["/", "/django/offline/"], inlineWorkboxRuntime: true, modifyURLPrefix: { @@ -156,7 +158,9 @@ export default defineConfig({ globPatterns: ["**/*.{js,css,eot,woff,woff2,ttf}"], runtimeCaching: [ { - urlPattern: new RegExp("^/(?!(django|admin|graphql|__icons__))[^.]*$"), + urlPattern: new RegExp( + "^/(?!(django|admin|graphql|__icons__))[^.]*$" + ), handler: "CacheFirst", }, { -- GitLab