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
777ed899
Commit
777ed899
authored
Jan 08, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: add memo uid
parent
ddcf1d66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
HorizontalRule.tsx
web/src/components/MemoContent/HorizontalRule.tsx
+2
-1
MemoView.tsx
web/src/components/MemoView.tsx
+12
-0
No files found.
web/src/components/MemoContent/HorizontalRule.tsx
View file @
777ed899
import
{
Divider
}
from
"@mui/joy"
;
import
{
BaseProps
}
from
"./types"
;
interface
Props
extends
BaseProps
{
...
...
@@ -5,7 +6,7 @@ interface Props extends BaseProps {
}
const
HorizontalRule
:
React
.
FC
<
Props
>
=
()
=>
{
return
<
hr
/>;
return
<
Divider
className=
"!my-3"
/>;
};
export
default
HorizontalRule
;
web/src/components/MemoView.tsx
View file @
777ed899
import
{
Divider
,
Tooltip
}
from
"@mui/joy"
;
import
copy
from
"copy-to-clipboard"
;
import
{
memo
,
useEffect
,
useRef
,
useState
}
from
"react"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
useTranslation
}
from
"react-i18next"
;
...
...
@@ -148,6 +149,11 @@ const MemoView: React.FC<Props> = (props: Props) => {
});
};
const
handleCopyMemoId
=
()
=>
{
copy
(
String
(
memo
.
id
));
toast
.
success
(
"Copied to clipboard!"
);
};
const
handleMemoContentClick
=
async
(
e
:
React
.
MouseEvent
)
=>
{
const
targetEl
=
e
.
target
as
HTMLElement
;
...
...
@@ -245,6 +251,12 @@ const MemoView: React.FC<Props> = (props: Props) => {
<
Icon
.
Trash
className=
"w-4 h-auto mr-2"
/>
{
t
(
"common.delete"
)
}
</
span
>
<
Divider
className=
"!my-1"
/>
<
div
className=
"w-full px-3 text-xs text-gray-400"
>
<
span
className=
"cursor-pointer"
onClick=
{
handleCopyMemoId
}
>
ID:
<
span
className=
"font-mono"
>
{
memo
.
id
}
</
span
>
</
span
>
</
div
>
</
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