Skip to content

Commit 1a0f679

Browse files
🎨 style: Improve CSS for app components and clean up code
- Updated App.css to ensure consistent styling across the application. - Removed unnecessary line breaks in CameraSources component to clean up the code. - Refactored Floating component to use inline styles for better control over layout and added overflow-hidden class for improved UI consistency. - Adjusted Webcam component to fill the available space, ensuring the video feed uses the full container size.
1 parent 2e2049e commit 1a0f679

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

‎src/App.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ button {
5353

5454
.read-the-docs {
5555
color: #888;
56-
}
56+
}

‎src/components/CameraSources.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export default function CameraSources({
2727
await window.electron.setPermissionsMissing(true);
2828
}
2929
};
30-
3130
getDevices();
3231
}, []);
3332

‎src/components/Floating.tsx‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,16 @@ export const Floating = () => {
7979
});
8080

8181
return (
82-
<div className="m-0 p-0 w-screen h-screen flex justify-center items-center bg-white dark:bg-gray-800">
82+
<div
83+
style={{
84+
width: "100%",
85+
height: "100%",
86+
display: "flex",
87+
justifyContent: "center",
88+
alignItems: "center",
89+
}}
90+
className="m-0 p-0 bg-white dark:bg-gray-800 overflow-hidden"
91+
>
8392
<div className="divide-y divide-gray-300 dark:divide-gray-600 rounded-md shadow-md md:flex md:divide-y-0 bg-gray-50 dark:bg-gray-700">
8493
<button
8594
className="group flex w-full items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-600"

‎src/components/Webcam.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,7 @@ export const Webcam = ({}) => {
5252

5353
if (!cameraSource) return null;
5454

55-
return <video ref={videoRef} autoPlay />;
55+
return (
56+
<video ref={videoRef} autoPlay style={{ width: "100%", height: "100%" }} />
57+
);
5658
};

0 commit comments

Comments
 (0)