{
await super.willUpdate(changedProperties);
if (changedProperties.has("editorLocation")) {
if (this.editorLocation === "files") {
this.editorClass = "wy-editor-comment wy-editor-comment-bottom";
} else if (this.editorLocation === "apps") {
this.editorClass = "wy-editor-comment wy-editor-comment-bottom";
}
}
}
/**
* Render the top slot for comment editor with no content.
*
* @internal
*/
protected override renderTopSlot(): TemplateResult | typeof nothing {
return nothing;
}
/**
* Render the primary middle slot containing the add-menu, editor and send button.
*
* Overrides the base implementation to provide message-specific controls and layout.
*
* @internal
*/
protected override renderMiddleSlot() {
return html`
${this.componentFeatures?.allowsAnyFeature(
Feature.Attachments,
Feature.CloudFiles,
Feature.Meetings,
Feature.ZoomMeetings,
Feature.GoogleMeet,
Feature.MicrosoftTeams,
Feature.Polls,
)
? html`
${this.componentFeatures?.allowsFeature(Feature.Attachments)
? html` this.openFileInput()} title=${msg("From device")}>
${msg("From device")}
e.stopPropagation()}
@change=${(e: Event) =>
this.handleUploadFiles(
Array.from((e.target as HTMLInputElement).files || []),
e.target as HTMLInputElement,
)}
multiple
hidden
tabindex="-1"
/>`
: nothing}
${this.componentFeatures?.allowsFeature(Feature.CloudFiles)
? html` this.openCloudFiles()} title=${msg("From cloud")}>
${msg("From cloud")}
`
: nothing}
${this.componentFeatures?.allowsAnyFeature(Feature.Meetings, Feature.ZoomMeetings)
? html`
this.handleMeetingClick("zoom")} title=${msg("Zoom meeting")}>
${msg("Zoom meeting")}
`
: nothing}
${this.componentFeatures?.allowsAnyFeature(Feature.Meetings, Feature.GoogleMeet)
? html`
this.handleMeetingClick("google")} title=${msg("Google Meet")}>
${msg("Google Meet")}
`
: nothing}
${this.componentFeatures?.allowsAnyFeature(Feature.Meetings, Feature.MicrosoftTeams)
? html`
this.handleMeetingClick("microsoft")}
title=${msg("Microsoft Teams")}
>
${msg("Microsoft Teams")}
`
: nothing}
${this.componentFeatures?.allowsFeature(Feature.Polls)
? html` this.togglePolls()} title=${msg("Poll")}>
${msg("Poll")}
`
: nothing}
`
: nothing}
${this.renderEditor()}
this.submit()}" title=${this.buttonText} ?disabled=${this.disabled}>
`;
}
/**
* Render content that appears below the message editor.
*
* By default returns the same lists section used by the base editor.
*
* @internal
*/
protected override renderBottomSlot(): (TemplateResult | typeof nothing)[] | TemplateResult | typeof nothing {
return [this.renderLists()];
}
}