Skip to content

Commit

Permalink
Merge pull request #25 from tekdi/v0.1.6
Browse files Browse the repository at this point in the history
Merge V0.1.6 to main branch
  • Loading branch information
sudeeppr1998 authored Dec 3, 2024
2 parents 666012e + 932cb3d commit e31560a
Show file tree
Hide file tree
Showing 13 changed files with 8,561 additions and 4,464 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/png" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<title>DigiPramaan</title>
</head>
<body>
<div id="root"></div>
Expand Down
12,874 changes: 8,442 additions & 4,432 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"globals": "^15.11.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.15",
"vite": "^5.4.10"
"vite": "^5.4.10",
"vite-plugin-pwa": "^0.21.0"
}
}
Binary file added public/favico.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
11 changes: 9 additions & 2 deletions src/assets/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/Fetch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const Fetch = () => {
fullWidth
startIcon={<DownloadIcon />}
onClick={handleFetch} // Trigger fetch only if valid
sx={{ borderRadius: 7 }}
sx={{ borderRadius: 7,fontFamily: "Poppins, sans-serif",textTransform: "none" }}
>
Fetch
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Header = () => {
fontStyle: "italic",
}}
>
E-Wallet
DigiPramaan
</Typography>

{/* Language Selector */}
Expand Down
77 changes: 56 additions & 21 deletions src/components/LanguageSelect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import {
Button,
FormControl,
InputLabel,
CircularProgress,
} from "@mui/material";
import { useNavigate, useLocation } from "react-router-dom";
import icon from "../assets/icon.svg";
import logo from "../assets/logo.svg";
import { languageOptions } from "../config";
import { useKeycloak } from "@react-keycloak/web";
import {jwtDecode} from 'jwt-decode'; // Fixed import
Expand Down Expand Up @@ -52,7 +54,21 @@ const LanguageSelect = () => {
console.error("Login failed:", error instanceof Error ? error.message : "Unknown error");
}
};

// Show loader if Keycloak is not initialized
if (!initialized) {
return (
<Box
sx={{
minHeight: "100vh",
display: "flex",
justifyContent: "center",
alignItems: "center"
}}
>
<CircularProgress size={50}/>
</Box>
);
}
return (
<Box
sx={{
Expand All @@ -77,47 +93,53 @@ const LanguageSelect = () => {
>
<Box
sx={{
flex: 1,
display: "flex",
alignItems: "center",
flexDirection: "column",
justifyContent: "center",
gap: 2,
alignItems: "center",
color: "white",
p: 3,
gap: 1,
}}
>
<Box
component="img"
src={logo}
alt="Logo"
sx={{
width: 100,
height: 38,
}}
/>
<Box
component="img"
src={icon}
alt="Icon"
sx={{
width: 60, // Adjust width
height: 60, // Adjust height
display: "block", // Ensure image behaves like a block element
width: 269,
height: 51,
}}
/>
<Typography
variant="h4"
component="h1"
variant="subtitle1"
sx={{
textAlign: "center",
fontFamily: "Poppins, sans-serif",
fontStyle: "italic",
textAlign: "center", // Align text center
lineHeight: "60px", // Match the image height for vertical centering
mt: 1,
}}
gutterBottom
>
E-Wallet
Your Digital Identity
</Typography>
</Box>
<Typography variant="subtitle1">
Unlock Opportunities, Seamlessly
</Typography>
</Box>

{/* Language Selection Section */}
<Paper
sx={{
p: 3,
borderRadius: "24px 24px 0 0",
mt: "auto", // Push this section to the bottom of the screen
mt: "auto",
}}
>
<Typography variant="h6" gutterBottom>
Expand Down Expand Up @@ -153,16 +175,29 @@ const LanguageSelect = () => {
fullWidth
size="large"
onClick={handleLogin}
sx={{ borderRadius: 7,fontFamily: "Poppins, sans-serif",bgcolor: "#121943" }}
sx={{
borderRadius: 7,
fontFamily: "Poppins, sans-serif",
textTransform: "none",
bgcolor: "#121943",
}}
>
Log In to E-Wallet
Log In to DigiPramaan
</Button>
<Button
variant="outlined"
fullWidth
size="large"
onClick={()=> navigate("/signup")}
sx={{ borderRadius: 7,bgcolor:'white',fontFamily: "Poppins, sans-serif",color:"#121943",mt:2,mb:5 }}
onClick={() => navigate("/signup")}
sx={{
borderRadius: 7,
bgcolor: "white",
fontFamily: "Poppins, sans-serif",
textTransform: "none",
color: "#121943",
mt: 2,
mb: 5,
}}
>
Register
</Button>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ShareConfirmationDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const ShareConfirmationDialog = ({ open, onClose, documentType,documentSubType,d

<DialogContent sx={{ pt: 2 }}>
<Typography variant="h6" sx={{ mb: 3, fontFamily: 'Poppins, sans-serif' }}>
Please provide your consent to share the selected document with your E-Wallet
Please provide your consent to share the selected document with your DigiPramaan
</Typography>

<Box sx={{ display: 'flex', alignItems: 'center', mb: 2 }}>
Expand Down Expand Up @@ -148,7 +148,7 @@ const ShareConfirmationDialog = ({ open, onClose, documentType,documentSubType,d
<Typography variant="h6" sx={{ mb: 3, fontFamily: 'Poppins, sans-serif' }}>
Your <Typography component="span" color="primary" variant="h6" sx={{ fontFamily: 'Poppins, sans-serif' }}>
{documentName}
</Typography> has been added to your documents set in the E-Wallet!
</Typography> has been added to your documents set in the DigiPramaan!
</Typography>

<Box sx={{
Expand Down
2 changes: 1 addition & 1 deletion src/components/Upload.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const Upload = () => {
<Button
variant="contained"
fullWidth
sx={{ mt: 4, borderRadius: 7 }}
sx={{ mt: 4, borderRadius: 7,fontFamily: "Poppins, sans-serif",textTransform: "none" }}
startIcon={<UploadFileIcon />}
onClick={handleUpload}
>
Expand Down
32 changes: 31 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa';

// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [react(),
VitePWA({
registerType: 'autoUpdate', // Automatically updates service workers
includeAssets: ['favicon.ico'], //, 'robots.txt', 'apple-touch-icon.png'
manifest: {
name: 'DigiPramaan',
short_name: 'DigiPramaan',
description: 'DigiPramaan for Piramal',
theme_color: '#ffffff',
icons: [
{
src: 'favicon.ico',
sizes: '192x192',
type: 'image/png',
},
{
src: 'favicon.ico',
sizes: '512x512',
type: 'image/png',
},
{
src: 'favicon.ico',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
},
],
},
}),
],
})

0 comments on commit e31560a

Please sign in to comment.