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
a8074d94
Commit
a8074d94
authored
Jan 13, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update image attrs
parent
16e68fbf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
2 deletions
+8
-2
Image.tsx
web/src/components/MemoContent/Image.tsx
+1
-1
MemoResourceListView.tsx
web/src/components/MemoResourceListView.tsx
+1
-0
PreviewImageDialog.tsx
web/src/components/PreviewImageDialog.tsx
+2
-0
ResourceIcon.tsx
web/src/components/ResourceIcon.tsx
+2
-1
UserAvatar.tsx
web/src/components/UserAvatar.tsx
+2
-0
No files found.
web/src/components/MemoContent/Image.tsx
View file @
a8074d94
...
@@ -4,7 +4,7 @@ interface Props {
...
@@ -4,7 +4,7 @@ interface Props {
}
}
const
Image
:
React
.
FC
<
Props
>
=
({
altText
,
url
}:
Props
)
=>
{
const
Image
:
React
.
FC
<
Props
>
=
({
altText
,
url
}:
Props
)
=>
{
return
<
img
alt=
{
altText
}
src=
{
url
}
/>;
return
<
img
src=
{
url
}
alt=
{
altText
}
decoding=
"async"
loading=
"lazy"
/>;
};
};
export
default
Image
;
export
default
Image
;
web/src/components/MemoResourceListView.tsx
View file @
a8074d94
...
@@ -39,6 +39,7 @@ const MemoResourceListView = ({ resourceList = [] }: { resourceList: Resource[]
...
@@ -39,6 +39,7 @@ const MemoResourceListView = ({ resourceList = [] }: { resourceList: Resource[]
src=
{
resource
.
externalLink
?
url
:
`${url}${thumbnail ? "?thumbnail=1" : ""}`
}
src=
{
resource
.
externalLink
?
url
:
`${url}${thumbnail ? "?thumbnail=1" : ""}`
}
onClick=
{
()
=>
handleImageClick
(
url
)
}
onClick=
{
()
=>
handleImageClick
(
url
)
}
decoding=
"async"
decoding=
"async"
loading=
"lazy"
/>
/>
);
);
}
else
if
(
type
===
"video/*"
)
{
}
else
if
(
type
===
"video/*"
)
{
...
...
web/src/components/PreviewImageDialog.tsx
View file @
a8074d94
...
@@ -128,6 +128,8 @@ const PreviewImageDialog: React.FC<Props> = ({ destroy, imgUrls, initialIndex }:
...
@@ -128,6 +128,8 @@ const PreviewImageDialog: React.FC<Props> = ({ destroy, imgUrls, initialIndex }:
onTouchMove=
{
handleTouchMove
}
onTouchMove=
{
handleTouchMove
}
onTouchEnd=
{
handleTouchEnd
}
onTouchEnd=
{
handleTouchEnd
}
onWheel=
{
handleImgContainerScroll
}
onWheel=
{
handleImgContainerScroll
}
decoding=
"async"
loading=
"lazy"
/>
/>
</
div
>
</
div
>
</>
</>
...
...
web/src/components/ResourceIcon.tsx
View file @
a8074d94
...
@@ -27,10 +27,11 @@ const ResourceIcon = (props: Props) => {
...
@@ -27,10 +27,11 @@ const ResourceIcon = (props: Props) => {
return
(
return
(
<
SquareDiv
className=
{
classNames
(
className
,
"flex items-center justify-center overflow-clip"
)
}
>
<
SquareDiv
className=
{
classNames
(
className
,
"flex items-center justify-center overflow-clip"
)
}
>
<
img
<
img
loading=
"lazy"
className=
"min-w-full min-h-full object-cover border rounded dark:border-none"
className=
"min-w-full min-h-full object-cover border rounded dark:border-none"
src=
{
resource
.
externalLink
?
resourceUrl
:
resourceUrl
+
"?thumbnail=1"
}
src=
{
resource
.
externalLink
?
resourceUrl
:
resourceUrl
+
"?thumbnail=1"
}
onClick=
{
()
=>
showPreviewImageDialog
(
resourceUrl
)
}
onClick=
{
()
=>
showPreviewImageDialog
(
resourceUrl
)
}
decoding=
"async"
loading=
"lazy"
/>
/>
</
SquareDiv
>
</
SquareDiv
>
);
);
...
...
web/src/components/UserAvatar.tsx
View file @
a8074d94
...
@@ -12,6 +12,8 @@ const UserAvatar = (props: Props) => {
...
@@ -12,6 +12,8 @@ const UserAvatar = (props: Props) => {
<
img
<
img
className=
"w-full h-auto rounded-full shadow min-w-full min-h-full object-cover dark:opacity-80"
className=
"w-full h-auto rounded-full shadow min-w-full min-h-full object-cover dark:opacity-80"
src=
{
avatarUrl
||
"/logo.png"
}
src=
{
avatarUrl
||
"/logo.png"
}
decoding=
"async"
loading=
"lazy"
alt=
""
alt=
""
/>
/>
</
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