UX: Adjust bot warning so it looks better (#141)

This moves the bot warning from `composer-after-composer-editor` to
`after-d-editor` (with a minor adjustment for outlet args to match new name)
This commit is contained in:
Sam 2023-08-17 14:43:14 +10:00 committed by GitHub
parent b4477ecdcd
commit 3e46250f3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -11,7 +11,7 @@ export default class extends Component {
@service siteSettings; @service siteSettings;
get composerModel() { get composerModel() {
return this.args.outletArgs.model; return this.args?.outletArgs?.composer;
} }
get renderChatWarning() { get renderChatWarning() {
@ -21,6 +21,7 @@ export default class extends Component {
@computed("composerModel.targetRecipients") @computed("composerModel.targetRecipients")
get isAiBotChat() { get isAiBotChat() {
if ( if (
this.composerModel &&
this.composerModel.targetRecipients && this.composerModel.targetRecipients &&
this.currentUser.ai_enabled_chat_bots this.currentUser.ai_enabled_chat_bots
) { ) {

View File

@ -3,7 +3,7 @@ nav.post-controls .actions button.cancel-streaming {
} }
.ai-bot-chat #reply-control { .ai-bot-chat #reply-control {
.title-input { .title-and-category {
display: none; display: none;
} }
} }
@ -11,14 +11,14 @@ nav.post-controls .actions button.cancel-streaming {
.ai-bot-chat-warning { .ai-bot-chat-warning {
color: var(--tertiary); color: var(--tertiary);
background-color: var(--tertiary-low); background-color: var(--tertiary-low);
box-shadow: 0px 0px 0px 2px var(--tertiary-medium); border-top: 1px solid var(--tertiary-medium);
opacity: 0.75; opacity: 0.75;
.d-icon { .d-icon {
color: var(--tertiary); color: var(--tertiary);
} }
margin: 10px 2px 0; margin: 0;
padding: 4px 10px; padding: 4px 10px;
width: fit-content; width: calc(100% - 20px);
} }
article.streaming nav.post-controls .actions button.cancel-streaming { article.streaming nav.post-controls .actions button.cancel-streaming {