Skip to content

Commit

Permalink
integrate Answer component into the Chatbot component
Browse files Browse the repository at this point in the history
  • Loading branch information
jojortz committed Oct 16, 2023
1 parent 985390a commit 7bb9a19
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions pykoi/frontend/src/lib/Chatbots/Chatbot.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { select } from "d3-selection";
import { writable } from "svelte/store";
import DownloadModal from "./Components/DownloadModal.svelte";
import Answer from "./Components/Answer.svelte";
let showModal = false;
Expand Down Expand Up @@ -173,22 +174,7 @@
<p>{message.question}</p>
</div>
<div class="answers">
<div class="answer">
<h5 class="bold">Response:</h5>
<p>{message.answer}</p>
{#if feedback}
<div class="feedback-buttons">
<button
on:click={(event) => logVote(event, "up", index)}
class="small-button thumbs-up">👍</button
>
<button
on:click={(event) => logVote(event, "down", index)}
class="small-button thumbs-down">👎</button
>
</div>
{/if}
</div>
<Answer {feedback} {message} {index} title={true}/>
</div>
</div>
</div>
Expand Down Expand Up @@ -450,4 +436,14 @@
background: inherit;
clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
}
.vote-selected {
border: "3px solid black";
opacity: 1;
}
.vote-not-selected {
border: "3px solid transparent";
opacity: 0.65;
}
</style>

0 comments on commit 7bb9a19

Please sign in to comment.