9f4b0c99da
* Fixing up "Manage Project" & "New Project" Dialogs * Dialog Updates * Updates from tickets * Remove sidepanel * Remove max-height prop from Dialog component * Updates to Profile Dialog * Props for Buttons in Dialog. Attachment Dialog * Remove margin to show issue with dialogs * Update to stories * Responsive updates * Fix overflow on MoveTo * Use Dialog header prop * Dialog updates * Responsive Changes * Responsive fixes * Small responsive change * Fixes * Type based declaration * Last fixes * Small darkmode fixes * Updated type * Update * Updates from PR comments * Fix storybook issues * Updates from PR * Updates from PR * Changes from Agi * Turntable mode Toggle * Fix dialog shadows on scroll * Fix invite autocomplete * Changes from PR Comments * Small styling updates * Responsive views * Adjust Danger zones * Fix typo * New Webhook Icon. Swap icon prop to slot. * Adjust Icon weights * FE2-TASK-27 * FE2-TASK-26 * FE2-TASK-28
65 lines
2.2 KiB
Vue
65 lines
2.2 KiB
Vue
<template>
|
|
<LayoutDialog v-model:open="isOpen" max-width="sm" :buttons="dialogButtons">
|
|
<template #header>Create Application</template>
|
|
<div class="flex flex-col gap-4 text-sm text-foreground">
|
|
<div class="flex flex-col gap-3">
|
|
<h6 class="h6 font-bold text-center">Your new app is ready</h6>
|
|
<div class="grid grid-cols-2 gap-x-6 gap-y-3 py-2 text-sm max-w-xs mx-auto">
|
|
<div class="flex items-center">App Id:</div>
|
|
<div class="w-40">
|
|
<CommonClipboardInputWithToast
|
|
v-if="props.application?.id"
|
|
:value="props.application?.id"
|
|
/>
|
|
</div>
|
|
<div class="flex items-center">App Secret:</div>
|
|
<div class="w-40">
|
|
<CommonClipboardInputWithToast
|
|
v-if="props.application?.secret"
|
|
:value="props.application?.secret"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="flex gap-4 items-center border-primary border rounded-lg px-4 py-3">
|
|
<ExclamationTriangleIcon class="h-8 w-8 mt-0.5 text-primary" />
|
|
<div class="max-w-md flex flex-col gap-1.5 text-sm">
|
|
<p>
|
|
<strong>Note:</strong>
|
|
To authenticate users inside your app, direct them to
|
|
</p>
|
|
<CommonClipboardInputWithToast
|
|
v-if="props.application?.secret"
|
|
:value="`https://latest.speckle.dev/authn/verify/${props.application?.id}/{code_challenge}`"
|
|
is-multiline
|
|
/>
|
|
<p>
|
|
`{code_challenge}` is an OAuth2 plain code challenge that your app needs to
|
|
generate for each authentication request.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</LayoutDialog>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { LayoutDialog } from '@speckle/ui-components'
|
|
import { ExclamationTriangleIcon } from '@heroicons/vue/24/outline'
|
|
import { ApplicationItem } from 'lib/developer-settings/helpers/types'
|
|
|
|
const props = defineProps<{
|
|
application: ApplicationItem | null
|
|
}>()
|
|
|
|
const isOpen = defineModel<boolean>('open', { required: true })
|
|
|
|
const dialogButtons = computed(() => [
|
|
{
|
|
text: 'Close',
|
|
props: { color: 'primary', fullWidth: true },
|
|
onClick: () => (isOpen.value = false)
|
|
}
|
|
])
|
|
</script>
|