From 82b10ebc4b6c2675f7080ae6c62244e4a356ad58 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Tue, 2 Sep 2025 18:49:42 +0200 Subject: [PATCH] fix: adjust loading state delay and clean up Activity component template --- app/components/chat/Loading.vue | 3 +- app/components/tool/Activity.vue | 136 ++++++++++++++++--------------- app/pages/index.vue | 1 - 3 files changed, 73 insertions(+), 67 deletions(-) diff --git a/app/components/chat/Loading.vue b/app/components/chat/Loading.vue index 77668a9..d30ff66 100644 --- a/app/components/chat/Loading.vue +++ b/app/components/chat/Loading.vue @@ -13,7 +13,7 @@ onMounted(() => { function nextState() { index++ if (index < props.fetchStates.length) { - const delay = Math.random() * 3000 + 500 + const delay = Math.random() * 1050 + 400 setTimeout(() => { currentState.value = props.fetchStates[index] nextState() @@ -27,7 +27,6 @@ onMounted(() => { nextState() } else { - // If only one state, call setLoadingState immediately setLoadingState(props.messageId, ChatState.SENT) } }) diff --git a/app/components/tool/Activity.vue b/app/components/tool/Activity.vue index 23f4be6..cf1bf3b 100644 --- a/app/components/tool/Activity.vue +++ b/app/components/tool/Activity.vue @@ -72,77 +72,82 @@ const getActivity = computed(() => { @@ -153,6 +158,7 @@ const getActivity = computed(() => { "working": "I'm actually online! Check what I'm working on just below.", "idling": "I'm idling on my computer with {editor} running in background.", "maths": "I am probably doing some maths or sleeping.", + "response": "The statistics are powered and saved by WakaTime.", "tooltip": { "online": "I'm online 👋", "offline": "I'm offline 🫥", @@ -166,6 +172,7 @@ const getActivity = computed(() => { "working": "Je suis actuellement en ligne ! Découvrez ce sur quoi je travaille juste en dessous.", "idling": "Je suis en veille sur mon ordinateur avec {editor} en arrière-plan.", "maths": "Je suis probablement en train de faire des maths ou en train de dormir.", + "response": "Les statistiques sont propulsées et enregistrées par WakaTime.", "tooltip": { "online": "Je suis connecté 👋", "offline": "Je suis déconnecté 🫥", @@ -179,6 +186,7 @@ const getActivity = computed(() => { "working": "Estoy trabajando en línea. ¡Mira lo que estoy haciendo justo debajo!", "idling": "Estoy en reposo en mi ordenador con {editor} en segundo plano.", "maths": "Estoy probablemente haciendo matemáticas o durmiendo.", + "response": "Las estadísticas son propulsadas y registradas por WakaTime.", "tooltip": { "online": "Estoy conectado 👋", "offline": "Estoy desconectado 🫥", diff --git a/app/pages/index.vue b/app/pages/index.vue index 651c210..3f2a5ba 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -1,5 +1,4 @@