Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
384
Merge Requests
55
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
55f7fa87
Commit
55f7fa87
authored
2 hours ago
by
Marcelo Rivera
Browse files
Options
Download
(fix): added jsdoc
(fix): cleanup
parent
1bc00288
feat/modal-in-media-feeds-2226
1 merge request
!683
Use media modal in channel media feeds
Pipeline
#106617401
failed with stages
in 27 minutes
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
21 deletions
+15
-21
src/app/modules/newsfeed/feeds/tiles.component.html
View file @
55f7fa87
...
...
@@ -13,16 +13,17 @@
>
<img
[src]=
"getThumbnailSrc(entity$ | async)"
(click)=
"clickedImage(entity,
this
)"
(click)=
"clickedImage(entity,
$event
)"
/>
<i
*ngIf=
"attachment.shouldBeBlurred(entity)"
class=
"material-icons mature-icon"
>
explicit
</i
>
<i
*ngIf=
"isUnlisted(entity)"
class=
"material-icons unlisted-icon"
>
visibility_off
</i
>
explicit
</i>
<i
*ngIf=
"isUnlisted(entity)"
class=
"material-icons unlisted-icon"
>
visibility_off
</i>
</a>
</ng-container>
</div>
This diff is collapsed.
src/app/modules/newsfeed/feeds/tiles.component.ts
View file @
55f7fa87
...
...
@@ -17,8 +17,7 @@ export class NewsfeedTilesComponent {
constructor
(
public
attachment
:
AttachmentService
,
private
router
:
Router
,
private
overlayModalService
:
OverlayModalService
,
private
featuresService
:
FeaturesService
private
overlayModalService
:
OverlayModalService
)
{}
getThumbnailSrc
(
entity
:
any
)
{
...
...
@@ -48,7 +47,11 @@ export class NewsfeedTilesComponent {
return
entity
&&
(
entity
.
access_id
===
'
0
'
||
entity
.
access_id
===
0
);
}
clickedImage
(
entity
:
any
,
batchImage
)
{
/**
* @param entity
* @param event
*/
clickedImage
(
entity
:
any
,
event
:
MouseEvent
)
{
const
isNotTablet
=
Math
.
min
(
screen
.
width
,
screen
.
height
)
<
768
;
const
pageUrl
=
`/media/
${
entity
.
entity_guid
}
`
;
...
...
@@ -57,22 +60,12 @@ export class NewsfeedTilesComponent {
return
;
}
if
(
!
this
.
featuresService
.
has
(
'
media-modal
'
))
{
this
.
router
.
navigate
([
pageUrl
]);
return
;
}
else
{
if
(
entity
.
width
===
'
0
'
||
entity
.
height
===
'
0
'
)
{
this
.
setImageDimensions
(
entity
,
batchImage
);
}
this
.
openModal
(
entity
);
if
(
entity
.
width
===
'
0
'
||
entity
.
height
===
'
0
'
)
{
this
.
setImageDimensions
(
entity
,
event
.
target
as
HTMLImageElement
);
}
this
.
openModal
(
entity
);
}
// setVideoDimensions($event) {
// this.videoDimensions = $event.dimensions;
// entity.custom_data.dimensions = videoDimensions;
// }
setImageDimensions
(
entity
,
imageElement
:
HTMLImageElement
)
{
const
img
:
HTMLImageElement
=
imageElement
;
entity
.
width
=
img
.
naturalWidth
;
...
...
This diff is collapsed.
Please
register
or
sign in
to comment