Skip to content
Snippets Groups Projects
Commit 5009ea00 authored by Julian's avatar Julian
Browse files

Run linter/reformatter

parent b7219f7e
No related branches found
No related tags found
1 merge request!1123Resolve "Finalise Vuetify app as SPA"
......@@ -99,7 +99,6 @@ const links = [
}),
];
/** Upstream Apollo GraphQL client */
const apolloClient = new ApolloClient({
typeDefs,
......
......@@ -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"
......
/*
* Main entrypoint of AlekSIS0-ore.
*
*
* This script sets up all necessary Vue plugins and defines the Vue app.
*/
......
......@@ -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 = {
......
......@@ -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
......
......@@ -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.
*/
......
/**
* 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
*/
......
/*
* 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.
*/
......
......@@ -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",
},
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment