mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 11:53:39 +08:00
FIX: do not show as clickable the thread header (#30005)
When the current user can't modify the thread title we shouldn't show it as a clickable area.
This commit is contained in:
parent
b546c31b7f
commit
877b03c7ae
|
@ -1,6 +1,7 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { on } from "@ember/modifier";
|
||||
import { service } from "@ember/service";
|
||||
import { or } from "truth-helpers";
|
||||
import noop from "discourse/helpers/noop";
|
||||
import replaceEmoji from "discourse/helpers/replace-emoji";
|
||||
import icon from "discourse-common/helpers/d-icon";
|
||||
|
@ -70,8 +71,6 @@ export default class ChatThreadHeader extends Component {
|
|||
) {
|
||||
return () =>
|
||||
this.modal.show(ThreadSettingsModal, { model: this.args.thread });
|
||||
} else {
|
||||
return noop;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,9 +91,9 @@ export default class ChatThreadHeader extends Component {
|
|||
|
||||
<navbar.Title
|
||||
@title={{replaceEmoji this.headerTitle}}
|
||||
{{on "click" this.openThreadTitleModal}}
|
||||
{{on "click" (or this.openThreadTitleModal noop)}}
|
||||
role={{if this.openThreadTitleModal "button"}}
|
||||
class="clickable"
|
||||
class={{if this.openThreadTitleModal "clickable"}}
|
||||
/>
|
||||
<navbar.Actions as |action|>
|
||||
<action.ThreadTrackingDropdown @thread={{@thread}} />
|
||||
|
|
Loading…
Reference in New Issue
Block a user