Browse Source

added icons for main categories

pull/1/head
PhilReact 10 months ago
parent
commit
2b43bef184
  1. BIN
      src/assets/icons/gaming.webp
  2. BIN
      src/assets/icons/media.webp
  3. BIN
      src/assets/icons/software.webp
  4. 11
      src/constants/index.ts
  5. 9
      src/pages/Home/VideoList.tsx
  6. 8
      src/pages/Home/VideoListComponentLevel.tsx

BIN
src/assets/icons/gaming.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
src/assets/icons/media.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
src/assets/icons/software.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

11
src/constants/index.ts

@ -1,3 +1,8 @@
import softwareIcon from '../assets/icons/software.webp'
import gamingIcon from '../assets/icons/gaming.webp'
import mediaIcon from '../assets/icons/media.webp'
const useTestIdentifiers = true;
export const QTUBE_VIDEO_BASE = useTestIdentifiers
@ -218,3 +223,9 @@ export const subCategories3: CategoryMap = {
};
export const icons = {
1: softwareIcon,
2: gamingIcon,
3: mediaIcon
}

9
src/pages/Home/VideoList.tsx

@ -59,7 +59,7 @@ import {
setEditPlaylist,
setEditVideo,
} from "../../state/features/videoSlice";
import { categories, subCategories, subCategories2, subCategories3 } from "../../constants";
import { categories, icons, subCategories, subCategories2, subCategories3 } from "../../constants";
import { Playlists } from "../../components/Playlists/Playlists";
import { PlaylistSVG } from "../../assets/svgs/PlaylistSVG";
import BlockIcon from "@mui/icons-material/Block";
@ -753,7 +753,12 @@ export const VideoList = ({ mode }: VideoListProps) => {
gap: '25px',
alignItems: 'center'
}}>
<AttachFileIcon />
{icons[videoObj?.category] ? <img src={icons[videoObj?.category]} width="50px" style={{
borderRadius: '5px'
}}/> : (
<AttachFileIcon />
)}
<VideoCardTitle sx={{
width: '100px'
}}>

8
src/pages/Home/VideoListComponentLevel.tsx

@ -19,7 +19,7 @@ import ResponsiveImage from '../../components/ResponsiveImage'
import { formatDate, formatTimestampSeconds } from '../../utils/time'
import { Video } from '../../state/features/videoSlice'
import { queue } from '../../wrappers/GlobalWrapper'
import { QTUBE_VIDEO_BASE } from '../../constants'
import { QTUBE_VIDEO_BASE, icons } from '../../constants'
import { formatBytes } from '../VideoContent/VideoContent'
interface VideoListProps {
@ -192,7 +192,11 @@ export const VideoListComponentLevel = ({ mode }: VideoListProps) => {
gap: '25px',
alignItems: 'center'
}}>
<AttachFileIcon />
{icons[videoObj?.category] ? <img src={icons[videoObj?.category]} width="50px" style={{
borderRadius: '5px'
}}/> : (
<AttachFileIcon />
)}
<VideoCardTitle sx={{
width: '100px'
}}>

Loading…
Cancel
Save