diff --git a/README.md b/README.md index 4540bb0..f72ec96 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,4 @@ runner selfservice portal - copy the `/public/env.sample.js` file to `/public/env.js` - set the required environment variables - `documentserver_key`: url to the [document server](https://git.odit.services/lfk/document-server) instance - - `baseurl`: url to the main lfk instance - WITH TRAILING SLASH - - see [@lfk/deployment](https://git.odit.services/lfk/deployment) for a complete deployment guide - - `baseurl_selfservice`: location of the selfservice instance - WITH TRAILING SLASH - - e.g. path: `/selfservice/` - - e.g. url: `https://example.com/selfservice/` \ No newline at end of file + - `baseurl`: url to the main lfk instance - WITH TRAILING SLASH \ No newline at end of file diff --git a/public/env.sample.js b/public/env.sample.js index 142bf66..8fcafee 100644 --- a/public/env.sample.js +++ b/public/env.sample.js @@ -3,14 +3,12 @@ const config = { documentserver_key: '', // required, with trailing slash baseurl: '', - // optional, will fallback to /selfservice/ - baseurl_selfservice: '/selfservice/', // full url (including fqdn) baseurl_documentserver: 'http://localhost:4010/documents', // optional, will fallback to code128 code_format: 'ean13', - // optional, will fallback to baseurl_selfservice/imprint + // optional, will fallback to /imprint url_imprint: '', - // optional, will fallback to baseurl_selfservice/privacy + // optional, will fallback to /privacy url_privacy: '', }; diff --git a/src/components/EnvError.vue b/src/components/EnvError.vue deleted file mode 100644 index c326305..0000000 --- a/src/components/EnvError.vue +++ /dev/null @@ -1,29 +0,0 @@ - \ No newline at end of file diff --git a/src/components/Footer.vue b/src/components/Footer.vue index 6bc2ddb..c1dda06 100644 --- a/src/components/Footer.vue +++ b/src/components/Footer.vue @@ -19,8 +19,8 @@ export default { data() { return { - imprint_url: config.url_imprint || config.baseurl_selfservice + "imprint" - , privacy_url: config.url_privacy || config.baseurl_selfservice + "privacy" + imprint_url: config.url_imprint || "/imprint" + , privacy_url: config.url_privacy || "/privacy" } }, } diff --git a/src/routes.js b/src/routes.js index de5aaf7..f33b66b 100644 --- a/src/routes.js +++ b/src/routes.js @@ -1,24 +1,23 @@ -// import EnvError from './components/EnvError.vue'; -import Home from './views/Home.vue'; -import Imprint from './views/Imprint.vue'; -import Privacy from './views/Privacy.vue'; -import Register from './views/Register.vue'; -import Profile from './views/Profile.vue'; -import ProfileNone from './views/ProfileNone.vue'; +import Home from "./views/Home.vue"; +import Imprint from "./views/Imprint.vue"; +import Privacy from "./views/Privacy.vue"; +import Register from "./views/Register.vue"; +import Profile from "./views/Profile.vue"; +import ProfileNone from "./views/ProfileNone.vue"; console.log(config); /** @type {import('vue-router').RouterOptions['routes']} */ export const routes = [ - { path: config.baseurl_selfservice + '', component: Home }, - { path: config.baseurl_selfservice + 'imprint', component: Imprint }, - { path: config.baseurl_selfservice + 'imprint/', component: Imprint }, - { path: config.baseurl_selfservice + 'privacy', component: Privacy }, - { path: config.baseurl_selfservice + 'privacy/', component: Privacy }, - { path: config.baseurl_selfservice + 'register', component: Register }, - { path: config.baseurl_selfservice + 'register/', component: Register }, - { path: config.baseurl_selfservice + 'register/:token', component: Register, props: true }, - { path: config.baseurl_selfservice + 'profile', component: Profile }, - { path: config.baseurl_selfservice + 'profile/', component: ProfileNone }, - { path: config.baseurl_selfservice + 'profile/:token', component: Profile, props: true } + { path: "/", component: Home }, + { path: "/imprint", component: Imprint }, + { path: "/imprint/", component: Imprint }, + { path: "/privacy", component: Privacy }, + { path: "/privacy/", component: Privacy }, + { path: "/register", component: Register }, + { path: "/register/", component: Register }, + { path: "/register/:token", component: Register, props: true }, + { path: "/profile", component: Profile }, + { path: "/profile/", component: ProfileNone }, + { path: "/profile/:token", component: Profile, props: true }, ]; diff --git a/src/views/Home.vue b/src/views/Home.vue index 1edfa06..716d934 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -11,8 +11,8 @@ Selfservice Portal

{{ $t('main_page_text') }}

{{ $t('register_now') }} - {{ $t('register_now') }} + {{ $t('view_my_data') }} diff --git a/src/views/Profile.vue b/src/views/Profile.vue index f0a4ac2..b583445 100644 --- a/src/views/Profile.vue +++ b/src/views/Profile.vue @@ -576,7 +576,7 @@ function delete_me() { .then(() => { toast.clear(); toast(t('alle_daten_geloescht')); - location.replace(`${config.baseurl_selfservice}`); + location.replace(`/`); }) .catch((error) => { toast.clear(); diff --git a/src/views/ProfileNone.vue b/src/views/ProfileNone.vue index a2204f2..1bf716b 100644 --- a/src/views/ProfileNone.vue +++ b/src/views/ProfileNone.vue @@ -48,7 +48,7 @@
- {{ $t('register_now_small') }}