Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

Commit

Permalink
fix: attempt to make mobile support better
Browse files Browse the repository at this point in the history
  • Loading branch information
Zibbp committed Dec 24, 2023
1 parent c2a7af2 commit 1bc5040
Show file tree
Hide file tree
Showing 13 changed files with 192 additions and 110 deletions.
20 changes: 16 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/node": "20.10.5",
"@types/react": "18.2.45",
"@types/react-dom": "18.2.18",
"@vidstack/react": "^1.5.7",
"@vidstack/react": "^1.9.8",
"axios": "^1.6.2",
"clsx": "^2.0.0",
"cookies-next": "^2.1.1",
Expand All @@ -37,6 +37,7 @@
"react-dom": "18.2.0",
"react-hook-form": "^7.49.2",
"typescript": "5.3.3",
"vidstack": "^1.9.8",
"zustand": "^4.4.7"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/components/Vod/TheaterModeIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const TheaterModeIcon = () => {
size="xl"
variant="transparent"
onClick={toggleTheaterMode}
onTouchStart={toggleTheaterMode}
className={classes.customFullScreenButton}
>
<IconMaximize size="1.8rem" />
Expand Down
1 change: 1 addition & 0 deletions src/components/Vod/TitleBar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
width: 100%;
height: 60px;
position: relative;
overflow: scroll;
}
.titleBar {
display: flex;
Expand Down
14 changes: 5 additions & 9 deletions src/components/Vod/VideoPlayer.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
}

@media (max-width: em(1000px)) {
height: auto !important;
height: 100%;
video {
height: auto !important;
height: 100%;
}
}
}
Expand All @@ -20,11 +20,7 @@
video {
height: 100vh;
}

@media (max-width: em(1000px)) {
height: auto !important;
video {
height: auto !important;
}
}

width: 100%;

}
1 change: 1 addition & 0 deletions src/components/Vod/VideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ const NewVideoPlayer = ({ vod }: any) => {
onMouseEnter={handleHover}
onMouseLeave={handleMouseLeave}
onTouchStart={handleTouch}
playsinline
>

<MediaProvider >
Expand Down
30 changes: 24 additions & 6 deletions src/components/Workflows/ActiveTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import dayjs from 'dayjs';
import WorkflowStatusCancelled from './Status/Cancelled';
import WorkflowStatusTerminated from './Status/Terminated';
import Link from 'next/link';
import WorkflowStatusFailed from './Status/Failed';

type Props = {}

Expand All @@ -25,6 +26,7 @@ const WorkflowsActiveTable = (props: Props) => {
},
false
).then((res) => res?.data),
refetchInterval: 2000,
});

if (error) return <div>Failed to load</div>;
Expand All @@ -39,15 +41,31 @@ const WorkflowsActiveTable = (props: Props) => {
<Table.Td>
{workflow.status == 1 && <WorkflowStatusRunning />}
{workflow.status == 2 && <WorkflowStatusCompleted />}
{workflow.status == 3 && <WorkflowStatusFailed />}
{workflow.status == 4 && <WorkflowStatusCancelled />}
{workflow.status == 5 && <WorkflowStatusTerminated />}
</Table.Td>
<Table.Td>{workflow.execution.workflow_id}</Table.Td>
<Link href={`/workflows/${workflow.execution.workflow_id}/${workflow.execution.run_id}`}>
<span>
{workflow.execution.run_id}
</span>
</Link> <Table.Td>{workflow.type.name}</Table.Td>
<Table.Td>
<Link href={`/workflows/${workflow.execution.workflow_id}/${workflow.execution.run_id}`}>
<span>
{workflow.execution.workflow_id}
</span>
</Link>
</Table.Td>
<Table.Td>
<Link href={`/workflows/${workflow.execution.workflow_id}/${workflow.execution.run_id}`}>
<span>
{workflow.execution.run_id}
</span>
</Link>
</Table.Td>
<Table.Td>
<Link href={`/workflows/${workflow.execution.workflow_id}/${workflow.execution.run_id}`}>
<span>
{workflow.type.name}
</span>
</Link>
</Table.Td>
<Table.Td>{dayjs(workflow.start_time).format("YYYY/MM/DD HH:mm:ss")}</Table.Td>
</Table.Tr>
));
Expand Down
19 changes: 17 additions & 2 deletions src/components/Workflows/ClosedTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import dayjs from 'dayjs';
import Link from 'next/link';
import WorkflowStatusCancelled from './Status/Cancelled';
import WorkflowStatusTerminated from './Status/Terminated';
import WorkflowStatusFailed from './Status/Failed';

type Props = {}

Expand All @@ -25,6 +26,7 @@ const WorkflowsClosedTable = (props: Props) => {
},
false
).then((res) => res?.data),
refetchInterval: 2000,
});

if (error) return <div>Failed to load</div>;
Expand All @@ -39,18 +41,31 @@ const WorkflowsClosedTable = (props: Props) => {
<Table.Td>
{workflow.status == 1 && <WorkflowStatusRunning />}
{workflow.status == 2 && <WorkflowStatusCompleted />}
{workflow.status == 3 && <WorkflowStatusFailed />}
{workflow.status == 4 && <WorkflowStatusCancelled />}
{workflow.status == 5 && <WorkflowStatusTerminated />}
</Table.Td>
<Table.Td>{workflow.execution.workflow_id}</Table.Td>
<Table.Td>
<Link href={`/workflows/${workflow.execution.workflow_id}/${workflow.execution.run_id}`}>
<span>
{workflow.execution.workflow_id}
</span>
</Link>
</Table.Td>
<Table.Td>
<Link href={`/workflows/${workflow.execution.workflow_id}/${workflow.execution.run_id}`}>
<span>
{workflow.execution.run_id}
</span>
</Link>
</Table.Td>
<Table.Td>{workflow.type.name}</Table.Td>
<Table.Td>
<Link href={`/workflows/${workflow.execution.workflow_id}/${workflow.execution.run_id}`}>
<span>
{workflow.type.name}
</span>
</Link>
</Table.Td>
<Table.Td>{dayjs(workflow.close_time).format("YYYY/MM/DD HH:mm:ss")}</Table.Td>
</Table.Tr>
));
Expand Down
19 changes: 19 additions & 0 deletions src/components/Workflows/Status/Failed.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react'

type Props = {}

const WorkflowStatusFailed = (props: Props) => {
return (
<div style={{
backgroundColor: "#fba0a1",
padding: "5px 10px",
borderRadius: "5px",
width: "fit-content",
color: "#a90003",
opacity: 0.8,
fontWeight: 600,
}}>Failed</div>
)
}

export default WorkflowStatusFailed
1 change: 1 addition & 0 deletions src/components/layouts/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default function MainLayout({ children }) {
// Theater mode support
useEffect(() => {
eventBus.on("theaterMode", (data) => {
console.log("toggling theater mode")
setFullscreen(data);
});
}, []);
Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export function HeaderMegaMenu() {

</Group>

<Group visibleFrom="sm" className={classes.groupRight}>
<Group visibleFrom="md" className={classes.groupRight}>
<TextInput
className={classes.search}
value={search}
Expand Down
Loading

0 comments on commit 1bc5040

Please sign in to comment.