diff --git a/README.md b/README.md index 5eda5c2..773bb9c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ runner selfservice portal ## ⚡ Development ### Requirements -- Node.js v14.15.0 or newer +- Node.js v14.16.0 or newer - yarn package manager >= v1.22.10 < 2 ### Recommended Extensions @@ -14,9 +14,17 @@ runner selfservice portal ### Fastest Dev Environment - You can install the [Remote - Containers](https://github.com/Microsoft/vscode-remote-release) extension and use all recommended extensions and editor settings via the provided `./devcontainer/` config -## 🔨 environment config +### Manual Dev Environment +``` +yarn && yarn dev --open +``` + +## 🔨 Environment config - 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 instance - - see [@lfk/deployment](https://git.odit.services/lfk/deployment) for a complete deployment guide \ No newline at end of file + - `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 diff --git a/index.html b/index.html index 2e151b8..955cb15 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@
- + \ No newline at end of file diff --git a/public/env.sample.js b/public/env.sample.js index 1b7072a..c6c0e42 100644 --- a/public/env.sample.js +++ b/public/env.sample.js @@ -1,10 +1,10 @@ const config = { // required documentserver_key: '', - // required + // required, with trailing slash baseurl: '', - // optional, will fallback to /selfservice - baseurl_selfservice: '/selfservice', + // optional, will fallback to /selfservice/ + baseurl_selfservice: '/selfservice/', // optional, will fallback to /imprint url_imprint: '', // optional, will fallback to /privacy diff --git a/src/App.vue b/src/App.vue index cc5bdf4..fd7338c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,8 +2,4 @@
- - - \ No newline at end of file + \ No newline at end of file diff --git a/src/routes.js b/src/routes.js index 815464f..de5aaf7 100644 --- a/src/routes.js +++ b/src/routes.js @@ -1,16 +1,24 @@ -import EnvError from './components/EnvError.vue'; +// 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'; + +console.log(config); /** @type {import('vue-router').RouterOptions['routes']} */ export const routes = [ - { path: '/', component: Home }, - { path: '/imprint', component: Imprint }, - { path: '/privacy', component: Privacy }, - { path: '/register', component: Register }, - { path: '/register/:token', component: Register, props: true }, - { path: '/profile/:token', component: Profile, props: true } + { 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 } ]; diff --git a/src/views/Home.vue b/src/views/Home.vue index e1af9d0..9794fe3 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,5 +1,5 @@