mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-09 03:18:18 +00:00
refac
This commit is contained in:
parent
d7513e4ce8
commit
b4d13793a3
6 changed files with 13 additions and 2 deletions
|
|
@ -3881,6 +3881,7 @@
|
|||
{mergeResponses}
|
||||
{chatActionHandler}
|
||||
{addMessages}
|
||||
allowDelete={!(generating || taskIds?.length)}
|
||||
forkHandler={generating || taskIds?.length ? null : handleForkChat}
|
||||
topPadding={!embedded}
|
||||
bottomPadding={files.length > 0}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
export let forkHandler: Function | null = null;
|
||||
|
||||
export let readOnly = false;
|
||||
export let allowDelete = true;
|
||||
export let compactPreview = false;
|
||||
export let editCodeBlock = true;
|
||||
|
||||
|
|
@ -555,6 +556,7 @@
|
|||
{mergeResponses}
|
||||
{addMessages}
|
||||
{forkHandler}
|
||||
{allowDelete}
|
||||
{triggerScroll}
|
||||
{readOnly}
|
||||
{compactPreview}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
export let forkHandler: Function | null = null;
|
||||
export let triggerScroll;
|
||||
export let readOnly = false;
|
||||
export let allowDelete = true;
|
||||
export let compactPreview = false;
|
||||
export let editCodeBlock = true;
|
||||
export let topPadding = false;
|
||||
|
|
@ -76,6 +77,7 @@
|
|||
{showNextMessage}
|
||||
{editMessage}
|
||||
{deleteMessage}
|
||||
{allowDelete}
|
||||
{readOnly}
|
||||
{compactPreview}
|
||||
{editCodeBlock}
|
||||
|
|
@ -101,6 +103,7 @@
|
|||
{actionMessage}
|
||||
{submitMessage}
|
||||
{deleteMessage}
|
||||
{allowDelete}
|
||||
{continueResponse}
|
||||
{regenerateResponse}
|
||||
{addMessages}
|
||||
|
|
@ -126,6 +129,7 @@
|
|||
{actionMessage}
|
||||
{submitMessage}
|
||||
{deleteMessage}
|
||||
{allowDelete}
|
||||
{continueResponse}
|
||||
{regenerateResponse}
|
||||
{mergeResponses}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
export let isLastMessage;
|
||||
export let readOnly = false;
|
||||
export let allowDelete = true;
|
||||
export let compactPreview = false;
|
||||
export let editCodeBlock = true;
|
||||
|
||||
|
|
@ -377,6 +378,7 @@
|
|||
{saveMessage}
|
||||
{rateMessage}
|
||||
{deleteMessage}
|
||||
{allowDelete}
|
||||
{actionMessage}
|
||||
{submitMessage}
|
||||
{continueResponse}
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@
|
|||
|
||||
export let isLastMessage = true;
|
||||
export let readOnly = false;
|
||||
export let allowDelete = true;
|
||||
export let compactPreview = false;
|
||||
export let editCodeBlock = true;
|
||||
export let topPadding = false;
|
||||
|
|
@ -1482,7 +1483,7 @@
|
|||
{/if}
|
||||
|
||||
{#if $user?.role === 'admin' || ($user?.permissions?.chat?.delete_message ?? true)}
|
||||
{#if siblings.length > 1}
|
||||
{#if allowDelete && siblings.length > 1}
|
||||
<Tooltip content={$i18n.t('Delete')} placement="bottom">
|
||||
<button
|
||||
type="button"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
export let isFirstMessage: boolean;
|
||||
export let readOnly: boolean;
|
||||
export let allowDelete = true;
|
||||
export let compactPreview = false;
|
||||
export let editCodeBlock = true;
|
||||
export let topPadding = false;
|
||||
|
|
@ -578,7 +579,7 @@
|
|||
{/if}
|
||||
|
||||
{#if $_user?.role === 'admin' || ($_user?.permissions?.chat?.delete_message ?? false)}
|
||||
{#if !compactPreview && !readOnly && (!isFirstMessage || siblings.length > 1)}
|
||||
{#if !compactPreview && !readOnly && allowDelete && (!isFirstMessage || siblings.length > 1)}
|
||||
<Tooltip content={$i18n.t('Delete')} placement="bottom">
|
||||
<button
|
||||
class="{($settings?.highContrastMode ?? false)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue