Client - display if oauth client does not exist when authorizing

This commit is contained in:
Sam 2022-06-12 16:26:51 +02:00
parent 22c8105ea6
commit 1f26b69cba

View File

@ -1,33 +1,41 @@
<template> <template>
<div id="authorize-oauth2-app" v-if="client.client_id"> <div id="authorize-oauth2-app">
<h1 id="authorize-oauth2-title"> <div v-if="client.client_id">
<i18n-t keypath="oauth2.AUTHORIZE_APP"> <h1 id="authorize-oauth2-title">
<router-link :to="{ name: 'UserApp', params: { id: client.id } }"> <i18n-t keypath="oauth2.AUTHORIZE_APP">
{{ client.name }} <router-link :to="{ name: 'UserApp', params: { id: client.id } }">
</router-link> {{ client.name }}
</i18n-t> </router-link>
</h1> </i18n-t>
<ErrorMessage :message="errorMessages" v-if="errorMessages" /> </h1>
<div class="oauth2-access"> <ErrorMessage :message="errorMessages" v-if="errorMessages" />
<p>{{ $t('oauth2.APP_REQUESTING_ACCESS') }}</p> <div class="oauth2-access">
<ul> <p>{{ $t('oauth2.APP_REQUESTING_ACCESS') }}</p>
<li <ul>
class="client-scope" <li
v-for="scope in client.scope.split(' ')" class="client-scope"
:key="scope" v-for="scope in client.scope.split(' ')"
> :key="scope"
{{ $t(`oauth2.APP.SCOPE.${scope.toUpperCase()}`) }} >
</li> {{ $t(`oauth2.APP.SCOPE.${scope.toUpperCase()}`) }}
</ul> </li>
<div class="authorize-oauth2-buttons"> </ul>
<button class="danger" @click="authorizeApp"> <div class="authorize-oauth2-buttons">
{{ $t('buttons.AUTHORIZE') }} <button class="danger" @click="authorizeApp">
</button> {{ $t('buttons.AUTHORIZE') }}
<button class="cancel" @click="$router.push('/profile/apps')"> </button>
{{ $t('buttons.CANCEL') }} <button class="cancel" @click="$router.push('/profile/apps')">
</button> {{ $t('buttons.CANCEL') }}
</button>
</div>
</div> </div>
</div> </div>
<div v-else>
<p class="no-app">{{ $t('oauth2.NO_APP') }}</p>
<button @click="$router.push('/profile/apps')">
{{ $t('buttons.BACK') }}
</button>
</div>
</div> </div>
</template> </template>