mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 01:46:07 +00:00
remove unneccessary code, make gms request working on mount
This commit is contained in:
parent
b49f18c9a7
commit
eab0817eb9
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div v-if="humhubAllowed" class="mb-3 p-3 card-circles">
|
||||
<div class="mb-3 p-3 card-circles">
|
||||
<BContainer class="bg-white app-box-shadow gradido-border-radius p-4 mt--3">
|
||||
<div class="h3">{{ $t('card-circles.headline') }}</div>
|
||||
<div v-if="humhubAllowed" class="my-3 text-small">
|
||||
@ -56,11 +56,7 @@ const humhubUri = ref('')
|
||||
|
||||
const humhubAllowed = computed(() => store.state.humhubAllowed)
|
||||
|
||||
const {
|
||||
refetch: refetchAuthenticateHumhub,
|
||||
onResult,
|
||||
onError,
|
||||
} = useQuery(authenticateHumhubAutoLogin, null, {
|
||||
const { onResult, onError } = useQuery(authenticateHumhubAutoLogin, null, {
|
||||
fetchPolicy: 'network-only',
|
||||
enabled: true,
|
||||
})
|
||||
@ -77,16 +73,6 @@ onError(() => {
|
||||
humhubUri.value = ''
|
||||
store.commit('humhubAllowed', false)
|
||||
})
|
||||
|
||||
const handleAuthenticateHumhubAutoLogin = async () => {
|
||||
enableButton.value = false
|
||||
humhubUri.value = null
|
||||
await refetchAuthenticateHumhub()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
handleAuthenticateHumhubAutoLogin()
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
.card {
|
||||
|
||||
@ -75,7 +75,10 @@ const gmsUserLocationExists = store.state.userLocation !== null
|
||||
// console.log('gmsUserLocationExists=', gmsUserLocationExists)
|
||||
const isUserSearchDisabled = computed(() => gmsUri.value !== null)
|
||||
|
||||
const { onResult, result, loading, onError } = useQuery(authenticateGmsUserSearch)
|
||||
const { onResult, result, loading, onError } = useQuery(authenticateGmsUserSearch, null, {
|
||||
fetchPolicy: 'network-only',
|
||||
enabled: true,
|
||||
})
|
||||
|
||||
onResult(({ data }) => {
|
||||
if (gmsAllowed && gmsUserLocationExists && data !== undefined) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user