Skip to content

Commit

Permalink
Fix: Eslint and Embedded Chatbar fixed on bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
BuonDavide committed Nov 26, 2024
1 parent bcb8c5d commit 488f8a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions components/ChatZone.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div v-if="dialog.length">
<div class="pt-6 pb-4 shadow-md rounded space-y-3" :class="!isEmbedded ? 'bg-white px-4' : ''">
<div class="pt-6 pb-4 space-y-3" :class="{'bg-white px-4 relative shadow-md rounded': !isEmbedded}">
<div class="flex flex-col space-y-6 pb-4">
<div
v-for="(item, i) in dialog"
Expand Down Expand Up @@ -35,7 +35,7 @@
</div>
</div>
</div>
<div class="space-y-4">
<div class="space-y-4" :class="{'bottom-6 left-0 absolute px-4 grow w-full': isEmbedded}">
<div class="flex space-x-4">
<input
ref="input"
Expand Down
4 changes: 0 additions & 4 deletions pages/chatbot-iframe/[uuid].vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
definePageMeta({
layout: 'iframe',
});
const { t } = useI18n();
const collection = ref<{ name?: string; uuid?: string; cmetadata?: any }>({});
const isBusy = ref(false);
const input = ref<HTMLElement | null>(null);
let sessionId = '';
onBeforeMount(async () => {
const route = useRoute();
const uuid = route.params.uuid as string;
Expand All @@ -33,7 +30,6 @@ onBeforeMount(async () => {
});
}
sessionId = crypto.randomUUID();
isBusy.value = false;
});
Expand Down
5 changes: 2 additions & 3 deletions pages/chatbot/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
</div>
</div>

<ChatZone :collection :isDemoChatbot="isDemo" :messagesLeft @updateLeft="updateLeftMessages">
<template v-slot:messageCounter>
<ChatZone :collection :is-demo-chatbot="isDemo" :messages-left @update-left="updateLeftMessages">
<template #messageCounter>
<div v-if="isDemo" class="flex space-x-4">
<span class="grow text-lg">{{ $t('MESSAGES_LEFT') }}: {{ messagesLeft }}</span>
</div>
Expand All @@ -46,7 +46,6 @@ import { ItemEditLevel } from '#imports';
const config = useRuntimeConfig();
const store = useStatesStore();
useHead({ title: `Chatbot | ${config.public.appName}` });
const { t } = useI18n();
const collection = ref<{ name?: string; uuid?: string; cmetadata?: any }>({});
const isBusy = ref(false);
Expand Down

0 comments on commit 488f8a3

Please sign in to comment.