-
Logout
+
+
+
+ Logout
+
-
- ) : (
-
-
-
-
+
);
}
\ No newline at end of file
diff --git a/frontend-plataforma-tutoriais/src/components/sidebar/styles.module.css b/frontend-plataforma-tutoriais/src/components/sidebar/styles.module.css
index 15dc290..a3b0718 100644
--- a/frontend-plataforma-tutoriais/src/components/sidebar/styles.module.css
+++ b/frontend-plataforma-tutoriais/src/components/sidebar/styles.module.css
@@ -1,5 +1,4 @@
.sidebar {
- width: 260px;
height: 100vh;
background: #ffffff;
border-right: 1px solid #e9ecef;
@@ -65,6 +64,9 @@
color: #495057;
border-radius: 8px;
padding: 10px 12px;
+ overflow: hidden;
+ display: flex;
+ align-items: center;
transition: background-color 0.2s ease, color 0.2s ease;
&:hover{
background-color: var(--bg-grey);
diff --git a/frontend-plataforma-tutoriais/src/pages/private/dashboard/index.tsx b/frontend-plataforma-tutoriais/src/pages/private/dashboard/index.tsx
index 794ac0f..d40b8ab 100644
--- a/frontend-plataforma-tutoriais/src/pages/private/dashboard/index.tsx
+++ b/frontend-plataforma-tutoriais/src/pages/private/dashboard/index.tsx
@@ -5,7 +5,8 @@ import styles from "./styles.module.css";
import { LuArrowUpRight, LuCalendar, LuClock3, LuPencil } from "react-icons/lu";
import { Link } from "react-router";
import { CgSpinner } from "react-icons/cg";
-import { ProgressBar } from "react-bootstrap";
+import AnimatedProgressBar from "../../../components/animatedProgressBar";
+import AnimatedCounter from "../../../components/animatedNumberCount";
/* import { useGetCurrentUser } from "../../../hooks/useGetCurrentUser"
import { useGetVideosLength } from "../../../hooks/useGetVideosLength";
@@ -197,7 +198,7 @@ export default function Home() {
{role !== 1 && (
<>
-
+
{progressoVideos === 100 && (
@@ -348,12 +349,12 @@ export default function Home() {
{role === 1 ? "Vídeos ativos" : "Vídeos assistidos"}
-
{role === 1 ? videosCount : `${videosWatched}/${videosCount}`}
+
{role === 1 ? : }/
{role === 1 ? "Workshops agendados" : "Workshops inscrito"}
-
{role === 1 ? workshopsCount : `${workshopsInscribed}/${workshopsCount}`}
+
{role === 1 ? : }/{}
diff --git a/frontend-plataforma-tutoriais/src/pages/private/profile/index.tsx b/frontend-plataforma-tutoriais/src/pages/private/profile/index.tsx
index 8002bc2..5d1b08a 100644
--- a/frontend-plataforma-tutoriais/src/pages/private/profile/index.tsx
+++ b/frontend-plataforma-tutoriais/src/pages/private/profile/index.tsx
@@ -5,7 +5,7 @@ import styles from "./styles.module.css";
import { LuCheck, LuKeyRound, LuPencil, LuX, LuArrowUpRight, LuClock3, LuCalendar } from "react-icons/lu";
import { CgSpinner } from "react-icons/cg";
import { Link } from "react-router";
-import { ProgressBar } from "react-bootstrap";
+import AnimatedProgressBar from "../../../components/animatedProgressBar";
import { imageSkeletonFadeStyle, onImageSkeletonLoad } from "../../../utils/imageSkeleton";
import { PiCheckCircleFill } from "react-icons/pi";
import Swal from "sweetalert2";
@@ -311,7 +311,7 @@ export default function Profile() {
{role !== 1 && (
<>
-
+
{progressoVideos === 100 && (
diff --git a/frontend-plataforma-tutoriais/src/pages/private/video/[id].tsx b/frontend-plataforma-tutoriais/src/pages/private/video/[id].tsx
index 23e7387..d60465e 100644
--- a/frontend-plataforma-tutoriais/src/pages/private/video/[id].tsx
+++ b/frontend-plataforma-tutoriais/src/pages/private/video/[id].tsx
@@ -3,7 +3,7 @@ import { useEffect, useState } from "react";
import { Link, useParams } from "react-router";
import type { ApiErrorResponse, Video } from "../../../types";
import styles from "./styles.module.css";
-import { LuArrowLeft } from "react-icons/lu";
+import { LuArrowLeft, LuChevronLeft, LuChevronRight } from "react-icons/lu";
import { Plyr } from "plyr-react";
import "plyr-react/plyr.css";
import { useVideoWatch } from "../../../hooks/useVideoWatch";
@@ -16,7 +16,8 @@ export default function Video() {
const [loading, setLoading] = useState(true);
const [playerReady, setPlayerReady] = useState(false);
const { watched, markAsWatched } = useVideoWatch(Number(id), video?.watched ?? false);
-
+ const [nextVideo, setNextVideo] = useState
(null);
+ const [previousVideo, setPreviousVideo] = useState(null);
useEffect(() => {
getVideo();
}, [id]);
@@ -79,6 +80,9 @@ export default function Video() {
async function getVideo() {
setLoading(true);
setPlayerReady(false);
+ setNextVideo(null);
+ setPreviousVideo(null);
+ setVideo(null);
try {
const response = await fetch(`${API_URL}/api/video/${id}`, {
method: "GET",
@@ -93,6 +97,8 @@ export default function Video() {
if (response.ok) {
setVideo(data.data);
+ setNextVideo(data.nextVideo as number);
+ setPreviousVideo(data.previousVideo as number);
setError(null);
} else {
setVideo(null);
@@ -112,7 +118,7 @@ export default function Video() {
const pageSkeleton = (
-
+
{playerSkeleton}
@@ -157,6 +163,15 @@ export default function Video() {
/>
+
+ {previousVideo && (
+ Anterior
+ )}
+
+ {nextVideo && (
+ Próximo
+ )}
+
{video.description}
diff --git a/frontend-plataforma-tutoriais/src/pages/private/video/styles.module.css b/frontend-plataforma-tutoriais/src/pages/private/video/styles.module.css
index 9a98453..1f2024b 100644
--- a/frontend-plataforma-tutoriais/src/pages/private/video/styles.module.css
+++ b/frontend-plataforma-tutoriais/src/pages/private/video/styles.module.css
@@ -12,7 +12,7 @@
.LinkIcon,
.linkText {
color: var(--text-black);
- font-size: var(--size-font-text);
+ font-size: var(--size-font-text);
}
.button:hover .LinkIcon,
@@ -20,6 +20,23 @@
color: var(--primary-color);
}
+.previousButton,
+.nextButton {
+ display: block;
+ width: fit-content;
+ border-radius: var(--border-radius);
+ transition: all 0.3s ease;
+ font-weight: 600;
+ text-decoration: none;
+ padding: 10px 20px;
+ background-color: var(--bg-white);
+ color: var(--text-primary-color);
+ transition: all .3s ease;
+ &:hover {
+ background-color: var(--bg-primary-color-opacity);
+ }
+}
+
.animateSpin {
animation: spin 1s linear infinite;
}
diff --git a/frontend-plataforma-tutoriais/src/types.tsx b/frontend-plataforma-tutoriais/src/types.tsx
index dfe80a9..36941ae 100644
--- a/frontend-plataforma-tutoriais/src/types.tsx
+++ b/frontend-plataforma-tutoriais/src/types.tsx
@@ -77,6 +77,8 @@ export type Video = {
watched: boolean;
users: User[];
role: number;
+ nextVideo: number | null;
+ previousVideo: number | null;
}
export type NextVideosResponse = {