-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
86 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
'use client'; | ||
|
||
import ContributeCode from '@/components/cla/contribute-code'; | ||
import InterestedInContributing from '@/components/cla/interested'; | ||
import CLAForm from '@/components/cla/form'; | ||
import DownloadCLA from '@/components/cla/download'; | ||
import { SIMULATE_NOT_AUTHENTICATED, SIMULATE_NOT_SIGNED } from '@/lib/cla-constants'; | ||
import { useSession } from 'next-auth/react'; | ||
import { useEffect, useState } from 'react'; | ||
import type { CLASignedInfo } from '@/lib/cla-types'; | ||
import type { ExtendedProfile } from '@/lib/auth'; | ||
|
||
export default function CLAContainer() { | ||
let { data: session, status } = useSession(); | ||
let [claInfo, setCLAInfo] = useState<CLASignedInfo | null>(null); | ||
const user = !SIMULATE_NOT_AUTHENTICATED && status === 'authenticated' && session?.user ? session.user as ExtendedProfile : null; | ||
|
||
useEffect(() => { | ||
fetch('/api/cla') | ||
.then(res => res.json()) | ||
.then((data: CLASignedInfo) => { | ||
if (!SIMULATE_NOT_SIGNED) { | ||
return setCLAInfo(data); | ||
} | ||
}) | ||
.catch(console.error); | ||
}, []); | ||
|
||
return ( | ||
<> | ||
{claInfo?.signed && <DownloadCLA/>} | ||
<InterestedInContributing/> | ||
<ContributeCode/> | ||
{!claInfo?.signed && <CLAForm onSign={setCLAInfo} user={user}/>} | ||
</> | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
'use client'; | ||
|
||
import CLAContainer from '@/components/cla/container'; | ||
import { SessionProvider } from 'next-auth/react'; | ||
|
||
export default function CLASession() { | ||
return ( | ||
<SessionProvider> | ||
<CLAContainer/> | ||
</SessionProvider> | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import Link from 'next/link'; | ||
import Header from './header'; | ||
import Footer from './footer'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
`open-pdf-sign.jar` | ||
|
||
This file copied from https://github.com/open-pdf-sign/open-pdf-sign/releases/tag/v0.1.7 which is licensed under the Apache 2.0 license. | ||
|
||
NOTE: This library needs an PKCS1 formatted RSA private key. To convert a PKCS8 private key to PKCS1, run: | ||
|
||
openssl rsa -in tidev.io.key -out tidev.io.pkcs1.key |