Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various UI tweaks and changes #12364

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion web/src/components/navigation/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ import { useLocation } from "react-router-dom";
import GeneralSettings from "../menu/GeneralSettings";
import AccountSettings from "../menu/AccountSettings";
import useNavigation from "@/hooks/use-navigation";
import { baseUrl } from "@/api/baseUrl";
import { useMemo } from "react";

function Sidebar() {
const location = useLocation();
const basePath = useMemo(() => new URL(baseUrl).pathname, []);

const navbarLinks = useNavigation();

Expand All @@ -18,7 +21,8 @@ function Sidebar() {
<Logo className="mb-6 h-8 w-8" />
{navbarLinks.map((item) => {
const showCameraGroups =
item.id == 1 && item.url == location.pathname;
item.id == 1 &&
(location.pathname === "/" || location.pathname === basePath);

return (
<div key={item.id}>
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/player/HlsVideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default function HlsVideoPlayer({
}, [videoRef, controlsOpen]);

return (
<TransformWrapper minScale={1.0}>
<TransformWrapper minScale={1.0} wheel={{ smoothStep: 0.005 }}>
<VideoControls
className={cn(
"absolute left-1/2 z-50 -translate-x-1/2",
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/SubmitPlus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ function PlusFilterGroup({
<div className="hidden text-primary md:block">
{selectedScoreRange == undefined
? "Score Range"
: `${selectedScoreRange[0] * 100}% - ${selectedScoreRange[1] * 100}%`}
: `${Math.round(selectedScoreRange[0] * 100)}% - ${Math.round(selectedScoreRange[1] * 100)}%`}
</div>
</Button>
</Trigger>
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/live/LiveBirdseyeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function LiveBirdseyeView({
}

return (
<TransformWrapper minScale={1.0}>
<TransformWrapper minScale={1.0} wheel={{ smoothStep: 0.005 }}>
<div
ref={mainRef}
className={
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/live/LiveCameraView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export default function LiveCameraView({
}, []);

return (
<TransformWrapper minScale={1.0}>
<TransformWrapper minScale={1.0} wheel={{ smoothStep: 0.005 }}>
<div
ref={mainRef}
className={
Expand Down