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
888
Issues
888
List
Boards
Labels
Service Desk
Milestones
Merge Requests
48
Merge Requests
48
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
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
55b9ceb6
Commit
55b9ceb6
authored
2 hours ago
by
Olivia Madrid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat): remove an unused fx to pass tests
parent
855a4229
feat/media-modal-service-1822
1 merge request
!530
WIP: Agnostic media modal
Pipeline
#79366669
failed with stages
in 8 minutes and 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
30 deletions
+30
-30
card.ts
src/app/modules/blogs/card/card.ts
+29
-29
video.component.spec.ts
...pp/modules/media/components/video/video.component.spec.ts
+1
-1
No files found.
src/app/modules/blogs/card/card.ts
View file @
55b9ceb6
...
...
@@ -2,11 +2,11 @@ import { Component } from '@angular/core';
import
{
Session
}
from
'
../../../services/session
'
;
import
{
AttachmentService
}
from
'
../../../services/attachment
'
;
import
{
ACCESS
}
from
'
../../../services/list-options
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
MediaModalComponent
}
from
'
../../media/modal/modal.component
'
;
import
{
OverlayModalService
}
from
'
../../../services/ux/overlay-modal
'
;
import
{
FeaturesService
}
from
'
../../../services/features.service
'
;
import
isMobile
from
'
../../../helpers/is-mobile
'
;
//
import { Router } from '@angular/router';
//
import { MediaModalComponent } from '../../media/modal/modal.component';
//
import { OverlayModalService } from '../../../services/ux/overlay-modal';
//
import { FeaturesService } from '../../../services/features.service';
//
import isMobile from '../../../helpers/is-mobile';
@
Component
({
moduleId
:
module
.
id
,
...
...
@@ -22,9 +22,9 @@ export class BlogCard {
constructor
(
public
session
:
Session
,
public
attachment
:
AttachmentService
,
private
router
:
Router
,
protected
featuresService
:
FeaturesService
,
private
overlayModal
:
OverlayModalService
//
private router: Router,
//
protected featuresService: FeaturesService,
//
private overlayModal: OverlayModalService
)
{
this
.
minds
=
window
.
Minds
;
}
...
...
@@ -35,28 +35,28 @@ export class BlogCard {
this
.
blog
=
value
;
}
showMediaModal
()
{
const
route
=
this
.
blog
.
route
?
`/
${
this
.
blog
.
route
}
`
:
`/blog/view
${
this
.
blog
.
guid
}
`
;
const
isNotTablet
=
Math
.
min
(
screen
.
width
,
screen
.
height
)
<
768
;
//
showMediaModal() {
//
const route = this.blog.route
//
? `/${this.blog.route}`
//
: `/blog/view${this.blog.guid}`;
//
const isNotTablet = Math.min(screen.width, screen.height) < 768;
if
(
isMobile
()
&&
isNotTablet
)
{
this
.
router
.
navigate
([
route
]);
return
;
}
//
if (isMobile() && isNotTablet) {
//
this.router.navigate([route]);
//
return;
//
}
if
(
!
this
.
featuresService
.
has
(
'
media-modal
'
))
{
this
.
router
.
navigate
([
route
]);
return
;
}
else
{
this
.
blog
.
modal_source_url
=
this
.
router
.
url
;
//
if (!this.featuresService.has('media-modal')) {
//
this.router.navigate([route]);
//
return;
//
} else {
//
this.blog.modal_source_url = this.router.url;
this
.
overlayModal
.
create
(
MediaModalComponent
,
this
.
blog
,
{
class
:
'
m-overlayModal--media
'
,
})
.
present
();
}
}
//
this.overlayModal
//
.create(MediaModalComponent, this.blog, {
//
class: 'm-overlayModal--media',
//
})
//
.present();
//
}
//
}
}
This diff is collapsed.
Click to expand it.
src/app/modules/media/components/video/video.component.spec.ts
View file @
55b9ceb6
...
...
@@ -214,7 +214,7 @@ describe('MindsVideo', () => {
// video.src = 'thisisavideo.mp4';
const
video
=
new
HTMLVideoElementMock
();
comp
.
playerRef
.
getPlayer
=
()
=>
<
any
>
video
;
comp
.
isActivity
=
false
;
comp
.
shouldPlayInModal
=
false
;
comp
.
showControls
=
true
;
fixture
.
detectChanges
();
// re-render
...
...
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