From b728b74c4906d263775b5c5405015da4204987ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Saquetim?= <1108771+megothss@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:57:07 -0300 Subject: [PATCH] DEV: Add showLogin action to post menu buttons and prevent text selection (#30500) This commit adds `showLogin` as an available action to the post menu buttons. They can use this action to show the login form when there is no user logged in. It also adds a small CSS tweak to prevent the content from the post menu to being user selectable. This was causing small UX issues in touch devices. --- app/assets/javascripts/discourse/app/components/post/menu.gjs | 1 + app/assets/stylesheets/common/base/topic-post.scss | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/assets/javascripts/discourse/app/components/post/menu.gjs b/app/assets/javascripts/discourse/app/components/post/menu.gjs index 5a64d3b4ea3..ff041f85f9d 100644 --- a/app/assets/javascripts/discourse/app/components/post/menu.gjs +++ b/app/assets/javascripts/discourse/app/components/post/menu.gjs @@ -113,6 +113,7 @@ export default class PostMenu extends Component { showDeleteTopicModal: this.showDeleteTopicModal, showFlags: this.args.showFlags, showMoreActions: this.showMoreActions, + showLogin: this.args.showLogin, toggleReplies: this.args.toggleReplies, toggleWhoLiked: this.toggleWhoLiked, toggleWhoRead: this.toggleWhoRead, diff --git a/app/assets/stylesheets/common/base/topic-post.scss b/app/assets/stylesheets/common/base/topic-post.scss index ab359613e94..c4b39a443f5 100644 --- a/app/assets/stylesheets/common/base/topic-post.scss +++ b/app/assets/stylesheets/common/base/topic-post.scss @@ -314,6 +314,8 @@ nav.post-controls { color: var(--primary-low-mid); + @include user-select(none); + .actions { display: inline-flex; text-align: right;