Files
speckle-server/packages/frontend-2/components/developer-settings/CreateTokenSuccessDialog.vue
T
andrewwallacespeckle 76cbcef4e6 Feature - FE2 - Developer Settings (#1822)
* WIP Developer Settings

* Access Tokens

* scopes load fix

* mapping to correct struct

* Updates to Application

* Update to apps.js to fix scopes error

* Application table done

* Token confirmation done.

* Application Success

* Fix ts

* Darkmode fixes

* Responsive fix

* Fixes for PR

* Pass size prop to Editable Avatar

* Updates from PR comments

* Section Header - TS Types

* Add Typeguard to Delete Dialog

* Add Description to scopes query

* minor type guard fix

* edit application cache update fix

* Fix Dialog Expansion

* Rename mutations to correct casing

* Remove unneeded import for defineProps

---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2023-10-26 12:51:05 +01:00

50 lines
1.4 KiB
Vue

<template>
<LayoutDialog
v-model:open="isOpen"
max-width="sm"
title="Create Token"
:buttons="dialogButtons"
max-height
>
<div class="flex flex-col gap-6 text-sm text-foreground">
<div class="flex flex-col gap-3">
<h6 class="h6 font-bold text-center">Your new token:</h6>
<CommonClipboardInputWithToast :value="props.token" />
</div>
<div
class="flex gap-4 items-center bg-warning dark:bg-warning-lighter border-warning-darker dark:border-warning-lighter border rounded-lg py-2 pl-4 pr-8"
>
<ExclamationTriangleIcon
class="h-8 w-8 mt-0.5 text-warning-darker dark:text-warning-darker"
/>
<div class="text-warning-darker max-w-md">
<p>
<strong>Note:</strong>
This is the first and last time you will be able to see the full token.
</p>
<p><strong>Please copy paste it somewhere safe now.</strong></p>
</div>
</div>
</div>
</LayoutDialog>
</template>
<script setup lang="ts">
import { LayoutDialog } from '@speckle/ui-components'
import { ExclamationTriangleIcon } from '@heroicons/vue/24/outline'
const props = defineProps<{
token: string
}>()
const isOpen = defineModel<boolean>('open', { required: true })
const dialogButtons = [
{
text: 'Close',
props: { color: 'primary', fullWidth: true },
onClick: () => (isOpen.value = false)
}
]
</script>