mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-06 13:30:41 +02:00
frontend styling
This commit is contained in:
parent
6d9191fe18
commit
7ef82e61e5
@ -5,11 +5,6 @@ body {
|
|||||||
input.instantUpdate {
|
input.instantUpdate {
|
||||||
background-color: rgba(255, 0, 0, 0.1);
|
background-color: rgba(255, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.numberComponentButton {
|
|
||||||
padding: 0.15em 6px !important;
|
|
||||||
font-size: 0.7rem !important;
|
|
||||||
}
|
|
||||||
.navbarOffset {
|
.navbarOffset {
|
||||||
padding-top: 60px !important;
|
padding-top: 60px !important;
|
||||||
}
|
}
|
||||||
@ -28,38 +23,30 @@ input.instantUpdate {
|
|||||||
.criticalToast {
|
.criticalToast {
|
||||||
background-color: rgba(216, 41, 18, 0.678) !important;
|
background-color: rgba(216, 41, 18, 0.678) !important;
|
||||||
}
|
}
|
||||||
.buttonComponent {
|
.component {
|
||||||
|
position: relative;
|
||||||
float: left !important;
|
float: left !important;
|
||||||
margin-right: 10px !important;
|
padding: 5px !important;
|
||||||
}
|
z-index: 1;
|
||||||
.stringComponent {
|
|
||||||
float: left !important;
|
|
||||||
margin-right: 10px !important;
|
|
||||||
}
|
|
||||||
.numberComponent {
|
|
||||||
float: left !important;
|
|
||||||
margin-right: 10px !important;
|
|
||||||
width: 270px !important;
|
|
||||||
}
|
}
|
||||||
.dataServiceComponent {
|
.dataServiceComponent {
|
||||||
position: relative;
|
width: 100%;
|
||||||
z-index: 1;
|
|
||||||
}
|
}
|
||||||
.deviceConnectionComponent {
|
.deviceConnectionComponent {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
float: left !important;
|
||||||
|
width: 100%;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
.overlayContent {
|
.overlayContent {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
inset: 5px; /* (see https://developer.mozilla.org/en-US/docs/Web/CSS/inset) */
|
||||||
left: 0;
|
background: rgba(155, 155, 155, 0.75);
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
background-color: rgba(128, 128, 128, 0.5);
|
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column; /* Stack children vertically */
|
flex-direction: column; /* Stack children vertically */
|
||||||
border-radius: var(--bs-card-inner-border-radius);
|
border-radius: var(--bs-card-inner-border-radius);
|
||||||
|
border: var(--bs-border-width) solid var(--bs-border-color-translucent)
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="align-items-center asyncMethodComponent" id={id}>
|
<div className="component asyncMethodComponent" id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
@ -43,7 +43,7 @@ export const ButtonComponent = React.memo((props: ButtonComponentProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'buttonComponent'} id={id}>
|
<div className={'component buttonComponent'} id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
@ -49,7 +49,7 @@ export const ColouredEnumComponent = React.memo((props: ColouredEnumComponentPro
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'enumComponent'} id={id}>
|
<div className={'component enumComponent'} id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
@ -40,8 +40,8 @@ export const DataServiceComponent = React.memo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dataServiceComponent" id={id}>
|
<div className="component dataServiceComponent" id={id}>
|
||||||
<Card className="mb-3">
|
<Card>
|
||||||
<Card.Header
|
<Card.Header
|
||||||
onClick={() => setOpen(!open)}
|
onClick={() => setOpen(!open)}
|
||||||
style={{ cursor: 'pointer' }} // Change cursor style on hover
|
style={{ cursor: 'pointer' }} // Change cursor style on hover
|
||||||
|
@ -40,10 +40,10 @@ export const DeviceConnectionComponent = React.memo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`deviceConnectionComponent ${displayName}`} id={id}>
|
<div className="deviceConnectionComponent" id={id}>
|
||||||
{!availableVal && (
|
{!availableVal && (
|
||||||
<div className="overlayContent">
|
<div className="overlayContent">
|
||||||
<div>This device is currently not available!</div>
|
<div>{displayName} is currently not available!</div>
|
||||||
<MethodComponent
|
<MethodComponent
|
||||||
name="connect"
|
name="connect"
|
||||||
parentPath={fullAccessPath}
|
parentPath={fullAccessPath}
|
||||||
|
@ -48,7 +48,7 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'enumComponent'} id={id}>
|
<div className={'component enumComponent'} id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
@ -39,7 +39,7 @@ export const ImageComponent = React.memo((props: ImageComponentProps) => {
|
|||||||
}, [props.value]);
|
}, [props.value]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'imageComponent'} id={id}>
|
<div className="component imageComponent" id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
@ -83,7 +83,7 @@ export const MethodComponent = React.memo((props: MethodProps) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="align-items-center methodComponent" id={id}>
|
<div className="component methodComponent" id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
@ -309,7 +309,7 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="numberComponent" id={id}>
|
<div className="component numberComponent" id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
@ -100,7 +100,7 @@ export const SliderComponent = React.memo((props: SliderComponentProps) => {
|
|||||||
const [stepSizeMagnitude, stepSizeReadOnly] = deconstructNumberDict(stepSize);
|
const [stepSizeMagnitude, stepSizeReadOnly] = deconstructNumberDict(stepSize);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="sliderComponent" id={id}>
|
<div className="component sliderComponent" id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
@ -66,7 +66,7 @@ export const StringComponent = React.memo((props: StringComponentProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'stringComponent'} id={id}>
|
<div className="component stringComponent" id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user