-
Notifications
You must be signed in to change notification settings - Fork 989
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show popup when email not configured
- Loading branch information
Showing
12 changed files
with
149 additions
and
14 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
21 changes: 21 additions & 0 deletions
21
frontend/src/components/v2/EmailServiceSetupModal/EmailServiceSetupModal.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,21 @@ | ||
import { Button } from '../Button'; | ||
import { Modal, ModalContent } from '../Modal'; | ||
|
||
type Props = { | ||
isOpen?: boolean; | ||
onOpenChange?: (isOpen: boolean) => void; | ||
}; | ||
|
||
export const EmailServiceSetupModal = ({ isOpen, onOpenChange }: Props): JSX.Element => ( | ||
<Modal isOpen={isOpen} onOpenChange={onOpenChange}> | ||
<ModalContent title="Email service not configured"> | ||
<p className="mb-4 text-bunker-300"> | ||
The administrators of this Infisical instance have not yet set up an email service provider required to perform this action | ||
</p> | ||
|
||
<a href="https://infisical.com/docs/self-hosting/configuration/email"> | ||
<Button className="mr-4">Learn more</Button> | ||
</a> | ||
</ModalContent> | ||
</Modal> | ||
); |
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 @@ | ||
export { EmailServiceSetupModal } from './EmailServiceSetupModal'; |
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 @@ | ||
export { useFetchServerStatus } from './queries' |
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,19 @@ | ||
import {useQuery } from '@tanstack/react-query'; | ||
|
||
import { apiRequest } from '@app/config/request'; | ||
|
||
import { ServerStatus } from './types'; | ||
|
||
// cache key | ||
const serverStatusKeys = { | ||
serverStatus: ['serverStatus'] as const | ||
}; | ||
|
||
const fetchServerStatus = async () => { | ||
const {data} = await apiRequest.get<ServerStatus>('/api/status'); | ||
return data; | ||
}; | ||
|
||
export const useFetchServerStatus= () => { | ||
return useQuery({ queryKey: serverStatusKeys.serverStatus, queryFn: fetchServerStatus }); | ||
} |
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,5 @@ | ||
export type ServerStatus = { | ||
date: string; | ||
message: string; | ||
emailConfigured: boolean; | ||
}; |
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
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