mirror of
https://github.com/ArthurDanjou/artchat.git
synced 2026-02-01 16:29:32 +01:00
refactor: update ESLint configuration and remove unused dependencies
- Replaced Nuxt ESLint configuration with Antfu's ESLint config. - Removed 'nuxt-visitors' module from Nuxt configuration. - Added linting scripts to package.json for easier code quality checks. - Introduced a new API endpoint for fetching weather data from OpenWeather. - Enhanced chat types with new enums and properties for better state management. - Added OpenWeather response types for improved type safety. - Updated social links in types/index.ts to include an email contact.
This commit is contained in:
34
app/components/chat/Typing.vue
Normal file
34
app/components/chat/Typing.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<script setup lang="ts">
|
||||
const children = ref<HTMLElement[]>([])
|
||||
const shown = ref<HTMLElement[]>([])
|
||||
|
||||
const container = ref<HTMLElement | null>(null)
|
||||
|
||||
onMounted(async () => {
|
||||
if (!container.value)
|
||||
return
|
||||
|
||||
children.value = Array.from(container.value.children) as HTMLElement[]
|
||||
|
||||
for (const child of children.value) {
|
||||
shown.value.push(child)
|
||||
await new Promise(resolve => setTimeout(resolve, 400))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div ref="container" class="hidden">
|
||||
<slot />
|
||||
</div>
|
||||
<div>
|
||||
<component
|
||||
:is="el.tagName.toLowerCase()"
|
||||
v-for="(el, index) in shown"
|
||||
:key="index"
|
||||
v-html="el.innerHTML"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user