File tree Expand file tree Collapse file tree 9 files changed +30
-6
lines changed
incidents/overview/incident-list Expand file tree Collapse file tree 9 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,11 @@ function App() {
3939 < IxApplicationHeader name = "Siemens Industrial Experience" >
4040 < Logo />
4141 < IxAvatar username = "Your user" extra = "Administrator" >
42- < IxDropdownItem icon = { iconUserSettings } label = "User Settings" onClick = { showDemoMessage } />
42+ < IxDropdownItem
43+ icon = { iconUserSettings }
44+ label = { t ( "settings.user-settings" ) }
45+ onClick = { showDemoMessage }
46+ />
4347 < IxDropdownItem icon = { iconLogOut } label = "Logout" onClick = { showDemoMessage } />
4448 </ IxAvatar >
4549 </ IxApplicationHeader >
Original file line number Diff line number Diff line change @@ -25,3 +25,5 @@ export function useMediaQuery(query: string) {
2525 } , [ query ] ) ;
2626 return matches ;
2727}
28+
29+ export const useIsMobileViewPort = ( ) => useMediaQuery ( "(max-width: 48em)" ) ;
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ export default function AddDeviceModal() {
122122 </ form >
123123 </ IxModalContent >
124124
125- < IxModalFooter >
125+ < IxModalFooter className = { styles . ModalFooter } >
126126 < IxButton aria-label = { t ( "device-add-modal.dismiss" ) } outline onClick = { ( ) => dismiss ( ) } >
127127 { t ( "device-add-modal.dismiss" ) }
128128 </ IxButton >
Original file line number Diff line number Diff line change 1616.ItemFullWidth {
1717 grid-column : 1 / 3 ;
1818}
19+
20+ .ModalFooter {
21+ margin-top : 1rem ;
22+ }
Original file line number Diff line number Diff line change 99
1010.DeviceRange {
1111 height : 21rem ;
12+ min-height : 21rem ;
13+ max-height : 21rem ;
1214}
1315
1416.echarts {
Original file line number Diff line number Diff line change 77 * LICENSE file in the root directory of this source tree.
88 */
99import useShowDemoMessage from "@/hooks/demoMessage" ;
10- import { useMediaQuery } from "@/hooks/mediaQuery" ;
10+ import { useIsMobileViewPort } from "@/hooks/mediaQuery" ;
1111import { iconOpenExternal , iconUpload } from "@siemens/ix-icons/icons" ;
1212import {
1313 IxButton ,
@@ -20,9 +20,9 @@ import {
2020 IxRow ,
2121 IxTypography ,
2222} from "@siemens/ix-react" ;
23+ import { useTranslation } from "react-i18next" ;
2324import { type Incident } from "../incident" ;
2425import styles from "./styles.module.css" ;
25- import { useTranslation } from "react-i18next" ;
2626
2727function DesktopItem ( { incident } : { incident : Incident } ) {
2828 const { t } = useTranslation ( ) ;
@@ -95,7 +95,7 @@ function MobileItem({ incident }: { incident: Incident }) {
9595}
9696
9797function IncidentList ( props : { incidents : Incident [ ] ; search : string } ) {
98- const isMobile = useMediaQuery ( "(max-width: 48em)" ) ;
98+ const isMobile = useIsMobileViewPort ( ) ;
9999 const searchFilter = ( incident : Incident ) => {
100100 if ( ! props . search ) {
101101 return true ;
Original file line number Diff line number Diff line change 99
1010.StatusHistory {
1111 height : 21rem ;
12+ min-height : 21rem ;
13+ max-height : 21rem ;
1214}
1315
1416.echarts {
Original file line number Diff line number Diff line change @@ -12,14 +12,21 @@ import { useTranslation } from "react-i18next";
1212import Incidents from "./components/incidents/overview" ;
1313import Overview from "./components/overview" ;
1414import styles from "./styles.module.css" ;
15+ import { useIsMobileViewPort } from "@/hooks/mediaQuery" ;
16+ import clsx from "clsx" ;
1517
1618const OverviewPage = ( ) => {
1719 const { t } = useTranslation ( ) ;
20+ const isMobile = useIsMobileViewPort ( ) ;
1821
1922 return (
2023 < >
2124 < IxContentHeader headerTitle = { t ( "content-header" ) } slot = "header" > </ IxContentHeader >
22- < section className = { styles . List } >
25+ < section
26+ className = { clsx ( styles . List , {
27+ [ styles [ "h-100" ] ] : ! isMobile ,
28+ } ) }
29+ >
2330 < Overview > </ Overview >
2431 < Incidents > </ Incidents >
2532 </ section >
Original file line number Diff line number Diff line change 1616 flex-direction : column;
1717 gap : 2rem ;
1818 overflow : hidden;
19+ }
20+
21+ .List .h-100 {
1922 height : 100% ;
2023}
You can’t perform that action at this time.
0 commit comments