From 6fd78aa92fbade3955d2d5eb331bf8fa7db87aa9 Mon Sep 17 00:00:00 2001 From: Laux Dev <2201104208@student.buksu.edu.ph> Date: Wed, 18 Mar 2026 16:18:55 +0800 Subject: [PATCH] Add feature --- .../app/components/checkbox/styles.module.css | 10 +- frontend/src/app/components/icons/check.jsx | 3 +- .../components/radio-button/RadioButton.jsx | 15 + .../components/radio-button/styles.module.css | 44 ++ .../[servicesId]/LogsModal/styles.module.css | 4 +- .../app/projects/view/[servicesId]/page.jsx | 424 +++------------ .../view/[servicesId]/projectDetails.jsx | 323 +++++++++++ .../projects/view/[servicesId]/settings.jsx | 171 ++++++ .../view/[servicesId]/styles.module.css | 155 +++++- .../[servicesId]/variableStyles.module.css | 23 +- .../projects/view/add-from-scratch/page.jsx | 23 +- .../view/add-from-scratch/projectDetails.jsx | 511 ++++++++++-------- .../view/add-from-scratch/settings.jsx | 3 +- .../view/add-from-scratch/styles.module.css | 105 +++- .../variableStyles.module.css | 14 +- .../AddConfigMap/AddConfigMapModal.jsx | 53 +- .../AddConfigMap/styles.module.css | 37 +- .../AddVariableModal/AddVariableModal.jsx | 4 +- .../AddVariableModal/styles.module.css | 17 +- .../AddVolumes/styles.module.css | 13 +- 20 files changed, 1268 insertions(+), 684 deletions(-) create mode 100644 frontend/src/app/components/radio-button/RadioButton.jsx create mode 100644 frontend/src/app/components/radio-button/styles.module.css create mode 100644 frontend/src/app/projects/view/[servicesId]/projectDetails.jsx create mode 100644 frontend/src/app/projects/view/[servicesId]/settings.jsx diff --git a/frontend/src/app/components/checkbox/styles.module.css b/frontend/src/app/components/checkbox/styles.module.css index dbe7766..adfd1fb 100644 --- a/frontend/src/app/components/checkbox/styles.module.css +++ b/frontend/src/app/components/checkbox/styles.module.css @@ -1,7 +1,7 @@ .switch { display: flex; - width: 53px; - height: 33px; + width: 50px; + height: 30px; align-items: center; background-color: white; cursor: pointer; @@ -16,8 +16,8 @@ display: none; } .knob { - width: 25px; - height: 25px; + width: 22px; + height: 22px; background-color: #6d6d6d; border-radius: 50%; display: flex; @@ -32,7 +32,7 @@ } .check:checked + .switch .knob { - transform: translateX(78%); + transform: translateX(90%); background-color: white; } diff --git a/frontend/src/app/components/icons/check.jsx b/frontend/src/app/components/icons/check.jsx index 510727f..cc22737 100644 --- a/frontend/src/app/components/icons/check.jsx +++ b/frontend/src/app/components/icons/check.jsx @@ -11,8 +11,9 @@ const CheckIcon = (props) => { {...props} > { + return ( +
+ +
+ ); +}; + +export default RadioButton; diff --git a/frontend/src/app/components/radio-button/styles.module.css b/frontend/src/app/components/radio-button/styles.module.css new file mode 100644 index 0000000..8891da5 --- /dev/null +++ b/frontend/src/app/components/radio-button/styles.module.css @@ -0,0 +1,44 @@ +.radioButtonsContainer > div > div > div { + display: flex; + padding: 12px 4px; + align-items: center; + gap: 12px; +} +.radio { + display: flex; + align-items: center; + cursor: pointer; + gap: 8px; +} +.radio input { + display: none; +} + +.radio .custom { + width: 20px; + height: 20px; + border: 2px solid #4b4f6d; + border-radius: 50%; + position: relative; + background-color: #fff; +} + +.radio .custom::after { + content: ""; + width: 10px; + height: 10px; + background: #5980f1; + border-radius: 50%; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%) scale(0); +} + +.radio input:checked + .custom::after { + transform: translate(-50%, -50%) scale(1); +} +.radio input:not(:checked) + .custom + span, +.radio input:not(:checked) + .custom + * { + color: #85869b; +} diff --git a/frontend/src/app/projects/view/[servicesId]/LogsModal/styles.module.css b/frontend/src/app/projects/view/[servicesId]/LogsModal/styles.module.css index 4e575f9..da54ad4 100644 --- a/frontend/src/app/projects/view/[servicesId]/LogsModal/styles.module.css +++ b/frontend/src/app/projects/view/[servicesId]/LogsModal/styles.module.css @@ -115,10 +115,10 @@ gap: 12px; } .autoScroll input[type="checkbox"] { - accent-color: #5980f1; + accent-color: #4271ff; height: 16px; width: 16px; - background: white; + background-color: transparent; } .autoScroll p { diff --git a/frontend/src/app/projects/view/[servicesId]/page.jsx b/frontend/src/app/projects/view/[servicesId]/page.jsx index a6b69b8..9f7502d 100644 --- a/frontend/src/app/projects/view/[servicesId]/page.jsx +++ b/frontend/src/app/projects/view/[servicesId]/page.jsx @@ -4,21 +4,44 @@ import globalStyle from "@/app/globalStyle.module.css"; import TopHeader from "@/app/components/topHeader/TopHeader"; import styles from "./styles.module.css"; import variableStyles from "./variableStyles.module.css"; -import TextField from "@/app/components/fields/textfield"; import AddVariableModal from "../variableModals/AddVariableModal/AddVariableModal"; import AddVolumeModal from "../variableModals/AddVolumes/AddVolumeModal"; import AddConfigMapModal from "../variableModals/AddConfigMap/AddConfigMapModal"; -import CustomCheckbox from "@/app/components/checkbox/CheckBox"; -import DeleteIcon from "@/app/components/icons/delete"; -import SelectField from "@/app/components/select/SelectField"; -import ActionButton from "@/app/components/actionButton/ActionButton"; import LogsModal from "./LogsModal/logsModas"; +import ProjectDetails from "./projectDetails"; +import Settings from "./settings"; +import useServicesForm from "@/app/hooks/useServicesForm"; +import useIsMobile from "@/app/hooks/useIsMobile"; const AddServices = () => { - const [triggerVariableDropDown, setTriggerVariableDropDown] = useState(false); const [triggerAddVariable, setTriggerAddVariable] = useState(false); const [triggerAddVolume, setTriggerAddVolume] = useState(false); - const [triggeAddConfigMap, setTriggerAddConfigMap] = useState(false); + const [triggerAddConfigMap, setTriggerAddConfigMap] = useState(false); + const [isProjectDetails, setIsProjectDetails] = useState(true); const [triggerLogsModal, setTriggerLogsModal] = useState(false); + const [isEnableIngress, setIsEnableIngress] = useState(false); + const isMobile = useIsMobile(); + + const { + register, + handleSubmit, + errors, + onSubmit, + triggerAlert, + disableScaling, + disableReadiness, + disableLiveness, + setDisableScaling, + setDisableReadiness, + setDisableLiveness, + setTriggerAlert, + minPods, + maxPods, + readinessPath, + readinessPort, + livenessPort, + livenessPath, + } = useServicesForm(); + const sampleData = [ { id: 1, key: "REQUEST_SERVICE_GRPC", value: "request-service:50053" }, { id: 1, key: "REQUEST_SERVICE_GRPC", value: "request-service:50053" }, @@ -38,7 +61,7 @@ const AddServices = () => { {triggerAddVolume && ( )} - {triggeAddConfigMap && ( + {triggerAddConfigMap && ( )}
@@ -51,348 +74,53 @@ const AddServices = () => { requiredButtons={["back", "title", "edit", "download"]} setTriggerLogsModal={setTriggerLogsModal} /> -
-
-
-
-

Project Details

-
-
-
-
-

Name

- -
-
-

Version

- -
-
-
-
-

- Image (Optional) -

- -
-
-
-
-

Port

- -
-
-
-
-

Ingress

- -
-
-

Ingress

- -
-
-
-
-
-
-

Resource

-
-
-
-
-

CPU Request (MB)

- -
-
-

CPU Limit (MB)

- -
-
-
-
-

Memory Request (MB)

- -
-
-

Memory Limit (MB)

- -
-
-
-
-
-
-
-
-
-

Auto Scaling

- -
-
-
-
-
-
-

Minimum pods

- - -
-
-

Maximum pods

- -
-
-
-
-
-
-
-
-
-
-

Readiness

- -
-
-
-
-
-
-

Readiness Path

- -
-
-

Readiness Port

- -
-
-
-
-
-
-
-
-
-
-

Liveness

- -
-
-
-
-
-
-

Liveness Path

- -
-
-

Liveness Port

- - -
-
-
-
-
-
+
+
+
+

setIsProjectDetails(true)} + > + Project Details +

+

setIsProjectDetails(false)} + > + Settings +

-
-
-
-
-
- - - - - - - -
-
-
-
- setTriggerVariableDropDown(!triggerVariableDropDown) - } - > - - - - -
- {triggerVariableDropDown && ( -
-
{ - setTriggerAddVariable(true); - setTriggerVariableDropDown( - !triggerVariableDropDown, - ); - }} - > -

Environment Variables

-
-
{ - setTriggerAddVolume(true); - setTriggerVariableDropDown( - !triggerVariableDropDown, - ); - }} - > -

Volumes

-
-
{ - setTriggerAddConfigMap(true); - setTriggerVariableDropDown( - !triggerVariableDropDown, - ); - }} - > -

Config Maps

-
-
- )} -
-
-
-
-
-
-
-
-

Environment Variables

-
-
-
-

Key

-

Value

-
-
-
- {/*
-
-

No Environment Variables added

-
-
*/} - {sampleData.map((data, key) => { - return ( -
-

{data.key}

-

{data.value}

- } /> -
- ); - })} -
-
-
-
-
-
-

Volumes

-
-
-
-

Name

-

Path

-

Size/Type

-

Access Mode

-

Storage Class

-
-
-
-
-
-

No volume added

-
-
-
-
-
-
-
-
-

Config maps

-
- -
-
-
-

No config map added

-
-
-
-
-
-
-
+
+ +
diff --git a/frontend/src/app/projects/view/[servicesId]/projectDetails.jsx b/frontend/src/app/projects/view/[servicesId]/projectDetails.jsx new file mode 100644 index 0000000..61817d9 --- /dev/null +++ b/frontend/src/app/projects/view/[servicesId]/projectDetails.jsx @@ -0,0 +1,323 @@ +"use client"; +import React, { useState } from "react"; +import styles from "./styles.module.css"; +import TextField from "@/app/components/fields/textfield"; +import CustomCheckbox from "@/app/components/checkbox/CheckBox"; +import SelectField from "@/app/components/select/SelectField"; +import RadioButton from "@/app/components/radio-button/RadioButton"; + +const ProjectDetails = ({ + register, + handleSubmit, + errors, + onSubmit, + triggerAlert, + disableScaling, + disableReadiness, + disableLiveness, + setDisableScaling, + setDisableReadiness, + setDisableLiveness, + setTriggerAlert, + minPods, + maxPods, + readinessPath, + readinessPort, + livenessPort, + livenessPath, + setIsEnableIngress, + isEnableIngress, + ...props +}) => { + return ( +
+
+
+

Project Details

+
+
+
+
+

Name

+ +
+
+

Version

+ +
+
+
+
+

+ Image (Optional) +

+ +
+
+
+
+

Port

+ +
+
+
+
+

Ingress

+
+
+ + setIsEnableIngress(e.target.value === "true") + } + /> + + setIsEnableIngress(e.target.value === "true") + } + /> +
+
+
+
+ + {isEnableIngress && ( + <> +
+
+

Sub Domain

+ +
+ +
+

Sub Domain

+ +
+
+
+
+

+ Allowed Ips (Optional) +

+ +
+
+ + )} +
+
+
+
+

Resource

+
+
+
+
+

CPU Request (MB)

+ +
+
+

CPU Limit (MB)

+ +
+
+
+
+

Memory Request (MB)

+ +
+
+

Memory Limit (MB)

+ +
+
+
+
+
+
+
+
+
+

Auto Scaling

+ setDisableScaling(!disableScaling)} + /> +
+
+
+
+
+
+

Minimum pods

+ + +
+
+

Maximum pods

+ +
+
+
+
+
+
+
+
+
+
+

Readiness

+ setDisableReadiness(!disableReadiness)} + /> +
+
+
+
+
+
+

Readiness Path

+ + +
+
+

Readiness Port

+ +
+
+
+
+
+
+
+
+
+
+

Liveness

+ setDisableLiveness(!disableLiveness)} + /> +
+
+
+
+
+
+

Liveness Path

+ +
+
+

Liveness Port

+ +
+
+
+
+
+
+
+
+ ); +}; + +export default ProjectDetails; diff --git a/frontend/src/app/projects/view/[servicesId]/settings.jsx b/frontend/src/app/projects/view/[servicesId]/settings.jsx new file mode 100644 index 0000000..b360843 --- /dev/null +++ b/frontend/src/app/projects/view/[servicesId]/settings.jsx @@ -0,0 +1,171 @@ +"use client"; +import React, { useState } from "react"; +import variableStyles from "./variableStyles.module.css"; +const Settings = ({ + setTriggerAddVariable, + setTriggerAddVolume, + setTriggerAddConfigMap, + ...props +}) => { + const [triggerVariableDropDown, setTriggerVariableDropDown] = useState(false); + + return ( +
+
+
+
+
+ + + + + + + +
+
+
+
+ setTriggerVariableDropDown(!triggerVariableDropDown) + } + > + + + + +
+ {triggerVariableDropDown && ( +
+
{ + setTriggerAddVariable(true); + setTriggerVariableDropDown(!triggerVariableDropDown); + }} + > +

Environment Variables

+
+
{ + setTriggerAddVolume(true); + setTriggerVariableDropDown(!triggerVariableDropDown); + }} + > +

Volumes

+
+
{ + setTriggerAddConfigMap(true); + setTriggerVariableDropDown(!triggerVariableDropDown); + }} + > +

Config Maps

+
+
+ )} +
+
+
+
+
+
+
+
+

Environment Variables

+
+
+
+

Key

+

Value

+
+
+
+
+
+

No Environment Variables added

+
+
+ {/*
+

REQUEST_SERVICE_GRPC

+

request-service:50053

+ +
*/} +
+
+
+
+
+
+

Volumes

+
+
+
+

Name

+

Path

+

Size/Type

+

Access Mode

+

Storage Class

+
+
+
+
+
+

No volume added

+
+
+
+
+
+
+
+
+

Config maps

+
+ +
+
+
+

No config map added

+
+
+
+
+
+
+
+
+ ); +}; + +export default Settings; diff --git a/frontend/src/app/projects/view/[servicesId]/styles.module.css b/frontend/src/app/projects/view/[servicesId]/styles.module.css index 13bab16..3f1c59d 100644 --- a/frontend/src/app/projects/view/[servicesId]/styles.module.css +++ b/frontend/src/app/projects/view/[servicesId]/styles.module.css @@ -1,24 +1,119 @@ +.content { + display: flex; + + flex-direction: column; + align-items: flex-start; + gap: 32px; + min-height: 0; + + align-self: stretch; +} .contentContainer { display: flex; align-items: flex-start; - flex: 1 0 0; + height: calc(100vh - 240px); + flex: 1; + align-self: stretch; } + +.heading { + display: none; + flex-direction: column; + align-items: flex-start; + gap: 16px; + padding: 0 16px; + align-self: stretch; + background: #191a24; +} +.heading > div { + display: flex; + align-items: flex-start; + gap: 16px; + align-self: stretch; +} +.heading p { + display: flex; + padding: 24px 4px 16px 4px; + flex-direction: column; + justify-content: center; + align-items: flex-start; + gap: 5px; + color: #85869b; + font-family: Inter; + font-size: 18px; + + font-weight: 400; +} +.heading .active { + border-bottom: 1px solid #959aff; + color: #959aff; +} .fieldsContainerCreateNew { display: flex; padding-top: 36px; flex-direction: column; - width: 550px; align-items: flex-start; gap: 36px; background: #191a24; - height: calc(100vh - 175px); + height: calc(100vh - 170px); + min-height: 0; + flex: 1; overflow-y: scroll; scrollbar-width: none; } +.radioButtonContainer { + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + gap: 12px; + align-self: stretch; +} +.radioButtonContainer > div { + display: flex; + align-items: flex-start; + gap: 24px; + padding: 20px 0; +} +.textarea { + display: flex; + height: 120px; + padding: 12px; + width: 100%; + flex-direction: column; + align-items: flex-start; + background-color: transparent; + gap: 10px; + align-self: stretch; + border-radius: 4px; + border: 1px solid #4b4f6d; + resize: none; + color: #85869b; + font-size: 16px; + font-family: inter; + font-style: normal; + font-weight: 400; + line-height: normal; + letter-spacing: 0.16px; + outline: none; +} +.textarea:focus { + border-radius: 6px; + border: 1px solid #959aff; + background: rgba(75, 79, 109, 0.25); +} +.textarea:focus::placeholder { + color: #4b4f6d; + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} .projectDetails { display: flex; - padding: 0 36px; + padding: 0 20px; flex-direction: column; align-items: flex-start; gap: 10px; @@ -48,7 +143,7 @@ } .resource { display: flex; - padding: 0 36px; + padding: 0 20px; flex-direction: column; align-items: flex-start; align-self: stretch; @@ -65,7 +160,7 @@ display: flex; justify-content: center; align-items: center; - gap: 10px; + gap: 8px; align-self: stretch; } @@ -92,25 +187,6 @@ color: #85869b; } -.fieldsCreateNew > div > div select, -.resourceFields > div > div select { - display: flex; - padding: 12px; - flex-direction: column; - align-items: flex-start; - gap: 10px; - align-self: stretch; - border-radius: 4px; - border: 1px solid #4b4f6d; - background-color: transparent; - color: white; - font-size: 16px; - font-style: normal; - font-weight: 400; - line-height: normal; - letter-spacing: 0.16px; -} - .repositoryForm { display: flex; padding: 12px; @@ -217,3 +293,32 @@ line-height: normal; letter-spacing: 0.16px; } +.noDisplay { + display: none; +} +.hasDisplay { + display: flex; +} +@media (max-width: 768px) { + .heading { + display: flex; + } + .fieldsContainerCreateNew { + height: calc(100vh - 262px); + } + .content { + padding: 0; + } + .fieldsCreateNew .inputGroup, + .additionalDetailsFields > div .inputGroup, + .resourceFields .inputGroup { + display: flex; + flex-direction: column; + gap: 16px; + } + .fieldsCreateNew .inputGroup div, + .additionalDetailsFields > div .inputGroup div, + .resourceFields .inputGroup div { + width: 100%; + } +} diff --git a/frontend/src/app/projects/view/[servicesId]/variableStyles.module.css b/frontend/src/app/projects/view/[servicesId]/variableStyles.module.css index e90ceb2..2cdbf6a 100644 --- a/frontend/src/app/projects/view/[servicesId]/variableStyles.module.css +++ b/frontend/src/app/projects/view/[servicesId]/variableStyles.module.css @@ -2,9 +2,8 @@ display: flex; flex-direction: column; align-items: flex-start; - flex: 1 0 0; + flex: 1; align-self: stretch; - background: #161720; } .variablesHeader { @@ -23,7 +22,7 @@ } .searchContainer > div { display: flex; - width: 310px; + width: 100%; padding: 8px 12px; align-items: center; gap: 9px; @@ -103,6 +102,13 @@ align-self: stretch; text-wrap: nowrap; width: 100%; + border-radius: 4px; + color: #acb0ff; + font-family: Inter; + font-size: 18px; + font-style: normal; + font-weight: 400; + line-height: normal; } .dropDownContainer > div:hover { background: #3c4159; @@ -251,3 +257,14 @@ font-weight: 500; line-height: normal; } +.noDisplay { + display: none; +} +.hasDisplay { + display: flex; +} +@media (max-width: 768px) { + .variablesContentContainer > div { + height: calc(100vh - 342px); + } +} diff --git a/frontend/src/app/projects/view/add-from-scratch/page.jsx b/frontend/src/app/projects/view/add-from-scratch/page.jsx index 1a4a182..52f636f 100644 --- a/frontend/src/app/projects/view/add-from-scratch/page.jsx +++ b/frontend/src/app/projects/view/add-from-scratch/page.jsx @@ -3,6 +3,7 @@ import React, { useState } from "react"; import globalStyle from "@/app/globalStyle.module.css"; import TopHeader from "@/app/components/topHeader/TopHeader"; import styles from "./styles.module.css"; +import variableStyles from "./variableStyles.module.css"; import AddVariableModal from "../variableModals/AddVariableModal/AddVariableModal"; import AddVolumeModal from "../variableModals/AddVolumes/AddVolumeModal"; import AddConfigMapModal from "../variableModals/AddConfigMap/AddConfigMapModal"; @@ -10,10 +11,14 @@ import useServicesForm from "@/app/hooks/useServicesForm"; import Alert from "@/app/components/alerts/Alert"; import ProjectDetails from "./projectDetails"; import Settings from "./settings"; +import useIsMobile from "@/app/hooks/useIsMobile"; const AddServices = () => { const [triggerAddVariable, setTriggerAddVariable] = useState(false); const [triggerAddVolume, setTriggerAddVolume] = useState(false); const [triggerAddConfigMap, setTriggerAddConfigMap] = useState(false); + const [isProjectDetails, setIsProjectDetails] = useState(true); + const [isEnableIngress, setIsEnableIngress] = useState(false); + const isMobile = useIsMobile(); const { register, @@ -66,12 +71,23 @@ const AddServices = () => {
-

Project Details

-

Settings

+

setIsProjectDetails(true)} + > + Project Details +

+

setIsProjectDetails(false)} + > + Settings +

{ readinessPort={readinessPort} livenessPort={livenessPort} livenessPath={livenessPath} + setIsEnableIngress={setIsEnableIngress} + isEnableIngress={isEnableIngress} /> { return ( -
-
-
-
-

Project Details

-
-
-
-
-

- Repository (Optional) -

- -
-
-
-
-

Name

- -
-
-

Version

- -
-
-
-
-

- Image (Optional) -

- -
-
-
-
-

Port

- -
-
-
-
-

Ingress

- -
-
-

Ingress

- -
-
-
+ +
+
+

Project Details

-
-
-

Resource

-
-
-
-
-

CPU Request (MB)

- -
-
-

CPU Limit (MB)

- -
-
-
-
-

Memory Request (MB)

- -
-
-

Memory Limit (MB)

- -
-
-
-
-
+
-
+

+ Repository (Optional) +

+ +
+
+
+
+

Name

+ +
+
+

Version

+ +
+
+
+
+

+ Image (Optional) +

+ +
+
+
+
+

Port

+ +
+
+
+
+

Ingress

+
-

Auto Scaling

- setDisableScaling(!disableScaling)} + + setIsEnableIngress(e.target.value === "true") + } + /> + + setIsEnableIngress(e.target.value === "true") + } />
-
-
-
-
-

Minimum pods

+
+
- -
-
-

Maximum pods

- -
+ {isEnableIngress && ( + <> +
+
+

Sub Domain

+ +
+ +
+

Sub Domain

+ +
+
+
+
+

+ Allowed Ips (Optional) +

+ +
+
+ + )} +
+
+

Type

+ +
+
+
+
+
+
+

Resource

+
+
+
+
+

CPU Request (MB)

+ +
+
+

CPU Limit (MB)

+ +
+
+
+
+

Memory Request (MB)

+ +
+
+

Memory Limit (MB)

+ +
+
+
+
+
+
+
+
+
+

Auto Scaling

+ setDisableScaling(!disableScaling)} + /> +
+
+
+
+
+
+

Minimum pods

+ + +
+
+

Maximum pods

+
+
+
-
-
-
-

Readiness

- setDisableReadiness(!disableReadiness)} - /> -
+
+
+

Readiness

+ setDisableReadiness(!disableReadiness)} + />
-
-
+
+
+
+
-
-

Readiness Path

+

Readiness Path

- -
-
-

Readiness Port

- -
+ +
+
+

Readiness Port

+
+
+
-
-
-
-

Liveness

- setDisableLiveness(!disableLiveness)} - /> -
+
+
+

Liveness

+ setDisableLiveness(!disableLiveness)} + />
-
-
+
+
+
+
-
-

Liveness Path

- -
-
-

Liveness Port

- -
+

Liveness Path

+ +
+
+

Liveness Port

+
diff --git a/frontend/src/app/projects/view/add-from-scratch/settings.jsx b/frontend/src/app/projects/view/add-from-scratch/settings.jsx index a288f4d..b360843 100644 --- a/frontend/src/app/projects/view/add-from-scratch/settings.jsx +++ b/frontend/src/app/projects/view/add-from-scratch/settings.jsx @@ -5,11 +5,12 @@ const Settings = ({ setTriggerAddVariable, setTriggerAddVolume, setTriggerAddConfigMap, + ...props }) => { const [triggerVariableDropDown, setTriggerVariableDropDown] = useState(false); return ( -
+
diff --git a/frontend/src/app/projects/view/add-from-scratch/styles.module.css b/frontend/src/app/projects/view/add-from-scratch/styles.module.css index ae940e1..b03c523 100644 --- a/frontend/src/app/projects/view/add-from-scratch/styles.module.css +++ b/frontend/src/app/projects/view/add-from-scratch/styles.module.css @@ -1,23 +1,24 @@ .content { display: flex; - padding: 0 16px; + flex-direction: column; align-items: flex-start; - height: calc(100vh - 170px); - /* ✅ fills remaining space */ + gap: 32px; min-height: 0; + align-self: stretch; } .contentContainer { display: flex; align-items: flex-start; + height: calc(100vh - 240px); flex: 1; - background-color: red; + align-self: stretch; } .heading { - display: flex; + display: none; flex-direction: column; align-items: flex-start; gap: 16px; @@ -41,10 +42,12 @@ color: #85869b; font-family: Inter; font-size: 18px; - font-style: normal; + font-weight: 400; - line-height: normal; - letter-spacing: 0.18px; +} +.heading .active { + border-bottom: 1px solid #959aff; + color: #959aff; } .fieldsContainerCreateNew { display: flex; @@ -53,9 +56,9 @@ align-items: flex-start; gap: 36px; background: #191a24; - height: 100%; + height: calc(100vh - 170px); min-height: 0; - background-color: red; + flex: 1; overflow-y: scroll; scrollbar-width: none; } @@ -90,9 +93,58 @@ gap: 16px; align-self: stretch; } +.radioButtonContainer { + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + gap: 12px; + align-self: stretch; +} +.radioButtonContainer > div { + display: flex; + align-items: flex-start; + gap: 24px; + padding: 20px 0; +} +.textarea { + display: flex; + height: 120px; + padding: 12px; + width: 100%; + flex-direction: column; + align-items: flex-start; + background-color: transparent; + gap: 10px; + align-self: stretch; + border-radius: 4px; + border: 1px solid #4b4f6d; + resize: none; + color: #85869b; + font-size: 16px; + font-family: inter; + font-style: normal; + font-weight: 400; + line-height: normal; + letter-spacing: 0.16px; + outline: none; +} +.textarea:focus { + border-radius: 6px; + border: 1px solid #959aff; + background: rgba(75, 79, 109, 0.25); +} +.textarea:focus::placeholder { + color: #4b4f6d; + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} .resource { display: flex; - padding: 0 36px; + padding: 0 20px; flex-direction: column; align-items: flex-start; align-self: stretch; @@ -126,7 +178,7 @@ flex-direction: column; justify-content: center; align-items: flex-start; - gap: 12px; + gap: 16px; flex: 1 0 0; } .fieldsCreateNew > div > div p, @@ -249,3 +301,32 @@ line-height: normal; letter-spacing: 0.16px; } +.noDisplay { + display: none; +} +.hasDisplay { + display: flex; +} +@media (max-width: 768px) { + .heading { + display: flex; + } + .fieldsContainerCreateNew { + height: calc(100vh - 262px); + } + .content { + padding: 0; + } + .fieldsCreateNew .inputGroup, + .additionalDetailsFields > div .inputGroup, + .resourceFields .inputGroup { + display: flex; + flex-direction: column; + gap: 16px; + } + .fieldsCreateNew .inputGroup div, + .additionalDetailsFields > div .inputGroup div, + .resourceFields .inputGroup div { + width: 100%; + } +} diff --git a/frontend/src/app/projects/view/add-from-scratch/variableStyles.module.css b/frontend/src/app/projects/view/add-from-scratch/variableStyles.module.css index e28c2b5..2cdbf6a 100644 --- a/frontend/src/app/projects/view/add-from-scratch/variableStyles.module.css +++ b/frontend/src/app/projects/view/add-from-scratch/variableStyles.module.css @@ -2,9 +2,8 @@ display: flex; flex-direction: column; align-items: flex-start; - flex: 1 0 0; + flex: 1; align-self: stretch; - background: #161720; } .variablesHeader { @@ -258,3 +257,14 @@ font-weight: 500; line-height: normal; } +.noDisplay { + display: none; +} +.hasDisplay { + display: flex; +} +@media (max-width: 768px) { + .variablesContentContainer > div { + height: calc(100vh - 342px); + } +} diff --git a/frontend/src/app/projects/view/variableModals/AddConfigMap/AddConfigMapModal.jsx b/frontend/src/app/projects/view/variableModals/AddConfigMap/AddConfigMapModal.jsx index f3c01cc..ac5467e 100644 --- a/frontend/src/app/projects/view/variableModals/AddConfigMap/AddConfigMapModal.jsx +++ b/frontend/src/app/projects/view/variableModals/AddConfigMap/AddConfigMapModal.jsx @@ -4,7 +4,10 @@ import CloseIcon from "@/app/components/icons/close"; import TextField from "@/app/components/fields/textfield"; import AddIcon from "@/app/components/icons/add"; import PrimaryButton from "@/app/components/buttons/primarybutton/PrimaryButton"; +import SelectField from "@/app/components/select/SelectField"; +import RadioButton from "@/app/components/radio-button/RadioButton"; const AddConfigMapModal = (props) => { + const [typeOption, setTypeOption] = useState("raw"); return (
@@ -33,21 +36,20 @@ const AddConfigMapModal = (props) => {

Type

- {" "} -
- -
-
- -
+ setTypeOption(e.target.value)} + label="Raw" + /> + setTypeOption(e.target.value)} + label="Credential" + />
@@ -57,11 +59,22 @@ const AddConfigMapModal = (props) => {

Value

- + {typeOption === "raw" ? ( + + ) : ( + + )}
diff --git a/frontend/src/app/projects/view/variableModals/AddConfigMap/styles.module.css b/frontend/src/app/projects/view/variableModals/AddConfigMap/styles.module.css index 12d9922..01405f1 100644 --- a/frontend/src/app/projects/view/variableModals/AddConfigMap/styles.module.css +++ b/frontend/src/app/projects/view/variableModals/AddConfigMap/styles.module.css @@ -7,13 +7,14 @@ z-index: 10; display: flex; align-items: center; + padding: 5px; justify-content: center; background-color: #00000037; } .modal { display: flex; - width: 593px; - + max-width: 593px; + width: 100%; padding: 16px 16px 24px 16px; flex-direction: column; align-items: flex-start; @@ -174,28 +175,7 @@ line-height: normal; letter-spacing: 0.16px; } -.verticalInput textarea { - display: flex; - height: 120px; - padding: 12px; - width: 100%; - flex-direction: column; - align-items: flex-start; - background-color: transparent; - gap: 10px; - align-self: stretch; - border-radius: 4px; - border: 1px solid #4b4f6d; - resize: none; - color: #85869b; - font-size: 16px; - font-family: inter; - font-style: normal; - font-weight: 400; - outline: none; - line-height: normal; - letter-spacing: 0.16px; -} + .verticalInput textarea:focus { border-radius: 6px; border: 1px solid #959aff; @@ -286,3 +266,12 @@ gap: 16px; align-self: stretch; } +@media (max-width: 768px) { + .horizontalInput > div { + flex-direction: column; + gap: 10px; + } + .horizontalInput > div > div { + width: 100%; + } +} diff --git a/frontend/src/app/projects/view/variableModals/AddVariableModal/AddVariableModal.jsx b/frontend/src/app/projects/view/variableModals/AddVariableModal/AddVariableModal.jsx index 4ca99c3..83501a9 100644 --- a/frontend/src/app/projects/view/variableModals/AddVariableModal/AddVariableModal.jsx +++ b/frontend/src/app/projects/view/variableModals/AddVariableModal/AddVariableModal.jsx @@ -102,11 +102,11 @@ const AddVariableModal = (props) => {
-

Protocol

+

Username

-

Service

+

Password

diff --git a/frontend/src/app/projects/view/variableModals/AddVariableModal/styles.module.css b/frontend/src/app/projects/view/variableModals/AddVariableModal/styles.module.css index a3f0a6d..13adb83 100644 --- a/frontend/src/app/projects/view/variableModals/AddVariableModal/styles.module.css +++ b/frontend/src/app/projects/view/variableModals/AddVariableModal/styles.module.css @@ -4,6 +4,7 @@ position: absolute; top: 0; left: 0; + padding: 5px; z-index: 10; display: flex; align-items: center; @@ -12,8 +13,8 @@ } .modal { display: flex; - width: 593px; - height: 566px; + max-width: 593px; + width: 100%; padding: 16px 16px 24px 16px; flex-direction: column; align-items: flex-start; @@ -189,14 +190,11 @@ } .authenticationContainer { display: flex; - padding: 12px 12px 32px 12px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; align-self: stretch; - border-radius: 6px; - background: #272b3a; } .authenticationContainer > p { color: #85869b; @@ -213,3 +211,12 @@ gap: 16px; align-self: stretch; } +@media (max-width: 768px) { + .horizontalInput > div { + flex-direction: column; + gap: 10px; + } + .horizontalInput > div > div { + width: 100%; + } +} diff --git a/frontend/src/app/projects/view/variableModals/AddVolumes/styles.module.css b/frontend/src/app/projects/view/variableModals/AddVolumes/styles.module.css index 947bdea..815e7c5 100644 --- a/frontend/src/app/projects/view/variableModals/AddVolumes/styles.module.css +++ b/frontend/src/app/projects/view/variableModals/AddVolumes/styles.module.css @@ -12,8 +12,8 @@ } .modal { display: flex; - width: 593px; - + max-width: 593px; + width: 100%; padding: 16px 16px 24px 16px; flex-direction: column; align-items: flex-start; @@ -200,3 +200,12 @@ gap: 16px; align-self: stretch; } +@media (max-width: 768px) { + .horizontalInput > div { + flex-direction: column; + gap: 10px; + } + .horizontalInput > div > div { + width: 100%; + } +}