-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add logic to select category if the user starts with chatting
- Loading branch information
1 parent
673c3f1
commit 5477527
Showing
5 changed files
with
84 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script lang="ts"> | ||
import ChatListItem from './ChatListItem.svelte'; | ||
import SelectCategory from './SelectCategory.svelte'; | ||
export let content: string; | ||
</script> | ||
|
||
<div class="flex flex-col gap-y-3 h-full"> | ||
<ChatListItem type="user" {content} /> | ||
|
||
<ChatListItem type="assistant" content="Please select your audiocast category" /> | ||
|
||
<SelectCategory on:selectCategory /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<script lang="ts" context="module"> | ||
import type { ContentCategory } from '@/utils/types'; | ||
export const categories: ContentCategory[] = [ | ||
'podcast', | ||
'sermon', | ||
'audiodrama', | ||
'lecture', | ||
'commentary', | ||
'voicenote', | ||
'interview', | ||
'soundbite' | ||
]; | ||
</script> | ||
|
||
<script lang="ts"> | ||
import { createEventDispatcher } from 'svelte'; | ||
import Button from './ui/button/button.svelte'; | ||
const dispatch = createEventDispatcher<{ selectCategory: { value: ContentCategory } }>(); | ||
</script> | ||
|
||
<div class="w-full h-full block animate-fade-in"> | ||
<div class="flex flex-wrap gap-3"> | ||
{#each categories as category (category)} | ||
<Button | ||
class="bg-sky-900/40 hover:bg-sky-900/60 text-sky-200 px-4 py-2 rounded-full" | ||
on:click={() => dispatch('selectCategory', { value: category })} | ||
> | ||
{category} | ||
</Button> | ||
{/each} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters