Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

update progress

ErikKaumk4df10be2101c
diff --git a/apps/docs/src/components/Button.tsx b/apps/docs/src/components/Button.tsx
index a6e96b034..2a9bc84d6 100644
--- a/apps/docs/src/components/Button.tsx
+++ b/apps/docs/src/components/Button.tsx
@@ -37,6 +37,8 @@ const variantStyles = {
'text-sm text-zinc-500 hover:text-zinc-600 dark:text-zinc-400 dark:hover:text-zinc-500 underline', // same as text, but gray-ish
textTernary:
'text-yellow-500 hover:text-yellow-600 dark:text-yellow-400 dark:hover:text-yellow-500', // same as text, but gray-ish
+ desctructive:
+ 'rounded-full py-1 px-3 text-red-700 ring-1 ring-inset ring-red-900/50 hover:bg-red-900/90 hover:text-red-900 dark:text-red-400 dark:ring-red/10 dark:hover:bg-red/50 dark:hover:text-red',
}
type ButtonProps = {
diff --git a/apps/docs/src/components/Dashboard/Personal.tsx b/apps/docs/src/components/Dashboard/Personal.tsx
index 9ff16b803..d2b25816b 100644
--- a/apps/docs/src/components/Dashboard/Personal.tsx
+++ b/apps/docs/src/components/Dashboard/Personal.tsx
@@ -24,6 +24,15 @@ export const PersonalContent = ({user}: {user: User}) => {
})
}
+ const resetPassword = async() => {
+ const supabase = createPagesBrowserClient()
+ await supabase.auth.resetPasswordForEmail('[email protected]', {
+ redirectTo: 'http://example.com/account/update-password',
+ })
+ }
+
+ console.log(user.app_metadata.provider)
+
return(
<div className="flex flex-col w-full h-full">
<div className="flex flex-col h-full">
@@ -42,18 +51,22 @@ export const PersonalContent = ({user}: {user: User}) => {
/>
<Button variant='outline'>Save changes</Button>
</div>
+
+ {user.app_metadata.provider === 'email' && (
+ <>
+ <h1 className="font-bold pb-4 text-xl">
+ Reset password
+ </h1>
+ <span className='text-neutral-300 pb-4'>
+ Resetting the will send an email with a link to reset the password. <br/>
+ The action cannot be undone.
+ </span>
+ <div className='flex items-center space-x-2 pb-10'>
+ <Button variant='desctructive' onClick={resetPassword}>Reset password</Button>
+ </div>
+ </>
+ )}
- <span className='text-neutral-300 pb-2'>Change password:</span>
- <div className='flex items-center space-x-2 pb-10'>
- <input
- type="text"
- className="w-1/2 border border-white/10 text-sm focus:outline-none outline-none rounded-md p-2"
- placeholder={user.email}
- value={user.email}
- onSubmit={updateUserEmail}
- />
- <Button variant='outline'>Change password</Button>
- </div>
</div>
</div>
)
diff --git a/apps/docs/src/components/Dashboard/Usage.tsx b/apps/docs/src/components/Dashboard/Usage.tsx
index 2d029798f..35da12b85 100644
--- a/apps/docs/src/components/Dashboard/Usage.tsx
+++ b/apps/docs/src/components/Dashboard/Usage.tsx
@@ -13,7 +13,7 @@ export const UsageContent = () => {
const getUsage = async () => {
const response = await fetch(usageUrl, {
headers: {
- 'X-Team-API-Key': ''
+ 'X-Team-API-Key': 'e2b_ee29899a1aab99d4955a78eae32078a5c8aeee9f'
}
})
const data = await response.json()