mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-08 15:22:47 +00:00
UX: add invite button to AI conversations
This commit is contained in:
parent
3ac2359ff1
commit
172a4954c5
@ -0,0 +1,29 @@
|
||||
import Component from "@glimmer/component";
|
||||
import { action } from "@ember/object";
|
||||
import { service } from "@ember/service";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import AddPmParticipants from "discourse/components/modal/add-pm-participants";
|
||||
|
||||
export default class AiConversationsInvite extends Component {
|
||||
@service site;
|
||||
@service modal;
|
||||
|
||||
@action
|
||||
showInvite() {
|
||||
this.modal.show(AddPmParticipants, {
|
||||
model: {
|
||||
title: "discourse_ai.ai_bot.invite_ai_conversation.title",
|
||||
inviteModel: this.args.topic,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
<template>
|
||||
<DButton
|
||||
@icon="user-plus"
|
||||
@label="discourse_ai.ai_bot.invite_ai_conversation.button"
|
||||
@action={{this.showInvite}}
|
||||
class="ai-conversations__invite-button"
|
||||
/>
|
||||
</template>
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
import Component from "@glimmer/component";
|
||||
import AiConversationsInvite from "../../components/ai-conversations-invite";
|
||||
|
||||
export default class AiConversationsInviteConnector extends Component {
|
||||
static shouldRender(args) {
|
||||
return args.topic.is_bot_pm;
|
||||
}
|
||||
|
||||
<template><AiConversationsInvite @topic={{@outletArgs.topic}} /></template>
|
||||
}
|
@ -450,7 +450,8 @@ body.has-ai-conversations-sidebar {
|
||||
button:not(
|
||||
.create,
|
||||
.share-ai-conversation-button,
|
||||
.topic-admin-menu-trigger
|
||||
.topic-admin-menu-trigger,
|
||||
.ai-conversations__invite-button
|
||||
) {
|
||||
display: none;
|
||||
}
|
||||
|
@ -709,9 +709,13 @@ en:
|
||||
delete: "Delete share"
|
||||
|
||||
share_ai_conversation:
|
||||
name: "Share AI conversation"
|
||||
name: "Share"
|
||||
title: "Share this AI conversation publicly"
|
||||
|
||||
invite_ai_conversation:
|
||||
button: "Invite"
|
||||
title: "Invite to AI conversation"
|
||||
|
||||
ai_label: "AI"
|
||||
ai_title: "Conversation with AI"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user