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
eccddb11
Unverified
Commit
eccddb11
authored
Jul 07, 2024
by
Johnny
Committed by
GitHub
Jul 07, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: add create time to memo detail sidebar (#3657)
parent
a681b8e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
MemoDetailSidebar.tsx
web/src/components/MemoDetailSidebar/MemoDetailSidebar.tsx
+17
-2
No files found.
web/src/components/MemoDetailSidebar/MemoDetailSidebar.tsx
View file @
eccddb11
import
clsx
from
"clsx"
;
import
clsx
from
"clsx"
;
import
{
isEqual
}
from
"lodash-es"
;
import
{
Memo
}
from
"@/types/proto/api/v1/memo_service"
;
import
{
Memo
}
from
"@/types/proto/api/v1/memo_service"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
Icon
from
"../Icon"
;
import
Icon
from
"../Icon"
;
...
@@ -22,8 +23,22 @@ const MemoDetailSidebar = ({ memo, className }: Props) => {
...
@@ -22,8 +23,22 @@ const MemoDetailSidebar = ({ memo, className }: Props) => {
className
,
className
,
)
}
)
}
>
>
<
div
className=
"flex flex-col justify-start items-start w-full mt-1 px-1 h-auto shrink-0 flex-nowrap hide-scrollbar"
>
<
div
className=
"flex flex-col justify-start items-start w-full mt-1 px-1 gap-2 h-auto shrink-0 flex-nowrap hide-scrollbar"
>
<
div
className=
"flex flex-row justify-start items-center w-full gap-1 mb-1 text-sm leading-6 text-gray-400 select-none"
>
<
div
className=
"w-full flex flex-col"
>
<
p
className=
"flex flex-row justify-start items-center w-full gap-1 mb-1 text-sm leading-6 text-gray-400 dark:text-gray-500 select-none"
>
<
span
>
Created at
</
span
>
</
p
>
<
p
className=
"text-sm dark:text-gray-400"
>
{
memo
.
createTime
?.
toLocaleString
()
}
</
p
>
</
div
>
{
!
isEqual
(
memo
.
createTime
,
memo
.
updateTime
)
&&
(
<
div
className=
"w-full flex flex-col"
>
<
p
className=
"flex flex-row justify-start items-center w-full gap-1 mb-1 text-sm leading-6 text-gray-400 dark:text-gray-500 select-none"
>
<
span
>
Last updated at
</
span
>
</
p
>
<
p
className=
"text-sm dark:text-gray-400"
>
{
memo
.
updateTime
?.
toLocaleString
()
}
</
p
>
</
div
>
)
}
<
div
className=
"flex flex-row justify-start items-center w-full gap-1 mb-1 text-sm leading-6 text-gray-400 dark:text-gray-500 select-none"
>
<
span
>
{
t
(
"common.tags"
)
}
</
span
>
<
span
>
{
t
(
"common.tags"
)
}
</
span
>
{
memo
.
property
.
tags
.
length
>
0
&&
<
span
className=
"shrink-0"
>
(
{
memo
.
property
.
tags
.
length
}
)
</
span
>
}
{
memo
.
property
.
tags
.
length
>
0
&&
<
span
className=
"shrink-0"
>
(
{
memo
.
property
.
tags
.
length
}
)
</
span
>
}
</
div
>
</
div
>
...
...
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