Skip to content

Commit

Permalink
Merge pull request #16 from BuonDavide/issue/white-text-in-forms
Browse files Browse the repository at this point in the history
fix: textarea having white text when modifying chatbot
  • Loading branch information
nikazzio authored Sep 24, 2024
2 parents de827a6 + df53add commit 3a55b2b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
10 changes: 6 additions & 4 deletions components/Form/Chatbot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@keydown.enter.stop.prevent="save"
/>

<textarea v-model="description" :placeholder="$t('DESCRIPTION_PLACEHOLDER')" rows="4"></textarea>
<textarea v-model="description" :placeholder="$t('DESCRIPTION_PLACEHOLDER')" class="textarea" rows="4"></textarea>

<div v-if="error" class="p-3 bg-neutral-100 text-center font-semibold text-brand_primary">
{{ $t('AN_ERROR_OCCURRED_PLEASE_RETRY') }}
Expand All @@ -37,6 +37,8 @@
</template>

<script lang="ts" setup>
import type { collectionItem } from '~/store/states';
const props = defineProps({
isModal: {
type: Boolean,
Expand Down Expand Up @@ -90,7 +92,7 @@ const create = async () => {
},
});
collection = data;
collection = data as collectionItem;
statesStore.collection = collection;
statesStore.menu.push({
Expand All @@ -108,8 +110,8 @@ const create = async () => {
const update = async () => {
try {
collection.cmetadata = {
...collection.cmetadata,
collection!.cmetadata = {
...collection!.cmetadata,
...{ title: title.value, description: description.value },
};
Expand Down
2 changes: 1 addition & 1 deletion components/Form/ChatbotQuestion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@keydown.enter.stop.prevent="save"
/>

<textarea v-model="answer" :placeholder="$t('ANSWER_PLACEHOLDER')" rows="7"></textarea>
<textarea v-model="answer" :placeholder="$t('ANSWER_PLACEHOLDER')" class="textarea" rows="7"></textarea>

<div v-if="error" class="p-3 bg-neutral-100 text-center font-semibold text-brand_primary">
{{ $t('AN_ERROR_OCCURRED_PLEASE_RETRY') }}
Expand Down
8 changes: 7 additions & 1 deletion store/states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ export interface menuItem {
edit: ItemEditLevel;
}

export interface collectionItem {
name: string;
uuid: string;
cmetadata: any;
}

export const useStatesStore = defineStore('states', {
state: () => ({
user: null as UserDataStore | null,
menu: [] as menuItem[],
collection: null as object | null,
collection: null as collectionItem | null,
}),

actions: {
Expand Down

0 comments on commit 3a55b2b

Please sign in to comment.