Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Profile Page UI #3459

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 14 additions & 33 deletions dashboard/src/modules/components/ProfileComponent/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,33 @@ import {
Text,
TextContent,
TextVariants,
isValidDate,
} from "@patternfly/react-core";
import { KeyIcon, UserAltIcon } from "@patternfly/react-icons";

import KeyManagementComponent from "./KeyManagement";
import React from "react";
import { UserAltIcon } from "@patternfly/react-icons";
import avatar from "assets/images/avatar.jpg";
import { useKeycloak } from "@react-keycloak/web";

const ProfileComponent = () => {
const { keycloak } = useKeycloak();

const formatDate = (date) => {
const registerDate = new Date(date);
return isValidDate(registerDate)
? registerDate.toLocaleDateString()
: "----";
};
return (
<div className={"profileDiv"}>
<TextContent>
<Text component={TextVariants.h2}>User Profile</Text>
</TextContent>
<Grid>
<GridItem span={1} />
<GridItem span={10}>
<TextContent>
<Text component={TextVariants.h2}>User Profile</Text>
</TextContent>
</GridItem>
<GridItem span={1} />
</Grid>

<div className="headerDiv">
<Grid hasGutter>
<GridItem span={8}>
<GridItem span={1} />
<GridItem span={10}>
<Card className="card">
<CardBody>
<Level className="levelCard">
Expand Down Expand Up @@ -111,27 +112,7 @@ const ProfileComponent = () => {
<KeyManagementComponent />
</GridItem>
</GridItem>
<GridItem span={4}>
<Card className="card">
<CardBody>
<div className="subHeader settings-wrapper">
<KeyIcon />
<span className="subHeader">Settings</span>
</div>
<Grid>
<GridItem span={12} className="subCardDiv">
<TextContent>
{/* TODO: How to handle account creation date */}
<span>Account creation Date</span>
<Text component={TextVariants.h4}>
{formatDate("MM/DD/YYYY")}
</Text>
</TextContent>
</GridItem>
</Grid>
</CardBody>
</Card>
</GridItem>
<GridItem span={1} />
</Grid>
</div>
</div>
Expand Down
3 changes: 0 additions & 3 deletions dashboard/src/modules/components/ProfileComponent/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@
padding: var(--pf-global--spacer--xs) 0;
}
}
.settings-wrapper {
color: #6a6e73;
}
.item-container {
padding: 2vh 0;
.item-header {
Expand Down