Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/docs/content/guides/platform/project-transfer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ The target organization will be charged at the end of the billing cycle for usag

## Transfer to a different region

Note that project transfers are only transferring your projects across an organization and cannot be used to transfer between different regions. To move your project to a different region, see [migrating your project](/docs/guides/platform/migrating-and-upgrading-projects#migrate-your-project).
Note that project transfers are only transferring your projects across an organization and cannot be used to transfer between different regions. To move your project to a different region, see [migrating your project](/docs/guides/platform/migrating-within-supabase).
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Pro-Projects at the moment cannot be paused. However, [You are allowed to have t

If a project is under 500MB, you can [transfer it to be under a free organization](/docs/guides/platform/project-transfer). Afterwards, you can initiate a pause.

Alternatively, you can download a [daily backup](/dashboard/project/_/database/backups/scheduled) of just your database for archiving. You can also manually download a .SQL file of your database and storage buckets by following this [guide](/docs/guides/platform/migrating-and-upgrading-projects#migrate-your-project).
Alternatively, you can download a [daily backup](/dashboard/project/_/database/backups/scheduled) of just your database for archiving. You can also manually download a .SQL file of your database and storage buckets by following this [guide](/docs/guides/platform/migrating-within-supabase/backup-restore).

You can also download your storage buckets with the [Supabase CLI:](/docs/guides/cli/getting-started?queryGroups=platform&platform=npx)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export const getCodeWorkflowSteps = ({
hasCliSetup,
hasSampleData,
hasRlsPolicies,
hasConfiguredAuth,
hasAppConnected,
hasFirstUser,
hasStorageObjects,
Expand Down Expand Up @@ -140,15 +139,6 @@ export const getCodeWorkflowSteps = ({
},
],
},
{
key: 'setup-auth',
status: hasConfiguredAuth ? 'complete' : 'incomplete',
title: 'Allow user signups',
icon: <User strokeWidth={1} className="text-foreground-muted" size={16} />,
description:
"It's time to configure your authentication providers and settings for Supabase Auth, so jump into the configuration page and tailor the providers you need.",
actions: [{ label: 'Configure', href: `/project/${ref}/auth/providers`, variant: 'default' }],
},
{
key: 'connect-app',
status: hasAppConnected ? 'complete' : 'incomplete',
Expand Down Expand Up @@ -246,7 +236,6 @@ export const getNoCodeWorkflowSteps = ({
hasTables,
hasSampleData,
hasRlsPolicies,
hasConfiguredAuth,
hasAppConnected,
hasFirstUser,
hasStorageObjects,
Expand Down Expand Up @@ -323,17 +312,6 @@ export const getNoCodeWorkflowSteps = ({
},
],
},
{
key: 'setup-auth',
status: hasConfiguredAuth ? 'complete' : 'incomplete',
title: 'Allow user signups',
icon: <User strokeWidth={1} className="text-foreground-muted" size={16} />,
description:
"It's time to set up authentication so you can start signing up users, configuring providers and settings from the auth dashboard.",
actions: [
{ label: 'Configure auth', href: `/project/${ref}/auth/providers`, variant: 'default' },
],
},
{
key: 'connect-app',
status: hasAppConnected ? 'complete' : 'incomplete',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ type GettingStartedStatuses = {
hasCliSetup: boolean
hasSampleData: boolean
hasRlsPolicies: boolean
hasConfiguredAuth: boolean
hasAppConnected: boolean
hasFirstUser: boolean
hasStorageObjects: boolean
Expand Down Expand Up @@ -94,7 +93,6 @@ export const useGettingStartedProgress = (): GettingStartedStatuses => {
const hasRlsPolicies = (policiesData?.length ?? 0) > 0
const allowSignupsEnabled = authConfig ? !authConfig.DISABLE_SIGNUP : false
const emailProviderEnabled = !!authConfig?.EXTERNAL_EMAIL_ENABLED
const hasConfiguredAuth = allowSignupsEnabled && emailProviderEnabled
const hasFirstUser = !!usersCountData && !usersCountData.is_estimate && usersCountData.count > 0
const hasStorageObjects = (storageTablesData ?? []).some(
(table) => table.name === 'objects' && Number(table?.live_rows_estimate ?? 0) > 0
Expand All @@ -119,7 +117,6 @@ export const useGettingStartedProgress = (): GettingStartedStatuses => {
hasCliSetup,
hasSampleData,
hasRlsPolicies,
hasConfiguredAuth,
hasAppConnected,
hasFirstUser,
hasStorageObjects,
Expand Down
17 changes: 17 additions & 0 deletions apps/studio/components/interfaces/SignIn/SignInMfaForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useEffect, useState } from 'react'
import { SubmitHandler, useForm } from 'react-hook-form'
import z from 'zod'

import { useAuthError } from 'common'
import AlertError from 'components/ui/AlertError'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useMfaChallengeAndVerifyMutation } from 'data/profile/mfa-challenge-and-verify-mutation'
Expand Down Expand Up @@ -86,6 +87,22 @@ export const SignInMfaForm = ({ context = 'sign-in' }: SignInMfaFormProps) => {
}
}, [factors?.totp, isSuccessFactors, router, queryClient])

const error = useAuthError()

if (error) {
return (
<AlertError
error={error}
subject="Error while signing in"
additionalActions={
<Button asChild type="warning" className="w-min">
<Link href="/sign-in">Back to sign in</Link>
</Button>
}
/>
)
}

return (
<>
{isLoadingFactors && <GenericSkeletonLoader />}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'

Expand All @@ -7,11 +6,14 @@ import { useOrganizationsQuery } from 'data/organizations/organizations-query'
import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { IS_PLATFORM } from 'lib/constants'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'

export const HomeIcon = () => {
const { data: selectedOrganization } = useSelectedOrganizationQuery()
const { data: organizations } = useOrganizationsQuery()

const largeLogo = useIsFeatureEnabled('branding:large_logo')

const router = useRouter()
const [lastVisitedOrganization] = useLocalStorageQuery(
LOCAL_STORAGE_KEYS.LAST_VISITED_ORGANIZATION,
Expand All @@ -29,12 +31,10 @@ export const HomeIcon = () => {

return (
<Link href={href} className="items-center justify-center flex-shrink-0 hidden md:flex">
<Image
<img
alt="Supabase"
src={`${router.basePath}/img/supabase-logo.svg`}
width={18}
height={18}
className="w-[18px] h-[18px]"
className={largeLogo ? 'h-[20px]' : 'h-[18px]'}
/>
</Link>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const PauseFailedState = () => {
<div className="border-t border-overlay flex items-center justify-end gap-x-2 py-4 px-8">
<Button asChild type="default">
<Link
href={`/support/new?category=Database_unresponsive&ref=${project?.ref}&subject=Restoration%20failed%20for%20project`}
href={`/support/new?category=Database_unresponsive&ref=${project?.ref}&subject=Pausing%20failed%20for%20project`}
>
Contact support
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const RestoringState = () => {
<div className="border-t border-overlay flex items-center justify-end py-4 px-8 gap-x-2">
<Button asChild type="default">
<Link
href={`/support/new?category=Database_unresponsive&ref=${project?.ref}&subject=Restoration%20failed%20for%20project`}
href={`/support/new?category=Database_unresponsive&ref=${project?.ref}&subject=Ongoing%20restoration%20for%20project`}
>
Contact support
</Link>
Expand Down
9 changes: 4 additions & 5 deletions apps/studio/components/layouts/SignInLayout/SignInLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useQueryClient } from '@tanstack/react-query'
import { useTheme } from 'next-themes'
import Image from 'next/legacy/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { PropsWithChildren, useEffect, useState } from 'react'
Expand Down Expand Up @@ -31,7 +30,8 @@ const SignInLayout = ({
const { resolvedTheme } = useTheme()
const ongoingIncident = useFlag('ongoingIncident')

const showTestimonial = useIsFeatureEnabled('dashboard_auth:show_testimonial')
const { dashboardAuthShowTestimonial: showTestimonial, brandingLargeLogo: largeLogo } =
useIsFeatureEnabled(['dashboard_auth:show_testimonial', 'branding:large_logo'])

// This useEffect redirects the user to MFA if they're already halfway signed in
useEffect(() => {
Expand Down Expand Up @@ -96,15 +96,14 @@ const SignInLayout = ({
<div className="flex items-center flex-grow flex-shrink-0 lg:flex-grow-0">
<div className="flex items-center justify-between w-full md:w-auto">
<Link href={logoLinkToMarketingSite ? 'https://supabase.com' : '/organizations'}>
<Image
<img
src={
resolvedTheme?.includes('dark')
? `${BASE_PATH}/img/supabase-dark.svg`
: `${BASE_PATH}/img/supabase-light.svg`
}
alt="Supabase Logo"
height={24}
width={120}
className={largeLogo ? 'h-[48px]' : 'h-[24px]'}
/>
</Link>
</div>
Expand Down
11 changes: 8 additions & 3 deletions apps/studio/components/ui/AlertError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface AlertErrorProps {
error?: { message: string } | null
className?: string
showIcon?: boolean
additionalActions?: React.ReactNode
}

// [Joshen] To standardize the language for all error UIs
Expand All @@ -26,6 +27,7 @@ export const AlertError = ({
className,
showIcon = true,
children,
additionalActions,
}: PropsWithChildren<AlertErrorProps>) => {
const subjectString = subject?.replace(/ /g, '%20')
let href = `/support/new?category=dashboard_bug`
Expand All @@ -51,9 +53,12 @@ export const AlertError = ({
</p>
</div>
{children}
<Button asChild type="warning" className="w-min">
<Link href={href}>Contact support</Link>
</Button>
<div className="flex gap-2">
{additionalActions}
<Button asChild type="warning" className="w-min">
<Link href={href}>Contact support</Link>
</Button>
</div>
</AlertDescription_Shadcn_>
</Alert_Shadcn_>
)
Expand Down
12 changes: 6 additions & 6 deletions apps/studio/components/ui/GlobalErrorBoundaryState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { isError } from 'lodash'
import { ExternalLink } from 'lucide-react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import CopyButton from './CopyButton'

import Image from 'next/image'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { Button, cn } from 'ui'
import { Admonition } from 'ui-patterns'
import CopyButton from './CopyButton'
import { InlineLinkClassName } from './InlineLink'

export type FallbackProps = {
Expand All @@ -18,6 +18,8 @@ export const GlobalErrorBoundaryState = ({ error, resetErrorBoundary }: Fallback
const router = useRouter()
const checkIsError = isError(error)

const largeLogo = useIsFeatureEnabled('branding:large_logo')

const errorMessage = checkIsError ? error.message : ''
const urlMessage = checkIsError ? `Path name: ${router.pathname}\n\n${error?.stack}` : ''
const isRemoveChildError = checkIsError
Expand All @@ -44,12 +46,10 @@ export const GlobalErrorBoundaryState = ({ error, resetErrorBoundary }: Fallback
<div className="w-screen mx-auto h-screen flex items-center justify-center">
<header className="h-12 absolute top-0 w-full border-b px-4 flex items-center">
<Link href="/" className="items-center justify-center">
<Image
<img
alt="Supabase"
src={`${router.basePath}/img/supabase-logo.svg`}
width={18}
height={18}
className="w-[18px] h-[18px]"
className={largeLogo ? 'h-[20px]' : 'h-[18px]'}
/>
</Link>
</header>
Expand Down
3 changes: 3 additions & 0 deletions packages/common/enabled-features/enabled-features.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
"authentication:show_sort_by_email": true,
"authentication:show_sort_by_phone": true,
"authentication:show_user_type_filter": true,

"billing:all": true,

"branding:large_logo": false,

"dashboard_auth:sign_up": true,
"dashboard_auth:sign_in_with_github": true,
"dashboard_auth:sign_in_with_sso": true,
Expand Down
5 changes: 5 additions & 0 deletions packages/common/enabled-features/enabled-features.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
"description": "Enable the billing settings page"
},

"branding:large_logo": {
"type": "boolean",
"description": "Show larger logo sizes throughout the apps"
},

"dashboard_auth:sign_up": {
"type": "boolean",
"description": "Enable the sign up page in the dashboard"
Expand Down
Loading