Implement authentication phase with Cidaas OAuth2 integration
- Add authentication middleware to protect routes - Create API endpoints for login, logout, registration, and user info - Develop UI components for login and registration forms - Integrate VeeValidate for form validation - Update environment configuration for Cidaas settings - Add i18n support for English and German languages - Enhance Tailwind CSS for improved styling of auth components - Document authentication flow and testing procedures
This commit is contained in:
30
app/components/ui/form/FormItem.vue
Normal file
30
app/components/ui/form/FormItem.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from 'vue'
|
||||
import { provide } from 'vue'
|
||||
import { useId } from 'reka-ui'
|
||||
import { cn } from '~/lib/utils'
|
||||
import { FORM_ITEM_INJECT_KEY } from '.'
|
||||
|
||||
/**
|
||||
* FormItem component - Container for form fields with proper spacing
|
||||
* Provides unique ID context for label and error message association
|
||||
*/
|
||||
|
||||
interface Props {
|
||||
class?: HTMLAttributes['class']
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
// Generate unique ID for this form item
|
||||
const id = useId()
|
||||
|
||||
// Provide the ID to child components (FormLabel, FormControl, FormMessage)
|
||||
provide(FORM_ITEM_INJECT_KEY, { id })
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div :class="cn('space-y-2', props.class)">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user