From 19b51fbf1dc9b5b1d19779cbff741f05b395e4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Sch=C3=A4fer?= Date: Mon, 26 Aug 2024 15:27:54 +0200 Subject: [PATCH] Use relative paths, so the site can be published at a URL that is not the domain root --- web/index.html | 8 ++++---- web/src/sipgator-app.ts | 4 ++-- web/src/sipgator-light-dark-switch.ts | 2 +- web/src/sipgator-logged-out-message.ts | 2 +- web/src/sipgator-login.ts | 2 +- web/src/sipgator-page.ts | 2 +- web/vite.config.ts | 7 +++++-- 7 files changed, 15 insertions(+), 12 deletions(-) diff --git a/web/index.html b/web/index.html index 6c54645..1bd3b30 100644 --- a/web/index.html +++ b/web/index.html @@ -1,8 +1,9 @@ + - - + + Sipgator - - + diff --git a/web/src/sipgator-app.ts b/web/src/sipgator-app.ts index 0d2c66c..e1ad32f 100644 --- a/web/src/sipgator-app.ts +++ b/web/src/sipgator-app.ts @@ -29,7 +29,7 @@ export class SipgatorApp extends LitElement { return html` - +
${ this.componentForPath(this.path) }
diff --git a/web/src/sipgator-light-dark-switch.ts b/web/src/sipgator-light-dark-switch.ts index 5773e16..50949f9 100644 --- a/web/src/sipgator-light-dark-switch.ts +++ b/web/src/sipgator-light-dark-switch.ts @@ -36,7 +36,7 @@ export class SipgatorLightDarkSwitch extends LitElement { light_mode - + ` } } diff --git a/web/src/sipgator-logged-out-message.ts b/web/src/sipgator-logged-out-message.ts index ca9ce8f..2794d00 100644 --- a/web/src/sipgator-logged-out-message.ts +++ b/web/src/sipgator-logged-out-message.ts @@ -54,6 +54,6 @@ export class SipgatorLoggedOutMessage extends LitElement {

- ` + ` } } diff --git a/web/src/sipgator-login.ts b/web/src/sipgator-login.ts index ccc6af4..d7dd0a1 100644 --- a/web/src/sipgator-login.ts +++ b/web/src/sipgator-login.ts @@ -80,7 +80,7 @@ export class SipgatorLogin extends LitElement { - + `; } diff --git a/web/src/sipgator-page.ts b/web/src/sipgator-page.ts index b979709..e670cce 100644 --- a/web/src/sipgator-page.ts +++ b/web/src/sipgator-page.ts @@ -51,7 +51,7 @@ export abstract class SipgatorPage extends LitElement { return html`

${ this.icon }${ this.label }

${ when(this.credential, () => this.credential ? renderWithCredentials(this.credential) : fallback, () => fallback) } - + ` } } diff --git a/web/vite.config.ts b/web/vite.config.ts index ee6f57f..efe4ffd 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -1,6 +1,9 @@ import { viteStaticCopy } from "vite-plugin-static-copy" import compression from "vite-plugin-compression2" -export default { +import { defineConfig } from "vite" + +export default defineConfig({ + base: "", plugins: [ viteStaticCopy({ targets: [ @@ -25,4 +28,4 @@ export default { algorithm: "brotliCompress", exclude: [/\.br$/, /\.gz$/] }) ] -} +})