mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
first fixes
This commit is contained in:
@@ -359,10 +359,10 @@
|
||||
"inviteRemoveErrorDescription": "Beim Entfernen der Einladung ist ein Fehler aufgetreten.",
|
||||
"inviteRemoved": "Einladung entfernt",
|
||||
"inviteRemovedDescription": "Die Einladung für {email} wurde entfernt.",
|
||||
"inviteQuestionRemove": "Sind Sie sicher, dass Sie die Einladung{email, plural, ='' {}, other { für #}} entfernen möchten?",
|
||||
"inviteQuestionRemove": "Sind Sie sicher, dass Sie die Einladung {email} entfernen möchten?",
|
||||
"inviteMessageRemove": "Sobald entfernt, wird diese Einladung nicht mehr gültig sein. Sie können den Benutzer später jederzeit erneut einladen.",
|
||||
"inviteMessageConfirm": "Bitte geben Sie zur Bestätigung die E-Mail-Adresse der Einladung unten ein.",
|
||||
"inviteQuestionRegenerate": "Sind Sie sicher, dass Sie die Einladung{email, plural, ='' {}, other { für #}} neu generieren möchten? Dies wird die vorherige Einladung widerrufen.",
|
||||
"inviteQuestionRegenerate": "Sind Sie sicher, dass Sie die Einladung {email} neu generieren möchten? Dies wird die vorherige Einladung widerrufen.",
|
||||
"inviteRemoveConfirm": "Entfernen der Einladung bestätigen",
|
||||
"inviteRegenerated": "Einladung neu generiert",
|
||||
"inviteSent": "Eine neue Einladung wurde an {email} gesendet.",
|
||||
@@ -431,7 +431,7 @@
|
||||
"accessRoleSelect": "Rolle auswählen",
|
||||
"inviteEmailSentDescription": "Eine E-Mail mit dem Zugangslink wurde an den Benutzer gesendet. Er muss den Link aufrufen, um die Einladung anzunehmen.",
|
||||
"inviteSentDescription": "Der Benutzer wurde eingeladen. Er muss den unten stehenden Link aufrufen, um die Einladung anzunehmen.",
|
||||
"inviteExpiresIn": "Die Einladung läuft in <b>{days, plural, =1 {einem Tag} other {# Tagen}}</b> ab.",
|
||||
"inviteExpiresIn": "Die Einladung läuft in {days, plural, =1 {einem Tag} other {# Tagen}} ab.",
|
||||
"idpTitle": "Identitätsanbieter",
|
||||
"idpSelect": "Wählen Sie den Identitätsanbieter für den externen Benutzer",
|
||||
"idpNotConfigured": "Es sind keine Identitätsanbieter konfiguriert. Bitte konfigurieren Sie einen Identitätsanbieter, bevor Sie externe Benutzer erstellen.",
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
"inviteRemoveErrorDescription": "An error occurred while removing the invitation.",
|
||||
"inviteRemoved": "Invitation removed",
|
||||
"inviteRemovedDescription": "The invitation for {email} has been removed.",
|
||||
"inviteQuestionRemove": "Are you sure you want to remove the invitation {email}?",
|
||||
"inviteQuestionRemove ": "Are you sure you want to remove the invitation {email}?",
|
||||
"inviteMessageRemove": "Once removed, this invitation will no longer be valid. You can always re-invite the user later.",
|
||||
"inviteMessageConfirm": "To confirm, please type the email address of the invitation below.",
|
||||
"inviteQuestionRegenerate": "Are you sure you want to regenerate the invitation for {email}? This will revoke the previous invitation.",
|
||||
@@ -431,7 +431,7 @@
|
||||
"accessRoleSelect": "Select role",
|
||||
"inviteEmailSentDescription": "An email has been sent to the user with the access link below. They must access the link to accept the invitation.",
|
||||
"inviteSentDescription": "The user has been invited. They must access the link below to accept the invitation.",
|
||||
"inviteExpiresIn": "The invite will expire in <b>{days, plural, =1 {# day} other {# days}}</b>.",
|
||||
"inviteExpiresIn": "The invite will expire in {days, plural, =1 {# day} other {# days}}.",
|
||||
"idpTitle": "Identity Provider",
|
||||
"idpSelect": "Select the identity provider for the external user",
|
||||
"idpNotConfigured": "No identity providers are configured. Please configure an identity provider before creating external users.",
|
||||
@@ -684,7 +684,7 @@
|
||||
"accessRoleErrorRemove": "Failed to remove role",
|
||||
"accessRoleErrorRemoveDescription": "An error occurred while removing the role.",
|
||||
"accessRoleName": "Role Name",
|
||||
"accessRoleQuestionRemove": "You're about to delete the <b>{name}</b> role. You cannot undo this action.",
|
||||
"accessRoleQuestionRemove": "You're about to delete the {name} role. You cannot undo this action.",
|
||||
"accessRoleRemove": "Remove Role",
|
||||
"accessRoleRemoveDescription": "Remove a role from the organization",
|
||||
"accessRoleRemoveSubmit": "Remove Role",
|
||||
@@ -693,9 +693,7 @@
|
||||
"accessRoleRequiredRemove": "Before deleting this role, please select a new role to transfer existing members to.",
|
||||
"manage": "Manage",
|
||||
"sitesNotFound": "No sites found.",
|
||||
"expiresAt": "Expires At",
|
||||
"pangolinServerAdmin": "Server Admin - Pangolin",
|
||||
"idpNameInternal": "Internal",
|
||||
"licenseTierProfessional": "Professional License",
|
||||
"licenseTierEnterprise": "Enterprise License",
|
||||
"licensed": "Licensed",
|
||||
@@ -717,8 +715,6 @@
|
||||
"idp": "Identity Providers",
|
||||
"idpSearch": "Search identity providers...",
|
||||
"idpAdd": "Add Identity Provider",
|
||||
"nameMin": "Name must be at least {len} characters.",
|
||||
"nameMax": "Name must not be longer than {len} characters.",
|
||||
"idpClientIdRequired": "Client ID is required.",
|
||||
"idpClientSecretRequired": "Client Secret is required.",
|
||||
"idpErrorAuthUrlInvalid": "Auth URL must be a valid URL.",
|
||||
@@ -730,7 +726,6 @@
|
||||
"idpCreate": "Create Identity Provider",
|
||||
"idpCreateDescription": "Configure a new identity provider for user authentication",
|
||||
"idpSeeAll": "See All Identity Providers",
|
||||
"idpTitle": "General Information",
|
||||
"idpSettingsDescription": "Configure the basic information for your identity provider",
|
||||
"idpDisplayName": "A display name for this identity provider",
|
||||
"idpAutoProvisionUsers": "Auto Provision Users",
|
||||
@@ -779,8 +774,8 @@
|
||||
"orgPolicyDeletedDescription": "Policy deleted successfully",
|
||||
"defaultMappingsUpdatedDescription": "Default mappings updated successfully",
|
||||
"orgPoliciesAbout": "About Organization Policies",
|
||||
"orgPoliciesAboutDescription": "Organization policies are used to control access to organizations based on the user's ID token. You can specify JMESPath expressions to extract role and organization information from the ID token. For more information, see",
|
||||
"orgPoliciesAboutDescriptionLink": "the documentation",
|
||||
"orgPoliciesAboutDescription": "Organization policies are used to control access to organizations based on the user's ID token. You can specify JMESPath expressions to extract role and organization information from the ID token.",
|
||||
"orgPoliciesAboutDescriptionLink": "See documentation, for more information.",
|
||||
"defaultMappingsOptional": "Default Mappings (Optional)",
|
||||
"defaultMappingsOptionalDescription": "The default mappings are used when when there is not an organization policy defined for an organization. You can specify the default role and organization mappings to fall back to here.",
|
||||
"defaultMappingsRole": "Default Role Mapping",
|
||||
@@ -801,11 +796,7 @@
|
||||
"redirectUrl": "Redirect URL",
|
||||
"redirectUrlAbout": "About Redirect URL",
|
||||
"redirectUrlAboutDescription": "This is the URL to which users will be redirected after authentication. You need to configure this URL in your identity provider settings.",
|
||||
"key": "Key",
|
||||
"createdAt": "Created At",
|
||||
"expiresAt": "Expires At",
|
||||
"pangolinAuth": "Auth - Pangolin",
|
||||
"emailInvalid": "Invalid email address",
|
||||
"verificationCodeLengthRequirements": "Your verification code must be 8 characters.",
|
||||
"errorOccurred": "An error occurred",
|
||||
"emailErrorVerify": "Failed to verify email:",
|
||||
@@ -887,7 +878,6 @@
|
||||
"idpConnectingToFinished": "Connected",
|
||||
"idpErrorConnectingTo": "There was a problem connecting to {name}. Please contact your administrator.",
|
||||
"idpErrorNotFound": "IdP not found",
|
||||
"expiresAt": "Expires At",
|
||||
"inviteInvalid": "Invalid Invite",
|
||||
"inviteInvalidDescription": "The invite link is invalid.",
|
||||
"inviteErrorWrongUser": "Invite is not for this user",
|
||||
@@ -904,15 +894,9 @@
|
||||
"pageNotFoundDescription": "Oops! The page you're looking for doesn't exist.",
|
||||
"overview": "Overview",
|
||||
"home": "Home",
|
||||
"sites": "Sites",
|
||||
"resources": "Resources",
|
||||
"accessControl": "Access Control",
|
||||
"users": "Users",
|
||||
"roles": "Roles",
|
||||
"share": "Shareable Links",
|
||||
"settings": "Settings",
|
||||
"usersAll": "All Users",
|
||||
"idp": "Identity Providers",
|
||||
"license": "License",
|
||||
"pangolinDashboard": "Dashboard - Pangolin"
|
||||
}
|
||||
|
||||
@@ -359,10 +359,10 @@
|
||||
"inviteRemoveErrorDescription": "Une erreur s'est produite lors de la suppression de l'invitation.",
|
||||
"inviteRemoved": "Invitation supprimée",
|
||||
"inviteRemovedDescription": "L'invitation pour {email} a été supprimée.",
|
||||
"inviteQuestionRemove": "Êtes-vous sûr de vouloir supprimer l'invitation{email, plural, ='' {}, other { pour #}} ?",
|
||||
"inviteQuestionRemove": "Êtes-vous sûr de vouloir supprimer l'invitation {email}?",
|
||||
"inviteMessageRemove": "Une fois supprimée, cette invitation ne sera plus valide. Vous pourrez toujours réinviter l'utilisateur plus tard.",
|
||||
"inviteMessageConfirm": "Pour confirmer, veuillez saisir l'adresse e-mail de l'invitation ci-dessous.",
|
||||
"inviteQuestionRegenerate": "Êtes-vous sûr de vouloir régénérer l'invitation{email, plural, ='' {}, other { pour #}} ? Cela révoquera l'invitation précédente.",
|
||||
"inviteQuestionRegenerate": "Êtes-vous sûr de vouloir régénérer l'invitation {email}? Cela révoquera l'invitation précédente.",
|
||||
"inviteRemoveConfirm": "Confirmer la suppression de l'invitation",
|
||||
"inviteRegenerated": "Invitation régénérée",
|
||||
"inviteSent": "Une nouvelle invitation a été envoyée à {email}.",
|
||||
@@ -431,7 +431,7 @@
|
||||
"accessRoleSelect": "Sélectionner un rôle",
|
||||
"inviteEmailSentDescription": "Un e-mail a été envoyé à l'utilisateur avec le lien d'accès ci-dessous. Ils doivent accéder au lien pour accepter l'invitation.",
|
||||
"inviteSentDescription": "L'utilisateur a été invité. Ils doivent accéder au lien ci-dessous pour accepter l'invitation.",
|
||||
"inviteExpiresIn": "L'invitation expirera dans <b>{days, plural, =1 {# jour} other {# jours}}</b>.",
|
||||
"inviteExpiresIn": "L'invitation expirera dans {days, plural, =1 {# jour} other {# jours}}.",
|
||||
"idpTitle": "Fournisseur d'identité",
|
||||
"idpSelect": "Sélectionnez le fournisseur d'identité pour l'utilisateur externe",
|
||||
"idpNotConfigured": "Aucun fournisseur d'identité n'est configuré. Veuillez configurer un fournisseur d'identité avant de créer des utilisateurs externes.",
|
||||
|
||||
@@ -359,10 +359,10 @@
|
||||
"inviteRemoveErrorDescription": "Si è verificato un errore durante la rimozione dell'invito.",
|
||||
"inviteRemoved": "Invito rimosso",
|
||||
"inviteRemovedDescription": "L'invito per {email} è stato rimosso.",
|
||||
"inviteQuestionRemove": "Sei sicuro di voler rimuovere l'invito{email, plural, ='' {}, other { per #}}?",
|
||||
"inviteQuestionRemove": "Sei sicuro di voler rimuovere l'invito {email}?",
|
||||
"inviteMessageRemove": "Una volta rimosso, questo invito non sarà più valido. Puoi sempre reinvitare l'utente in seguito.",
|
||||
"inviteMessageConfirm": "Per confermare, digita l'indirizzo email dell'invito qui sotto.",
|
||||
"inviteQuestionRegenerate": "Sei sicuro di voler rigenerare l'invito{email, plural, ='' {}, other { per #}}? Questo revocherà l'invito precedente.",
|
||||
"inviteQuestionRegenerate": "Sei sicuro di voler rigenerare l'invito {email}? Questo revocherà l'invito precedente.",
|
||||
"inviteRemoveConfirm": "Conferma Rimozione Invito",
|
||||
"inviteRegenerated": "Invito Rigenerato",
|
||||
"inviteSent": "Un nuovo invito è stato inviato a {email}.",
|
||||
@@ -431,7 +431,7 @@
|
||||
"accessRoleSelect": "Seleziona ruolo",
|
||||
"inviteEmailSentDescription": "È stata inviata un'email all'utente con il link di accesso qui sotto. Devono accedere al link per accettare l'invito.",
|
||||
"inviteSentDescription": "L'utente è stato invitato. Deve accedere al link qui sotto per accettare l'invito.",
|
||||
"inviteExpiresIn": "L'invito scadrà tra <b>{days, plural, =1 {# giorno} other {# giorni}}</b>.",
|
||||
"inviteExpiresIn": "L'invito scadrà tra {days, plural, =1 {# giorno} other {# giorni}}.",
|
||||
"idpTitle": "Provider di Identità",
|
||||
"idpSelect": "Seleziona il provider di identità per l'utente esterno",
|
||||
"idpNotConfigured": "Nessun provider di identità configurato. Configura un provider di identità prima di creare utenti esterni.",
|
||||
|
||||
@@ -359,10 +359,10 @@
|
||||
"inviteRemoveErrorDescription": "Wystąpił błąd podczas usuwania zaproszenia.",
|
||||
"inviteRemoved": "Zaproszenie usunięte",
|
||||
"inviteRemovedDescription": "Zaproszenie dla {email} zostało usunięte.",
|
||||
"inviteQuestionRemove": "Czy na pewno chcesz usunąć zaproszenie{email, plural, ='' {}, other { dla #}}?",
|
||||
"inviteQuestionRemove": "Czy na pewno chcesz usunąć zaproszenie {email}?",
|
||||
"inviteMessageRemove": "Po usunięciu to zaproszenie nie będzie już ważne. Zawsze możesz ponownie zaprosić użytkownika później.",
|
||||
"inviteMessageConfirm": "Aby potwierdzić, wpisz poniżej adres email zaproszenia.",
|
||||
"inviteQuestionRegenerate": "Czy na pewno chcesz ponownie wygenerować zaproszenie{email, plural, ='' {}, other { dla #}}? Spowoduje to unieważnienie poprzedniego zaproszenia.",
|
||||
"inviteQuestionRegenerate": "Czy na pewno chcesz ponownie wygenerować zaproszenie {email}? Spowoduje to unieważnienie poprzedniego zaproszenia.",
|
||||
"inviteRemoveConfirm": "Potwierdź usunięcie zaproszenia",
|
||||
"inviteRegenerated": "Zaproszenie wygenerowane ponownie",
|
||||
"inviteSent": "Nowe zaproszenie zostało wysłane do {email}.",
|
||||
@@ -431,7 +431,7 @@
|
||||
"accessRoleSelect": "Wybierz rolę",
|
||||
"inviteEmailSentDescription": "Email został wysłany do użytkownika z linkiem dostępu poniżej. Musi on uzyskać dostęp do linku, aby zaakceptować zaproszenie.",
|
||||
"inviteSentDescription": "Użytkownik został zaproszony. Musi uzyskać dostęp do poniższego linku, aby zaakceptować zaproszenie.",
|
||||
"inviteExpiresIn": "Zaproszenie wygaśnie za <b>{days, plural, =1 {# dzień} other {# dni}}</b>.",
|
||||
"inviteExpiresIn": "Zaproszenie wygaśnie za {days, plural, =1 {# dzień} other {# dni}}.",
|
||||
"idpTitle": "Dostawca tożsamości",
|
||||
"idpSelect": "Wybierz dostawcę tożsamości dla użytkownika zewnętrznego",
|
||||
"idpNotConfigured": "Nie skonfigurowano żadnych dostawców tożsamości. Skonfiguruj dostawcę tożsamości przed utworzeniem użytkowników zewnętrznych.",
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
"accessRoleSelect": "Selecionar função",
|
||||
"inviteEmailSentDescription": "Um e-mail foi enviado ao usuário com o link de acesso abaixo. Eles devem acessar o link para aceitar o convite.",
|
||||
"inviteSentDescription": "O usuário foi convidado. Eles devem acessar o link abaixo para aceitar o convite.",
|
||||
"inviteExpiresIn": "O convite expirará em <b>{days, plural, =1 {# dia} other {# dias}}</b>.",
|
||||
"inviteExpiresIn": "O convite expirará em {days, plural, =1 {# dia} other {# dias}}.",
|
||||
"idpTitle": "Provedor de Identidade",
|
||||
"idpSelect": "Selecione o provedor de identidade para o usuário externo",
|
||||
"idpNotConfigured": "Nenhum provedor de identidade está configurado. Configure um provedor de identidade antes de criar usuários externos.",
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
"accessRoleSelect": "Select role",
|
||||
"inviteEmailSentDescription": "An email has been sent to the user with the access link below. They must access the link to accept the invitation.",
|
||||
"inviteSentDescription": "The user has been invited. They must access the link below to accept the invitation.",
|
||||
"inviteExpiresIn": "The invite will expire in <b>{days, plural, =1 {# day} other {# days}}</b>.",
|
||||
"inviteExpiresIn": "The invite will expire in {days, plural, =1 {# day} other {# days}}.",
|
||||
"idpTitle": "Identity Provider",
|
||||
"idpSelect": "Select the identity provider for the external user",
|
||||
"idpNotConfigured": "No identity providers are configured. Please configure an identity provider before creating external users.",
|
||||
@@ -684,7 +684,7 @@
|
||||
"accessRoleErrorRemove": "Failed to remove role",
|
||||
"accessRoleErrorRemoveDescription": "An error occurred while removing the role.",
|
||||
"accessRoleName": "Role Name",
|
||||
"accessRoleQuestionRemove": "You're about to delete the <b>{name}</b> role. You cannot undo this action.",
|
||||
"accessRoleQuestionRemove": "You're about to delete the {name} role. You cannot undo this action.",
|
||||
"accessRoleRemove": "Remove Role",
|
||||
"accessRoleRemoveDescription": "Remove a role from the organization",
|
||||
"accessRoleRemoveSubmit": "Remove Role",
|
||||
|
||||
@@ -39,10 +39,8 @@ type CreateRoleFormProps = {
|
||||
afterCreate?: (res: CreateRoleResponse) => Promise<void>;
|
||||
};
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
const formSchema = z.object({
|
||||
name: z.string({ message: t('accessRoleNameRequired') }).max(32),
|
||||
name: z.string({ message: "Name is required" }).max(32),
|
||||
description: z.string().max(255).optional()
|
||||
});
|
||||
|
||||
@@ -52,6 +50,7 @@ export default function CreateRoleForm({
|
||||
afterCreate
|
||||
}: CreateRoleFormProps) {
|
||||
const { org } = useOrgContext();
|
||||
const t = useTranslations();
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
|
||||
@@ -47,10 +47,8 @@ type CreateRoleFormProps = {
|
||||
afterDelete?: () => void;
|
||||
};
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
const formSchema = z.object({
|
||||
newRoleId: z.string({ message: t('accessRoleErrorNewRequired') })
|
||||
newRoleId: z.string({ message: "New role is required" })
|
||||
});
|
||||
|
||||
export default function DeleteRoleForm({
|
||||
@@ -60,6 +58,7 @@ export default function DeleteRoleForm({
|
||||
afterDelete
|
||||
}: CreateRoleFormProps) {
|
||||
const { org } = useOrgContext();
|
||||
const t = useTranslations();
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [roles, setRoles] = useState<ListRolesResponse["roles"]>([]);
|
||||
|
||||
@@ -60,30 +60,28 @@ interface IdpOption {
|
||||
type: string;
|
||||
}
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
const internalFormSchema = z.object({
|
||||
email: z.string().email({ message: t('emailInvalid') }),
|
||||
validForHours: z.string().min(1, { message: t('inviteValidityDuration') }),
|
||||
roleId: z.string().min(1, { message: t('accessRoleSelectPlease') })
|
||||
email: z.string().email({ message: "Invalid email address" }),
|
||||
validForHours: z.string().min(1, { message: "Please select a duration" }),
|
||||
roleId: z.string().min(1, { message: "Please select a role" })
|
||||
});
|
||||
|
||||
const externalFormSchema = z.object({
|
||||
username: z.string().min(1, { message: t('usernameRequired') }),
|
||||
username: z.string().min(1, { message: "Username is required" }),
|
||||
email: z
|
||||
.string()
|
||||
.email({ message: t('emailInvalid') })
|
||||
.email({ message: "Invalid email address" })
|
||||
.optional()
|
||||
.or(z.literal("")),
|
||||
name: z.string().optional(),
|
||||
roleId: z.string().min(1, { message: t('accessRoleSelectPlease') }),
|
||||
idpId: z.string().min(1, { message: t('idpSelectPlease') })
|
||||
roleId: z.string().min(1, { message: "Please select a role" }),
|
||||
idpId: z.string().min(1, { message: "Please select an identity provider" })
|
||||
});
|
||||
|
||||
const formatIdpType = (type: string) => {
|
||||
switch (type.toLowerCase()) {
|
||||
case "oidc":
|
||||
return t('idpGenericOidc');
|
||||
return "Generic OAuth2/OIDC provider.";
|
||||
default:
|
||||
return type;
|
||||
}
|
||||
@@ -94,6 +92,7 @@ export default function Page() {
|
||||
const router = useRouter();
|
||||
const { env } = useEnvContext();
|
||||
const api = createApiClient({ env });
|
||||
const t = useTranslations();
|
||||
|
||||
const [userType, setUserType] = useState<UserType | null>("internal");
|
||||
const [inviteLink, setInviteLink] = useState<string | null>(null);
|
||||
@@ -351,7 +350,7 @@ export default function Page() {
|
||||
<SettingsSection>
|
||||
<SettingsSectionHeader>
|
||||
<SettingsSectionTitle>
|
||||
{t('userInfo')}
|
||||
{t('userSettings')}
|
||||
</SettingsSectionTitle>
|
||||
<SettingsSectionDescription>
|
||||
{t('userSettingsDescription')}
|
||||
|
||||
@@ -11,7 +11,6 @@ import { verifySession } from "@app/lib/auth/verifySession";
|
||||
import AccessPageHeaderAndNav from "../AccessPageHeaderAndNav";
|
||||
import SettingsSectionTitle from "@app/components/SettingsSectionTitle";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
type UsersPageProps = {
|
||||
params: Promise<{ orgId: string }>;
|
||||
@@ -24,8 +23,7 @@ export default async function UsersPage(props: UsersPageProps) {
|
||||
|
||||
const getUser = cache(verifySession);
|
||||
const user = await getUser();
|
||||
|
||||
const t = useTranslations();
|
||||
const t = await getTranslations();
|
||||
|
||||
let users: ListUsersResponse["users"] = [];
|
||||
let hasInvitations = false;
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
import { GetApiKeyResponse } from "@server/routers/apiKeys";
|
||||
import ApiKeyProvider from "@app/providers/ApiKeyProvider";
|
||||
import { HorizontalTabs } from "@app/components/HorizontalTabs";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
interface SettingsLayoutProps {
|
||||
children: React.ReactNode;
|
||||
@@ -24,8 +24,7 @@ interface SettingsLayoutProps {
|
||||
|
||||
export default async function SettingsLayout(props: SettingsLayoutProps) {
|
||||
const params = await props.params;
|
||||
|
||||
const t = useTranslations();
|
||||
const t = await getTranslations();
|
||||
|
||||
const { children } = props;
|
||||
|
||||
|
||||
@@ -45,10 +45,10 @@ export default function Page() {
|
||||
.catch((e) => {
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: "Error loading API key actions",
|
||||
title: t('apiKeysPermissionsErrorLoadingActions'),
|
||||
description: formatAxiosError(
|
||||
e,
|
||||
"Error loading API key actions"
|
||||
t('apiKeysPermissionsErrorLoadingActions')
|
||||
)
|
||||
});
|
||||
});
|
||||
@@ -79,18 +79,18 @@ export default function Page() {
|
||||
)
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error("Error setting permissions", e);
|
||||
console.error(t('apiKeysErrorSetPermission'), e);
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: "Error setting permissions",
|
||||
title: t('apiKeysErrorSetPermission'),
|
||||
description: formatAxiosError(e)
|
||||
});
|
||||
});
|
||||
|
||||
if (actionsRes && actionsRes.status === 200) {
|
||||
toast({
|
||||
title: "Permissions updated",
|
||||
description: "The permissions have been updated."
|
||||
title: t('apiKeysPermissionsUpdated'),
|
||||
description: t('apiKeysPermissionsUpdatedDescription')
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { AxiosResponse } from "axios";
|
||||
import SettingsSectionTitle from "@app/components/SettingsSectionTitle";
|
||||
import OrgApiKeysTable, { OrgApiKeyRow } from "./OrgApiKeysTable";
|
||||
import { ListOrgApiKeysResponse } from "@server/routers/apiKeys";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
type ApiKeyPageProps = {
|
||||
params: Promise<{ orgId: string }>;
|
||||
@@ -14,7 +14,8 @@ export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function ApiKeysPage(props: ApiKeyPageProps) {
|
||||
const params = await props.params;
|
||||
const t = useTranslations();
|
||||
const t = await getTranslations();
|
||||
|
||||
let apiKeys: ListOrgApiKeysResponse["apiKeys"] = [];
|
||||
try {
|
||||
const res = await internal.get<AxiosResponse<ListOrgApiKeysResponse>>(
|
||||
|
||||
@@ -19,7 +19,7 @@ import UserProvider from "@app/providers/UserProvider";
|
||||
import { Layout } from "@app/components/Layout";
|
||||
import { SidebarNavItem, SidebarNavProps } from "@app/components/SidebarNav";
|
||||
import { orgNavItems } from "@app/app/navigation";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
@@ -47,7 +47,7 @@ export default async function SettingsLayout(props: SettingsLayoutProps) {
|
||||
|
||||
const cookie = await authCookieHeader();
|
||||
|
||||
const t = useTranslations();
|
||||
const t = await getTranslations();
|
||||
|
||||
try {
|
||||
const getOrgUser = cache(() =>
|
||||
|
||||
@@ -89,11 +89,8 @@ export default function SitesTable({ resources, orgId }: ResourcesTableProps) {
|
||||
.catch((e) => {
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: "Failed to toggle resource",
|
||||
description: formatAxiosError(
|
||||
e,
|
||||
"An error occurred while updating the resource"
|
||||
)
|
||||
title: t('resourcesErrorUpdate'),
|
||||
description: formatAxiosError(e, t('resourcesErrorUpdateDescription'))
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -67,8 +67,6 @@ import {
|
||||
import { SwitchInput } from "@app/components/SwitchInput";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
const GeneralFormSchema = z
|
||||
.object({
|
||||
subdomain: z.string().optional(),
|
||||
@@ -91,7 +89,7 @@ const GeneralFormSchema = z
|
||||
return true;
|
||||
},
|
||||
{
|
||||
message: t('proxyErrorInvalidPort'),
|
||||
message: "Invalid port number",
|
||||
path: ["proxyPort"]
|
||||
}
|
||||
)
|
||||
@@ -103,7 +101,7 @@ const GeneralFormSchema = z
|
||||
return true;
|
||||
},
|
||||
{
|
||||
message: t('subdomainErrorInvalid'),
|
||||
message: "Invalid subdomain",
|
||||
path: ["subdomain"]
|
||||
}
|
||||
);
|
||||
@@ -121,6 +119,7 @@ export default function GeneralForm() {
|
||||
const { resource, updateResource } = useResourceContext();
|
||||
const { org } = useOrgContext();
|
||||
const router = useRouter();
|
||||
const t = useTranslations();
|
||||
|
||||
const { env } = useEnvContext();
|
||||
|
||||
@@ -178,10 +177,7 @@ export default function GeneralForm() {
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: t('domainErrorFetch'),
|
||||
description: formatAxiosError(
|
||||
e,
|
||||
t('domainErrorFetchDescription')
|
||||
)
|
||||
description: formatAxiosError(e, t('domainErrorFetchDescription'))
|
||||
});
|
||||
});
|
||||
|
||||
@@ -220,10 +216,7 @@ export default function GeneralForm() {
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: t('resourceErrorUpdate'),
|
||||
description: formatAxiosError(
|
||||
e,
|
||||
t('resourceErrorUpdateDescription')
|
||||
)
|
||||
description: formatAxiosError(e, t('resourceErrorUpdateDescription'))
|
||||
});
|
||||
});
|
||||
|
||||
@@ -259,9 +252,7 @@ export default function GeneralForm() {
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: t('resourceErrorTransfer'),
|
||||
description: formatAxiosError(
|
||||
e,
|
||||
t('resourceErrorTransferDescription')
|
||||
description: formatAxiosError(e, t('resourceErrorTransferDescription')
|
||||
)
|
||||
});
|
||||
});
|
||||
|
||||
@@ -93,8 +93,6 @@ type LocalTarget = Omit<
|
||||
"protocol"
|
||||
>;
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
const proxySettingsSchema = z.object({
|
||||
setHostHeader: z
|
||||
.string()
|
||||
@@ -107,7 +105,7 @@ const proxySettingsSchema = z.object({
|
||||
return true;
|
||||
},
|
||||
{
|
||||
message: t('proxyErrorInvalidHeader')
|
||||
message: "Invalid custom Host Header value. Use domain name format, or save empty to unset custom Host Header."
|
||||
}
|
||||
)
|
||||
});
|
||||
@@ -125,7 +123,7 @@ const tlsSettingsSchema = z.object({
|
||||
return true;
|
||||
},
|
||||
{
|
||||
message: t('proxyErrorTls')
|
||||
message: "Invalid TLS Server Name. Use domain name format, or save empty to remove the TLS Server Name."
|
||||
}
|
||||
)
|
||||
});
|
||||
@@ -138,6 +136,7 @@ export default function ReverseProxyTargets(props: {
|
||||
params: Promise<{ resourceId: number }>;
|
||||
}) {
|
||||
const params = use(props.params);
|
||||
const t = useTranslations();
|
||||
|
||||
const { resource, updateResource } = useResourceContext();
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import { GetOrgResponse } from "@server/routers/org";
|
||||
import OrgProvider from "@app/providers/OrgProvider";
|
||||
import ResourcesSplashCard from "./ResourcesSplashCard";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
type ResourcesPageProps = {
|
||||
params: Promise<{ orgId: string }>;
|
||||
@@ -20,6 +19,8 @@ export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function ResourcesPage(props: ResourcesPageProps) {
|
||||
const params = await props.params;
|
||||
const t = await getTranslations();
|
||||
|
||||
let resources: ListResourcesResponse["resources"] = [];
|
||||
try {
|
||||
const res = await internal.get<AxiosResponse<ListResourcesResponse>>(
|
||||
@@ -47,8 +48,6 @@ export default async function ResourcesPage(props: ResourcesPageProps) {
|
||||
redirect(`/${params.orgId}/settings/resources`);
|
||||
}
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
const resourceRows: ResourceRow[] = resources.map((resource) => {
|
||||
return {
|
||||
id: resource.resourceId,
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
import { GetApiKeyResponse } from "@server/routers/apiKeys";
|
||||
import ApiKeyProvider from "@app/providers/ApiKeyProvider";
|
||||
import { HorizontalTabs } from "@app/components/HorizontalTabs";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
interface SettingsLayoutProps {
|
||||
children: React.ReactNode;
|
||||
@@ -25,7 +25,7 @@ interface SettingsLayoutProps {
|
||||
export default async function SettingsLayout(props: SettingsLayoutProps) {
|
||||
const params = await props.params;
|
||||
|
||||
const t = useTranslations();
|
||||
const t = await getTranslations();
|
||||
|
||||
const { children } = props;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
BreadcrumbPage,
|
||||
BreadcrumbSeparator
|
||||
} from "@app/components/ui/breadcrumb";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
interface SettingsLayoutProps {
|
||||
children: React.ReactNode;
|
||||
@@ -37,7 +37,7 @@ export default async function SettingsLayout(props: SettingsLayoutProps) {
|
||||
redirect("/admin/idp");
|
||||
}
|
||||
|
||||
const t = useTranslations();
|
||||
const t = await getTranslations();
|
||||
|
||||
const navItems: HorizontalTabs = [
|
||||
{
|
||||
|
||||
@@ -371,7 +371,7 @@ export default function Page() {
|
||||
</AlertTitle>
|
||||
<AlertDescription>
|
||||
{/*TODO(vlalx): Validate replacing */}
|
||||
{t('idpJmespathAboutDescription')}
|
||||
{t('idpJmespathAboutDescription')}{" "}
|
||||
<a
|
||||
href="https://jmespath.org"
|
||||
target="_blank"
|
||||
@@ -447,8 +447,7 @@ export default function Page() {
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>
|
||||
"idpOidcConfigureScopes": "Scopes"
|
||||
{t('')}
|
||||
{t('idpOidcConfigureScopes')}
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<Input {...field} />
|
||||
|
||||
@@ -3,7 +3,7 @@ import { authCookieHeader } from "@app/lib/api/cookies";
|
||||
import { AxiosResponse } from "axios";
|
||||
import SettingsSectionTitle from "@app/components/SettingsSectionTitle";
|
||||
import IdpTable, { IdpRow } from "./AdminIdpTable";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
export default async function IdpPage() {
|
||||
let idps: IdpRow[] = [];
|
||||
@@ -16,7 +16,8 @@ export default async function IdpPage() {
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
const t = useTranslations();
|
||||
|
||||
const t = await getTranslations();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -7,7 +7,6 @@ import UsersTable, { GlobalUserRow } from "./AdminUsersTable";
|
||||
import { Alert, AlertDescription, AlertTitle } from "@app/components/ui/alert";
|
||||
import { InfoIcon } from "lucide-react";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
type PageProps = {
|
||||
params: Promise<{ orgId: string }>;
|
||||
@@ -26,7 +25,8 @@ export default async function UsersPage(props: PageProps) {
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
const t = useTranslations();
|
||||
|
||||
const t = await getTranslations();
|
||||
|
||||
const userRows: GlobalUserRow[] = rows.map((row) => {
|
||||
return {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { AxiosResponse } from "axios";
|
||||
import { ExternalLink } from "lucide-react";
|
||||
import { Metadata } from "next";
|
||||
import { cache } from "react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: `Auth - Pangolin`,
|
||||
@@ -22,7 +22,7 @@ type AuthLayoutProps = {
|
||||
export default async function AuthLayout({ children }: AuthLayoutProps) {
|
||||
const getUser = cache(verifySession);
|
||||
const user = await getUser();
|
||||
const t = useTranslations();
|
||||
const t = await getTranslations();
|
||||
|
||||
const licenseStatusRes = await cache(
|
||||
async () =>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { cleanRedirect } from "@app/lib/cleanRedirect";
|
||||
import db from "@server/db";
|
||||
import { idp } from "@server/db/schemas";
|
||||
import { LoginFormIDP } from "@app/components/LoginForm";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
@@ -41,7 +41,7 @@ export default async function Page(props: {
|
||||
name: idp.name
|
||||
})) as LoginFormIDP[];
|
||||
|
||||
const t = useTranslations();
|
||||
const t = await getTranslations();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import Link from "next/link";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
export default async function NotFound() {
|
||||
const t = useTranslations();
|
||||
|
||||
const t = await getTranslations();
|
||||
|
||||
return (
|
||||
<div className="w-full max-w-md mx-auto p-3 md:mt-32 text-center">
|
||||
<h1 className="text-6xl font-bold mb-4">404</h1>
|
||||
|
||||
Reference in New Issue
Block a user