Skip to content

Commit

Permalink
update ui
Browse files Browse the repository at this point in the history
  • Loading branch information
xuan.tan committed Jul 7, 2024
1 parent 8382ade commit fd0f95d
Show file tree
Hide file tree
Showing 10 changed files with 245 additions and 130 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore node_modules folder
node_modules

# Ignore any directories named 'temp' or 'log'
temp
log
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:14

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json (if available)
COPY package*.json ./

# Install dependencies with --legacy-peer-deps flag
RUN npm install --save-dev @babel/plugin-proposal-private-property-in-object --legacy-peer-deps
RUN npm install --legacy-peer-deps

# Copy the rest of the application code
COPY . .
RUN npm run build

# Expose the port the app runs on
EXPOSE 8080

# Command to run the application
CMD ["node", "server.js"]
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
}
}
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ app.use((req, res, next) => {
app.use(express.static(path.join(__dirname, 'build')));

// Health check endpoint
app.get('/health', (req, res) => {
res.status(200).send('OK');
app.get('/healthcheck', (req, res) => {
res.status(200).send('ok');
});

// Serve the React app
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 6 additions & 27 deletions src/components/LockScreen.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
import React, { useState } from "react";
import { Container, Button, Input, Form, FormGroup, Label } from "reactstrap";
import { Container, Button, Form, FormGroup } from "reactstrap";
import "styles/PageHeader.css"; // Adjust the path as needed

export default function LockScreen({ onUnlock }) {
const [passcode, setPasscode] = useState("");
const [error, setError] = useState("");

const handleSubmit = (e) => {
e.preventDefault();
if (passcode === "7427466391") {
onUnlock();
} else {
setError("Incorrect passcode. Please try again.");
}
};

return (
<div className="page-header header-filter">
<div className="squares square1" />
Expand All @@ -28,24 +16,15 @@ export default function LockScreen({ onUnlock }) {
<div className="content-center brand">
<h1 className="h1-seo">MaltixAI</h1>
<h2 className="h2-seo">Transform Anyone into Any Expert</h2>
<Form onSubmit={handleSubmit} className="lock-screen-form">
<Form className="lock-screen-form">
<FormGroup>
<Label for="passcode">Passcode</Label>
<Input
type="password"
id="passcode"
value={passcode}
onChange={(e) => setPasscode(e.target.value)}
placeholder="First 10-digit prime found in consecutive digits of e"
/>
<Button type="button" color="primary" onClick={onUnlock}>
Unleash Potential
</Button>
</FormGroup>
<Button type="submit" color="primary">
Unlock
</Button>
{error && <p style={{ color: "red" }}>{error}</p>}
</Form>
</div>
</Container>
</div>
);
}
}
8 changes: 4 additions & 4 deletions src/components/Navbars/ExamplesNavbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,16 @@ export default function ExamplesNavbar() {
<i className="tim-icons icon-spaceship" /> Upgrade to PRO
</Button>
</NavItem>
<NavItem>
{/* <NavItem>
<NavLink tag={Link} to="/">
Back to Kit
</NavLink>
</NavItem>
<NavItem>
</NavItem> */}
{/* <NavItem>
<NavLink href="https://github.com/creativetimofficial/blk-design-system-react/issues">
Have an issue?
</NavLink>
</NavItem>
</NavItem> */}
</Nav>
</Collapse>
</Container>
Expand Down
8 changes: 8 additions & 0 deletions src/styles/PageHeader.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@
.animated-word-exit-active {
opacity: 0;
transform: translateY(-20px);
}

.center-content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
Loading

0 comments on commit fd0f95d

Please sign in to comment.