diff --git a/apps/admin/app/(all)/(dashboard)/ai/form.tsx b/apps/admin/app/(all)/(dashboard)/ai/form.tsx index affbda4808b..991e2e6c7ec 100644 --- a/apps/admin/app/(all)/(dashboard)/ai/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/ai/form.tsx @@ -50,6 +50,7 @@ export function InstanceAIForm(props: IInstanceAIForm) { target="_blank" className="text-accent-primary hover:underline" rel="noreferrer" + aria-label="OpenAI models documentation" > Learn more @@ -71,6 +72,7 @@ export function InstanceAIForm(props: IInstanceAIForm) { target="_blank" className="text-accent-primary hover:underline" rel="noreferrer" + aria-label="OpenAI API keys page" > here. diff --git a/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx b/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx index f05464a41a9..55a9b26938d 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx @@ -31,6 +31,11 @@ type Props = { type GiteaConfigFormValues = Record; +const GITEA_FORM_SWITCH_FIELD: TControllerSwitchFormField = { + name: "ENABLE_GITEA_SYNC", + label: "Gitea", +}; + export function InstanceGiteaConfigForm(props: Props) { const { config } = props; // states @@ -74,7 +79,6 @@ export function InstanceGiteaConfigForm(props: Props) { <> You will get this from your{" "} Your client secret is also found in your{" "} = { - name: "ENABLE_GITEA_SYNC", - label: "Gitea", - }; - const GITEA_SERVICE_FIELD: TCopyField[] = [ { key: "Callback_URI", @@ -127,11 +125,11 @@ export function InstanceGiteaConfigForm(props: Props) { We will auto-generate this. Paste this into your Authorized Callback URI{" "} field{" "} here. diff --git a/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx b/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx index 2425216b3a0..1e3bbf286c3 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx @@ -32,6 +32,11 @@ type Props = { type GithubConfigFormValues = Record; +const GITHUB_FORM_SWITCH_FIELD: TControllerSwitchFormField = { + name: "ENABLE_GITHUB_SYNC", + label: "GitHub", +}; + export function InstanceGithubConfigForm(props: Props) { const { config } = props; // states @@ -64,7 +69,6 @@ export function InstanceGithubConfigForm(props: Props) { <> You will get this from your{" "} Your client secret is also found in your{" "} = { - name: "ENABLE_GITHUB_SYNC", - label: "GitHub", - }; - const GITHUB_COMMON_SERVICE_DETAILS: TCopyField[] = [ { key: "Origin_URL", @@ -125,11 +123,11 @@ export function InstanceGithubConfigForm(props: Props) { <> We will auto-generate this. Paste this into the Authorized origin URL field{" "} here. @@ -148,11 +146,11 @@ export function InstanceGithubConfigForm(props: Props) { We will auto-generate this. Paste this into your Authorized Callback URI{" "} field{" "} here. diff --git a/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx b/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx index 7df6faf17af..7df12a0094a 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx @@ -31,6 +31,11 @@ type Props = { type GitlabConfigFormValues = Record; +const GITLAB_FORM_SWITCH_FIELD: TControllerSwitchFormField = { + name: "ENABLE_GITLAB_SYNC", + label: "GitLab", +}; + export function InstanceGitlabConfigForm(props: Props) { const { config } = props; // states @@ -76,7 +81,6 @@ export function InstanceGitlabConfigForm(props: Props) { <> Get this from your{" "} The client secret is also found in your{" "} = { - name: "ENABLE_GITLAB_SYNC", - label: "GitLab", - }; - const GITLAB_SERVICE_FIELD: TCopyField[] = [ { key: "Callback_URL", @@ -130,7 +128,6 @@ export function InstanceGitlabConfigForm(props: Props) { <> We will auto-generate this. Paste this into the Redirect URI field of your{" "} ; +const GOOGLE_FORM_SWITCH_FIELD: TControllerSwitchFormField = { + name: "ENABLE_GOOGLE_SYNC", + label: "Google", +}; + export function InstanceGoogleConfigForm(props: Props) { const { config } = props; // states @@ -63,11 +68,11 @@ export function InstanceGoogleConfigForm(props: Props) { <> Your client ID lives in your Google API Console.{" "} Learn more @@ -85,11 +90,11 @@ export function InstanceGoogleConfigForm(props: Props) { <> Your client secret should also be in your Google API Console.{" "} Learn more @@ -101,11 +106,6 @@ export function InstanceGoogleConfigForm(props: Props) { }, ]; - const GOOGLE_FORM_SWITCH_FIELD: TControllerSwitchFormField = { - name: "ENABLE_GOOGLE_SYNC", - label: "Google", - }; - const GOOGLE_COMMON_SERVICE_DETAILS: TCopyField[] = [ { key: "Origin_URL", @@ -120,6 +120,7 @@ export function InstanceGoogleConfigForm(props: Props) { target="_blank" className="text-accent-primary hover:underline" rel="noreferrer" + aria-label="Google Cloud Console OAuth client credentials" > here. @@ -142,6 +143,7 @@ export function InstanceGoogleConfigForm(props: Props) { target="_blank" className="text-accent-primary hover:underline" rel="noreferrer" + aria-label="Google Cloud Console OAuth client credentials" > here. diff --git a/apps/admin/app/(all)/(dashboard)/authentication/page.tsx b/apps/admin/app/(all)/(dashboard)/authentication/page.tsx index 26e5fc56f9d..d96630f2a2d 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/page.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/page.tsx @@ -4,7 +4,7 @@ * See the LICENSE file for details. */ -import { useCallback, useRef, useState } from "react"; +import { useCallback, useEffect, useRef, useState } from "react"; import { observer } from "mobx-react"; import { useTheme } from "next-themes"; import useSWR from "swr"; @@ -105,8 +105,10 @@ const InstanceAuthenticationPage = observer(function InstanceAuthenticationPage( resolvedTheme, }); - // Update ref with latest authentication modes - authenticationModesRef.current = authenticationModes; + // Update ref with latest authentication modes (updateConfig reads it only from event handlers) + useEffect(() => { + authenticationModesRef.current = authenticationModes; + }, [authenticationModes]); return ( setReceiverEmail(e.target.value)} placeholder="Receiver email" className="w-full resize-none text-16" - tabIndex={1} + tabIndex={0} /> )} {sendEmailStep === ESendEmailSteps.SUCCESS && ( @@ -122,11 +122,11 @@ export function SendTestEmailModal(props: Props) { )} {sendEmailStep === ESendEmailSteps.FAILED &&
{error}
}
- {sendEmailStep === ESendEmailSteps.SEND_EMAIL && ( - )} diff --git a/apps/admin/app/(all)/(dashboard)/image/form.tsx b/apps/admin/app/(all)/(dashboard)/image/form.tsx index 72ab513398e..7a2b165fd04 100644 --- a/apps/admin/app/(all)/(dashboard)/image/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/image/form.tsx @@ -64,6 +64,7 @@ export function InstanceImageConfigForm(props: IInstanceImageConfigForm) { target="_blank" className="text-accent-primary hover:underline" rel="noreferrer" + aria-label="Unsplash developer account documentation" > Learn more. diff --git a/apps/admin/app/(all)/(dashboard)/sidebar-help-section.tsx b/apps/admin/app/(all)/(dashboard)/sidebar-help-section.tsx index 51401f312ca..482ba5246a2 100644 --- a/apps/admin/app/(all)/(dashboard)/sidebar-help-section.tsx +++ b/apps/admin/app/(all)/(dashboard)/sidebar-help-section.tsx @@ -69,6 +69,7 @@ export const AdminSidebarHelpSection = observer(function AdminSidebarHelpSection
); } diff --git a/apps/admin/app/(all)/(home)/sign-in-form.tsx b/apps/admin/app/(all)/(home)/sign-in-form.tsx index 4e0afb8ea13..7b03b8c1cd8 100644 --- a/apps/admin/app/(all)/(home)/sign-in-form.tsx +++ b/apps/admin/app/(all)/(home)/sign-in-form.tsx @@ -127,9 +127,7 @@ export function InstanceSignInForm() { {errorData.type && errorData?.message ? ( ) : ( - <> - {errorInfo && setErrorInfo(value)} />} - + <>{errorInfo && } )} @@ -170,6 +168,7 @@ export function InstanceSignInForm() { {showPassword ? ( ) : ( - )} - {secondaryButton} - - - - ); -} diff --git a/apps/admin/components/common/header/index.tsx b/apps/admin/components/common/header/index.tsx index 48b9ca78e9c..8be7107048a 100644 --- a/apps/admin/components/common/header/index.tsx +++ b/apps/admin/components/common/header/index.tsx @@ -21,6 +21,8 @@ export const HamburgerToggle = observer(function HamburgerToggle() { const { isSidebarCollapsed, toggleSidebar } = useTheme(); return ( - - - - - ); -} diff --git a/apps/admin/components/instance/loading.tsx b/apps/admin/components/instance/loading.tsx deleted file mode 100644 index 293b44bdcc8..00000000000 --- a/apps/admin/components/instance/loading.tsx +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -import { useTheme } from "next-themes"; -// assets -import LogoSpinnerDark from "@/app/assets/images/logo-spinner-dark.gif?url"; -import LogoSpinnerLight from "@/app/assets/images/logo-spinner-light.gif?url"; - -export function InstanceLoading() { - const { resolvedTheme } = useTheme(); - - const logoSrc = resolvedTheme === "dark" ? LogoSpinnerLight : LogoSpinnerDark; - - return ( -
- logo -
- ); -} diff --git a/apps/admin/components/instance/setup-form.tsx b/apps/admin/components/instance/setup-form.tsx index 74e80db45b6..fdb7c809173 100644 --- a/apps/admin/components/instance/setup-form.tsx +++ b/apps/admin/components/instance/setup-form.tsx @@ -273,7 +273,7 @@ export function InstanceSetupForm() { {showPassword.password ? (