DEV: Fix random typos (#21638)

This commit is contained in:
Jarek Radosz 2023-05-18 15:34:46 +02:00 committed by GitHub
parent edbfe91623
commit f2339d2d5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 21 additions and 21 deletions

View File

@ -120,7 +120,7 @@ module Chat
if @chat_channel.direct_message_channel? if @chat_channel.direct_message_channel?
# If any of the channel users is ignoring, muting, or preventing DMs from # If any of the channel users is ignoring, muting, or preventing DMs from
# the current user then we shold not auto-follow the channel once again or # the current user then we should not auto-follow the channel once again or
# publish the new channel. # publish the new channel.
user_ids_allowing_communication = user_ids_allowing_communication =
UserCommScreener.new( UserCommScreener.new(

View File

@ -1,6 +1,6 @@
<div class="chat-channel-metadata"> <div class="chat-channel-metadata">
<div class="chat-channel-metadata__date"> <div class="chat-channel-metadata__date">
{{this.lastMessageFormatedDate}} {{this.lastMessageFormattedDate}}
</div> </div>
{{#if this.unreadIndicator}} {{#if this.unreadIndicator}}

View File

@ -5,7 +5,7 @@ export default class ChatChannelMetadata extends Component {
return this.args.unreadIndicator ?? false; return this.args.unreadIndicator ?? false;
} }
get lastMessageFormatedDate() { get lastMessageFormattedDate() {
return moment(this.args.channel.lastMessageSentAt).calendar(null, { return moment(this.args.channel.lastMessageSentAt).calendar(null, {
sameDay: "LT", sameDay: "LT",
nextDay: "[Tomorrow]", nextDay: "[Tomorrow]",

View File

@ -33,7 +33,7 @@ export default class ChatComposerDropdown extends Component {
@action @action
setupPanel(element) { setupPanel(element) {
this._tippyInstance = tippy(this.trigger, { this._tippyInstance = tippy(this.trigger, {
theme: "chat-composer-drodown", theme: "chat-composer-dropdown",
trigger: "click", trigger: "click",
zIndex: 1400, zIndex: 1400,
arrow: iconHTML("tippy-rounded-arrow"), arrow: iconHTML("tippy-rounded-arrow"),

View File

@ -10,7 +10,7 @@ export default class ChatDirectMessage {
@tracked id; @tracked id;
@tracked users = null; @tracked users = null;
type = CHATABLE_TYPES.drectMessageChannel; type = CHATABLE_TYPES.directMessageChannel;
constructor(args = {}) { constructor(args = {}) {
this.id = args.id; this.id = args.id;

View File

@ -23,7 +23,7 @@ import { addChatDrawerStateCallback } from "discourse/plugins/chat/discourse/ser
/** /**
* Callback used to decorate a chat message * Callback used to decorate a chat message
* *
* @callback PluginApi~chatDrawerStateCallbak * @callback PluginApi~chatDrawerStateCallback
* @param {Object} state * @param {Object} state
* @param {boolean} state.isDrawerActive - is the chat drawer active * @param {boolean} state.isDrawerActive - is the chat drawer active
* @param {boolean} state.isDrawerExpanded - is the chat drawer expanded * @param {boolean} state.isDrawerExpanded - is the chat drawer expanded
@ -81,7 +81,7 @@ import { addChatDrawerStateCallback } from "discourse/plugins/chat/discourse/ser
* @memberof PluginApi * @memberof PluginApi
* @instance * @instance
* @function addChatDrawerStateCallback * @function addChatDrawerStateCallback
* @param {PluginApi~chatDrawerStateCallbak} callback * @param {PluginApi~chatDrawerStateCallback} callback
* @example * @example
* *
* api.addChatDrawerStateCallback(({isDrawerExpanded, isDrawerActive}) => { * api.addChatDrawerStateCallback(({isDrawerExpanded, isDrawerActive}) => {

View File

@ -1,7 +1,7 @@
import DiscourseRoute from "discourse/routes/discourse"; import DiscourseRoute from "discourse/routes/discourse";
import { inject as service } from "@ember/service"; import { inject as service } from "@ember/service";
// This route is only here as a convience method for a clean `/c/:channelTitle/:channelId/:messageId` URL. // This route is only here as a convenience method for a clean `/c/:channelTitle/:channelId/:messageId` URL.
// It's not a real route, it just redirects to the real route after setting a param on the controller. // It's not a real route, it just redirects to the real route after setting a param on the controller.
export default class ChatChannelNearMessage extends DiscourseRoute { export default class ChatChannelNearMessage extends DiscourseRoute {
@service router; @service router;

View File

@ -257,7 +257,7 @@ export default class ChatApi extends Service {
} }
/** /**
* Returns messages of a channel, from the last message or a specificed target. * Returns messages of a channel, from the last message or a specified target.
* @param {number} channelId - The ID of the channel. * @param {number} channelId - The ID of the channel.
* @param {object} data - Params of the query. * @param {object} data - Params of the query.
* @param {integer} data.targetMessageId - ID of the targeted message. * @param {integer} data.targetMessageId - ID of the targeted message.

View File

@ -10,7 +10,7 @@ const DIRECT_MESSAGE_CHANNELS_LIMIT = 20;
/* /*
The ChatChannelsManager service is responsible for managing the loaded chat channels. The ChatChannelsManager service is responsible for managing the loaded chat channels.
It provides helpers to facilitate using and managing laoded channels instead of constantly It provides helpers to facilitate using and managing loaded channels instead of constantly
fetching them from the server. fetching them from the server.
*/ */

View File

@ -276,7 +276,7 @@ export default class ChatSubscriptionsManager extends Service {
@bind @bind
_onNewChannelSubscription(data) { _onNewChannelSubscription(data) {
this.chatChannelsManager.find(data.channel.id).then((channel) => { this.chatChannelsManager.find(data.channel.id).then((channel) => {
// we need to refrehs here to have correct last message ids // we need to refresh here to have correct last message ids
channel.meta = data.channel.meta; channel.meta = data.channel.meta;
if ( if (

View File

@ -9,7 +9,7 @@ $float-height: 530px;
} }
// Very specific hack to ensure the contextual menu (copy/paste/...) is // Very specific hack to ensure the contextual menu (copy/paste/...) is
// not completly over the textarea, the rules to position this menu are quite obscure // not completely over the textarea, the rules to position this menu are quite obscure
// and under DiscourseHUB the space between the textarea and the keyboard is so small that // and under DiscourseHUB the space between the textarea and the keyboard is so small that
// it sometimes prefer to appear on top of the textarea, making any gesture very complicated // it sometimes prefer to appear on top of the textarea, making any gesture very complicated
html.ios-device.keyboard-visible body #main-outlet .full-page-chat { html.ios-device.keyboard-visible body #main-outlet .full-page-chat {
@ -226,10 +226,10 @@ html.ios-device.keyboard-visible body #main-outlet .full-page-chat {
.chat-user-avatar-container { .chat-user-avatar-container {
position: relative; position: relative;
padding: 1px; //for is-online boxshadow effect, preventing cutoff padding: 1px; // for is-online box-shadow effect, preventing cutoff
.avatar { .avatar {
padding: 1px; ////for is-online boxshadow effect, preventing shift padding: 1px; // for is-online box-shadow effect, preventing shift
} }
.chat-user-presence-flair { .chat-user-presence-flair {

View File

@ -1,4 +1,4 @@
[data-theme="chat-composer-drodown"] { [data-theme="chat-composer-dropdown"] {
margin-left: 0.2rem; margin-left: 0.2rem;
.tippy-content { .tippy-content {

View File

@ -8,7 +8,7 @@
.chat-message-container:hover .chat-message-left-gutter { .chat-message-container:hover .chat-message-left-gutter {
.chat-time { .chat-time {
color: var(--secondary-mediumy); color: var(--secondary-medium);
} }
} }

View File

@ -28,7 +28,7 @@ module Chat
private private
def self.enforce_max_direct_message_users!(acting_user, target_users) def self.enforce_max_direct_message_users!(acting_user, target_users)
# We never want to prevent the actor from communicating with themself. # We never want to prevent the actor from communicating with themselves
target_users = target_users.reject { |user| user.id == acting_user.id } target_users = target_users.reject { |user| user.id == acting_user.id }
if !acting_user.staff? && target_users.size > SiteSetting.chat_max_direct_message_users if !acting_user.staff? && target_users.size > SiteSetting.chat_max_direct_message_users
@ -83,7 +83,7 @@ module Chat
end end
def self.ensure_actor_can_communicate!(acting_user, target_users) def self.ensure_actor_can_communicate!(acting_user, target_users)
# We never want to prevent the actor from communicating with themself. # We never want to prevent the actor from communicating with themselves
target_users = target_users.reject { |user| user.id == acting_user.id } target_users = target_users.reject { |user| user.id == acting_user.id }
screener = screener =

View File

@ -5,7 +5,7 @@
# a separate PM. # a separate PM.
# - is_warning: Staff can send warnings when using the notify_user flag. # - is_warning: Staff can send warnings when using the notify_user flag.
# - take_action: Automatically approves the created reviewable and deletes the chat message. # - take_action: Automatically approves the created reviewable and deletes the chat message.
# - queue_for_review: Adds a special reason to the reviwable score and creates the reviewable using # - queue_for_review: Adds a special reason to the reviewable score and creates the reviewable using
# the force_review option. # the force_review option.
module Chat module Chat

View File

@ -22,11 +22,11 @@ RSpec.describe PrettyText do
HTML HTML
email_formated = <<~HTML email_formatted = <<~HTML
<p><a href="https://www.youtube.com/watch?v=kPRA0W1kECg">15 Sorting Algorithms in 6 Minutes</a></p> <p><a href="https://www.youtube.com/watch?v=kPRA0W1kECg">15 Sorting Algorithms in 6 Minutes</a></p>
<p><a href="https://vimeo.com/786646692">Dear Rich</a></p> <p><a href="https://vimeo.com/786646692">Dear Rich</a></p>
HTML HTML
expect(PrettyText.format_for_email(cooked_html, post)).to match_html(email_formated) expect(PrettyText.format_for_email(cooked_html, post)).to match_html(email_formatted)
end end
end end