-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ui-authorization] authorize application by providing client id
Co-authored-by: Maciej Samoraj <[email protected]>
- Loading branch information
1 parent
cb210ad
commit ad39c40
Showing
4 changed files
with
93 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,82 @@ | ||
<style> | ||
#add-button { | ||
display: block; | ||
margin: 16px auto 0; | ||
} | ||
</style> | ||
<template> | ||
<v-list> | ||
<v-list-item v-for="application in appStore.applicationList" :key="application.id" :prepend-avatar="application.logo" :title="application.name"> | ||
</v-list-item> | ||
</v-list> | ||
<v-container> | ||
<v-list> | ||
<v-list-item | ||
v-for="application in appStore.applicationList" | ||
:key="application.id" :prepend-avatar="application.logo" | ||
:title="application.name"> | ||
</v-list-item> | ||
</v-list> | ||
<v-btn | ||
id="add-button" | ||
color="primary" | ||
@click="addDialog = true" | ||
> | ||
<v-icon icon="mdi-plus"></v-icon>Add application | ||
</v-btn> | ||
<v-dialog | ||
persistent | ||
fullscreen | ||
width="100vw" | ||
v-model="addDialog" | ||
> | ||
<v-card> | ||
<v-card-title> | ||
Add application | ||
</v-card-title> | ||
<v-card-text> | ||
<v-text-field | ||
v-model="addClientId" | ||
label="Client Id" | ||
></v-text-field> | ||
</v-card-text> | ||
<v-card-actions> | ||
<v-btn | ||
color="warning" | ||
variant="tonal" | ||
@click="addDialog = false" | ||
> | ||
Cancel | ||
</v-btn> | ||
<v-spacer></v-spacer> | ||
<v-btn | ||
color="primary" | ||
:disabled="!addClientId" | ||
@click="addApplication" | ||
> | ||
Next | ||
</v-btn> | ||
</v-card-actions> | ||
</v-card> | ||
</v-dialog> | ||
</v-container> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { ref } from 'vue'; | ||
import { useAppStore } from '@/store/app'; | ||
import { useRouter } from 'vue-router'; | ||
const router = useRouter() | ||
const appStore = useAppStore() | ||
appStore.listApplications() | ||
</script> | ||
const addDialog = ref(false) | ||
const addClientId = ref('') | ||
// http://localhost:3000/acme/projectron/vue | ||
function addApplication() { | ||
addDialog.value = false | ||
if (addClientId.value) { | ||
router.push({ name: 'authorization', query: { client_id: addClientId.value, redirect: 'false' }}) | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters