mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:12:45 +08:00
UX: do not show selected composer education messages on whisper post (#14078)
This commit disables the "sequential_replies" and "duplicate_link" education message on composer when creating a whipser post.
This commit is contained in:
parent
a50cb61dd5
commit
c481f2ce16
|
@ -130,7 +130,12 @@ export default Component.extend({
|
|||
}
|
||||
}
|
||||
|
||||
this.queuedForTyping.forEach((msg) => this.send("popup", msg));
|
||||
this.queuedForTyping.forEach((msg) => {
|
||||
if (composer.whisper && msg.hide_if_whisper) {
|
||||
return;
|
||||
}
|
||||
this.send("popup", msg);
|
||||
});
|
||||
},
|
||||
|
||||
_create(info) {
|
||||
|
|
|
@ -501,7 +501,7 @@ export default Controller.extend({
|
|||
|
||||
const [linkWarn, linkInfo] = linkLookup.check(post, href);
|
||||
|
||||
if (linkWarn) {
|
||||
if (linkWarn && !this.get("isWhispering")) {
|
||||
const body = I18n.t("composer.duplicate_link", {
|
||||
domain: linkInfo.domain,
|
||||
username: linkInfo.username,
|
||||
|
|
|
@ -117,6 +117,7 @@ class ComposerMessagesFinder
|
|||
templateName: 'education',
|
||||
wait_for_typing: true,
|
||||
extraClass: 'education-message',
|
||||
hide_if_whisper: true,
|
||||
body: PrettyText.cook(I18n.t('education.sequential_replies'))
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user