diff --git a/package-lock.json b/package-lock.json index 242d89e..43cb1c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@fullcalendar/timegrid": "^6.1.15", "@types/chart.js": "^2.9.41", "chart.js": "^4.4.4", + "ios-pwa-splash": "^1.0.0", "svelte-portal": "^2.2.1", "vanilla-cookieconsent": "^3.0.1" }, @@ -3018,6 +3019,12 @@ "dev": true, "license": "ISC" }, + "node_modules/ios-pwa-splash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ios-pwa-splash/-/ios-pwa-splash-1.0.0.tgz", + "integrity": "sha512-3T2D1G88RvSU9MpdUHeh3MaQ7AW9r280CyBgKzt96x7bd7/dPpDdDeYmuF4I35OTsWVNHweQkBwN9q07+/rQjQ==", + "license": "MIT" + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", diff --git a/package.json b/package.json index 1ca118e..5f9188f 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "@fullcalendar/timegrid": "^6.1.15", "@types/chart.js": "^2.9.41", "chart.js": "^4.4.4", + "ios-pwa-splash": "^1.0.0", "svelte-portal": "^2.2.1", "vanilla-cookieconsent": "^3.0.1" } diff --git a/src/app.d.ts b/src/app.d.ts index bd4b357..8ddab6d 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -10,3 +10,4 @@ declare namespace App { declare module '@event-calendar/core'; declare module '@event-calendar/time-grid'; +declare module 'ios-pwa-splash'; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 527e812..49b9c22 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -31,9 +31,15 @@ const drawerStore = getDrawerStore(); import { load_cc } from '$lib/cc'; - import { browser } from '$app/environment'; load_cc(); + import { browser } from '$app/environment'; + import iosPWASplash from 'ios-pwa-splash'; + + if (browser) { + iosPWASplash('/splash-icon.png', '#e0e0e0'); + } + const popupRechtliches: PopupSettings = { // Represents the type of event that opens/closed the popup event: 'click', diff --git a/static/site.webmanifest b/static/site.webmanifest index 9591150..225f962 100644 --- a/static/site.webmanifest +++ b/static/site.webmanifest @@ -1,6 +1,7 @@ { - "name": "", - "short_name": "", + "name": "CampusUnbloat", + "short_name": "CampusUnbloat", + "start_url": "/dashboard", "icons": [ { "src": "/android-chrome-192x192.png", @@ -13,7 +14,7 @@ "type": "image/png" } ], - "theme_color": "#ffffff", - "background_color": "#ffffff", + "theme_color": "#161616", + "background_color": "#161616", "display": "standalone" } diff --git a/static/splash-icon.png b/static/splash-icon.png new file mode 100644 index 0000000..c0892f2 Binary files /dev/null and b/static/splash-icon.png differ