This commit is contained in:
2025-10-01 17:48:42 -06:00
8 changed files with 65 additions and 56 deletions

40
package-lock.json generated
View File

@@ -22,7 +22,7 @@
"localforage": "^1.10.0",
"mediainfo.js": "^0.3.5",
"moment": "^2.30.1",
"qapp-core": "^1.0.52",
"qapp-core": "^1.0.56",
"quill": "^2.0.2",
"quill-image-resize-module-react": "^3.0.0",
"react": "^19.0.0",
@@ -2635,9 +2635,9 @@
}
},
"node_modules/@xmldom/xmldom": {
"version": "0.8.10",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
"integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
"version": "0.8.11",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz",
"integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
@@ -3157,9 +3157,9 @@
"license": "MIT"
},
"node_modules/dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==",
"version": "1.11.18",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.18.tgz",
"integrity": "sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==",
"license": "MIT"
},
"node_modules/debug": {
@@ -3241,9 +3241,9 @@
}
},
"node_modules/dexie": {
"version": "4.0.11",
"resolved": "https://registry.npmjs.org/dexie/-/dexie-4.0.11.tgz",
"integrity": "sha512-SOKO002EqlvBYYKQSew3iymBoN2EQ4BDw/3yprjh7kAfFzjBYkaMNa/pZvcA7HSWlcKSQb9XhPe3wKyQ0x4A8A==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/dexie/-/dexie-4.2.0.tgz",
"integrity": "sha512-OSeyyWOUetDy9oFWeddJgi83OnRA3hSFh3RrbltmPgqHszE9f24eUCVLI4mPg0ifsWk0lQTdnS+jyGNrPMvhDA==",
"license": "Apache-2.0"
},
"node_modules/dom-helpers": {
@@ -5104,9 +5104,9 @@
}
},
"node_modules/qapp-core": {
"version": "1.0.52",
"resolved": "https://registry.npmjs.org/qapp-core/-/qapp-core-1.0.52.tgz",
"integrity": "sha512-oCvT01VSFPqiuWm+8MAfL1GFulz0R2zSCEOv6DKe+xICc3H1xnnikELI9PDCds+1VfTYzh0+aAA/j5PEs+U9pw==",
"version": "1.0.56",
"resolved": "https://registry.npmjs.org/qapp-core/-/qapp-core-1.0.56.tgz",
"integrity": "sha512-9VssIguugRyLtC6VXN4ftsTVapHNgiV5LTESgUHIl/uz5chW/oZY4SlmB5BXyV9110AI0+W9rrWE+Wn8Dir7oA==",
"license": "MIT",
"dependencies": {
"@tanstack/react-virtual": "^3.13.2",
@@ -5325,9 +5325,9 @@
}
},
"node_modules/react-hot-toast": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.5.2.tgz",
"integrity": "sha512-Tun3BbCxzmXXM7C+NI4qiv6lT0uwGh4oAfeJyNOjYUejTsm35mK9iCaYLGv8cBz9L5YxZLx/2ii7zsIwPtPUdw==",
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.6.0.tgz",
"integrity": "sha512-bH+2EBMZ4sdyou/DPrfgIouFpcRLCJ+HoCA32UoAYHn6T3Ur5yfcDCeSr5mwldl6pFOsiocmrXMuoCJ1vV8bWg==",
"license": "MIT",
"dependencies": {
"csstype": "^3.1.3",
@@ -6026,13 +6026,13 @@
}
},
"node_modules/video.js": {
"version": "8.23.3",
"resolved": "https://registry.npmjs.org/video.js/-/video.js-8.23.3.tgz",
"integrity": "sha512-Toe0VLlDZcUhiaWfcePS1OEdT3ATfktm0hk/PELfD7zUoPDHeT+cJf/wZmCy5M5eGVwtGUg25RWPCj1L/1XufA==",
"version": "8.23.4",
"resolved": "https://registry.npmjs.org/video.js/-/video.js-8.23.4.tgz",
"integrity": "sha512-qI0VTlYmKzEqRsz1Nppdfcaww4RSxZAq77z2oNSl3cNg2h6do5C8Ffl0KqWQ1OpD8desWXsCrde7tKJ9gGTEyQ==",
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@videojs/http-streaming": "^3.17.0",
"@videojs/http-streaming": "^3.17.2",
"@videojs/vhs-utils": "^4.1.1",
"@videojs/xhr": "2.7.0",
"aes-decrypter": "^4.0.2",

View File

@@ -24,7 +24,7 @@
"localforage": "^1.10.0",
"mediainfo.js": "^0.3.5",
"moment": "^2.30.1",
"qapp-core": "^1.0.52",
"qapp-core": "^1.0.56",
"quill": "^2.0.2",
"quill-image-resize-module-react": "^3.0.0",
"react": "^19.0.0",

View File

@@ -1,11 +1,11 @@
import { Avatar, useTheme } from "@mui/material";
import { AccountCircleSVG } from "../assets/svgs/AccountCircleSVG";
import { menuIconSize } from "../constants/Misc";
import { Avatar, useTheme } from '@mui/material';
import { AccountCircleSVG } from '../assets/svgs/AccountCircleSVG';
import { menuIconSize } from '../constants/Misc';
import {
DropdownContainer,
DropdownText,
AvatarContainer
} from "./layout/Navbar/Navbar-styles";
AvatarContainer,
} from './layout/Navbar/Navbar-styles';
interface UserDropDownProps {
userName: string;
@@ -13,22 +13,23 @@ interface UserDropDownProps {
popMenuRef: React.RefObject<{ closePopover: () => void }>;
}
export const UserDropDown = ({ userName, handleMyChannelLink, popMenuRef }: UserDropDownProps) => {
export const UserDropDown = ({
userName,
handleMyChannelLink,
popMenuRef,
}: UserDropDownProps) => {
const theme = useTheme();
const userAvatar = `/arbitrary/THUMBNAIL/${userName}/avatar?async=true`;
const userAvatar = `/arbitrary/THUMBNAIL/${encodeURIComponent(userName)}/avatar?async=true`;
return (
<DropdownContainer
onClick={() => {
handleMyChannelLink(userName);
popMenuRef.current.closePopover();
}}
>
<Avatar src={userAvatar}>
{userName?.charAt(0).toUpperCase()}
</Avatar>
<DropdownText>{userName}</DropdownText>
</DropdownContainer>
)
}
<DropdownContainer
onClick={() => {
handleMyChannelLink(userName);
popMenuRef.current.closePopover();
}}
>
<Avatar src={userAvatar}>{userName?.charAt(0).toUpperCase()}</Avatar>
<DropdownText>{userName}</DropdownText>
</DropdownContainer>
);
};

View File

@@ -74,7 +74,7 @@ export default function ListSuperLikes({ superlikes }) {
const info =
hashMapSuperlikes[superlike?.identifier]?.notificationInformation;
forName = info?.name;
url = `/video/${info?.name}/${info?.identifier}`;
url = `/video/${encodeURIComponent(info?.name)}/${info?.identifier}`;
}
// hasHash = true
@@ -121,7 +121,7 @@ export default function ListSuperLikes({ superlikes }) {
>
<Avatar
alt="Remy Sharp"
src={`/arbitrary/THUMBNAIL/${superlike?.name}/qortal_avatar`}
src={`/arbitrary/THUMBNAIL/${encodeURIComponent(superlike?.name)}/qortal_avatar`}
/>
<ListItemText

View File

@@ -42,7 +42,7 @@ export const UserMenu = ({
const handleMyChannelLink = useCallback(
(switchToName: string) => {
switchName(switchToName);
navigate(`/channel/${switchToName}`);
navigate(`/channel/${encodeURIComponent(switchToName)}`);
},
[navigate]
);

View File

@@ -169,8 +169,9 @@ export const PlaylistContent = () => {
playlistData={playlistData}
currentVideoIdentifier={videoData?.id}
onClick={(name, identifier) => {
if (!channelName) return;
navigate(
`/playlist/${channelName}/${id}/DOCUMENT/${name}/${identifier}`
`/playlist/${encodeURIComponent(channelName)}/${id}/DOCUMENT/${encodeURIComponent(name)}/${identifier}`
);
}}
// sx={playlistsSX}
@@ -213,8 +214,9 @@ export const PlaylistContent = () => {
playlistData={playlistData}
currentVideoIdentifier={videoData?.id}
onClick={(name, identifier) => {
if (!channelName) return;
navigate(
`/playlist/${channelName}/${id}/DOCUMENT/${name}/${identifier}`
`/playlist/${encodeURIComponent(channelName)}/${id}/DOCUMENT/${encodeURIComponent(name)}/${identifier}`
);
}}
// sx={playlistsSX}

View File

@@ -31,11 +31,11 @@ export const ChannelName = ({ channelName }: ChannelParams) => {
minWidth: '125px',
}}
onClick={() => {
navigate(`/channel/${channelName}`);
navigate(`/channel/${encodeURIComponent(channelName)}`);
}}
>
<Avatar
src={`/arbitrary/THUMBNAIL/${channelName}/qortal_avatar`}
src={`/arbitrary/THUMBNAIL/${encodeURIComponent(channelName)}/qortal_avatar`}
alt={`${channelName}'s avatar`}
/>
<AuthorTextComment

View File

@@ -146,7 +146,7 @@ export const VideoListItem = ({
<VideoCard
onClick={() => {
navigate(
`/playlist/${qortalMetadata?.name}/${qortalMetadata?.identifier}`
`/playlist/${encodeURIComponent(qortalMetadata?.name)}/${qortalMetadata?.identifier}`
);
}}
sx={{
@@ -183,7 +183,9 @@ export const VideoListItem = ({
<NameContainer
onClick={(e) => {
e.stopPropagation();
navigate(`/channel/${qortalMetadata?.name}`);
navigate(
`/channel/${encodeURIComponent(qortalMetadata?.name)}`
);
}}
>
<Avatar
@@ -195,7 +197,7 @@ export const VideoListItem = ({
scale: 1.05,
},
}}
src={`/arbitrary/THUMBNAIL/${qortalMetadata?.name}/qortal_avatar`}
src={`/arbitrary/THUMBNAIL/${encodeURIComponent(qortalMetadata?.name)}/qortal_avatar`}
alt={`${qortalMetadata?.name}'s avatar`}
/>
<VideoCardName
@@ -343,7 +345,7 @@ export const VideoListItem = ({
<VideoCard
onClick={() => {
navigate(
`/video/${qortalMetadata?.name}/${qortalMetadata?.identifier}`
`/video/${encodeURIComponent(qortalMetadata?.name)}/${qortalMetadata?.identifier}`
);
}}
>
@@ -392,11 +394,13 @@ export const VideoListItem = ({
scale: 1.05,
},
}}
src={`/arbitrary/THUMBNAIL/${qortalMetadata?.name}/qortal_avatar`}
src={`/arbitrary/THUMBNAIL/${encodeURIComponent(qortalMetadata?.name)}/qortal_avatar`}
alt={`${qortalMetadata?.name}'s avatar`}
onClick={(e) => {
e.stopPropagation();
navigate(`/channel/${qortalMetadata?.name}`);
navigate(
`/channel/${encodeURIComponent(qortalMetadata?.name)}`
);
}}
/>
<Tooltip
@@ -426,7 +430,9 @@ export const VideoListItem = ({
sx={{}}
onClick={(e) => {
e.stopPropagation();
navigate(`/channel/${qortalMetadata?.name}`);
navigate(
`/channel/${encodeURIComponent(qortalMetadata?.name)}`
);
}}
>
{qortalMetadata?.name}