enh: tts/stt user permissions

This commit is contained in:
Timothy Jaeryang Baek
2025-04-14 01:40:22 -07:00
parent ec3b8fab5b
commit d932fc555d
5 changed files with 58 additions and 11 deletions

View File

@@ -1189,7 +1189,7 @@
</div>
<div class="self-end flex space-x-1 mr-1 shrink-0">
{#if !history?.currentId || history.messages[history.currentId]?.done == true}
{#if (!history?.currentId || history.messages[history.currentId]?.done == true) && ($_user?.role === 'admin' || ($_user?.permissions?.chat?.stt ?? true))}
<Tooltip content={$i18n.t('Record voice')}>
<button
id="voice-input-button"
@@ -1262,7 +1262,7 @@
</button>
</Tooltip>
</div>
{:else if prompt === '' && files.length === 0}
{:else if prompt === '' && files.length === 0 && ($_user?.role === 'admin' || ($_user?.permissions?.chat?.call ?? true))}
<div class=" flex items-center">
<Tooltip content={$i18n.t('Call')}>
<button