Skip to content

Commit 4613479

Browse files
author
Jicheng Lu
committed
add tooltip
1 parent dbe8445 commit 4613479

File tree

2 files changed

+41
-20
lines changed

2 files changed

+41
-20
lines changed

.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ PUBLIC_COMPANY_WEBSITE=https://scisharp.github.io/SciSharp/
1818
PUBLIC_PLUGIN_DEFAULT_ICON=https://avatars.githubusercontent.com/u/44989469?s=200&v=4
1919
PUBLIC_ALLOW_SIGNUP=true
2020
PUBLIC_AUTH_ENABLE_SSO=true
21-
PUBLIC_AUTH_ENABLE_FIND_PWD=true
21+
PUBLIC_AUTH_ENABLE_FIND_PWD=true
22+
PUBLIC_DEBUG_MODE=false

src/routes/chat/[agentId]/[conversationId]/chat-box.svelte

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
PUBLIC_LIVECHAT_ENTRY_ICON,
4040
PUBLIC_LIVECHAT_VOICE_ENABLED,
4141
PUBLIC_LIVECHAT_FILES_ENABLED,
42-
PUBLIC_LIVECHAT_ENABLE_TRAINING
42+
PUBLIC_LIVECHAT_ENABLE_TRAINING,
43+
PUBLIC_DEBUG_MODE
4344
} from '$env/static/public';
4445
import { BOT_SENDERS, LERNER_ID, TEXT_EDITORS, TRAINING_MODE, USER_SENDERS } from '$lib/helpers/constants';
4546
import { signalr } from '$lib/services/signalr-service.js';
@@ -1455,15 +1456,15 @@
14551456
14561457
<div class="col-md-8 col-5">
14571458
<ul class="list-inline user-chat-nav user-chat-nav-flex mb-0">
1458-
{#if isFrame}
1459-
<li class="list-inline-item">
1460-
<button
1461-
class="btn btn-secondary btn-rounded btn-sm"
1462-
on:click={() => openFullScreen()}
1463-
>
1464-
<i class="bx bx-fullscreen" />
1465-
</button>
1466-
</li>
1459+
{#if PUBLIC_DEBUG_MODE === 'true' && isFrame}
1460+
<li class="list-inline-item">
1461+
<button
1462+
class="btn btn-secondary btn-rounded btn-sm"
1463+
on:click={() => openFullScreen()}
1464+
>
1465+
<i class="bx bx-fullscreen" />
1466+
</button>
1467+
</li>
14671468
{/if}
14681469
<li class="list-inline-item">
14691470
{#if !isLite}
@@ -1472,10 +1473,10 @@
14721473
<i class="bx bx-dots-horizontal-rounded" />
14731474
</DropdownToggle>
14741475
<DropdownMenu class="dropdown-menu-end">
1475-
{#if !isLite && (!isLoadPersistLog || !isLoadInstantLog)}
1476+
{#if !isLoadPersistLog || !isLoadInstantLog}
14761477
<DropdownItem on:click={() => openLogs()}>View Log</DropdownItem>
14771478
{/if}
1478-
{#if !isLite && (!isLoadInstantLog || !isOpenUserAddStateModal)}
1479+
{#if !isLoadInstantLog || !isOpenUserAddStateModal}
14791480
<li>
14801481
<Dropdown direction="right" class="state-menu">
14811482
<DropdownToggle caret class="dropdown-item">
@@ -1517,7 +1518,13 @@
15171518
disabled={disableAction}
15181519
on:click={() => handleNewConversation()}
15191520
>
1520-
<i class="mdi mdi-plus" />
1521+
<i
1522+
class="mdi mdi-plus"
1523+
style="font-size: 15px;"
1524+
data-bs-toggle="tooltip"
1525+
data-bs-placement="top"
1526+
title="New Conversation"
1527+
/>
15211528
</button>
15221529
{/if}
15231530
</li>
@@ -1529,19 +1536,32 @@
15291536
disabled={disableAction}
15301537
on:click={() => handleNewConversation()}
15311538
>
1532-
<i class="mdi mdi-plus" />
1533-
<span class="me-2">New</span>
1539+
<span
1540+
data-bs-toggle="tooltip"
1541+
data-bs-placement="top"
1542+
title="New Conversation"
1543+
>
1544+
<i class="mdi mdi-plus" />
1545+
<span class="me-2">New</span>
1546+
</span>
1547+
15341548
</button>
15351549
{/if}
15361550
<button
15371551
class={`btn btn-rounded btn-sm btn-danger ${!isLite ? 'btn-right' : ''}`}
15381552
disabled={disableAction}
15391553
on:click={() => endChat()}
15401554
>
1541-
{#if !isLite}
1542-
<span class="me-2">End</span>
1543-
{/if}
1544-
<i class="mdi mdi-window-close" />
1555+
<span
1556+
data-bs-toggle="tooltip"
1557+
data-bs-placement="top"
1558+
title="Exit Conversation"
1559+
>
1560+
{#if !isLite}
1561+
<span class="me-2">End</span>
1562+
{/if}
1563+
<i class="mdi mdi-window-close" />
1564+
</span>
15451565
</button>
15461566
</li>
15471567
</ul>

0 commit comments

Comments
 (0)