🚧 Add dynamic realm info
This commit is contained in:
parent
909b933ea9
commit
5b6d5f3c97
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login-container">
|
<div class="login-container" v-if="realm">
|
||||||
<form class="login-form" method="POST" :action="useRuntimeConfig().public.baseUrl + '/realms/' + useRuntimeConfig().public.realmKey + '/protocol/openid-connect/auth?client_id=' + useRoute().query.client_id">
|
<form class="login-form" method="POST" :action="useRuntimeConfig().public.baseUrl + '/realms/' + realmKey + '/protocol/openid-connect/auth?client_id=' + useRoute().query.client_id">
|
||||||
<div style="display: flex; flex-direction: column; justify-content: center;">
|
<div style="display: flex; flex-direction: column; justify-content: center;">
|
||||||
<h2 class="sso-heading">Sign in with Verifoo</h2>
|
<h2 class="sso-heading">Sign in with Verifoo</h2>
|
||||||
<p class="sso-subheading">MavenVault</p>
|
<p class="sso-subheading">{{ realm.name }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<p>E-Mail</p>
|
<p>E-Mail</p>
|
||||||
@ -20,6 +20,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import type {Realm} from "~/realm/Realm";
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
|
const realmKey = useRoute().params.realm as string;
|
||||||
|
|
||||||
|
const realm: Ref<Realm | undefined> = ref();
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
axios.get(useRuntimeConfig().public.baseUrl + '/realms/' + realmKey)
|
||||||
|
.then((response) => {
|
||||||
|
realm.value = response.data;
|
||||||
|
})
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
7
app/realm/Realm.ts
Normal file
7
app/realm/Realm.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export class Realm
|
||||||
|
{
|
||||||
|
constructor(
|
||||||
|
public key: string,
|
||||||
|
public name: string
|
||||||
|
) {}
|
||||||
|
}
|
||||||
@ -4,11 +4,17 @@ export default defineNuxtConfig({
|
|||||||
devtools: { enabled: true },
|
devtools: { enabled: true },
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
public: {
|
public: {
|
||||||
baseUrl: process.env.NUXT_PUBLIC_BASE_URL,
|
baseUrl: process.env.NUXT_PUBLIC_BASE_URL
|
||||||
realmKey: process.env.NUXT_PUBLIC_REALM_KEY
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
css: [
|
css: [
|
||||||
'@/assets/style.css'
|
'@/assets/style.css'
|
||||||
|
],
|
||||||
|
app: {
|
||||||
|
head: {
|
||||||
|
link: [
|
||||||
|
{ rel: 'icon', type: 'image/x-icon', href: '/logo.ico' }
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
BIN
public/logo.ico
Normal file
BIN
public/logo.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Loading…
x
Reference in New Issue
Block a user