mirror of
https://github.com/ArthurDanjou/artchat.git
synced 2026-02-14 14:07:37 +01:00
feat: enhance CommandPalette and MessageContainer with improved styling and interactivity; update localization messages for clarity
This commit is contained in:
@@ -152,6 +152,7 @@ const commandPaletteUi = {
|
|||||||
:icon="dark ? 'i-ph-moon-duotone' : 'i-ph-sun-duotone'"
|
:icon="dark ? 'i-ph-moon-duotone' : 'i-ph-sun-duotone'"
|
||||||
color="neutral"
|
color="neutral"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
|
class="cursor-pointer"
|
||||||
size="xl"
|
size="xl"
|
||||||
@click.prevent="toggleDark"
|
@click.prevent="toggleDark"
|
||||||
/>
|
/>
|
||||||
@@ -159,6 +160,7 @@ const commandPaletteUi = {
|
|||||||
icon="i-ph-translate-duotone"
|
icon="i-ph-translate-duotone"
|
||||||
color="neutral"
|
color="neutral"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
|
class="cursor-pointer"
|
||||||
size="xl"
|
size="xl"
|
||||||
@click.prevent="changeLocale(currentLocale!.code === 'en' ? 'fr' : currentLocale!.code === 'fr' ? 'es' : 'en')"
|
@click.prevent="changeLocale(currentLocale!.code === 'en' ? 'fr' : currentLocale!.code === 'fr' ? 'es' : 'en')"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const formatted = computed(() => useDateFormat(useNow(), 'D MMMM YYYY, HH:mm', {
|
|||||||
{{ formatted }}
|
{{ formatted }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="group space-y-2 duration-200">
|
<div v-else class="group space-y-2 duration-200 relative">
|
||||||
<div class="flex flex-col-reverse gap-2 items-start md:flex-row-reverse">
|
<div class="flex flex-col-reverse gap-2 items-start md:flex-row-reverse">
|
||||||
<UCard
|
<UCard
|
||||||
v-if="message.state === ChatState.LOADING && message.fetchStates && message.fetchStates.length > 0"
|
v-if="message.state === ChatState.LOADING && message.fetchStates && message.fetchStates.length > 0"
|
||||||
@@ -90,12 +90,12 @@ const formatted = computed(() => useDateFormat(useNow(), 'D MMMM YYYY, HH:mm', {
|
|||||||
{{ message }}
|
{{ message }}
|
||||||
</div>
|
</div>
|
||||||
</UCard>
|
</UCard>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2 lg:absolute lg:-left-12">
|
||||||
<UAvatar src="/arthur.webp" size="lg" />
|
<UAvatar src="/arthur.webp" size="lg" class="shadow-lg" />
|
||||||
<span class="md:hidden">Arthur DANJOU</span>
|
<span class="md:hidden">Arthur DANJOU</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-muted opacity-0 group-hover:opacity-80 duration-500 flex text-xs italic justify-start ml-12">
|
<div class="text-muted opacity-0 group-hover:opacity-80 duration-500 flex text-xs italic justify-start">
|
||||||
{{ formatted }}
|
{{ formatted }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -107,14 +107,14 @@ const getActivity = computed(() => {
|
|||||||
{{ getActivity.state!.split(' ').map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ') }}
|
{{ getActivity.state!.split(' ').map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ') }}
|
||||||
</div>
|
</div>
|
||||||
<div>{{ getActivity.project }}</div>
|
<div>{{ getActivity.project }}</div>
|
||||||
<div class="italic text-xs">
|
|
||||||
{{ getActivity.start.ago }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="flex justify-end text-sm">
|
<div class="flex justify-end text-sm">
|
||||||
<i18n-t keypath="tool.activity.started" tag="p">
|
<i18n-t keypath="tool.activity.started" tag="p">
|
||||||
|
<template #ago>
|
||||||
|
{{ getActivity.start.ago }}
|
||||||
|
</template>
|
||||||
<template #date>
|
<template #date>
|
||||||
{{ getActivity.start.formated.date }}
|
{{ getActivity.start.formated.date }}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ watch(
|
|||||||
scale: 1,
|
scale: 1,
|
||||||
transition: {
|
transition: {
|
||||||
delay: 1800,
|
delay: 1800,
|
||||||
ease: 'easeInOut',
|
ease: 'easeIn',
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
:active="messages.length > 0"
|
:active="messages.length > 0"
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
"offline": "I'm offline 🫥",
|
"offline": "I'm offline 🫥",
|
||||||
"idling": "I'm sleeping 😴"
|
"idling": "I'm sleeping 😴"
|
||||||
},
|
},
|
||||||
"started": "Started the {date} at {hour}",
|
"started": "Started {ago}, the {date} at {hour}",
|
||||||
"secret": "Secret Project"
|
"secret": "Secret Project"
|
||||||
},
|
},
|
||||||
"location": "I'm currently based in {location}. See below for more details.",
|
"location": "I'm currently based in {location}. See below for more details.",
|
||||||
|
|||||||
@@ -26,15 +26,15 @@
|
|||||||
"prompt": "¿Cómo puedo cambiar el tema?"
|
"prompt": "¿Cómo puedo cambiar el tema?"
|
||||||
},
|
},
|
||||||
"stats": {
|
"stats": {
|
||||||
"label": "Ver estadísticas",
|
"label": "Estadística de desarrollo",
|
||||||
"prompt": "¿Cómo puedo ver las estadísticas sobre Arthur?"
|
"prompt": "¿Cómo puedo ver las estadísticas sobre Arthur?"
|
||||||
},
|
},
|
||||||
"weather": {
|
"weather": {
|
||||||
"label": "Ver el clima",
|
"label": "Clima",
|
||||||
"prompt": "¿Cómo puedo ver las condiciones climáticas cerca de Arthur?"
|
"prompt": "¿Cómo puedo ver las condiciones climáticas cerca de Arthur?"
|
||||||
},
|
},
|
||||||
"location": {
|
"location": {
|
||||||
"label": "Ver ubicación",
|
"label": "Ubicación",
|
||||||
"prompt": "¿Cómo puedo ver la ubicación de Arthur?"
|
"prompt": "¿Cómo puedo ver la ubicación de Arthur?"
|
||||||
},
|
},
|
||||||
"language": {
|
"language": {
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
"offline": "Estoy desconectado 🫥",
|
"offline": "Estoy desconectado 🫥",
|
||||||
"idling": "Estoy durmiendo 😴"
|
"idling": "Estoy durmiendo 😴"
|
||||||
},
|
},
|
||||||
"started": "Comenzado el {date} a {hour}",
|
"started": "Comenzó {ago}, el {date} en {hour}",
|
||||||
"secret": "Proyecto Secreto"
|
"secret": "Proyecto Secreto"
|
||||||
},
|
},
|
||||||
"location": "Actualmente estoy basado en {location}. Consulta más detalles a continuación.",
|
"location": "Actualmente estoy basado en {location}. Consulta más detalles a continuación.",
|
||||||
|
|||||||
@@ -26,15 +26,15 @@
|
|||||||
"prompt": "Comment puis-je changer le thème ?"
|
"prompt": "Comment puis-je changer le thème ?"
|
||||||
},
|
},
|
||||||
"stats": {
|
"stats": {
|
||||||
"label": "Voir les statistiques",
|
"label": "Statistiques de développement",
|
||||||
"prompt": "Comment puis-je voir les statistiques concernant Arthur ?"
|
"prompt": "Comment puis-je voir les statistiques concernant Arthur ?"
|
||||||
},
|
},
|
||||||
"weather": {
|
"weather": {
|
||||||
"label": "Voir la météo",
|
"label": "Météo",
|
||||||
"prompt": "Comment puis-je voir les conditions météorologiques près d'Arthur ?"
|
"prompt": "Comment puis-je voir les conditions météorologiques près d'Arthur ?"
|
||||||
},
|
},
|
||||||
"location": {
|
"location": {
|
||||||
"label": "Voir la localisation",
|
"label": "Localisation",
|
||||||
"prompt": "Comment puis-je voir la localisation d'Arthur ?"
|
"prompt": "Comment puis-je voir la localisation d'Arthur ?"
|
||||||
},
|
},
|
||||||
"language": {
|
"language": {
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
"offline": "Je suis déconnecté 🫥",
|
"offline": "Je suis déconnecté 🫥",
|
||||||
"idling": "Je dors 😴"
|
"idling": "Je dors 😴"
|
||||||
},
|
},
|
||||||
"started": "Commencé le {date} à {hour}",
|
"started": "Commencé {ago}, le {date} à {hour}",
|
||||||
"secret": "Projet Secret"
|
"secret": "Projet Secret"
|
||||||
},
|
},
|
||||||
"location": "Je suis actuellement basé à {location}. Voir ci-dessous pour plus de détails.",
|
"location": "Je suis actuellement basé à {location}. Voir ci-dessous pour plus de détails.",
|
||||||
|
|||||||
Reference in New Issue
Block a user