Skip to content

Commit

Permalink
Add contact page and change logo position
Browse files Browse the repository at this point in the history
Add route for get-wallet-code

# Conflicts:
#	components/PresentationForm.vue
  • Loading branch information
Jdu278 committed Jul 30, 2024
1 parent f5a358d commit c0722e4
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 14 deletions.
22 changes: 9 additions & 13 deletions components/HeaderComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,15 @@
'transform-gpu transition-transform duration-500 sticky top-0 z-50',
]"
>
<div class="flex items-center justify-end max-w-7xl">
<div class="rounded-lg pl-2 lg:pl-4 pr-2 py-2">
<div class="flex flex-row">
<div class="absolute left-1/2">
<img src="public/img/logo-mit-text.png" alt="">
</div>
<div class="hidden lg:block">
<NavLinks :links="links"/>
</div>
<div class="lg:hidden">
<NavLinksMobile :links="links"/>
</div>
</div>
<div class="flex items-center justify-between max-w-7xl mx-auto pl-10 pr-2 py-3">
<div class="flex-1 flex justify-center relative text-xl text-base-100 lg:pl-48 lg:text-3xl">
EUDI Wallet
</div>
<div class="hidden lg:block">
<NavLinks :links="links"/>
</div>
<div class="lg:hidden">
<NavLinksMobile :links="links"/>
</div>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions components/StartInfo.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<template>
<div>
<img src="public/img/logo-mit-text.png" alt="">
</div>
<div class="text-xl lg:text-3xl font-bold text-accent m-6">
<h1>Privacy by Design</h1>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div data-theme="wallettheme" class="flex flex-col min-h-screen">
<div class="lg:pt-10 pb-3 bg-primary">
<div class="lg:pt-10 bg-primary">
<HeaderComponent/>
</div>
<div class="flex-grow max-w-xl lg:max-w-7xl mx-auto">
Expand Down
67 changes: 67 additions & 0 deletions pages/get-wallet-code.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<template>
<div>
<div class="text-xl lg:text-3xl font-bold text-accent m-6 text-center">
<h1>Ihre Daten</h1>
</div>
<div v-if="errorMessage" class="mx-6 p-4 border-red-400 border rounded text-red-500">
<p>{{ errorMessage }}</p>
</div>
<div v-else class="mx-6 py-4 border-neutral-400 border rounded">
<div class="overflow-x-auto">
<table class="table w-full">
<tbody>
<tr v-for="item in dataList" :key="item.kind">
<td>{{ item.kind }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</template>

<script setup lang="ts">
import axios from "axios";
import {ref, onMounted} from 'vue';
import type {TransactionRequest} from "~/models/TransactionRequest";
const runtimeConfig = useRuntimeConfig()
const baseUrl = runtimeConfig.public.apiUrl
const dataList = ref<{ kind: string }[]>([]);
const errorMessage = ref<string | null>(null);
onMounted(async () => {
const sessionStore = useSessionStore();
const presentationId = sessionStore.presentationId
const route = useRoute()
const responseCode = route.query.response_code
const nonce = route.query.nonce
if (responseCode && presentationId) {
try {
const response = await axios.get<TransactionRequest>(
`${baseUrl}/ui/presentations`
);
const presentationResponse = response.data;
if (nonce !== presentationResponse.nonce) {
errorMessage.value = 'Nonce ist falsch';
return;
}
const regex = /^\$\['[^']+'\]/;
dataList.value = presentationResponse.presentation_definition.input_descriptors[0].constraints.fields.map(field => ({
kind: field.path[0].replace(regex, '')
}));
sessionStore.$reset();
} catch (error) {
errorMessage.value = 'Fehler beim Abrufen der Daten';
}
} else {
errorMessage.value = 'Fehler beim Abrufen der Daten';
}
});
</script>
19 changes: 19 additions & 0 deletions pages/kontakt.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<template>
<div class="text-center p-2">
<h1 class="text-accent text-3xl font-bold p-2">TICE GmbH </h1>
<p>
Alexandrinenstraße 4
<br>
10969
<br>
Berlin
</p>
<br>
<h2 class="text-accent text-xl font-semibold p-2">Kontakt</h2>
<p>
Telefon: +493062939267
<br>
E-Mail: [email protected]
</p>
</div>
</template>

0 comments on commit c0722e4

Please sign in to comment.