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
aafcc21a
Commit
aafcc21a
authored
Apr 06, 2026
by
boojack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: improve image preview dialog and live photo trigger
parent
6b0487dc
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
198 additions
and
87 deletions
+198
-87
MotionPhotoPreview.tsx
web/src/components/MotionPhotoPreview.tsx
+11
-4
PreviewImageDialog.tsx
web/src/components/PreviewImageDialog.tsx
+187
-83
No files found.
web/src/components/MotionPhotoPreview.tsx
View file @
aafcc21a
...
@@ -41,10 +41,11 @@ const MotionPhotoPreview = ({
...
@@ -41,10 +41,11 @@ const MotionPhotoPreview = ({
containerClassName=
{
cn
(
"max-w-full max-h-full"
,
containerClassName
)
}
containerClassName=
{
cn
(
"max-w-full max-h-full"
,
containerClassName
)
}
mediaClassName=
{
mediaClassName
}
mediaClassName=
{
mediaClassName
}
/>
/>
<
button
<
div
type=
"button"
role=
"button"
tabIndex=
{
0
}
className=
{
cn
(
className=
{
cn
(
"absolute rounded-full border border-border/45 bg-background/65 px-2.5 py-1 text-xs font-semibold tracking-wide text-foreground backdrop-blur-sm transition-colors hover:bg-background/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50"
,
"absolute
select-none
rounded-full border border-border/45 bg-background/65 px-2.5 py-1 text-xs font-semibold tracking-wide text-foreground backdrop-blur-sm transition-colors hover:bg-background/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50"
,
badgeClassName
,
badgeClassName
,
)
}
)
}
onMouseEnter=
{
()
=>
setMotionActive
(
true
)
}
onMouseEnter=
{
()
=>
setMotionActive
(
true
)
}
...
@@ -64,10 +65,16 @@ const MotionPhotoPreview = ({
...
@@ -64,10 +65,16 @@ const MotionPhotoPreview = ({
}
}
}
}
}
}
onPointerCancel=
{
()
=>
setMotionActive
(
false
)
}
onPointerCancel=
{
()
=>
setMotionActive
(
false
)
}
onKeyDown=
{
(
event
)
=>
{
if
(
event
.
key
===
"Enter"
||
event
.
key
===
" "
)
{
event
.
preventDefault
();
setMotionActive
((
prev
)
=>
!
prev
);
}
}
}
aria
-
label=
"Hover or press to play live photo"
aria
-
label=
"Hover or press to play live photo"
>
>
LIVE
LIVE
</
button
>
</
div
>
</
div
>
</
div
>
);
);
};
};
...
...
web/src/components/PreviewImageDialog.tsx
View file @
aafcc21a
This diff is collapsed.
Click to expand it.
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