Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
e5104658
Commit
e5104658
authored
May 15, 2022
by
boojack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update tag selector
parent
f1cca0f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
7 deletions
+16
-7
MemoEditor.tsx
web/src/components/MemoEditor.tsx
+1
-1
TagList.tsx
web/src/components/TagList.tsx
+1
-1
UserBanner.tsx
web/src/components/UserBanner.tsx
+4
-3
user-banner.less
web/src/less/user-banner.less
+10
-2
No files found.
web/src/components/MemoEditor.tsx
View file @
e5104658
...
@@ -254,7 +254,7 @@ const MemoEditor: React.FC<Props> = () => {
...
@@ -254,7 +254,7 @@ const MemoEditor: React.FC<Props> = () => {
const
handleTagSeletorClick
=
useCallback
((
event
:
React
.
MouseEvent
)
=>
{
const
handleTagSeletorClick
=
useCallback
((
event
:
React
.
MouseEvent
)
=>
{
if
(
tagSeletorRef
.
current
!==
event
.
target
&&
tagSeletorRef
.
current
?.
contains
(
event
.
target
as
Node
))
{
if
(
tagSeletorRef
.
current
!==
event
.
target
&&
tagSeletorRef
.
current
?.
contains
(
event
.
target
as
Node
))
{
editorRef
.
current
?.
insertText
((
event
.
target
as
HTMLElement
).
textContent
??
""
);
editorRef
.
current
?.
insertText
((
event
.
target
as
HTMLElement
).
textContent
+
" "
??
""
);
toggleTagSeletor
(
false
);
toggleTagSeletor
(
false
);
}
}
},
[]);
},
[]);
...
...
web/src/components/TagList.tsx
View file @
e5104658
...
@@ -77,7 +77,7 @@ const TagList: React.FC<Props> = () => {
...
@@ -77,7 +77,7 @@ const TagList: React.FC<Props> = () => {
))
}
))
}
<
Only
when=
{
tags
.
length
<
5
&&
memoService
.
initialized
}
>
<
Only
when=
{
tags
.
length
<
5
&&
memoService
.
initialized
}
>
<
p
className=
"tag-tip-container"
>
<
p
className=
"tag-tip-container"
>
Enter
<
span
className=
"code-text"
>
#
Tag
</
span
>
to create a tag
Enter
<
span
className=
"code-text"
>
#Tag
</
span
>
to create a tag
</
p
>
</
p
>
</
Only
>
</
Only
>
</
div
>
</
div
>
...
...
web/src/components/UserBanner.tsx
View file @
e5104658
...
@@ -28,9 +28,10 @@ const UserBanner: React.FC<Props> = () => {
...
@@ -28,9 +28,10 @@ const UserBanner: React.FC<Props> = () => {
return
(
return
(
<
div
className=
"user-banner-container"
>
<
div
className=
"user-banner-container"
>
<
p
className=
"username-text"
onClick=
{
handleUsernameClick
}
>
<
div
className=
"username-container"
onClick=
{
handleUsernameClick
}
>
{
username
}
<
span
className=
"username-text"
>
{
username
}
</
span
>
</
p
>
{
user
?.
role
===
"OWNER"
?
<
span
className=
"tag"
>
MOD
</
span
>
:
null
}
</
div
>
<
span
className=
"action-btn menu-popup-btn"
onClick=
{
handlePopupBtnClick
}
>
<
span
className=
"action-btn menu-popup-btn"
onClick=
{
handlePopupBtnClick
}
>
<
img
src=
"/icons/more.svg"
className=
"icon-img"
/>
<
img
src=
"/icons/more.svg"
className=
"icon-img"
/>
</
span
>
</
span
>
...
...
web/src/less/user-banner.less
View file @
e5104658
...
@@ -4,8 +4,16 @@
...
@@ -4,8 +4,16 @@
.flex(row, space-between, center);
.flex(row, space-between, center);
@apply w-full h-auto px-6 flex-nowrap mb-1;
@apply w-full h-auto px-6 flex-nowrap mb-1;
> .username-text {
> .username-container {
@apply font-bold text-lg pr-2 text-slate-800 cursor-pointer shrink truncate;
@apply shrink flex flex-row justify-start items-center flex-nowrap truncate;
> .username-text {
@apply font-bold text-lg pr-1 text-slate-800 cursor-pointer shrink truncate;
}
> .tag {
@apply text-xs px-1 bg-blue-500 rounded text-white;
}
}
}
> .action-btn {
> .action-btn {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment