- Added page transition effects in app.vue for smoother navigation. - Updated nuxt.config.ts to include custom font styles and page transitions. - Improved loading indicators in MapPageWrapper.vue and login.vue for better user experience. - Enhanced MapView.vue with a collapsible control panel and improved styling. - Introduced new icons for various components to enhance visual consistency. - Updated Tailwind CSS configuration to extend font families and improve theme management. - Refined layout styles in default.vue and admin pages for better responsiveness and aesthetics. - Implemented error handling and loading states across various forms for improved user feedback.
50 lines
1.5 KiB
Vue
50 lines
1.5 KiB
Vue
<template>
|
|
<div class="form-control">
|
|
<label v-if="label" class="label" :for="inputId">
|
|
<span class="label-text">{{ label }}</span>
|
|
</label>
|
|
<div class="relative flex">
|
|
<input
|
|
:id="inputId"
|
|
:value="modelValue"
|
|
:type="showPass ? 'text' : 'password'"
|
|
class="input input-bordered flex-1 pr-10"
|
|
:placeholder="placeholder"
|
|
:required="required"
|
|
:autocomplete="autocomplete"
|
|
:readonly="readonly"
|
|
@input="emit('update:modelValue', ($event.target as HTMLInputElement).value)"
|
|
/>
|
|
<button
|
|
type="button"
|
|
class="absolute right-2 top-1/2 -translate-y-1/2 btn btn-ghost btn-sm btn-square min-h-0 h-8 w-8"
|
|
:aria-label="showPass ? 'Hide password' : 'Show password'"
|
|
@click="showPass = !showPass"
|
|
>
|
|
<icons-icon-eye-off v-if="showPass" />
|
|
<icons-icon-eye v-else />
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
modelValue: string
|
|
label?: string
|
|
placeholder?: string
|
|
required?: boolean
|
|
autocomplete?: string
|
|
readonly?: boolean
|
|
inputId?: string
|
|
}>(),
|
|
{ required: false, autocomplete: 'off', inputId: undefined }
|
|
)
|
|
|
|
const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
|
|
|
|
const showPass = ref(false)
|
|
const inputId = computed(() => props.inputId ?? `password-${Math.random().toString(36).slice(2, 9)}`)
|
|
</script>
|