Skip to content

Commit

Permalink
update flex layout for tablet, update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
firsttris committed Jan 17, 2025
1 parent 45af1fc commit ac9f67d
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 63 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en" style="overflow-y: scroll;">
<head>
<meta charset="utf-8" />
<title>ccu-addon-mui</title>
<title>CCU3 Add-on: Modern Web UI</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
Expand Down
152 changes: 102 additions & 50 deletions package-lock.json

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

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
},
"private": true,
"dependencies": {
"@emotion/react": "11.11.4",
"@emotion/styled": "11.11.0",
"@fontsource/roboto": "^5.0.8",
"@emotion/react": "11.14.0",
"@emotion/styled": "11.14.0",
"@fontsource/roboto": "^5.1.1",
"@swc/helpers": "0.5.15",
"react": "18.3.1",
"react-dom": "18.3.1",
Expand All @@ -26,7 +26,7 @@
},
"devDependencies": {
"@emotion/babel-plugin": "11.11.0",
"@iconify/react": "^4.1.1",
"@iconify/react": "^5.2.0",
"@nx/eslint": "20.3.1",
"@nx/eslint-plugin": "20.3.1",
"@nx/js": "20.3.1",
Expand All @@ -53,10 +53,10 @@
"eslint-plugin-react-hooks": "5.0.0",
"jsdom": "~22.1.0",
"nx": "20.3.1",
"prettier": "^2.6.2",
"prettier": "^3.4.2",
"typescript": "5.6.3",
"vite": "^5.0.0",
"vite-plugin-pwa": "^0.17.4",
"vite-plugin-pwa": "^0.21.1",
"vitest": "1.3.1"
}
}
7 changes: 6 additions & 1 deletion src/components/ChannelGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ const ChannelContainer = styled.div({
display: 'flex',
flexWrap: 'wrap',
gap: '10px',
justifyContent: 'space-around',
'@media (max-width: 800px)': {
marginLeft: '90px',
marginRight: '90px',
},
'@media (max-width: 600px)': {
justifyContent: 'center',
marginLeft: '0px',
marginRight: '0px',
},
});

Expand Down
2 changes: 1 addition & 1 deletion src/controls/BlindsControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const BlindsControl = ({ channel }: ControlProps) => {
const { datapoints, name, address, interfaceName } = channel;
const blindValue = Number(datapoints.LEVEL) * 100;
return (
<div>
<div style={{ width: '250px', padding: '10px' }}>
<ChannelHeader
icon={
blindValue === 0
Expand Down
2 changes: 1 addition & 1 deletion src/controls/SwitchControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const SwitchControl = ({ channel }: ControlProps) => {

return (
<CardHeader onClick={onHandleChange}>
<div style={{ height: "65px"}}>{name}</div>
<div style={{ height: "40px" }}>{name}</div>
<Icon
icon={checked ? 'mdi:light-switch' : 'mdi:light-switch-off'}
color={checked ? 'orange' : 'unset'}
Expand Down
2 changes: 1 addition & 1 deletion src/controls/ThermostatControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Container = styled.div`
position: relative;
width: 250px;
height: 100%;
padding: 20px;
padding: 10px;
`;

const getColor = (temperature: number) => {
Expand Down
2 changes: 0 additions & 2 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const root = ReactDOM.createRoot(

root.render(
<>

<Global
styles={css`
body {
Expand All @@ -38,6 +37,5 @@ root.render(
<WebSocketProvider>
<Router />
</WebSocketProvider>

</>
);

0 comments on commit ac9f67d

Please sign in to comment.