updated padding across cards and forms

This commit is contained in:
2025-09-26 13:58:14 +01:00
parent 6773b82349
commit c3d273f29d
19 changed files with 26 additions and 26 deletions

View File

@@ -25,7 +25,7 @@ const HistoryList = () => {
}; };
return ( return (
<Card className="h-100"> <Card className="h-100 p-4">
<CardHeader title="Alert History" /> <CardHeader title="Alert History" />
<button <button
className="bg-red-600 text-white px-4 py-2 rounded hover:bg-red-700 transition md:w-[10%] mb-2" className="bg-red-600 text-white px-4 py-2 rounded hover:bg-red-700 transition md:w-[10%] mb-2"
@@ -33,9 +33,9 @@ const HistoryList = () => {
> >
Clear List Clear List
</button> </button>
{isLoading && <p>Loading...</p>} {isLoading && <p className="px-2">Loading...</p>}
{error && <p className="text-red-500">Error: {error.message}</p>} {error && <p className="text-red-500 px-2">Error: {error.message}</p>}
<div className="flex flex-col gap-1"> <div className="flex flex-col gap-1 px-2">
{state?.alertList?.length > 0 ? ( {state?.alertList?.length > 0 ? (
state?.alertList?.map((alertItem, index) => ( state?.alertList?.map((alertItem, index) => (
<div key={index} className="flex flex-row space-x-2"> <div key={index} className="flex flex-row space-x-2">

View File

@@ -9,9 +9,9 @@ const SessionCard = () => {
const { dispatch } = useAlertHitContext(); const { dispatch } = useAlertHitContext();
return ( return (
<Card> <Card className="p-4">
<CardHeader title={"Hit Search"} /> <CardHeader title={"Hit Search"} />
<div className="flex flex-col gap-4"> <div className="flex flex-col gap-4 px-2">
<FormGroup> <FormGroup>
<label <label
htmlFor="VRM" htmlFor="VRM"

View File

@@ -10,9 +10,9 @@ const SessionCard = () => {
}; };
return ( return (
<Card> <Card className="p-4">
<CardHeader title="Session" /> <CardHeader title="Session" />
<div className="flex flex-col gap-4"> <div className="flex flex-col gap-4 px-2">
<button <button
className="bg-[#26B170] text-white px-4 py-2 rounded hover:bg-green-700 transition w-full" className="bg-[#26B170] text-white px-4 py-2 rounded hover:bg-green-700 transition w-full"
onClick={handleStartClick} onClick={handleStartClick}

View File

@@ -4,7 +4,7 @@ import BearerTypeFields from "./BearerTypeFields";
const BearerTypeCard = () => { const BearerTypeCard = () => {
return ( return (
<Card> <Card className="p-4">
<CardHeader title="Bearer Type" /> <CardHeader title="Bearer Type" />
<BearerTypeFields /> <BearerTypeFields />
</Card> </Card>

View File

@@ -9,7 +9,7 @@ const BearerTypeFields = () => {
useFormikContext(); useFormikContext();
return ( return (
<div className="flex flex-col space-y-4"> <div className="flex flex-col space-y-4 px-2">
<div className="flex items-center gap-3 justify-between"> <div className="flex items-center gap-3 justify-between">
<label htmlFor="format">Format</label> <label htmlFor="format">Format</label>
<Field <Field

View File

@@ -4,7 +4,7 @@ import ChannelFields from "./ChannelFields";
const ChannelCard = () => { const ChannelCard = () => {
return ( return (
<Card> <Card className="p-4">
<CardHeader title="Channel 1 (JSON)" /> <CardHeader title="Channel 1 (JSON)" />
<ChannelFields /> <ChannelFields />
</Card> </Card>

View File

@@ -8,7 +8,7 @@ const ChannelFields = () => {
useFormikContext(); useFormikContext();
const [showPwd, setShowPwd] = useState(false); const [showPwd, setShowPwd] = useState(false);
return ( return (
<div className="flex flex-col space-y-2"> <div className="flex flex-col space-y-2 px-2">
<FormGroup> <FormGroup>
<label htmlFor="backoffice" className="m-0"> <label htmlFor="backoffice" className="m-0">
Back Office URL Back Office URL

View File

@@ -5,7 +5,7 @@ import NPEDIcon from "/NPED.svg";
const NPEDCard = () => { const NPEDCard = () => {
return ( return (
<Card> <Card className="p-4">
<CardHeader title={"NPED Config"} img={NPEDIcon} /> <CardHeader title={"NPED Config"} img={NPEDIcon} />
<NPEDFields /> <NPEDFields />
</Card> </Card>

View File

@@ -56,7 +56,7 @@ const NPEDFields = () => {
enableReinitialize enableReinitialize
> >
{({ errors, touched }) => ( {({ errors, touched }) => (
<Form className="flex flex-col space-y-5"> <Form className="flex flex-col space-y-5 px-2">
<FormGroup> <FormGroup>
<label htmlFor="username">Username</label> <label htmlFor="username">Username</label>
{touched.username && errors.username && ( {touched.username && errors.username && (

View File

@@ -26,7 +26,7 @@ const NPEDHotlist = () => {
<Formik initialValues={initialValue} onSubmit={handleSubmit}> <Formik initialValues={initialValue} onSubmit={handleSubmit}>
{({ setFieldValue, setErrors, errors }) => { {({ setFieldValue, setErrors, errors }) => {
return ( return (
<Form className="flex flex-col space-y-2"> <Form className="flex flex-col space-y-2 px-2">
<input <input
type="file" type="file"
name="file" name="file"

View File

@@ -4,7 +4,7 @@ import NPEDHotlist from "./NPEDHotlist";
const NPEDHotlistCard = () => { const NPEDHotlistCard = () => {
return ( return (
<Card> <Card className="p-4">
<CardHeader title={" Hotlist file upload"} /> <CardHeader title={" Hotlist file upload"} />
<NPEDHotlist /> <NPEDHotlist />
</Card> </Card>

View File

@@ -4,7 +4,7 @@ import OverviewTextFields from "./OverviewTextFields";
const OverviewTextCard = () => { const OverviewTextCard = () => {
return ( return (
<Card> <Card className="p-4">
<CardHeader title={"Overview Text"} /> <CardHeader title={"Overview Text"} />
<OverviewTextFields /> <OverviewTextFields />
</Card> </Card>

View File

@@ -6,7 +6,7 @@ const OverviewTextFields = () => {
useFormikContext(); useFormikContext();
return ( return (
<div className="flex flex-col space-y-2"> <div className="flex flex-col space-y-2 px-2">
<FormGroup> <FormGroup>
<label htmlFor="overviewQuality">Include VRM</label> <label htmlFor="overviewQuality">Include VRM</label>
<FormToggle name="includeVRM" /> <FormToggle name="includeVRM" />

View File

@@ -4,7 +4,7 @@ import SightingDataFields from "./SightingDataFields";
const SightingDataCard = () => { const SightingDataCard = () => {
return ( return (
<Card> <Card className="p-4">
<CardHeader title={"Sighting Data"} /> <CardHeader title={"Sighting Data"} />
<SightingDataFields /> <SightingDataFields />
</Card> </Card>

View File

@@ -6,7 +6,7 @@ const SightingDataFields = () => {
useFormikContext(); useFormikContext();
return ( return (
<div className="flex flex-col space-y-2"> <div className="flex flex-col space-y-2 px-2">
<FormGroup> <FormGroup>
<label htmlFor="overviewQuality">Overview Quality</label> <label htmlFor="overviewQuality">Overview Quality</label>
<Field <Field

View File

@@ -4,7 +4,7 @@ import SystemConfigFields from "./SystemConfigFields.tsx";
const SystemCard = () => { const SystemCard = () => {
return ( return (
<Card> <Card className="p-4">
<CardHeader title={"System Config"} /> <CardHeader title={"System Config"} />
<SystemConfigFields /> <SystemConfigFields />
</Card> </Card>

View File

@@ -38,7 +38,7 @@ const SystemConfigFields = () => {
validateOnBlur validateOnBlur
> >
{({ values, errors, touched }) => ( {({ values, errors, touched }) => (
<Form className="flex flex-col space-y-5"> <Form className="flex flex-col space-y-5 px-2">
<FormGroup> <FormGroup>
<label <label
htmlFor="deviceName" htmlFor="deviceName"

View File

@@ -11,9 +11,9 @@ const ModemCard = () => {
return ( return (
// TODO: Add switch for Auto vs Manual settings // TODO: Add switch for Auto vs Manual settings
<Card> <Card className="p-4">
<CardHeader title={"Modem"} /> <CardHeader title={"Modem"} />
<div className="flex flex-col gap-4"> <div className="flex flex-col gap-4 px-2">
<FormGroup> <FormGroup>
<label <label
htmlFor="apn" htmlFor="apn"

View File

@@ -9,9 +9,9 @@ const WiFiCard = () => {
const [encryption, setEncryption] = useState("WPA2"); const [encryption, setEncryption] = useState("WPA2");
return ( return (
<Card className="mb-4"> <Card className="p-4">
<CardHeader title={"WiFi"} /> <CardHeader title={"WiFi"} />
<div className="flex flex-col gap-4"> <div className="flex flex-col gap-4 px-2">
<FormGroup> <FormGroup>
<label <label
htmlFor="ssid" htmlFor="ssid"