A platform for community discussion. Free, open, simple.
UX: remove chat and message buttons on currentUser profile (#34513)
chapoic6b2949d64fd
diff --git a/app/assets/javascripts/discourse/app/templates/user.gjs b/app/assets/javascripts/discourse/app/templates/user.gjsindex 09f67f5a296..168738e7f84 100644--- a/app/assets/javascripts/discourse/app/templates/user.gjs+++ b/app/assets/javascripts/discourse/app/templates/user.gjs@@ -2,6 +2,7 @@ import { array, concat, fn, hash } from "@ember/helper";import { LinkTo } from "@ember/routing";import { htmlSafe } from "@ember/template";import RouteTemplate from "ember-route-template";+import { and, not } from "truth-helpers";import DButton from "discourse/components/d-button";import HtmlWithLinks from "discourse/components/html-with-links";import PluginOutlet from "discourse/components/plugin-outlet";@@ -403,7 +404,12 @@ export default RouteTemplate(<section class="controls"><ul>- {{#if @controller.model.can_send_private_message_to_user}}+ {{#if+ (and+ @controller.model.can_send_private_message_to_user+ (not @controller.viewingSelf)+ )+ }}<li><DButton@action={{fndiff --git a/plugins/chat/assets/javascripts/discourse/connectors/user-profile-controls/chat-button.gjs b/plugins/chat/assets/javascripts/discourse/connectors/user-profile-controls/chat-button.gjsindex 0df48c2b9b9..effae09ea64 100644--- a/plugins/chat/assets/javascripts/discourse/connectors/user-profile-controls/chat-button.gjs+++ b/plugins/chat/assets/javascripts/discourse/connectors/user-profile-controls/chat-button.gjs@@ -1,7 +1,10 @@+import { and, not } from "truth-helpers";import ChatDirectMessageButton from "../../components/chat/direct-message-button";const ChatButton = <template>- {{#if @outletArgs.model.can_chat_user}}+ {{#if+ (and @outletArgs.model.can_chat_user (not @outletArgs.model.isCurrent))+ }}<li class="user-card-below-message-button chat-button"><ChatDirectMessageButton @user={{@outletArgs.model}} /></li>