|
|
|
@ -12,7 +12,7 @@ const CourseChapter = ({ |
|
|
|
|
selectedVideo, |
|
|
|
|
userId, |
|
|
|
|
setVideoActive, |
|
|
|
|
isMobile |
|
|
|
|
isMobile, |
|
|
|
|
}) => { |
|
|
|
|
const duration = (value) => { |
|
|
|
|
const minute = value % 60; |
|
|
|
@ -30,19 +30,19 @@ const CourseChapter = ({ |
|
|
|
|
className={`bg-transparent lg:bg-green1 bg-opacity-10 lg:bg-opacity-10 lg:shadow-md lg:py-5 lg:pr-5 overflow-hidden flex flex-col rounded-md`} |
|
|
|
|
style={{ |
|
|
|
|
minWidth: "calc(100% / 12 * 3.5)", |
|
|
|
|
height: isMobile ? "auto" :"calc(100vh - 300px)", |
|
|
|
|
height: isMobile ? "auto" : "calc(100vh - 300px)", |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
<div className="hidden lg:flex flex-row w-full items-center justify-between"> |
|
|
|
|
<div> |
|
|
|
|
<h2 className="text-green7B bg-opacity-5 text-base font-semibold"> |
|
|
|
|
سرفصل دوره |
|
|
|
|
{window.t("سرفصل دوره")} |
|
|
|
|
</h2> |
|
|
|
|
</div> |
|
|
|
|
<div className="flex flex-row-reverse items-center divide-x divide-solid transform translate-x-2"> |
|
|
|
|
<span className="text-green7B text-sm px-2">{book?.name}</span> |
|
|
|
|
<span className="text-green7B text-sm px-2"> |
|
|
|
|
{"پایه" + " " + grades[book?.gradeId]} |
|
|
|
|
{`${window.t("پایه")}` + " " + grades[book?.gradeId]} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -88,7 +88,10 @@ const CourseChapter = ({ |
|
|
|
|
></span> |
|
|
|
|
</div> |
|
|
|
|
{/* left div content */} |
|
|
|
|
<div className="py-1.5" style={{ width: isMobile ? '100%' :"90%" }}> |
|
|
|
|
<div |
|
|
|
|
className="py-1.5" |
|
|
|
|
style={{ width: isMobile ? "100%" : "90%" }} |
|
|
|
|
> |
|
|
|
|
<div |
|
|
|
|
className={`w-full bg-white flex flex-col transition duration-400 hover:scale-95 shadow-md border border-solid border-green-200 transform rounded-md
|
|
|
|
|
${ |
|
|
|
@ -100,7 +103,7 @@ const CourseChapter = ({ |
|
|
|
|
onClick={() => |
|
|
|
|
video?.isFreeVod || +userId === 140 |
|
|
|
|
? setVideoActive(video) |
|
|
|
|
: toast.error("ابتدا محصول رو خریداری کن!") |
|
|
|
|
: toast.error(`${window.t("ابتدا محصول رو خریداری کن!")}`) |
|
|
|
|
} |
|
|
|
|
disabled={true} |
|
|
|
|
> |
|
|
|
@ -138,7 +141,9 @@ const CourseChapter = ({ |
|
|
|
|
: "text-blueC0" |
|
|
|
|
}`}
|
|
|
|
|
> |
|
|
|
|
{selectedVideo?.id === video?.id ? "در حال پخش" : "پخش"} |
|
|
|
|
{selectedVideo?.id === video?.id |
|
|
|
|
? `${window.t("در حال پخش")}` |
|
|
|
|
: `${window.t("پخش")}`} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -157,7 +162,7 @@ const mapStateToProps = (state) => ({ |
|
|
|
|
grades: state.publicApi.grades, |
|
|
|
|
// vods: state.publicApi.bookSection?.vods,
|
|
|
|
|
userId: state?.user?.status?.id, |
|
|
|
|
isMobile: state.publicApi.isMobile |
|
|
|
|
isMobile: state.publicApi.isMobile, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = { |
|
|
|
|