Skip to content

Commit

Permalink
Merge pull request #251 from iceljc/features/refine-chat-window
Browse files Browse the repository at this point in the history
Features/refine chat window
  • Loading branch information
iceljc authored Oct 21, 2024
2 parents b088798 + a0ac7d6 commit 09a2335
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 40 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ PUBLIC_COMPANY_WEBSITE=https://scisharp.github.io/SciSharp/
PUBLIC_PLUGIN_DEFAULT_ICON=https://avatars.githubusercontent.com/u/44989469?s=200&v=4
PUBLIC_ALLOW_SIGNUP=true
PUBLIC_AUTH_ENABLE_SSO=true
PUBLIC_AUTH_ENABLE_FIND_PWD=true
PUBLIC_AUTH_ENABLE_FIND_PWD=true
PUBLIC_DEBUG_MODE=false
92 changes: 53 additions & 39 deletions src/routes/chat/[agentId]/[conversationId]/chat-box.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
PUBLIC_LIVECHAT_ENTRY_ICON,
PUBLIC_LIVECHAT_VOICE_ENABLED,
PUBLIC_LIVECHAT_FILES_ENABLED,
PUBLIC_LIVECHAT_ENABLE_TRAINING
PUBLIC_LIVECHAT_ENABLE_TRAINING,
PUBLIC_DEBUG_MODE
} from '$env/static/public';
import { BOT_SENDERS, LERNER_ID, TEXT_EDITORS, TRAINING_MODE, USER_SENDERS } from '$lib/helpers/constants';
import { signalr } from '$lib/services/signalr-service.js';
Expand Down Expand Up @@ -1455,15 +1456,15 @@
<div class="col-md-8 col-5">
<ul class="list-inline user-chat-nav user-chat-nav-flex mb-0">
{#if isFrame}
<li class="list-inline-item">
<button
class="btn btn-secondary btn-rounded btn-sm"
on:click={() => openFullScreen()}
>
<i class="bx bx-fullscreen" />
</button>
</li>
{#if PUBLIC_DEBUG_MODE === 'true' && isFrame}
<li class="list-inline-item">
<button
class="btn btn-secondary btn-rounded btn-sm"
on:click={() => openFullScreen()}
>
<i class="bx bx-fullscreen" />
</button>
</li>
{/if}
<li class="list-inline-item">
{#if !isLite}
Expand All @@ -1472,33 +1473,33 @@
<i class="bx bx-dots-horizontal-rounded" />
</DropdownToggle>
<DropdownMenu class="dropdown-menu-end">
{#if !isLite && (!isLoadPersistLog || !isLoadInstantLog)}
{#if !isLoadPersistLog || !isLoadInstantLog}
<DropdownItem on:click={() => openLogs()}>View Log</DropdownItem>
{/if}
{#if !isLite && (!isLoadInstantLog || !isOpenUserAddStateModal)}
<li>
<Dropdown direction="right" class="state-menu">
<DropdownToggle caret class="dropdown-item">
States
</DropdownToggle>
<DropdownMenu>
{#if !isOpenUserAddStateModal}
<DropdownItem
disabled={disableAction}
on:click={() => toggleUserAddStateModal()}
>
Add States
</DropdownItem>
{/if}
<DropdownItem
disabled={disableAction}
on:click={() => clearUserAddStates()}
>
Clear States
</DropdownItem>
</DropdownMenu>
</Dropdown>
</li>
{#if !isLoadInstantLog || !isOpenUserAddStateModal}
<li>
<Dropdown direction="right" class="state-menu">
<DropdownToggle caret class="dropdown-item">
States
</DropdownToggle>
<DropdownMenu>
{#if !isOpenUserAddStateModal}
<DropdownItem
disabled={disableAction}
on:click={() => toggleUserAddStateModal()}
>
Add States
</DropdownItem>
{/if}
<DropdownItem
disabled={disableAction}
on:click={() => clearUserAddStates()}
>
Clear States
</DropdownItem>
</DropdownMenu>
</Dropdown>
</li>
{/if}
{#if currentUser?.role === UserRole.Admin}
<DropdownItem on:click={() => toggleTagModal()}>
Expand All @@ -1516,7 +1517,13 @@
disabled={disableAction}
on:click={() => handleNewConversation()}
>
<i class="mdi mdi-plus" />
<i
class="mdi mdi-plus"
style="font-size: 15px;"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="New Conversation"
/>
</button>
{/if}
</li>
Expand All @@ -1528,8 +1535,15 @@
disabled={disableAction}
on:click={() => handleNewConversation()}
>
<i class="mdi mdi-plus" />
<span class="me-2">New</span>
<span
data-bs-toggle="tooltip"
data-bs-placement="top"
title="New Conversation"
>
<i class="mdi mdi-plus" />
<span class="me-2">New</span>
</span>
</button>
{/if}
<button
Expand All @@ -1538,7 +1552,7 @@
on:click={() => endChat()}
>
{#if !isLite}
<span class="me-2">Exit</span>
<span class="me-2">End</span>
{/if}
<i class="mdi mdi-window-close" />
</button>
Expand Down

0 comments on commit 09a2335

Please sign in to comment.