From de692a12480789061a7cfbd5d404266fe69deedc Mon Sep 17 00:00:00 2001 From: sigmaBoei Date: Fri, 27 Feb 2026 13:48:05 +0800 Subject: [PATCH] users page changes --- .../src/app/components/prompts/Prompts.jsx | 46 ++++++++++ .../app/components/prompts/styles.module.css | 16 ++++ frontend/src/app/credentials/add/page.jsx | 17 +++- .../src/app/credentials/add/styles.module.css | 86 +++++++++++++++++++ frontend/src/app/users/[usersId]/page.jsx | 15 +++- .../src/app/users/[usersId]/styles.module.css | 14 +++ 6 files changed, 190 insertions(+), 4 deletions(-) create mode 100644 frontend/src/app/components/prompts/Prompts.jsx create mode 100644 frontend/src/app/components/prompts/styles.module.css diff --git a/frontend/src/app/components/prompts/Prompts.jsx b/frontend/src/app/components/prompts/Prompts.jsx new file mode 100644 index 0000000..f842a68 --- /dev/null +++ b/frontend/src/app/components/prompts/Prompts.jsx @@ -0,0 +1,46 @@ +import React, { useState } from "react"; +import styles from "./styles.module.css"; + +const Prompts = ({ show }) => { + return ( + <> + {/* Prompts (static) */} + {show && ( +
+ + + + + +

The name is already in used. You can try another.

+
+ )} + + ); +}; + +export default Prompts; diff --git a/frontend/src/app/components/prompts/styles.module.css b/frontend/src/app/components/prompts/styles.module.css new file mode 100644 index 0000000..66be081 --- /dev/null +++ b/frontend/src/app/components/prompts/styles.module.css @@ -0,0 +1,16 @@ +.prompts { + display: flex; + align-items: center; + gap: 8px; + align-self: stretch; +} +.prompts > p { + color: #d49e3d; + color: color(display-p3 0.7988 0.6279 0.3103); + font-family: Inter; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: normal; + letter-spacing: -0.07px; +} diff --git a/frontend/src/app/credentials/add/page.jsx b/frontend/src/app/credentials/add/page.jsx index 7a43b5c..c83f78a 100644 --- a/frontend/src/app/credentials/add/page.jsx +++ b/frontend/src/app/credentials/add/page.jsx @@ -20,7 +20,22 @@ const page = () => {
{/* Project Name Input Container */} -
+
+
+

Project Name

+

*

+
+ {/* Content */} +
+ +
+
diff --git a/frontend/src/app/credentials/add/styles.module.css b/frontend/src/app/credentials/add/styles.module.css index e18567e..883e071 100644 --- a/frontend/src/app/credentials/add/styles.module.css +++ b/frontend/src/app/credentials/add/styles.module.css @@ -16,3 +16,89 @@ gap: 24px; border-radius: 8px; } +.projectName { + display: flex; + width: 500px; + flex-direction: column; + align-items: flex-start; + gap: 12px; +} +.label { + display: flex; + align-items: flex-start; + gap: 2px; + align-self: stretch; +} +.labelTxt { + color: #d2d3e1; + color: color(display-p3 0.8235 0.8275 0.8784); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} +.required { + color: #cfb000; + font-weight: 600; +} + +.credInputField { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 8px; + align-self: stretch; +} + +/* +.inputField { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 8px; + align-self: stretch; +} +.inputField > input { + display: flex; + height: 44px; + padding: 12px 16px; + flex-direction: column; + justify-content: center; + align-items: flex-start; + background: none; + gap: 10px; + align-self: stretch; + border-radius: 6px; + border: 1px solid #616583; + border: 1px solid color(display-p3 0.3843 0.3961 0.5057); +} +.inputField > input:hover { + border: 1px solid #616583; + border: 1px solid color(display-p3 0.3843 0.3961 0.5057); + background: rgba(75, 79, 109, 0.05); + background: color(display-p3 0.298 0.3098 0.4196 / 0.05); +} + +.inputField input:focus { + outline: none; + border-radius: 6px; + border: 1px solid #959aff; + border: 1px solid color(display-p3 0.5892 0.6031 0.9766); + background: rgba(75, 79, 109, 0.25); + background: color(display-p3 0.298 0.3098 0.4196 / 0.25); + caret-color: #959aff; +} +.inputField input:focus::placeholder { + color: #4b4f6d; + color: color(display-p3 0.298 0.3098 0.4196); +} + +.placeholderTxt::placeholder { + color: #85869b; + color: color(display-p3 0.5216 0.5255 0.6); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; */ diff --git a/frontend/src/app/users/[usersId]/page.jsx b/frontend/src/app/users/[usersId]/page.jsx index d96bcb0..87c759f 100644 --- a/frontend/src/app/users/[usersId]/page.jsx +++ b/frontend/src/app/users/[usersId]/page.jsx @@ -1,9 +1,11 @@ -import React from "react"; +"use client"; import TopHeader from "@/app/components/topHeader/TopHeader"; import globalStyle from "../../globalStyle.module.css"; import editUserStyle from "./styles.module.css"; +import Prompts from "@/app/components/prompts/Prompts"; +import { useState } from "react"; -const page = () => { +const Page = () => { const sampleData = [ { permission: "organization.delete" }, { permission: "user.create" }, @@ -20,6 +22,9 @@ const page = () => { { permission: "service.delete" }, { permission: "service.update" }, ]; + + const [showPrompt, setShowPrompt] = useState(false); + return (
@@ -43,6 +48,7 @@ const page = () => {

Role

+

*