Skip to content

Commit 59a467e

Browse files
authored
Merge pull request #225 from openscript-ch/221-configure-as-pwa
221 configure as pwa
2 parents cc0e44b + e1253c1 commit 59a467e

File tree

18 files changed

+785
-79
lines changed

18 files changed

+785
-79
lines changed

.changeset/sixty-berries-sort.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@quassel/frontend": patch
3+
"@quassel/ui": patch
4+
---
5+
6+
Add favicons and manifest to frontend

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ RUN apt update
44
RUN apt install -y postgresql-common
55
RUN YES=yes /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
66
RUN apt install -y postgresql-client-17
7-
RUN su node -c "npm install -g pnpm@9.15.0"
7+
RUN su node -c "npm install -g pnpm@9.15.2"

apps/frontend/index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<head>
55
<meta charset="UTF-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Lemon</title>
8-
<link rel="icon" href="/favicon.ico" />
7+
<title>LEMON</title>
98
<style>
109
html {
1110
height: 100%;
@@ -33,4 +32,4 @@
3332
<script type="module" src="/src/main.tsx"></script>
3433
</body>
3534

36-
</html>
35+
</html>

apps/frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"react-dom": "^18.3.1"
3434
},
3535
"devDependencies": {
36+
"@anolilab/unplugin-favicons": "^1.0.5",
3637
"@tanstack/router-devtools": "^1.92.11",
3738
"@tanstack/router-plugin": "^1.92.11",
3839
"@testing-library/jest-dom": "^6.6.3",
@@ -41,6 +42,7 @@
4142
"@types/react-dom": "^18.3.5",
4243
"@vitejs/plugin-react": "^4.3.4",
4344
"@vitest/coverage-v8": "2.1.8",
45+
"favicons": "^7.2.0",
4446
"jsdom": "^25.0.1",
4547
"openapi-typescript": "^7.4.4",
4648
"openapi-typescript-helpers": "^0.0.15",
-588 Bytes
Binary file not shown.
-745 Bytes
Binary file not shown.

apps/frontend/public/favicon.ico

25.3 KB
Binary file not shown.

apps/frontend/src/vite-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/// <reference types="vite/client" />
2+
/// <reference types="vite-plugin-pwa/pwa-assets" />

apps/frontend/vite.config.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from "vite";
22
import react from "@vitejs/plugin-react";
33
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
4+
import unpluginFavicons from "@anolilab/unplugin-favicons/vite";
45

56
// https://vitejs.dev/config/
67
export default defineConfig({
@@ -11,5 +12,25 @@ export default defineConfig({
1112
chunkSizeWarningLimit: 1000,
1213
},
1314
clearScreen: false,
14-
plugins: [react(), TanStackRouterVite({ quoteStyle: "double", semicolons: true })],
15+
plugins: [
16+
react(),
17+
TanStackRouterVite({ quoteStyle: "double", semicolons: true }),
18+
unpluginFavicons({
19+
logo: "../../libs/ui/src/assets/logo.svg",
20+
inject: true,
21+
appName: "LEMON",
22+
appShortName: "LEMON",
23+
favicons: {
24+
theme_color: "#FFC845",
25+
icons: {
26+
android: true,
27+
appleIcon: true,
28+
favicons: true,
29+
windows: true,
30+
yandex: true,
31+
appleStartup: false,
32+
},
33+
},
34+
}),
35+
],
1536
});

libs/ui/src/assets/Logo.svg

Lines changed: 0 additions & 12 deletions
This file was deleted.

libs/ui/src/assets/favicon.ico

722 Bytes
Binary file not shown.

libs/ui/src/assets/logo.svg

Lines changed: 38 additions & 0 deletions
Loading
File renamed without changes.

libs/ui/src/components/Brand.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Group, Stack, Title } from "@mantine/core";
2-
import Logo from "../assets/Logo.svg?react";
2+
import Logo from "../assets/logo.svg?react";
33

44
export function Brand() {
55
return (

libs/ui/src/components/FooterLogos.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Group } from "@mantine/core";
2-
import UZHLogo from "../assets/UZHLogo.svg?react";
3-
import KleineWeltentdeckerLogo from "../assets/KleineWeltentdeckerLogo.png";
2+
import UZHLogo from "../assets/uzh-logo.svg?react";
3+
import WeltentdeckerLogo from "../assets/weltentdecker-logo.png";
44

55
export function FooterLogos() {
66
return (
@@ -9,7 +9,7 @@ export function FooterLogos() {
99
<UZHLogo />
1010
</a>
1111
<a href="https://www.psychologie.uzh.ch/de/bereiche/dev/devpsy/Weltentdecker.html">
12-
<img src={KleineWeltentdeckerLogo} height={50} />
12+
<img src={WeltentdeckerLogo} height={50} />
1313
</a>
1414
</Group>
1515
);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"engines": {
3737
"node": ">=20.0.0"
3838
},
39-
"packageManager": "pnpm@9.15.0",
39+
"packageManager": "pnpm@9.15.2",
4040
"pnpm": {
4141
"overrides": {
4242
"sodium-native": "4.2.0"

0 commit comments

Comments
 (0)