Skip to content

Commit 88cd633

Browse files
New update
1 parent cf60c4c commit 88cd633

32 files changed

+2692
-170
lines changed

client/src/Assets/Component/Home_Page/Firstcontainer.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { Box, Grid, Typography } from '@mui/material';
33

4-
const Firstcontainer = ({ Heightsize }) => {
4+
const Firstcontainer = () => {
55
return (
66
<Box sx={{ color: "white", position: "relative", height: '90vh', overflow: 'hidden' }}>
77
<Grid container>
@@ -18,13 +18,16 @@ const Firstcontainer = ({ Heightsize }) => {
1818
color: 'white',
1919
zIndex: 2,
2020
width: "60%",
21-
fontWeight:"700",
21+
fontWeight:"500",
2222
fontSize:"3.5rem",
2323
lineHeight: 1.1,
2424
}}
2525

2626
>
27-
Activating humanity's potential through generative AI
27+
Activating humanity's potential through <span style={{color:"yellow", fontWeight: 600, fontStyle:"𝒽𝒾𝑔𝒽𝓁𝒾𝑔𝒽𝓉𝓈",}}>
28+
𝐆𝖾𐓣𝖾𝗋α𝗍𝗂𝗏𝖾 𝐀𝚰
29+
30+
</span>
2831
<Typography sx={{mt:"30px", width: "50%", fontSize:"1.9rem", fontWeight:"500", lineHeight: 1,}}>
2932
Open models in every modality,
3033
for everyone, everywhere.

client/src/Assets/Component/Home_Page/Secondcontainer.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';
44
import { useInView } from 'react-intersection-observer';
55

66

7-
const Secondcontainer = ({ Header, Header_summary, Header_url, Direaction, Header_Button_text }) => {
7+
const Secondcontainer = ({ Header, Header_summary, Header_url, Direaction, Header_Button_text, Header_Image_src }) => {
88
const { ref, inView } = useInView({
99
threshold: 0.1,
1010
triggerOnce: false,
@@ -33,7 +33,7 @@ const Secondcontainer = ({ Header, Header_summary, Header_url, Direaction, Heade
3333
{/* Image */}
3434
<Box
3535
component="img"
36-
src="/model/Aimg1.jpg"
36+
src={Header_Image_src}
3737
alt="Image 1"
3838
sx={{
3939
// border:"10px solid black",

client/src/Assets/Component/sidebar_feacture/Imgside.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const Imgside = () => {
3131
return (
3232
<Box
3333
sx={{
34+
position:"relative",
3435
width: { xs: "15%", sm: "10%", md: "5%" }, // Responsive width
3536
backgroundColor: `${Theme.primary[50]}`,
3637
color: "#fff",

client/src/Assets/Page_Component/Image_Generation/Image_Output_section.jsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Rive from '@rive-app/react-canvas';
44

55
const Image_Output_section = ({ loading, imageUrl, handleDownload }) => {
66
const [animation, setAnimation] = useState("Walking");
7-
const [isTransitioning, setIsTransitioning] = useState(false);
7+
const [isTransitioning, setIsTransitioning] = useState(false);
88

99
useEffect(() => {
1010
const animationCycle = async () => {
@@ -54,12 +54,12 @@ const Image_Output_section = ({ loading, imageUrl, handleDownload }) => {
5454
<>
5555
{loading ? (
5656
<Box width="500px" height="450px"
57-
style={{ display: 'flex', justifyContent: 'center', alignItems: 'center',backgroundColor:"gray", borderRadius: "10px" }}
57+
style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', backgroundColor: "gray", borderRadius: "10px" }}
5858
>
59-
<Rive
59+
<Rive
6060
src="/Rive_Folder/the_walking___working_dead.riv"
6161
animations={animation} // Dynamically set the animation
62-
sx={{backgroundColor:"red", width:"100%", height:"100%"}}
62+
sx={{ backgroundColor: "red", width: "100%", height: "100%" }}
6363
/>
6464
</Box>
6565
) : imageUrl ? (
@@ -70,7 +70,14 @@ const Image_Output_section = ({ loading, imageUrl, handleDownload }) => {
7070
style={{ width: "500px", height: "500px", borderRadius: "8px" }}
7171
/>
7272
<br />
73-
<button onClick={handleDownload} style={{ marginTop: "10px", background: "blue" }}>
73+
<button onClick={handleDownload} style={{
74+
marginTop: "10px", backgroundColor: "#71a3c1",
75+
color: "white",
76+
fontWeight: 'bold',
77+
"&:hover": { backgroundColor: "#0D0D0D" },
78+
padding: '10px 20px',
79+
borderRadius: '8px',
80+
}}>
7481
Download Image
7582
</button>
7683
</div>

client/src/Assets/Pages/Home.jsx

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
import React from 'react';
2-
import Firstcontainer from '../Component/Home_Page/Firstcontainer';
3-
import Secondcontainer from '../Component/Home_Page/Secondcontainer';
4-
import Responsivegallry from '../UI-Test/Responsivegallry';
1+
import React from "react";
2+
import Firstcontainer from "../Component/Home_Page/Firstcontainer";
3+
import Secondcontainer from "../Component/Home_Page/Secondcontainer";
4+
import Responsivegallry from "../UI-Test/Responsivegallry";
55

66
const Home = () => {
77
const Heightsize = "80vh";
88

9-
const Header1 = "Image Generation";
10-
const Header1_Summary = "A clean and professional scene showcasing an AI-powered image generation feature. The interface displays a user entering a text prompt, with the AI creating a vibrant, high-quality image in real time. The background is minimal, with subtle glowing lines representing AI technology.";
11-
const Header1_url = "/Image_generation";
12-
const Header1_Button_text = "Image Generation";
13-
14-
const Header2 = "Video Generation";
15-
const Header2_Summary = "A simple and professional interface showcasing an AI video generation feature. Users enter a text prompt, and the AI creates a high-quality video preview instantly. The layout is clean, with clear options to customize or finalize the video. Smooth animations illustrate the video creation process.";
16-
const Header2_url = "/Video_generation";
17-
const Header2_Button_text = "Video Generation";
18-
19-
const Header3 = "Sky Generation";
20-
const Header3_Summary = "Lorem ipsum dolor sit amet consectetur adipisicing elit...";
21-
const Header3_url = "/Skybox_generation";
22-
const Header3_Button_text = "SkyBox Generation";
9+
const sections = [
10+
{
11+
Header: "Image Generation",
12+
Header_summary:
13+
"A clean and professional scene showcasing an AI-powered image generation feature. The interface displays a user entering a text prompt, with the AI creating a vibrant, high-quality image in real time. The background is minimal, with subtle glowing lines representing AI technology.",
14+
Header_url: "/Image_generation",
15+
Header_Button_text: "Image Generation",
16+
Header_Image_src: "/model/Aimg1.jpg",
17+
Direaction: false,
18+
},
19+
{
20+
Header: "Video Generation",
21+
Header_summary:
22+
"A simple and professional interface showcasing an AI video generation feature. Users enter a text prompt, and the AI creates a high-quality video preview instantly. The layout is clean, with clear options to customize or finalize the video. Smooth animations illustrate the video creation process.",
23+
Header_url: "/Video_generation",
24+
Header_Button_text: "Video Generation",
25+
Header_Image_src: "/model/Aimg2.jpg",
26+
Direaction: true,
27+
},
28+
{
29+
Header: "Sky Generation",
30+
Header_summary: "Create beautiful sky scenes effortlessly. Customize colors and cloud patterns. Generate realistic skies for any environment. Perfect for creative projects.",
31+
Header_url: "/Skybox_generation",
32+
Header_Button_text: "SkyBox Generation",
33+
Header_Image_src: "/model/Aimg1.jpg",
34+
Direaction: false,
35+
},
36+
];
2337

2438
return (
2539
<div>
2640
<Firstcontainer Heightsize={Heightsize} />
27-
<Secondcontainer Header={Header1} Header_summary={Header1_Summary} Header_url={Header1_url} Direaction={false} Header_Button_text={Header1_Button_text} />
28-
<Secondcontainer Header={Header2} Header_summary={Header2_Summary} Header_url={Header2_url} Direaction={true} Header_Button_text={Header2_Button_text} />
29-
<Secondcontainer Header={Header3} Header_summary={Header3_Summary} Header_url={Header3_url} Direaction={false} Header_Button_text={Header3_Button_text} />
41+
{sections.map((section, index) => (
42+
<Secondcontainer key={index} {...section} />
43+
))}
3044
<Responsivegallry />
3145
</div>
3246
);
3347
};
3448

3549
export default Home;
36-
37-
// import React from 'react'
38-
// import Imagegen from './Imagegen'
39-
// import Imgside from './Profile/IMAGEGEN/Imgside'
40-
41-
// const Home = () => {
42-
// return (
43-
// // <Imagegen/>
44-
// <Imgside/>
45-
// )
46-
// }
47-
48-
// export default Home
49-

client/src/Assets/Pages/Imagegen.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const Imagegen = () => {
1414
const [imageUrl, setImageUrl] = useState("");
1515
const [error, setError] = useState("");
1616
const userdata = getuser();
17-
17+
1818
const handleChange = (e) => {
1919
setPrompt(e.target.value);
2020
};

client/src/Assets/Pages/Profile/Imagehistory.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const Imagehistory = () => {
7474
{item.image ? (
7575
<Box sx={{
7676
marginTop: "20px",
77-
position: "relative", height: "55vh", backgroundColor: "grey", cursor: "pointer", '&:hover': {
77+
position: "relative", height: "52.2vh", backgroundColor: "grey", cursor: "pointer", '&:hover': {
7878
backgroundColor: "#69369E",
7979
},
8080
}}>
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
import React, { useEffect, useState } from "react";
2+
import axios from "axios";
3+
import {Card, CardContent, Typography, CircularProgress, Grid, Box, Avatar, Stack,} from "@mui/material";
4+
import { CreditCard, MonetizationOn, CalendarToday } from "@mui/icons-material";
5+
import Theme, { GlobleVariable } from "../../../Theme";
6+
7+
const PaymentHistory = ({ userid }) => {
8+
const Backend_url = GlobleVariable.Backend_url;
9+
10+
const [history, setHistory] = useState([]);
11+
const [loading, setLoading] = useState(true);
12+
const [error, setError] = useState(null);
13+
14+
useEffect(() => {
15+
const fetchPaymentHistory = async () => {
16+
try {
17+
const response = await axios.get(`${Backend_url}/payment/history/${userid}`);
18+
const sortedHistory = response.data.getuser.sort(
19+
(a, b) => new Date(b.payment_time) - new Date(a.payment_time)
20+
);
21+
setHistory(sortedHistory);
22+
} catch (err) {
23+
setError("Failed to fetch payment history");
24+
} finally {
25+
setLoading(false);
26+
}
27+
};
28+
29+
if (userid) {
30+
fetchPaymentHistory();
31+
}
32+
}, [userid]);
33+
34+
if (loading)
35+
return (
36+
<Box display="flex" justifyContent="center" alignItems="center" minHeight="200px">
37+
<CircularProgress color="primary" />
38+
</Box>
39+
);
40+
41+
if (error)
42+
return (
43+
<Typography color="error" align="center" variant="h6" mt={2}>
44+
{error}
45+
</Typography>
46+
);
47+
48+
return (
49+
<Grid container spacing={3} mt={3} justifyContent="center">
50+
<Grid item xs={12}>
51+
<Typography variant="h5" align="center" fontWeight="bold" color={Theme.white[100]}>
52+
Payment History
53+
</Typography>
54+
</Grid>
55+
{history.length > 0 ? (
56+
history.map((payment, index) => (
57+
<Grid item xs={12} sm={6} md={4} key={payment._id}>
58+
<Card sx={{ backgroundColor: Theme.primary[50], color: Theme.white[100], p: 2, borderRadius: 3 }}>
59+
<CardContent>
60+
<Stack direction="row" spacing={2} alignItems="center">
61+
<Avatar sx={{ bgcolor: Theme.secondary[100] }}>
62+
<CreditCard />
63+
</Avatar>
64+
<Box>
65+
<Typography variant="h6" fontWeight="bold">
66+
{payment.amount}
67+
</Typography>
68+
<Typography variant="body2" color={Theme.white[200]}>
69+
Credits: {payment.credit}
70+
</Typography>
71+
<Stack direction="row" spacing={1} alignItems="center" mt={1}>
72+
<CalendarToday fontSize="small" />
73+
<Typography variant="body2">
74+
{new Date(payment.payment_time).toLocaleDateString()}
75+
</Typography>
76+
</Stack>
77+
</Box>
78+
</Stack>
79+
</CardContent>
80+
</Card>
81+
</Grid>
82+
))
83+
) : (
84+
<Grid item xs={12}>
85+
<Typography align="center" color={Theme.white[100]} variant="h6">
86+
No Payment History Found
87+
</Typography>
88+
</Grid>
89+
)}
90+
</Grid>
91+
);
92+
};
93+
94+
export default PaymentHistory;

client/src/Assets/Pages/Profile/Profilehome.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const Profilehome = () => {
3636
<Grid container spacing={2} justifyContent="center" alignItems="center" >
3737
<Grid item xs={12} md={3} style={{ textAlign: 'center' }} >
3838
<AccountCircleIcon sx={{ height: "200px", width: "auto", color: "grey" }} />
39+
{/* <img src="https://avatars.githubusercontent.com/u/144512766?s=400&v=4" sx={{ height: "200px", width: "auto", color: "grey", borderRadius:"50%" }}/> */}
3940
</Grid>
4041
<Grid item xs={12} md={9} >
4142
<Grid container spacing={2} sx={{ml:"2%"}}>

0 commit comments

Comments
 (0)