-
+
{{ $t("additionalModules.subTitle") }}
-
+
-declare module 'ical.js';
\ No newline at end of file
+declare module "ical.js";
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json
index b8f3de3..51d8f95 100644
--- a/frontend/tsconfig.json
+++ b/frontend/tsconfig.json
@@ -21,7 +21,7 @@
"allowSyntheticDefaultImports": true,
"paths": {
"@/*": ["./src/*"]
- },
+ }
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index ec8f975..c5a5658 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -17,63 +17,90 @@
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { fileURLToPath } from "node:url";
-import { VitePWA } from 'vite-plugin-pwa';
-import basicSsl from '@vitejs/plugin-basic-ssl'
+import { VitePWA } from "vite-plugin-pwa";
+import basicSsl from "@vitejs/plugin-basic-ssl";
export default defineConfig({
plugins: [
vue(),
basicSsl(),
VitePWA({
- mode: 'development',
- base: '/',
- injectRegister: 'auto',
- includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'mask-icon.svg'],
+ mode: "development",
+ base: "/",
+ injectRegister: "auto",
+ includeAssets: ["favicon.ico", "apple-touch-icon.png", "mask-icon.svg"],
manifest: {
- name: 'HTWKalender',
- short_name: 'HTWKalender',
- description: 'Calendar implementation for the HTWK Leipzig timetable. Evaluation and display of the individual dates in iCal format.',
- theme_color: '#FFFFFF',
- background_color: '#FFFFFF',
- display: 'standalone',
- start_url: '/',
+ name: "HTWKalender",
+ short_name: "HTWKalender",
+ description:
+ "Calendar implementation for the HTWK Leipzig timetable. Evaluation and display of the individual dates in iCal format.",
+ theme_color: "#FFFFFF",
+ background_color: "#FFFFFF",
+ display: "standalone",
+ start_url: "/",
+ id: "de.htwk-leipzig.htwkalender",
+ screenshots: [
+ {
+ src: "/1280x720.png",
+ sizes: "1280x720",
+ form_factor: "wide",
+ type: "image/png",
+ },
+ {
+ src: "/390x844.png",
+ sizes: "1170x2532",
+ form_factor: "narrow",
+ type: "image/png",
+ },
+ ],
icons: [
{
src: "/pwa-192x192.png",
sizes: "192x192",
type: "image/png",
- purpose: "any"
+ purpose: "any",
},
{
src: "/pwa-512x512.png",
sizes: "512x512",
type: "image/png",
- purpose: "any"
+ purpose: "any",
},
{
src: "/pwa-maskable-192x192.png",
sizes: "192x192",
type: "image/png",
- purpose: "maskable"
+ purpose: "maskable",
},
{
src: "/pwa-maskable-512x512.png",
sizes: "512x512",
type: "image/png",
- purpose: "maskable"
- }
+ purpose: "maskable",
+ },
],
},
- registerType: 'autoUpdate',
+ registerType: "autoUpdate",
workbox: {
- globPatterns: ['**/*.{js,css,html,ico,png,svg,json,vue,txt,woff2}'],
+ globPatterns: ["**/*.{js,css,html,ico,png,svg,json,vue,txt,woff2}"],
cleanupOutdatedCaches: true,
runtimeCaching: [
{
- urlPattern: /^https?.*/,
+ urlPattern: ({ url }) => url.pathname.startsWith('/api/feed'),
+ method: 'GET',
handler: 'NetworkFirst',
options: {
- cacheName: 'https-calls',
+ cacheName: 'calendar-feed-cache',
+ expiration: {
+ maxAgeSeconds: 12 * 60 * 60, // 12 hours
+ },
+ },
+ },
+ {
+ urlPattern: /^https?.*/,
+ handler: "NetworkFirst",
+ options: {
+ cacheName: "https-calls",
expiration: {
maxEntries: 150,
maxAgeSeconds: 30 * 12 * 60 * 60, // 1 month
@@ -86,11 +113,12 @@ export default defineConfig({
devOptions: {
enabled: true,
/* when using generateSW the PWA plugin will switch to classic */
- type: 'module',
- navigateFallback: 'index.html',
+ type: "module",
+ navigateFallback: "index.html",
suppressWarnings: true,
- }
- })],
+ },
+ }),
+ ],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
@@ -112,14 +140,14 @@ export default defineConfig({
},
esbuild: {
supported: {
- 'top-level-await': true
+ "top-level-await": true,
},
},
optimizeDeps: {
esbuildOptions: {
supported: {
- 'top-level-await': true
- }
+ "top-level-await": true,
+ },
},
},
});
diff --git a/frontend/vitest.config.ts b/frontend/vitest.config.ts
index 5f06fdd..8365fb5 100644
--- a/frontend/vitest.config.ts
+++ b/frontend/vitest.config.ts
@@ -1,11 +1,14 @@
// vitest.config.ts
-import {mergeConfig} from 'vite'
-import {defineConfig} from 'vitest/config'
-import viteConfig from './vite.config'
+import { mergeConfig } from "vite";
+import { defineConfig } from "vitest/config";
+import viteConfig from "./vite.config";
-export default mergeConfig(viteConfig, defineConfig({
- test: {
- globals: true,
- globalSetup: './vitest.global-setup.ts',
- },
-}))
\ No newline at end of file
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ globals: true,
+ globalSetup: "./vitest.global-setup.ts",
+ },
+ }),
+);
diff --git a/frontend/vitest.global-setup.ts b/frontend/vitest.global-setup.ts
index f7ffa41..89d5cfe 100644
--- a/frontend/vitest.global-setup.ts
+++ b/frontend/vitest.global-setup.ts
@@ -1,3 +1,3 @@
export const setup = () => {
- process.env.TZ = 'UTC'
-}
\ No newline at end of file
+ process.env.TZ = "UTC";
+};