Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

704 add instructor approved i note to playlist screen for each video #829

Open
wants to merge 4 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Cards/MediaCard/index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.ct-media-card {
display: flex;
width: 100%;
width: 82%;
position: relative;
overflow: hidden;

Expand Down
32 changes: 23 additions & 9 deletions src/screens/Watch/Components/Menus/PlaylistsMenu/Videos.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React, { useEffect } from 'react';
import { CTLoader } from 'layout';
import { useButtonStyles, CTLoader } from 'layout';
import { MediaCard } from 'components';
import { elem } from 'utils';
import Button from '@material-ui/core/Button';
import cx from 'classnames';
import { links, elem } from 'utils';
import { connectWithRedux } from '../../../Utils';

function Videos({
Expand All @@ -10,6 +12,8 @@ function Videos({
currPlaylist = {},
}) {
let { medias } = currPlaylist;
const btn = useButtonStyles();
const btnClassName = cx(btn.tealLink, 'media-item-button');

useEffect(() => {
elem.scrollIntoCenter(currMediaId, {
Expand All @@ -35,13 +39,23 @@ function Videos({
<div className="w-100 d-flex justify-content-center align-items-center m-5">NO VIDEO</div>
) : (
medias.map((me) => (
<MediaCard
row
dark
posterSize="small"
label={currMediaId === me.id ? 'NOW PLAYING' : null}
{...MediaCard.parse(me)}
/>
<div className='playlist-item'>
<MediaCard
row
dark
posterSize="small"
label={currMediaId === me.id ? 'NOW PLAYING' : null}
{...MediaCard.parse(me)}
/>
<Button
id="inote-button"
className={btnClassName}
startIcon={<i className="material-icons">import_contacts</i>}
href={links.mspEpubSettings(me.id)}
>
I-Note
</Button>
</div>
))
)}
</ul>
Expand Down
11 changes: 11 additions & 0 deletions src/screens/Watch/Components/Menus/PlaylistsMenu/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,14 @@
display: none;
}
}
.playlist-item {
display: flex;
white-space: nowrap !important;
overflow: hidden;
}
#inote-button {
color: white !important;
&:hover {
color: teal !important;
}
}