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
891
Issues
891
List
Boards
Labels
Service Desk
Milestones
Merge Requests
51
Merge Requests
51
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
Commits
2ee36af5
Commit
2ee36af5
authored
38 minutes ago
by
Marcelo Rivera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix): blog tiles should open the modal. moved behaviour to the tile itself
parent
640d2ce0
epic/minds-pro
1 merge request
!507
WIP: (feat): Minds Pro (development branch) - Release 3
Pipeline
#78975743
failed with stages
in 7 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
tile.component.html
src/app/modules/pro/channel/tiles/media/tile.component.html
+5
-8
tile.component.ts
src/app/modules/pro/channel/tiles/media/tile.component.ts
+13
-1
No files found.
src/app/modules/pro/channel/tiles/media/tile.component.html
View file @
2ee36af5
<ng-container
[ngSwitch]=
"getType(entity)"
>
<img
*ngSwitchCase=
"'object:image'"
[src]=
"entity.thumbnail_src"
(click)=
"showMediaModal()"
#img
>
<m-video
*ngSwitchCase=
"'object:video'"
...
...
@@ -18,14 +12,17 @@
[torrent]=
"[{ res: '360', key: entity.guid + '/360.mp4' }]"
[isActivity]=
"true"
(videoMetadataLoaded)=
"setVideoDimensions($event)"
(mediaModalRequested)=
"
showMediaModal
()"
(mediaModalRequested)=
"
tileClicked
()"
#player
></m-video>
<img
*ngSwitch
Case=
"'object:blog'"
*ngSwitch
Default
[src]=
"entity.thumbnail_src"
(click)=
"tileClicked()"
#img
>
</ng-container>
<div
class=
"m-proChannelTile__text"
*ngIf=
"getTitle() || getText()"
>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/tiles/media/tile.component.ts
View file @
2ee36af5
import
{
ChangeDetectionStrategy
,
Component
,
ElementRef
,
Input
,
ViewChild
}
from
'
@angular/core
'
;
import
{
ChangeDetectionStrategy
,
Component
,
ElementRef
,
HostListener
,
Input
,
ViewChild
}
from
'
@angular/core
'
;
import
{
MediaModalComponent
}
from
"
../../../../media/modal/modal.component
"
;
import
{
FeaturesService
}
from
"
../../../../../services/features.service
"
;
import
{
OverlayModalService
}
from
"
../../../../../services/ux/overlay-modal
"
;
import
{
Router
}
from
"
@angular/router
"
;
import
toMockActivity
from
"
../../util/mock-activity
"
;
import
{
ProChannelService
}
from
"
../../channel.service
"
;
@
Component
({
selector
:
'
m-pro--channel-tile
'
,
...
...
@@ -18,6 +19,7 @@ export class ProTileComponent {
constructor
(
protected
featuresService
:
FeaturesService
,
protected
channelService
:
ProChannelService
,
protected
modalService
:
OverlayModalService
,
protected
router
:
Router
,
)
{
...
...
@@ -55,6 +57,16 @@ export class ProTileComponent {
this
.
videoDimensions
=
$event
.
dimensions
;
}
tileClicked
()
{
switch
(
this
.
getType
(
this
.
entity
))
{
case
'
object:image
'
:
case
'
object:video
'
:
this
.
showMediaModal
();
case
'
object:blog
'
:
this
.
channelService
.
open
(
this
.
entity
,
this
.
modalService
);
}
}
showMediaModal
()
{
const
activity
=
toMockActivity
(
this
.
entity
);
if
(
this
.
featuresService
.
has
(
'
media-modal
'
))
{
...
...
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