mirror of
https://github.com/ArthurDanjou/artchat.git
synced 2026-01-14 15:54:03 +01:00
refactor: streamline component structure and enhance accessibility features
This commit is contained in:
@@ -46,8 +46,9 @@ defineShortcuts({
|
||||
})
|
||||
|
||||
const activeElement = useActiveElement()
|
||||
watch(activeElement, () => {
|
||||
if (activeElement.value instanceof HTMLElement && ['INPUT', 'TEXTAREA'].includes(activeElement.value.tagName)) {
|
||||
watch(openMessageModal, async () => {
|
||||
await nextTick()
|
||||
if (activeElement.value instanceof HTMLElement) {
|
||||
activeElement.value.blur()
|
||||
}
|
||||
})
|
||||
@@ -201,6 +202,7 @@ function goHome() {
|
||||
/>
|
||||
</UTooltip>
|
||||
<UTooltip
|
||||
v-if="router.currentRoute.value.name !== 'canva'"
|
||||
:text="t('palette.tooltip.canva')"
|
||||
arrow
|
||||
:content="toolTipContent"
|
||||
|
||||
@@ -14,7 +14,7 @@ const generate = computed(() => props.id && ((typeof headings?.anchorLinks === '
|
||||
<a
|
||||
v-if="id && generate"
|
||||
:href="`#${id}`"
|
||||
class="text-xl font-bold border-transparent border-b-2 hover:border-black dark:hover:border-white duration-300"
|
||||
class="text-xl font-bold decoration-neutral-300 dark:decoration-neutral-700 underline-offset-2 hover:decoration-black dark:hover:decoration-white duration-300"
|
||||
>
|
||||
<slot />
|
||||
</a>
|
||||
|
||||
@@ -14,7 +14,7 @@ const generate = computed(() => props.id && ((typeof headings?.anchorLinks === '
|
||||
<a
|
||||
v-if="id && generate"
|
||||
:href="`#${id}`"
|
||||
class="text-lg font-semibold text-neutral-800 dark:text-neutral-200"
|
||||
class="text-lg font-semibold text-neutral-800 dark:text-neutral-200 decoration-neutral-300 dark:decoration-neutral-700 underline-offset-2 hover:decoration-black dark:hover:decoration-white duration-300"
|
||||
>
|
||||
<slot />
|
||||
</a>
|
||||
|
||||
@@ -3,7 +3,7 @@ const { t } = useI18n()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mt-8 p-8 border bg-white/70 dark:bg-black/70 border-gray-200 dark:border-neutral-700 rounded-md">
|
||||
<UCard class="mt-8 shadow-sm bg-white dark:bg-neutral-900">
|
||||
<NuxtImg
|
||||
src="/arthur pro.webp"
|
||||
alt="Arthur Danjou"
|
||||
@@ -42,5 +42,5 @@ const { t } = useI18n()
|
||||
<br> <br>
|
||||
</template>
|
||||
</i18n-t>
|
||||
</div>
|
||||
</UCard>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user