-
Notifications
You must be signed in to change notification settings - Fork 4
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
256 changed files
with
10,795 additions
and
2,514 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
# Section for gitleaks | ||
if ! command -v gitleaks > /dev/null 2>&1 | ||
then | ||
|
||
echo "gitleaks is not installed. Please run 'brew install gitleaks' or visit https://github.com/gitleaks/gitleaks#installing" | ||
exit 1 | ||
fi | ||
|
||
# Run gitleaks | ||
gitleaks protect --staged -v | ||
|
||
pnpm pre-commit |
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
Binary file not shown.
2 changes: 2 additions & 0 deletions
2
apps/app/public/gotrue/mailer/templates/account-invite-template.html
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,2 @@ | ||
{ "transactionalId": "clpn080ta00ekjs0p8q45obhk", "email": "{{ .Email }}", "dataVariables": { | ||
"confirmationUrl": "{{ .ConfirmationURL }}" } } |
2 changes: 2 additions & 0 deletions
2
apps/app/public/gotrue/mailer/templates/account-magic-link-template.html
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,2 @@ | ||
{ "transactionalId": "clpn0978u045jjs0otu3qsp8o", "email": "{{ .Email }}", "dataVariables": { | ||
"confirmationUrl": "{{ .ConfirmationURL }}" } } |
2 changes: 2 additions & 0 deletions
2
apps/app/public/gotrue/mailer/templates/account-recovery-template.html
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,2 @@ | ||
{ "transactionalId": "clpn08i4l056sl90ojahcq01m", "email": "{{ .Email }}", "dataVariables": { | ||
"confirmationUrl": "{{ .ConfirmationURL }}" } } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,7 @@ | ||
"use client"; | ||
|
||
import { PageError } from "components/ui/page-error"; | ||
|
||
export default function DashboardError(props): JSX.Element { | ||
return <PageError {...props} title="Error loading dashboard" />; | ||
} |
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,30 @@ | ||
import { css } from "@flows/styled-system/css"; | ||
import { Flex } from "@flows/styled-system/jsx"; | ||
import { Sidebar } from "components/header"; | ||
import type { ReactNode } from "react"; | ||
|
||
type Props = { | ||
children?: ReactNode; | ||
}; | ||
|
||
export const dynamic = "force-dynamic"; | ||
|
||
export default function DashboardLayout({ children }: Props): JSX.Element { | ||
return ( | ||
<Flex height="100%" minHeight="100%"> | ||
<Sidebar /> | ||
<div | ||
className={css({ | ||
width: "100%", | ||
maxWidth: "1100px", | ||
mx: "auto", | ||
py: "space24", | ||
px: "space32", | ||
minHeight: "100%", | ||
})} | ||
> | ||
{children} | ||
</div> | ||
</Flex> | ||
); | ||
} |
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,3 @@ | ||
import { PageLoading } from "components/ui/page-loading"; | ||
|
||
export default PageLoading; |
23 changes: 23 additions & 0 deletions
23
apps/app/src/app/(dashboard)/org/[organizationId]/(detail)/layout.tsx
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,23 @@ | ||
import { api } from "lib/api"; | ||
import { load } from "lib/load"; | ||
import type { Metadata } from "next"; | ||
import type { ReactNode } from "react"; | ||
|
||
type Props = { | ||
children?: ReactNode; | ||
params: { | ||
organizationId: string; | ||
}; | ||
}; | ||
|
||
export async function generateMetadata({ params }: Props): Promise<Metadata> { | ||
const org = await load(api["/organizations/:organizationId"](params.organizationId)); | ||
|
||
return { | ||
title: `${org.name} | Flows`, | ||
}; | ||
} | ||
|
||
export default function OrganizationDetailLayout({ children }: Props): JSX.Element { | ||
return <>{children}</>; | ||
} |
25 changes: 16 additions & 9 deletions
25
...app/src/app/org/[organizationId]/page.tsx → ...d)/org/[organizationId]/(detail)/page.tsx
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
83 changes: 83 additions & 0 deletions
83
apps/app/src/app/(dashboard)/org/[organizationId]/(detail)/settings/invite-dialog.tsx
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,83 @@ | ||
"use client"; | ||
|
||
import { css } from "@flows/styled-system/css"; | ||
import { useSend } from "hooks/use-send"; | ||
import { Plus16 } from "icons"; | ||
import { api } from "lib/api"; | ||
import { useRouter } from "next/navigation"; | ||
import { type FC, useState } from "react"; | ||
import type { SubmitHandler } from "react-hook-form"; | ||
import { useForm } from "react-hook-form"; | ||
import { t } from "translations"; | ||
import { | ||
Button, | ||
Dialog, | ||
DialogActions, | ||
DialogClose, | ||
DialogContent, | ||
DialogTitle, | ||
Input, | ||
Text, | ||
toast, | ||
} from "ui"; | ||
|
||
type Props = { | ||
organizationId: string; | ||
}; | ||
|
||
type FormData = { | ||
email: string; | ||
}; | ||
|
||
export const InviteDialog: FC<Props> = ({ organizationId }) => { | ||
const [open, setOpen] = useState(false); | ||
const { send, loading } = useSend(); | ||
const router = useRouter(); | ||
|
||
const { register, handleSubmit } = useForm<FormData>(); | ||
const onSubmit: SubmitHandler<FormData> = async (data) => { | ||
const res = await send(api["POST /organizations/:organizationId/users"](organizationId, data), { | ||
errorMessage: t.toasts.createInviteFailed, | ||
}); | ||
if (res.error) return; | ||
toast.success(t.toasts.inviteSent); | ||
router.refresh(); | ||
setOpen(false); | ||
}; | ||
|
||
return ( | ||
<Dialog | ||
onOpenChange={setOpen} | ||
open={open} | ||
trigger={ | ||
<Button startIcon={<Plus16 />} variant="secondary"> | ||
{t.organization.members.addDialog.button} | ||
</Button> | ||
} | ||
> | ||
<DialogTitle>{t.organization.members.addDialog.title}</DialogTitle> | ||
<form onSubmit={handleSubmit(onSubmit)}> | ||
<DialogContent> | ||
<Text | ||
className={css({ | ||
mb: "space16", | ||
})} | ||
> | ||
{t.organization.members.addDialog.description} | ||
</Text> | ||
<Input {...register("email")} label="Email" required type="email" /> | ||
</DialogContent> | ||
<DialogActions> | ||
<DialogClose asChild> | ||
<Button shadow={false} size="small" variant="secondary"> | ||
{t.actions.close} | ||
</Button> | ||
</DialogClose> | ||
<Button loading={loading} size="small" type="submit"> | ||
{t.organization.members.addDialog.confirm} | ||
</Button> | ||
</DialogActions> | ||
</form> | ||
</Dialog> | ||
); | ||
}; |
Oops, something went wrong.