b7db51649d
* Initial work * Update role dialog * useDebouncedTextInput * Only show dialog if user has projects * Update Cache on updating role * Remove unused cache eviction * Fix reactivity bug * Handle pluralisation. Empty state when no projects left * Hide owner from Permission Select
46 lines
981 B
Vue
46 lines
981 B
Vue
<template>
|
|
<LayoutDialog v-model:open="open" max-width="xs" :buttons="dialogButtons">
|
|
<template #header>{{ title }}</template>
|
|
<div class="flex flex-col gap-4 text-body-xs text-foreground">
|
|
<p>
|
|
Are you sure you want to remove
|
|
<span class="font-medium">
|
|
{{ name }}
|
|
</span>
|
|
from the workspace?
|
|
</p>
|
|
</div>
|
|
</LayoutDialog>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type { LayoutDialogButton } from '@speckle/ui-components'
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'removeUser'): void
|
|
}>()
|
|
|
|
defineProps<{
|
|
title: string
|
|
name: string
|
|
}>()
|
|
|
|
const open = defineModel<boolean>('open', { required: true })
|
|
|
|
const dialogButtons = computed((): LayoutDialogButton[] => [
|
|
{
|
|
text: 'Cancel',
|
|
props: { color: 'outline' },
|
|
onClick: () => (open.value = false)
|
|
},
|
|
{
|
|
text: 'Remove',
|
|
props: { color: 'primary' },
|
|
onClick: () => {
|
|
open.value = false
|
|
emit('removeUser')
|
|
}
|
|
}
|
|
])
|
|
</script>
|