Skip to content

Commit 253d5f9

Browse files
committed
Make devices page more big-screen-friendly
- reduce button sizes a bit - put two devices (doors/hvac/lights/...) on a single row
1 parent 2b0da6e commit 253d5f9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/pages/Devices.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const Devices = ({
2929
// const variant = useVariant();
3030
const variantName = useVariantName();
3131

32-
return (<Row className="row-cols row-cols-1 gap-4">
32+
return (<Row className="row-cols row-cols-1 row-cols-xl-2 gy-4">
3333
{isLoading && <Col className="text-center">
3434
<LoadingIcon large/>
3535
</Col>}

src/widgets/DeviceActionButton/DeviceActionButton.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
}
2323

2424
@include media-breakpoint-up(xl) {
25-
width: 200px;
26-
height: 200px;
25+
width: 150px;
26+
height: 150px;
2727

2828
i {
29-
font-size: 72pt;
29+
font-size: 30pt;
3030
}
3131
}
3232
}

src/widgets/DeviceActionButton/DeviceActionButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ const DeviceActionButton = (
5555
const icon = isDoorOpen ? 'fa-solid fa-door-open' : type.icon;
5656
const label = t(isDoorOpen ? 'views.door.open' : 'views.devices.' + action);
5757

58-
return (<>
58+
return <>
5959
<Button variant={variant} className="device-action-button" onClick={handleClick} disabled={disabled}>
6060
<i className={icon}/>
6161
<div>{label}</div>
6262
</Button>
6363
{error?.status && [401, 403].includes(error.status) && <RedirectToLogin/>}
64-
</>);
64+
</>;
6565
};
6666

6767
export default DeviceActionButton;

0 commit comments

Comments
 (0)