mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: add support for flagged chat message in reviewqueue (#21802)
* UX: add support for flagged chat message in reviewqueue * correctly init a chat message object --------- Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
@@ -232,8 +232,9 @@
|
|||||||
color: var(--secondary);
|
color: var(--secondary);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background-color: var(--secondary-high);
|
background-color: var(--secondary-high);
|
||||||
&.-flagged-post {
|
&.-flagged-post,
|
||||||
background-color: var(--danger-medium);
|
&.-flagged-chat-message {
|
||||||
|
background-color: var(--danger);
|
||||||
}
|
}
|
||||||
&.-queued-post,
|
&.-queued-post,
|
||||||
&.-queued-topic,
|
&.-queued-topic,
|
||||||
|
|||||||
@@ -630,6 +630,8 @@ en:
|
|||||||
title: "User"
|
title: "User"
|
||||||
reviewable_post:
|
reviewable_post:
|
||||||
title: "Post"
|
title: "Post"
|
||||||
|
reviewable_chat_message:
|
||||||
|
title: "Flagged chat message"
|
||||||
approval:
|
approval:
|
||||||
title: "Post Needs Approval"
|
title: "Post Needs Approval"
|
||||||
description: "We've received your new post but it needs to be approved by a moderator before it will appear. Please be patient."
|
description: "We've received your new post but it needs to be approved by a moderator before it will appear. Please be patient."
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
import { inject as service } from "@ember/service";
|
import { inject as service } from "@ember/service";
|
||||||
import { cached } from "@glimmer/tracking";
|
import { cached } from "@glimmer/tracking";
|
||||||
|
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
|
||||||
|
|
||||||
export default class ReviewableChatMessage extends Component {
|
export default class ReviewableChatMessage extends Component {
|
||||||
@service store;
|
@service store;
|
||||||
|
@service chatChannelsManager;
|
||||||
|
|
||||||
@cached
|
@cached
|
||||||
get chatChannel() {
|
get chatChannel() {
|
||||||
return this.store.createRecord(
|
return ChatChannel.create(this.args.reviewable.chat_channel);
|
||||||
"chat-channel",
|
|
||||||
this.args.reviewable.chat_channel
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user