create page for usersearch

This commit is contained in:
Claus-Peter Huebner 2024-04-04 21:56:41 +02:00
parent f6797f42db
commit 48516e7f46
6 changed files with 62 additions and 23 deletions

View File

@ -28,7 +28,7 @@
<b-icon icon="layers" aria-hidden="true"></b-icon>
<span class="ml-2">{{ $t('GDT') }}</span>
</b-nav-item>
<b-nav-item to="/information" class="mb-3" active-class="activeRoute">
<b-nav-item to="/information" class="mb-3" active-class="activeRoute">
<b-img src="/img/svg/info.svg" height="20" class="svg-icon" />
<span class="ml-2">{{ $t('navigation.info') }}</span>
</b-nav-item>

View File

@ -279,7 +279,8 @@
"overview": "Willkommen {name}",
"send": "Sende Gradidos",
"settings": "Einstellungen",
"transactions": "Deine Transaktionen"
"transactions": "Deine Transaktionen",
"usersearch": "GMS Nutzersuche"
},
"qrCode": "QR Code",
"send_gdd": "GDD versenden",
@ -412,6 +413,11 @@
"transaction-link": {
"send_you": "sendet dir"
},
"usersearch": {
"headline": "Gradido GMS-Nutzersuche",
"text": "Ganz gleich zu welcher Community du gehörst, über die Gradido-Nutzersuche kannst du in einer geographischen Karte deine Community-Mitglieder als auch andere Communities und deren Mitglieder finden.",
"button": "Starte die Nutzersuche..."
},
"via_link": "über einen Link",
"welcome": "Willkommen in der Gemeinschaft"
}

View File

@ -279,7 +279,8 @@
"overview": "Welcome {name}",
"send": "Send Gradidos",
"settings": "Settings",
"transactions": "Your transactions"
"transactions": "Your transactions",
"usersearch": "GMS User-Search"
},
"qrCode": "QR Code",
"send_gdd": "Send GDD",
@ -412,6 +413,11 @@
"transaction-link": {
"send_you": "wants to send you"
},
"usersearch": {
"headline": "Gradido GMS-UserSearch",
"text": "Ganz gleich zu welcher Community du gehörst, über die Gradido-Nutzersuche kannst du in einer geographischen Karte deine Community-Mitglieder als auch andere Communities und deren Mitglieder finden.",
"button": "Start the User-Search..."
},
"via_link": "via Link",
"welcome": "Welcome to the community"
}

View File

@ -261,7 +261,8 @@
"overview": "Bienvenue {name}",
"send": "Envoyé Gradidos",
"settings": "Configuration",
"transactions": "Vos transactions"
"transactions": "Vos transactions",
"usersearch": "GMS Recherche d'Utilisateur"
},
"qrCode": "QR Code",
"send_gdd": "Envoyer GDD",
@ -353,6 +354,11 @@
"transaction-link": {
"send_you": "veut vous envoyer"
},
"usersearch": {
"headline": "Gradido GMS-Recherche d'Utilisateur",
"text": "Ganz gleich zu welcher Community du gehörst, über die Gradido-Nutzersuche kannst du in einer geographischen Karte deine Community-Mitglieder als auch andere Communities und deren Mitglieder finden.",
"button": "Lancer le Recherche d'Utilisateur..."
},
"via_link": "par lien",
"welcome": "Bienvenu dans la communauté"
}

View File

@ -1,47 +1,68 @@
<template>
<div class="h3">
{{ gmsPlaygroundUri }}
<div class="usersearch">
<b-container class="bg-white appBoxShadow gradido-border-radius p-4 mt--3">
<div class="h3">{{ $t('usersearch.headline') }}</div>
<div class="my-4 text-small">
{{ $t('usersearch.text') }}
</div>
<!-- div class="my-4 text-small">
{{ this.gmsUri }}
</div -->
<b-row class="my-5">
<b-col cols="12">
<div class="text-lg-right">
<b-button variant="gradido" :href="this.gmsUri" target="_blank">
{{ $t('usersearch.button') }}
</b-button>
</div>
</b-col>
</b-row>
</b-container>
</div>
</template>
<script>
import { authenticateGmsUserSearch } from '@/graphql/queries'
// import GmsInfo from '@/assets/UserSearch/usersearchinfo.json'
export default {
name: 'GMS User Playground',
name: 'UserSearch',
data() {
return {
gmsPlaygroundUrl: 'unknown',
gmsAuthToken: '',
gmsUri: 'not initialized',
// 'http://localhost:8080/playground?access_token=pk.eyJ1IjoidmlrYXNpbG16IiwiYSI6ImNsbG03NzNkNTFwZXMzbHQ2bTV6NHA0ZjgifQ.knlN4jnVdmhDkJTaka5RoQ&coords=[9.620812595440933,49.695725844876904]',
}
},
methods: {
authenticateGmsUserPlayground() {
async authenticateGmsUserPlayground() {
this.$apollo
.query({
query: authenticateGmsUserSearch,
})
.then((result) => {
this.gmsPlaygroundUrl = result.data.url,
this.gmsAuthToken = result.data.token
.then(async (result) => {
this.gmsUri =
result.data.authenticateGmsUserSearch.url +
'?accesstoken=' +
result.data.authenticateGmsUserSearch.token
})
.catch(() => {
this.toastError('listContributionLinks has no result, use default data')
this.toastError('authenticateGmsUserSearch failed!')
})
},
},
/*
openGmsUserPlayground: function () {
// window.open(this.gmsPlaygroundUrl + '?' + this.gmsAuthToken, '_blank')
let uri = this.gmsPlaygroundUrl + '?' + this.gmsAuthToken
let route = this.$router.resolve({path: uri});
// let route = this.$router.resolve('/link/to/page'); // This also works.
window.open(route.href, '_blank');
window.open(this.gmsPlaygroundUrl + '?' + this.gmsAuthToken, '_blank')
// let uri = this.gmsPlaygroundUrl + '?' + this.gmsAuthToken
// let route = this.$router.resolve({path: uri});
/// / let route = this.$router.resolve('/link/to/page'); // This also works.
// window.open(route.href, '_blank');
},
beforeCreate() {
this.authenticateGmsUserPlayground()
},
*/
created() {
this.authenticateGmsUserPlayground()
// this.openGmsUserPlayground()
},
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped></style>

View File

@ -85,7 +85,7 @@ const routes = [
component: () => import('@/pages/UserSearch'),
meta: {
requiresAuth: true,
pageTitle: 'user search',
pageTitle: 'usersearch',
},
},
// {