fix(core): chat-panel ui (#10928)
Close [AF-2332](https://linear.app/affine-design/issue/AF-2332). Close [AF-2333](https://linear.app/affine-design/issue/AF-2333).
This commit is contained in:
@@ -147,7 +147,9 @@ export class ChatPanelAddPopover extends SignalWatcher(
|
|||||||
height="30px"
|
height="30px"
|
||||||
data-id="upload"
|
data-id="upload"
|
||||||
.text=${'Upload files (pdf, txt, csv)'}
|
.text=${'Upload files (pdf, txt, csv)'}
|
||||||
|
hover=${this._activatedItemIndex === items.length + 1}
|
||||||
@click=${this._addFileChip}
|
@click=${this._addFileChip}
|
||||||
|
@mousemove=${() => (this._activatedItemIndex = items.length + 1)}
|
||||||
>
|
>
|
||||||
${UploadIcon()}
|
${UploadIcon()}
|
||||||
</icon-button>
|
</icon-button>
|
||||||
|
|||||||
@@ -31,6 +31,11 @@ export class ChatPanelChip extends SignalWatcher(
|
|||||||
color: var(--affine-error-color);
|
color: var(--affine-error-color);
|
||||||
background: var(--affine-background-error-color);
|
background: var(--affine-background-error-color);
|
||||||
}
|
}
|
||||||
|
.chip-card-content {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
.chip-card[data-state='failed'] svg {
|
.chip-card[data-state='failed'] svg {
|
||||||
color: var(--affine-error-color);
|
color: var(--affine-error-color);
|
||||||
}
|
}
|
||||||
@@ -92,11 +97,13 @@ export class ChatPanelChip extends SignalWatcher(
|
|||||||
data-testid="chat-panel-chip"
|
data-testid="chat-panel-chip"
|
||||||
data-state=${this.state}
|
data-state=${this.state}
|
||||||
>
|
>
|
||||||
${this.icon}
|
<div class="chip-card-content">
|
||||||
<span class="chip-card-title" @click=${this.onChipClick}>
|
${this.icon}
|
||||||
|
<span class="chip-card-title" @click=${this.onChipClick}>
|
||||||
|
<span data-testid="chat-panel-chip-title">${this.name}</span>
|
||||||
|
</span>
|
||||||
<affine-tooltip>${this.tooltip}</affine-tooltip>
|
<affine-tooltip>${this.tooltip}</affine-tooltip>
|
||||||
<span data-testid="chat-panel-chip-title">${this.name}</span>
|
</div>
|
||||||
</span>
|
|
||||||
${this.closeable
|
${this.closeable
|
||||||
? html`
|
? html`
|
||||||
<div class="chip-card-close" @click=${this.onChipDelete}>
|
<div class="chip-card-close" @click=${this.onChipDelete}>
|
||||||
|
|||||||
Reference in New Issue
Block a user