Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
3a810990
Unverified
Commit
3a810990
authored
1 year ago
by
gabriellsh
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
chore: New mention styles (#29162)
parent
0c34904b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/gazzodown/src/mentions/ChannelMentionElement.tsx
+4
-3
4 additions, 3 deletions
packages/gazzodown/src/mentions/ChannelMentionElement.tsx
packages/gazzodown/src/mentions/UserMentionElement.tsx
+16
-5
16 additions, 5 deletions
packages/gazzodown/src/mentions/UserMentionElement.tsx
with
20 additions
and
8 deletions
packages/gazzodown/src/mentions/ChannelMentionElement.tsx
+
4
−
3
View file @
3a810990
import
{
Message
}
from
'
@rocket.chat/fuselage
'
;
import
{
memo
,
ReactElement
,
useContext
,
useMemo
}
from
'
react
'
;
import
{
MarkupInteractionContext
}
from
'
../MarkupInteractionContext
'
;
...
...
@@ -17,9 +18,9 @@ const ChannelMentionElement = ({ mention }: ChannelMentionElementProps): ReactEl
}
return
(
<
span
className
=
'mention-link mention-link--room
'
onClick
=
{
handleClick
}
>
#
{
resolved
.
name
??
mention
}
</
spa
n
>
<
Message
.
Mention
clickable
tag
=
'#
'
onClick
=
{
handleClick
}
>
{
resolved
.
name
??
mention
}
</
Message
.
Mentio
n
>
);
};
...
...
This diff is collapsed.
Click to expand it.
packages/gazzodown/src/mentions/UserMentionElement.tsx
+
16
−
5
View file @
3a810990
import
{
Message
}
from
'
@rocket.chat/fuselage
'
;
import
{
useLayout
,
useSetting
,
useUserId
}
from
'
@rocket.chat/ui-contexts
'
;
import
{
memo
,
ReactElement
,
useContext
,
useMemo
}
from
'
react
'
;
...
...
@@ -18,11 +19,19 @@ const UserMentionElement = ({ mention }: UserMentionElementProps): ReactElement
const
showRealName
=
useSetting
<
boolean
>
(
'
UI_Use_Real_Name
'
)
&&
!
isMobile
;
if
(
mention
===
'
all
'
)
{
return
<
span
className
=
'mention-link mention-link--all mention-link--group'
>
all
</
span
>;
return
(
<
Message
.
Mention
tag
=
'@'
variant
=
'relevant'
>
all
</
Message
.
Mention
>
);
}
if
(
mention
===
'
here
'
)
{
return
<
span
className
=
'mention-link mention-link--here mention-link--group'
>
here
</
span
>;
return
(
<
Message
.
Mention
tag
=
'@'
variant
=
'relevant'
>
here
</
Message
.
Mention
>
);
}
if
(
!
resolved
)
{
...
...
@@ -30,14 +39,16 @@ const UserMentionElement = ({ mention }: UserMentionElementProps): ReactElement
}
return
(
<
span
className
=
{
resolved
.
_id
===
uid
?
'
mention-link mention-link--me mention-link--user
'
:
'
mention-link mention-link--user
'
}
<
Message
.
Mention
tag
=
'@'
variant
=
{
resolved
.
_id
===
uid
?
'
critical
'
:
'
other
'
}
title
=
{
resolved
.
username
||
resolved
.
name
}
clickable
onClick
=
{
handleClick
}
data-uid
=
{
resolved
.
_id
}
>
{
(
showRealName
?
resolved
.
name
:
resolved
.
username
)
??
mention
}
</
spa
n
>
</
Message
.
Mentio
n
>
);
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment