Skip to content

Commit

Permalink
perf(inbox): update response & script ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Baylag321 committed Oct 19, 2023
1 parent ef267af commit 851c811
Showing 1 changed file with 24 additions and 35 deletions.
59 changes: 24 additions & 35 deletions packages/plugin-inbox-ui/src/scripts/components/List.tsx
Expand Up @@ -175,32 +175,32 @@ class ScriptList extends React.Component<FinalProps, States> {
</IframePreview>
</TemplateBox>
<TemplateInfo>
<div>
{object.messenger && (
<div>
<Tip text="Messenger" placement="top">
<Icon icon="comment-1" />
</Tip>{' '}
{object.messenger.name}
</div>
)}
{object.kbTopic && (
<div>
<Tip text="Knowledge Base" placement="top">
<Icon icon="book-open" />
</Tip>
{object.messenger && (
<>
<p>Messenger</p>
<p>
<Icon icon="comment-1" /> {object.messenger.name}
</p>
</>
)}
{object.kbTopic && (
<>
<p>Knowledge Base"</p>
<p>
<Icon icon="book-open" />
{object.kbTopic.title}
</div>
)}
{object.leads.length > 0 && (
<div>
<Tip text="Forms" placement="top">
<Icon icon="window" />
</Tip>
</p>
</>
)}
{object.leads.length > 0 && (
<>
<p>Forms</p>
<p>
<Icon icon="window" />
{object.leads.map(lead => ` ${lead.name},`)}
</div>
)}
</div>
</p>
</>
)}
</TemplateInfo>
</Template>
);
Expand Down Expand Up @@ -237,23 +237,12 @@ class ScriptList extends React.Component<FinalProps, States> {
)}`}
/>
}
// flexFilter={this.renderFilter}
// rightActionBar="true"
emptyContent={<EmptyContent content={EMPTY_CONTENT_SCRIPT} />}
renderForm={this.renderForm}
renderContent={this.renderContent}
{...this.props}
queryParams={this.props.queryParams}
history={this.props.history}
additionalButton={
<FormControl
type="text"
placeholder={__('Type to search')}
onChange={this.searchHandler}
value={router.getParam(this.props.history, 'searchValue')}
autoFocus={true}
/>
}
/>
);
}
Expand Down

0 comments on commit 851c811

Please sign in to comment.