Unify workspace dropdowns; Update layouts (#458)

Unified Account and Workspace drop-downs; Layout updates, now header lives within the PageBody component; Sidebars now use floating variant
This commit is contained in:
Giancarlo Buomprisco
2026-03-11 14:45:42 +08:00
committed by GitHub
parent ca585e09be
commit 4bc8448a1d
530 changed files with 14398 additions and 11198 deletions

View File

@@ -306,16 +306,16 @@ function getAuthErrorMessage(params: { error: string; code?: string }) {
// this error arises when the user tries to sign in with an expired email link
if (params.code) {
if (params.code === 'otp_expired') {
return 'auth:errors.otp_expired';
return 'auth.errors.otp_expired';
}
}
// this error arises when the user is trying to sign in with a different
// browser than the one they used to request the sign in link
if (isVerifierError(params.error)) {
return 'auth:errors.codeVerifierMismatch';
return 'auth.errors.codeVerifierMismatch';
}
// fallback to the default error message
return `auth:authenticationErrorAlertBody`;
return `auth.authenticationErrorAlertBody`;
}

View File

@@ -1,9 +1,9 @@
import 'server-only';
import { z } from 'zod';
import * as z from 'zod';
const message =
'Invalid Supabase Secret Key. Please add the environment variable SUPABASE_SECRET_KEY or SUPABASE_SERVICE_ROLE_KEY.';
'Invalid Supabase Secret Key. Please add the environment variable SUPABASE_SECRET_KEY.';
/**
* @name getSupabaseSecretKey
@@ -13,14 +13,12 @@ const message =
export function getSupabaseSecretKey() {
return z
.string({
required_error: message,
error: message,
})
.min(1, {
message: message,
})
.parse(
process.env.SUPABASE_SECRET_KEY || process.env.SUPABASE_SERVICE_ROLE_KEY,
);
.parse(process.env.SUPABASE_SECRET_KEY);
}
/**

View File

@@ -1,4 +1,4 @@
import { z } from 'zod';
import * as z from 'zod';
/**
* Returns and validates the Supabase client keys from the environment.
@@ -7,18 +7,14 @@ export function getSupabaseClientKeys() {
return z
.object({
url: z.string({
description: `This is the URL of your hosted Supabase instance. Please provide the variable NEXT_PUBLIC_SUPABASE_URL.`,
required_error: `Please provide the variable NEXT_PUBLIC_SUPABASE_URL`,
error: `Please provide the variable NEXT_PUBLIC_SUPABASE_URL`,
}),
publicKey: z.string({
description: `This is the public key provided by Supabase. It is a public key used client-side. Please provide the variable NEXT_PUBLIC_SUPABASE_PUBLIC_KEY.`,
required_error: `Please provide the variable NEXT_PUBLIC_SUPABASE_PUBLIC_KEY`,
error: `Please provide the variable NEXT_PUBLIC_SUPABASE_PUBLIC_KEY`,
}),
})
.parse({
url: process.env.NEXT_PUBLIC_SUPABASE_URL,
publicKey:
process.env.NEXT_PUBLIC_SUPABASE_PUBLIC_KEY ||
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
publicKey: process.env.NEXT_PUBLIC_SUPABASE_PUBLIC_KEY,
});
}

View File

@@ -12,7 +12,7 @@ export function useSignInWithEmailPassword() {
const response = await client.auth.signInWithPassword(credentials);
if (response.error) {
throw response.error.message;
throw response.error;
}
const user = response.data?.user;

View File

@@ -12,7 +12,7 @@ export function useSignInWithProvider() {
const response = await client.auth.signInWithOAuth(credentials);
if (response.error) {
throw response.error.message;
throw response.error;
}
return response.data;

View File

@@ -49,7 +49,7 @@ export function useSignUpWithEmailAndPassword() {
throw new WeakPasswordError(errorObj.reasons ?? []);
}
throw response.error.message;
throw response.error;
}
const user = response.data?.user;