✨ Add disply of user id
This commit is contained in:
parent
c117268d07
commit
461eea6c2c
@ -7,7 +7,7 @@
|
||||
<NuxtLink class="link left-center" :class="{ active: useRoute().fullPath.startsWith('/artifacts') }" to="/artifacts"><UiIcon>box</UiIcon>Artifacts</NuxtLink>
|
||||
</div>
|
||||
<NuxtLink class="link left-center" :class="{ active: useRoute().fullPath.startsWith('/settings') }" to="/settings"><UiIcon>settings</UiIcon>Settings</NuxtLink>
|
||||
<a class="link left-center" href="/proxy/auth/logout"><UiIcon>logout</UiIcon> Log Out</a>
|
||||
<a class="link left-center" :href="useRuntimeConfig().public.logoutUrl"><UiIcon>logout</UiIcon> Log Out</a>
|
||||
</div>
|
||||
<NuxtPage></NuxtPage>
|
||||
</div>
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
<h1>Account Settings</h1>
|
||||
<div class="col-3">
|
||||
<div class="tile-m">
|
||||
<h3>Username</h3>
|
||||
|
||||
<h3>User ID</h3>
|
||||
<p>{{userId}}</p>
|
||||
</div>
|
||||
<div class="tile-m">
|
||||
<h3>E-Mail</h3>
|
||||
@ -50,9 +50,12 @@ import HeaderRow from "~/components/ui/table/HeaderRow.vue";
|
||||
import ContentRow from "~/components/ui/table/ContentRow.vue";
|
||||
import ContentCell from "~/components/ui/table/ContentCell.vue";
|
||||
import dayjs from "dayjs";
|
||||
import {jwtDecode} from "jwt-decode";
|
||||
|
||||
const session = useCookie<Session>(Session.COOKIE);
|
||||
|
||||
const userId = (jwtDecode(useCookie<string>("identity").value) as any).upn;
|
||||
|
||||
const tokens: Ref<Token[] | undefined> = ref(undefined);
|
||||
onMounted(() => {
|
||||
Token.get((_tokens: Token[]) => {
|
||||
|
||||
@ -20,7 +20,8 @@ export default defineNuxtConfig({
|
||||
runtimeConfig: {
|
||||
public: {
|
||||
clientId: process.env.NUXT_PUBLIC_CLIENT_ID,
|
||||
idpUrl: process.env.NUXT_PUBLIC_IDP_URL
|
||||
idpUrl: process.env.NUXT_PUBLIC_IDP_URL,
|
||||
logoutUrl: process.env.NUXT_PUBLIC_LOGOUT_URL
|
||||
}
|
||||
},
|
||||
modules: ['@pinia/nuxt']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user