Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
894
Issues
894
List
Boards
Labels
Service Desk
Milestones
Merge Requests
50
Merge Requests
50
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Compare Revisions
beede53c678d01fa2e5516a1ae317c286fa397ed...da9f463062244ce29273ad0e1ef7af8a87e8dea6
Source
da9f463062244ce29273ad0e1ef7af8a87e8dea6
Select Git revision
...
Target
beede53c678d01fa2e5516a1ae317c286fa397ed
Select Git revision
Compare
Commits (2)
(fix): click on video tiles
· ca8eb460
Marcelo Rivera
authored
4 minutes ago
ca8eb460
Merge branch 'epic/minds-pro' of
https://gitlab.com/minds/front
into epic/minds-pro
· da9f4630
Marcelo Rivera
authored
3 minutes ago
da9f4630
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
5 deletions
+28
-5
tile.component.ts
src/app/modules/pro/channel/tiles/media/tile.component.ts
+5
-3
mock-activity.ts
src/app/modules/pro/channel/util/mock-activity.ts
+23
-2
No files found.
src/app/modules/pro/channel/tiles/media/tile.component.ts
View file @
da9f4630
...
...
@@ -58,17 +58,19 @@ export class ProTileComponent {
}
tileClicked
()
{
switch
(
this
.
getType
(
this
.
entity
))
{
switch
(
this
.
getType
(
this
.
entity
))
{
case
'
object:image
'
:
case
'
object:video
'
:
this
.
showMediaModal
();
break
;
case
'
object:blog
'
:
this
.
channelService
.
open
(
this
.
entity
,
this
.
modalService
);
break
;
}
}
showMediaModal
()
{
const
activity
=
toMockActivity
(
this
.
entity
);
const
activity
=
toMockActivity
(
this
.
entity
,
this
.
entity
.
subtype
===
'
video
'
?
this
.
videoDimensions
:
null
);
if
(
this
.
featuresService
.
has
(
'
media-modal
'
))
{
// Mobile (not tablet) users go to media page instead of modal
// if (isMobile() && Math.min(screen.width, screen.height) < 768) {
...
...
@@ -77,7 +79,7 @@ export class ProTileComponent {
if
(
activity
.
custom_type
===
'
video
'
)
{
activity
.
custom_data
.
dimensions
=
this
.
videoDimensions
;
}
else
{
// Image
}
else
if
(
activity
.
custom_type
===
'
image
'
)
{
// Image
// Set image dimensions if they're not already there
const
img
:
HTMLImageElement
=
this
.
img
.
nativeElement
;
activity
.
custom_data
[
0
].
width
=
img
.
naturalWidth
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/util/mock-activity.ts
View file @
da9f4630
...
...
@@ -2,7 +2,7 @@
* generates an activity from an image or video
* @param entity
*/
export
default
function
toMockActivity
(
entity
:
any
)
{
export
default
function
toMockActivity
(
entity
:
any
,
dimensions
?:
any
)
{
let
obj
=
{
...
entity
,
entity_guid
:
entity
.
guid
,
...
...
@@ -12,8 +12,16 @@ export default function toMockActivity(entity: any) {
if
(
entity
.
subtype
===
'
video
'
)
{
obj
.
custom_data
=
{
...
entity
,
dimensions
:
this
.
videoD
imensions
dimensions
:
d
imensions
};
}
else
if
(
entity
.
subtype
===
'
blog
'
)
{
obj
.
custom_data
=
[{
...
entity
,
dimensions
:
{
width
:
document
.
documentElement
.
clientWidth
,
height
:
document
.
documentElement
.
clientHeight
}
}];
}
else
{
obj
.
custom_data
=
[{
...
entity
,
...
...
@@ -24,3 +32,16 @@ export default function toMockActivity(entity: any) {
return
obj
;
}
class
Translate
{
execute
(
entity
:
any
)
{
}
}
class
ImageTranslate
extends
Translate
{
execute
(
entity
:
any
)
{
return
{};
}
}
This diff is collapsed.
Click to expand it.