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
f637deac
Commit
f637deac
authored
Mar 26, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak tag list
parent
a0780590
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
TagList.tsx
web/src/components/TagList.tsx
+17
-13
No files found.
web/src/components/TagList.tsx
View file @
f637deac
...
...
@@ -79,19 +79,23 @@ const TagList = () => {
return
(
<
div
className=
"flex flex-col justify-start items-start w-full mt-3 px-1 h-auto shrink-0 flex-nowrap hide-scrollbar"
>
<
div
className=
"flex flex-row justify-start items-center w-full"
>
<
span
className=
"text-sm leading-6 font-mono text-gray-400"
>
{
t
(
"common.tags"
)
}
</
span
>
<
button
onClick=
{
()
=>
showCreateTagDialog
()
}
className=
"flex flex-col justify-center items-center w-5 h-5 bg-gray-200 dark:bg-zinc-800 rounded ml-2 hover:shadow"
>
<
Icon
.
Plus
className=
"w-4 h-4 text-gray-400"
/>
</
button
>
</
div
>
<
div
className=
"flex flex-col justify-start items-start relative w-full h-auto flex-nowrap gap-1 mt-1"
>
{
tags
.
map
((
t
,
idx
)
=>
(
<
TagItemContainer
key=
{
t
.
text
+
"-"
+
idx
}
tag=
{
t
}
tagQuery=
{
filter
.
tag
}
/>
))
}
<
span
className=
"text-sm leading-6 font-mono text-gray-400 select-none"
onDoubleClick=
{
()
=>
showCreateTagDialog
()
}
>
{
t
(
"common.tags"
)
}
</
span
>
</
div
>
{
tags
.
length
>
0
?
(
<
div
className=
"flex flex-col justify-start items-start relative w-full h-auto flex-nowrap gap-2 mt-1"
>
{
tags
.
map
((
t
,
idx
)
=>
(
<
TagItemContainer
key=
{
t
.
text
+
"-"
+
idx
}
tag=
{
t
}
tagQuery=
{
filter
.
tag
}
/>
))
}
</
div
>
)
:
(
<
div
>
<
p
className=
"text-sm leading-snug italic text-gray-400 dark:text-gray-500"
>
You can create tags by inputting
<
code
>
`#tag`
</
code
>
.
</
p
>
</
div
>
)
}
</
div
>
);
};
...
...
@@ -137,7 +141,7 @@ const TagItemContainer: React.FC<TagItemContainerProps> = (props: TagItemContain
return
(
<>
<
div
className=
"relative flex flex-row justify-between items-center w-full leading-6 py-0 mt-px rounded-lg text-
base
select-none shrink-0"
>
<
div
className=
"relative flex flex-row justify-between items-center w-full leading-6 py-0 mt-px rounded-lg text-
sm
select-none shrink-0"
>
<
div
className=
{
`flex flex-row justify-start items-center truncate shrink leading-5 mr-1 text-gray-600 dark:text-gray-400 ${
isActive && "!text-blue-600"
...
...
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