Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/credebl/studio into feat…
Browse files Browse the repository at this point in the history
…-public-profile
  • Loading branch information
16-karan committed Sep 18, 2023
2 parents 8ebbf98 + f0e8106 commit 4a80b8b
Show file tree
Hide file tree
Showing 46 changed files with 1,686 additions and 705 deletions.
54 changes: 48 additions & 6 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"socket.io-client": "^4.6.2",
"tailwind-scrollbar": "^3.0.4",
"tailwindcss": "^3.3.3",
"uuidv4": "^6.2.13",
"yup": "^1.2.0"
},
"devDependencies": {
Expand All @@ -90,4 +91,4 @@
"eslint-plugin-tsdoc": "^0.2.17",
"postcss": "^8.4.25"
}
}
}
27 changes: 26 additions & 1 deletion src/api/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import CryptoJS from "crypto-js"
import { apiRoutes } from '../config/apiRoutes'
import { envConfig } from '../config/envConfig'
import { storageKeys } from '../config/CommonConstant'
import type { AddPassword } from '../components/Profile/interfaces'

export interface UserSignUpData {
email: string,
}
export interface AddPasswordDetails {
password:string
password?:string
isPasskey:boolean
firstName: string|null
lastName: string|null
Expand Down Expand Up @@ -135,6 +136,7 @@ export const checkUserExist = async(payload: string) => {
}

export const addPasswordDetails = async(payload: AddPasswordDetails, email:string) => {
// Api call to add password
const details ={
url: `${apiRoutes.auth.addDetails}${email}`,
payload,
Expand All @@ -152,6 +154,29 @@ export const addPasswordDetails = async(payload: AddPasswordDetails, email:strin

}

export const addPasskeyUserDetails = async(payload: AddPassword, email:string) => {
const token = await getFromLocalStorage(storageKeys.TOKEN)
const details ={
url: `${apiRoutes.auth.passkeyUserDetails}${email}`,
payload,
config: { headers: {
'Content-type': 'application/json',
'Authorization': `Bearer ${token}`,
}, }
}
try{
const response = await axiosPost(details)
return response
}
catch(error){
const err = error as Error
return err?.message
}


}


export const passwordEncryption = (password: string): string => {
const CRYPTO_PRIVATE_KEY: string = `${envConfig.PUBLIC_CRYPTO_PRIVATE_KEY}`
const encryptedPassword: string = CryptoJS.AES.encrypt(JSON.stringify(password), CRYPTO_PRIVATE_KEY).toString()
Expand Down
4 changes: 2 additions & 2 deletions src/app/FooterStacked.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import CopyrightNotice from '../components/CopyrightNotice.astro';
>
<CopyrightNotice />

<ul class="flex flex-wrap items-center justify-center">
<!-- <ul class="flex flex-wrap items-center justify-center">
<li>
<a
href="#"
Expand Down Expand Up @@ -36,5 +36,5 @@ import CopyrightNotice from '../components/CopyrightNotice.astro';
>Contact</a
>
</li>
</ul>
</ul> -->
</footer>
1 change: 1 addition & 0 deletions src/app/LayoutStacked.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import FooterStacked from './FooterStacked.astro';
import LayoutCommon from './LayoutCommon.astro';
import NavBarStacked from './NavBarStacked.astro';
import '../styles/markdown.css'
---

<LayoutCommon>
Expand Down
18 changes: 11 additions & 7 deletions src/app/NavBarSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,16 @@ import AgentHealth from '../commonComponents/AgentHealth';
</div>

<!-- Search mobile -->
<button

<!-- <button
id="toggleSidebarMobileSearch"
type="button"
class="p-2 text-gray-500 rounded-lg lg:hidden hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
>
<span class="sr-only">Search</span>
> -->
<!-- <span class="sr-only">Search</span> -->

<!-- Search icon -->
<svg
<!-- <svg
class="w-6 h-6"
fill="currentColor"
viewBox="0 0 20 20"
Expand All @@ -88,8 +90,9 @@ import AgentHealth from '../commonComponents/AgentHealth';
fill-rule="evenodd"
d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
clip-rule="evenodd"></path>
</svg>
</button>
</svg> -->
<!-- </button> -->

<!-- Dropdown menu -->
<div
id="dropdownNavbar"
Expand Down Expand Up @@ -406,7 +409,8 @@ import AgentHealth from '../commonComponents/AgentHealth';
<button
type="button"
data-dropdown-toggle="apps-dropdown"
class="hidden p-2 text-gray-500 rounded-lg sm:flex hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-700"
class="p-2 text-gray-500 rounded-lg sm:flex hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-700"

>
<span class="sr-only">View </span>
<!-- Icon -->
Expand Down
Loading

0 comments on commit 4a80b8b

Please sign in to comment.