forked from nhost/nhost
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sync Fork
committed
Oct 11, 2023
1 parent
c46429d
commit a1ebac2
Showing
82 changed files
with
2,194 additions
and
1,148 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@nhost/apollo': patch | ||
--- | ||
|
||
fix: apollo-integration: reset accessToken to null after sign-out |
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
28 changes: 28 additions & 0 deletions
28
dashboard/src/components/common/DepricationNotice/DepricationNotice.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,28 @@ | ||
import { Alert } from '@/components/ui/v2/Alert'; | ||
import { Text } from '@/components/ui/v2/Text'; | ||
import { useCurrentWorkspaceAndProject } from '@/features/projects/common/hooks/useCurrentWorkspaceAndProject'; | ||
|
||
export default function DepricationNotice() { | ||
const { currentProject } = useCurrentWorkspaceAndProject(); | ||
|
||
return ( | ||
!currentProject?.providersUpdated && ( | ||
<Alert severity="warning" className="grid place-content-center"> | ||
<Text color="warning" className="max-w-3xl text-sm"> | ||
On December 1st the old backend domain will cease to work. You need to | ||
make sure your client is instantiated using the subdomain and region | ||
and update your oauth2 settings. You can find more information{' '} | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="underline" | ||
href="https://github.com/nhost/nhost/discussions/2303" | ||
> | ||
here | ||
</a> | ||
. | ||
</Text> | ||
</Alert> | ||
) | ||
); | ||
} |
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 { default as ContactUs } from './DepricationNotice'; |
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
100 changes: 100 additions & 0 deletions
100
dashboard/src/components/settings/ProvidersUpdatedAlert.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,100 @@ | ||
import { useDialog } from '@/components/common/DialogProvider'; | ||
import { Alert } from '@/components/ui/v2/Alert'; | ||
import { Button } from '@/components/ui/v2/Button'; | ||
import { ArrowSquareOutIcon } from '@/components/ui/v2/icons/ArrowSquareOutIcon'; | ||
import { Link } from '@/components/ui/v2/Link'; | ||
import { Text } from '@/components/ui/v2/Text'; | ||
import { useCurrentWorkspaceAndProject } from '@/features/projects/common/hooks/useCurrentWorkspaceAndProject'; | ||
import { getToastStyleProps } from '@/utils/constants/settings'; | ||
import { useConfirmProvidersUpdatedMutation } from '@/utils/__generated__/graphql'; | ||
import { useTheme } from '@mui/material'; | ||
import { useState } from 'react'; | ||
import toast from 'react-hot-toast'; | ||
|
||
export default function ProvidersUpdatedAlert() { | ||
const theme = useTheme(); | ||
const { openAlertDialog } = useDialog(); | ||
const [confirmed, setConfirmed] = useState(true); | ||
const { currentProject } = useCurrentWorkspaceAndProject(); | ||
|
||
const [confirmProvidersUpdated] = useConfirmProvidersUpdatedMutation({ | ||
variables: { id: currentProject?.id }, | ||
}); | ||
|
||
async function handleSubmitConfirmation() { | ||
const confirmProvidersUpdatedPromise = confirmProvidersUpdated(); | ||
|
||
await toast.promise( | ||
confirmProvidersUpdatedPromise, | ||
{ | ||
loading: 'Confirming...', | ||
success: 'Your settings have been updated successfully.', | ||
error: 'An error occurred while trying to confirm the message.', | ||
}, | ||
getToastStyleProps(), | ||
); | ||
|
||
setConfirmed(false); | ||
} | ||
|
||
function handleOpenConfirmationDialog() { | ||
openAlertDialog({ | ||
title: 'Confirm all providers updated?', | ||
payload: ( | ||
<Text variant="subtitle1" component="span"> | ||
Please make sure to update all providers before continuing. Your | ||
sign-in flows might break if you don't. | ||
</Text> | ||
), | ||
props: { | ||
onPrimaryAction: handleSubmitConfirmation, | ||
}, | ||
}); | ||
} | ||
|
||
if (!confirmed) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<Alert | ||
severity="warning" | ||
className="grid items-center grid-flow-row gap-2 p-4 place-items-center lg:grid-flow-col lg:place-content-between" | ||
> | ||
<div className="grid grid-flow-row gap-1 text-left"> | ||
<Text className="font-semibold"> | ||
Please update the Redirect URL for all providers being used | ||
</Text> | ||
|
||
<Text className="text-sm+"> | ||
We are deprecating your project's old DNS name in favor of | ||
individual DNS names for each service. Please make sure to update your | ||
providers to use the new auth specific URL under <b>Redirect URL</b>{' '} | ||
before the 1st of February 2023.{' '} | ||
<Link | ||
href="https://github.com/nhost/nhost/discussions/1319" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
underline="hover" | ||
className="font-medium" | ||
> | ||
Read the discussion here. | ||
<ArrowSquareOutIcon className="w-4 h-4 ml-1" /> | ||
</Link> | ||
</Text> | ||
</div> | ||
|
||
<Button | ||
variant="borderless" | ||
className={ | ||
theme.palette.mode === 'dark' | ||
? 'text-white hover:bg-brown' | ||
: 'text-black hover:bg-orange-300' | ||
} | ||
onClick={handleOpenConfirmationDialog} | ||
> | ||
I have updated all Redirect URLs | ||
</Button> | ||
</Alert> | ||
); | ||
} |
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 { default as ProvidersUpdatedAlert } from './ProvidersUpdatedAlert'; |
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 @@ | ||
mutation confirmProvidersUpdated($id: uuid!) { | ||
updateApp(pk_columns: { id: $id }, _set: { providersUpdated: true }) { | ||
id | ||
} | ||
} |
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
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
Oops, something went wrong.