Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #159 from vishalola/main
Browse files Browse the repository at this point in the history
New Dashboard Added
  • Loading branch information
BuddyLongLegs authored May 10, 2023
2 parents c7648bf + 19621d1 commit 840604b
Show file tree
Hide file tree
Showing 9 changed files with 185 additions and 10 deletions.
24 changes: 24 additions & 0 deletions assets/svgs/iconDash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions components/P_Card/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {PlusOutlined} from "@ant-design/icons";
export default (props)=>{
return (
<div className="bg-[#FFFEFE] shadow-[0px_4px_8px_rgba(0,0,0,0.25)] h-[180px] w-[230px] cursor-pointer rounded-[12px]
flex justify-center flex-col items-center hover:bg-[#DEF7E5] transition-all duration-200
"
>
<div className="h-1/2 w-full p-5 pl-6 text-xs">
<div className="text-xl font-bold mb-1">
{props.formName}
</div>
<div className="text-sm font-medium mb-1 text-[#116149]">
{props.totalForms} Forms
</div>
<div className="text-[#970606] mb-1 "
>
{props.allowedOrigins}
</div>
</div>
<div className="h-1/2 w-full p-5 pl-6 text-2xs flex items-end text-[#116149] font-medium">
<div>
Created : {props.creationDate}
</div>
</div>
</div>
)
}
16 changes: 16 additions & 0 deletions components/card/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {PlusOutlined} from "@ant-design/icons";
export default (props)=>{
return (
<div className="bg-[#FFFEFE] shadow-[0px_4px_8px_rgba(0,0,0,0.25)] h-[180px] w-[230px] cursor-pointer rounded-[12px]
flex justify-center flex-col items-center hover:bg-[#DEF7E5] transition-all duration-200
"
>
<div>
<PlusOutlined className="text-[30px]"/>
</div>
<div className="select-none text-base text-[#023430] font-semibold">
Create a Project
</div>
</div>
)
}
68 changes: 60 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@ant-design/icons": "^5.0.1",
"@dicebear/avatars": "^4.10.7",
"@dicebear/avatars-avataaars-sprites": "^4.10.7",
"@nextui-org/react": "^1.0.0-beta.10",
Expand Down
54 changes: 54 additions & 0 deletions pages/dashboard2/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import Card from '../../components/card'
import PCard from '../../components/P_Card'
import Icon from '../../assets/svgs/iconDash.svg'
import Image from 'next/image'
export default ()=>{
return (
<div className="flex-col flex items-center border-0 border-yellow-500 font-[Poppins]">

<svg width="100%" height="300" viewBox="0 0 1728 461" fill="none" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">
<rect x="0.5" y="0.5" width="1727" height="460" fill="#023430" stroke="black"/>
{/* <path d="M843 0C898.229 0 943 44.7715 943 100V324.686C943 381.743 888.726 423.166 833.691 408.114C811.616 402.076 788.049 405.034 768.15 416.338L730 438.01L691.202 453.704C679.288 458.523 666.557 461 653.705 461H63.1044C32.6848 461 6.59467 439.298 1.05515 409.387C0.353192 405.597 0 401.75 0 397.896V394.527C0 339.415 44.6773 294.738 99.7895 294.738H313.517H379.217C455.118 294.738 498.432 208.075 452.873 147.369C407.314 86.6627 450.628 0 526.528 0H843Z" fill="#00684A"/> */}
</svg>
<div className=" w-[clamp(200px,60%,900px)] project_cards relative top-[-150px] outline-[black]
flex flex-col
">
<div className="text-xl font-bold md:m-2 mb-2 text-[#DEF7E5] text-center md:pl-8 md:text-start">
Your Projects
</div>
<div className="flex flex-wrap justify-center md:justify-start gap-16 md:pl-8">
<Card/>
<PCard formName="Project 1" totalForms="10" allowedOrigins={"Public"} creationDate="25 Feb 2025"/>
<PCard formName="Project 1" totalForms="10" allowedOrigins={"google"} creationDate="25 Feb 2025"/>
</div>
</div>
<div className='mb-5 mt-[-100px] md:w-[clamp(0px,65%,900px)] w-[70%] flex flex-col md:flex-row'>
<div className='border-[#001E2B] border-[1px] rounded-[12px] flex md:w-[65%] flex-col md:flex-row'>
<div className=' md:w-[85%] flex flex-col justify-center p-2'>
<div className='m-2 text-xl font-bold'>
Projects represent your website
</div>
<div className='m-1 ml-2 text-sm text-[#001E2B99]'>
A project may contain multiple forms and those forms share the same domain name and reCaptcha details.
</div>
<div className='ml-2 m-2'>
Learn More
</div>
</div>
<div className='md:w-[70%] md:flex justify-center items-center hidden mb-[-20px]'>
<Image src={Icon}/>
</div>
</div>
<div className='border-[#001E2B] p-3 border-[1px] mt-5 md:mt-0 rounded-[12px] flex flex-col items-center justify-between md:w-[30%] md:ml-auto '>
<div className='text-xl mb-[80px] font-bold'>
You can create upto 6 Projects.
</div>
<div className='text-[#001E2B99]'>
We are working to provide you more
</div>
</div>
</div>

</div>
)
}
2 changes: 1 addition & 1 deletion pages/signin/oauth/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRouter } from 'next/router';
import { post } from '../../../components/utils/API';
import { useEffect } from 'react';
import { useEffect, useContext } from 'react';
import { UserContext } from '../../../components/context';

export default function OAuth() {
Expand Down
2 changes: 1 addition & 1 deletion pages/signup/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Image from 'next/image';
import React, { useState } from 'react';
import React, { useState,useContext } from 'react';
import backimage from '../../assets/images/illustrations/signin.png';
import { post } from '../../components/utils/API';
import { storeLS } from '../../components/utils/LocalStorage';
Expand Down
1 change: 1 addition & 0 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ body {
padding: 0;
margin: 0;
font-family: Inter, sans-serif;
overscroll-behavior:none;
}

a {
Expand Down

1 comment on commit 840604b

@vercel
Copy link

@vercel vercel bot commented on 840604b May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.