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

Feat/mui5 #652

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"build": "npx lerna run build",
"test": "lerna run test:ci",
"bootstrap": "npx lerna bootstrap",
"start": "npx lerna --scope @immobiliarelabs/backstage-plugin-ldap-auth run start",
"publish:ci": "lerna publish from-package --yes --pre-dist-tag alpha",
"version:release": "lerna version --yes --conventional-commits --conventional-graduate --create-release github --message 'chore(release): publish'",
"version:prerelease": "lerna version --yes --force-publish --conventional-commits --conventional-prerelease --create-release github --message 'chore(prerelease): publish'",
Expand Down
9 changes: 6 additions & 3 deletions packages/ldap-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@
"dependencies": {
"@backstage/core-components": "^0.14.0",
"@backstage/core-plugin-api": "^1.9.0",
"@backstage/theme": "^0.5.1",
"@material-ui/core": "^4.12.4",
"@backstage/theme": "^0.5.2",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/material": "^5.15.15",
"@mui/styles": "^5.15.15",
"@react-hookz/web": "^23.0.0",
"password-validator": "^5.3.0",
"zod": "^3.17.3"
},
"peerDependencies": {
"react": "^16.13.1 || ^17.0.0"
"react": "^16.13.1 || ^17.0.0 || ^18.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.22.0",
Expand Down
24 changes: 8 additions & 16 deletions packages/ldap-auth/src/components/LoginPage/Form.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Content, Page } from '@backstage/core-components';
import React, { useEffect, useState } from 'react';
import { Paper, TextField, Container, Button } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import { Paper, TextField, Container, Button } from '@mui/material';
import { styled } from '@mui/material/styles';
import PasswordValidator from 'password-validator';

export type LoginFormProps = {
Expand All @@ -15,17 +15,10 @@ export type LoginFormProps = {
usernameLabel?: string;
};

const useStyles = makeStyles((theme) => ({
paper: {
padding: theme.spacing(2),
textAlign: 'center',
color: theme.palette.text.secondary,
},
paperHead: {
marginBottom: theme.spacing(2),
textAlign: 'center',
color: theme.palette.text.secondary,
},
const StyledPaper = styled(Paper)(({ theme }) => ({
padding: theme.spacing(2),
textAlign: 'center',
color: theme.palette.text.secondary,
}));

const passwordSchema = new PasswordValidator();
Expand Down Expand Up @@ -53,7 +46,6 @@ export const LoginForm = ({
const [password, setPassword] = useState('');
const [uError, setUError] = useState(Boolean(error));
const [pError, setPError] = useState(Boolean(error));
const classes = useStyles();

function onClick() {
const isUsernameValid = validateUsern(username) as boolean;
Expand Down Expand Up @@ -92,7 +84,7 @@ export const LoginForm = ({
<Page themeId="tool">
<Content>
<Container maxWidth="sm">
<Paper elevation={4} className={classes.paper}>
<StyledPaper elevation={4}>
<TextField
required
label={usernameLabel || 'LDAP Name'}
Expand Down Expand Up @@ -129,7 +121,7 @@ export const LoginForm = ({
>
Login
</Button>
</Paper>
</StyledPaper>
</Container>
</Content>
</Page>
Expand Down
33 changes: 0 additions & 33 deletions packages/ldap-auth/src/components/LoginPage/style.tsx

This file was deleted.

Loading
Loading