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
e268a1fe
Commit
e268a1fe
authored
Jan 05, 2026
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak memo content renderer
parent
ac377381
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
index.tsx
web/src/components/MemoContent/index.tsx
+3
-2
AttachmentCard.tsx
...omponents/MemoView/components/metadata/AttachmentCard.tsx
+0
-3
No files found.
web/src/components/MemoContent/index.tsx
View file @
e268a1fe
...
...
@@ -55,10 +55,11 @@ const MemoContent = (props: MemoContentProps) => {
return
<
input
{
...
inputProps
}
/>;
})
as
React
.
ComponentType
<
React
.
ComponentProps
<
"input"
>>
,
span
:
((
spanProps
:
React
.
ComponentProps
<
"span"
>
&
{
node
?:
Element
})
=>
{
if
(
spanProps
.
node
&&
isTagNode
(
spanProps
.
node
))
{
const
{
node
,
...
rest
}
=
spanProps
;
if
(
node
&&
isTagNode
(
node
))
{
return
<
Tag
{
...
spanProps
}
/>;
}
return
<
span
{
...
spanProps
}
/>;
return
<
span
{
...
rest
}
/>;
})
as
React
.
ComponentType
<
React
.
ComponentProps
<
"span"
>>
,
pre
:
CodeBlock
,
a
:
({
href
,
children
,
...
aProps
})
=>
(
...
...
web/src/components/MemoView/components/metadata/AttachmentCard.tsx
View file @
e268a1fe
...
...
@@ -11,7 +11,6 @@ interface AttachmentCardProps {
const
AttachmentCard
=
({
attachment
,
onClick
,
className
}:
AttachmentCardProps
)
=>
{
const
attachmentType
=
getAttachmentType
(
attachment
);
const
sourceUrl
=
getAttachmentUrl
(
attachment
);
const
colorspace
=
getColorspace
(
attachment
.
type
);
if
(
attachmentType
===
"image/*"
)
{
return
(
...
...
@@ -21,7 +20,6 @@ const AttachmentCard = ({ attachment, onClick, className }: AttachmentCardProps)
className=
{
cn
(
"w-full h-full object-cover rounded-lg cursor-pointer"
,
className
)
}
onClick=
{
onClick
}
loading=
"lazy"
{
...
(
colorspace
&&
{
colorSpace
:
colorspace
as
unknown
as
string
})}
/>
);
}
...
...
@@ -33,7 +31,6 @@ const AttachmentCard = ({ attachment, onClick, className }: AttachmentCardProps)
className=
{
cn
(
"w-full h-full object-cover rounded-lg"
,
className
)
}
controls
preload=
"metadata"
{
...
(
colorspace
&&
{
colorSpace
:
colorspace
as
unknown
as
string
})}
/>
);
}
...
...
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