diff --git a/demos/devkit-simple-tutorial/index.html b/demos/devkit-simple-tutorial/index.html index 03773113..c25b5efa 100644 --- a/demos/devkit-simple-tutorial/index.html +++ b/demos/devkit-simple-tutorial/index.html @@ -8,7 +8,7 @@ /> - + - tutorial - Prizes - Privacy - Prizes + Privacy + Back Office - Home - Prizes - Privacy - Back Office + Home + Prizes + Privacy + Back Office
diff --git a/demos/devkit-simple-tutorial/src/views/BackOffice.js b/demos/devkit-simple-tutorial/src/views/BackOffice.js index 81e22728..5b92b2b9 100644 --- a/demos/devkit-simple-tutorial/src/views/BackOffice.js +++ b/demos/devkit-simple-tutorial/src/views/BackOffice.js @@ -7,7 +7,15 @@ export class AppBackOffice extends LitElement { } showDCI() { - Router.go('/admin'); + // Vaadin Router doesn't handle baseUrl propertly here + // TODO: report issue to Vaadin + // alternatively, we could use a popstate event + const baseURL = document.querySelector('base')?.href || '/'; + const routed = Router.go(`${baseURL}admin`); + if (!routed) { + // eslint-disable-next-line no-console + console.error('admin route not found'); + } } render() { diff --git a/demos/devkit-simple-tutorial/src/views/DCI.js b/demos/devkit-simple-tutorial/src/views/DCI.js index 62c0c35d..18f5328c 100644 --- a/demos/devkit-simple-tutorial/src/views/DCI.js +++ b/demos/devkit-simple-tutorial/src/views/DCI.js @@ -7,11 +7,7 @@ export class AppDCI extends LitElement { } render() { - return html` -

Admin

- - - `; + return html` `; } } diff --git a/demos/devkit-simple-tutorial/src/views/Home.js b/demos/devkit-simple-tutorial/src/views/Home.js index 61febabf..a2e77be9 100644 --- a/demos/devkit-simple-tutorial/src/views/Home.js +++ b/demos/devkit-simple-tutorial/src/views/Home.js @@ -47,7 +47,7 @@ export class AppHome extends LitElement { for details and instructions.

-

🚀 Make a privacy request.

+

🚀 Make a privacy request.

`; } } diff --git a/demos/devkit-simple-tutorial/web-dev-server.config.mjs b/demos/devkit-simple-tutorial/web-dev-server.config.mjs index 0274065a..5d1cbe17 100644 --- a/demos/devkit-simple-tutorial/web-dev-server.config.mjs +++ b/demos/devkit-simple-tutorial/web-dev-server.config.mjs @@ -23,4 +23,7 @@ export default /** @type {import('@web/dev-server').DevServerConfig} */ ({ ], // See documentation for all available options + // https://modern-web.dev/docs/dev-server/cli-and-configuration/ + + basePath: '/privacy-components-web/demos/devkit-simple-tutorial/', });