3
0
mirror of https://github.com/Qortal/q-tube.git synced 2025-02-11 17:55:51 +00:00
Comment replies use full width available for username

Fixed bug in PublishVideo.tsx that erased video durations when videos to publish are added twice
This commit is contained in:
Qortal Dev 2024-12-30 14:39:02 -07:00
parent f687b3025d
commit d0841e4db5
4 changed files with 9 additions and 6 deletions

View File

@ -147,7 +147,12 @@ export const PublishVideo = ({
const assembleVideoDurations = () => { const assembleVideoDurations = () => {
if (files.length === videoDurations.value.length) return; if (files.length === videoDurations.value.length) return;
const newArray: number[] = []; const newArray: number[] = [];
files.map(() => newArray.push(0));
files.map((file, index) =>
newArray.push(
videoDurations.value[index] ? videoDurations.value[index] : 0
)
);
videoDurations.value = [...newArray]; videoDurations.value = [...newArray];
}; };

View File

@ -28,9 +28,7 @@ export const FrameExtractor = ({
const newVideoDurations = [...videoDurations.value]; const newVideoDurations = [...videoDurations.value];
newVideoDurations[index] = duration; newVideoDurations[index] = duration;
console.log("durations before update: ", videoDurations.value);
videoDurations.value = [...newVideoDurations]; videoDurations.value = [...newVideoDurations];
console.log("durations after update: ", videoDurations.value);
const section = duration / 4; const section = duration / 4;
const timestamps = []; const timestamps = [];

View File

@ -259,7 +259,9 @@ export const CommentCard = ({
alt={`${name}'s avatar`} alt={`${name}'s avatar`}
sx={{ width: "35px", height: "35px" }} sx={{ width: "35px", height: "35px" }}
/> />
<AuthorTextComment>{name}</AuthorTextComment> <AuthorTextComment sx={{ width: "max-content" }}>
{name}
</AuthorTextComment>
</Box> </Box>
<StyledCardColComment <StyledCardColComment
sx={{ sx={{

View File

@ -50,7 +50,6 @@ export const Home = ({ mode }: HomeProps) => {
<> <>
<Box sx={{ ...homeBaseSX, ...homeColumns }}> <Box sx={{ ...homeBaseSX, ...homeColumns }}>
<SearchSidebar onSearch={getVideosHandler} /> <SearchSidebar onSearch={getVideosHandler} />
<Box <Box
sx={{ sx={{
width: "100%", width: "100%",
@ -95,7 +94,6 @@ export const Home = ({ mode }: HomeProps) => {
</TabPanel> </TabPanel>
</TabContext> </TabContext>
</Box> </Box>
<ListSuperLikeContainer /> <ListSuperLikeContainer />
</Box> </Box>
</> </>