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
15 changes: 10 additions & 5 deletions apps/admin/app/(all)/(dashboard)/ai/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

import { useForm } from "react-hook-form";
import { Lightbulb } from "lucide-react";
import { Button } from "@plane/propel/button";
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import { Button } from "@makeplane/propel/components/button";
import type { IFormattedInstanceConfiguration, TInstanceAIConfigurationKeys } from "@plane/types";
// components
import type { TControllerInputFormField } from "@/components/common/controller-input";
import { ControllerInput } from "@/components/common/controller-input";
import { TOAST_TYPE, setToast } from "@/providers/toast";
// hooks
import { useInstance } from "@/hooks/store";

Expand Down Expand Up @@ -123,9 +123,14 @@ export function InstanceAIForm(props: IInstanceAIForm) {
</div>

<div className="flex flex-col items-start gap-4">
<Button variant="primary" size="lg" onClick={handleSubmit(onSubmit)} loading={isSubmitting}>
{isSubmitting ? "Saving" : "Save changes"}
</Button>
<Button
variant="primary"
size="md"
stretch="auto"
onClick={handleSubmit(onSubmit)}
loading={isSubmitting}
label={isSubmitting ? "Saving" : "Save changes"}
/>

<div className="relative inline-flex items-center gap-1.5 rounded-sm border border-accent-subtle bg-accent-subtle px-4 py-2 text-caption-sm-regular text-accent-secondary">
<Lightbulb className="size-4" />
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/app/(all)/(dashboard)/ai/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import { observer } from "mobx-react";
import useSWR from "swr";
import { Skeleton } from "@plane/propel/skeleton";
// components
import { PageWrapper } from "@/components/common/page-wrapper";
import { Skeleton } from "@/components/common/skeleton";
// hooks
import { useInstance } from "@/hooks/store";
// types
Expand Down
23 changes: 14 additions & 9 deletions apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import Link from "next/link";
import { useForm } from "react-hook-form";
// plane internal packages
import { API_BASE_URL } from "@plane/constants";
import { Button, getButtonStyling } from "@plane/propel/button";
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import { Button } from "@makeplane/propel/components/button";
import { TOAST_TYPE, setToast } from "@/providers/toast";
import type { IFormattedInstanceConfiguration, TInstanceGiteaAuthenticationConfigurationKeys } from "@plane/types";
// components
import { CodeBlock } from "@/components/common/code-block";
Expand Down Expand Up @@ -195,16 +195,21 @@ export function InstanceGiteaConfigForm(props: Props) {
<div className="flex items-center gap-4">
<Button
variant="primary"
size="lg"
size="md"
stretch="auto"
onClick={(e) => void handleSubmit(onSubmit)(e)}
loading={isSubmitting}
disabled={!isDirty}
>
{isSubmitting ? "Saving" : "Save changes"}
</Button>
<Link href="/authentication" className={getButtonStyling("secondary", "lg")} onClick={handleGoBack}>
Go back
</Link>
label={isSubmitting ? "Saving" : "Save changes"}
/>
<Button
variant="secondary"
size="md"
stretch="auto"
nativeButton={false}
render={<Link href="/authentication" onClick={handleGoBack} />}
label="Go back"
/>
</div>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions apps/admin/app/(all)/(dashboard)/authentication/gitea/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import { useState } from "react";
import { observer } from "mobx-react";
import useSWR from "swr";
// plane internal packages
import { Skeleton } from "@plane/propel/skeleton";
import { Switch } from "@plane/propel/switch";
import { setPromiseToast } from "@plane/propel/toast";
import { Switch } from "@makeplane/propel/components/switch";
// assets
import giteaLogo from "@/app/assets/logos/gitea-logo.svg?url";
// components
import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card";
import { PageWrapper } from "@/components/common/page-wrapper";
import { Skeleton } from "@/components/common/skeleton";
import { setPromiseToast } from "@/providers/toast";
// hooks
import { useInstance } from "@/hooks/store";
// types
Expand Down Expand Up @@ -74,8 +74,8 @@ const InstanceGiteaAuthenticationPage = observer(function InstanceGiteaAuthentic
icon={<img src={giteaLogo} height={24} width={24} alt="Gitea Logo" />}
config={
<Switch
value={isGiteaEnabled}
onChange={() => {
checked={isGiteaEnabled}
onCheckedChange={() => {
updateConfig("IS_GITEA_ENABLED", isGiteaEnabled ? "0" : "1");
}}
size="sm"
Expand Down
23 changes: 14 additions & 9 deletions apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { useForm } from "react-hook-form";
import { Monitor } from "lucide-react";
// plane internal packages
import { API_BASE_URL } from "@plane/constants";
import { Button, getButtonStyling } from "@plane/propel/button";
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import { Button } from "@makeplane/propel/components/button";
import { TOAST_TYPE, setToast } from "@/providers/toast";
import type { IFormattedInstanceConfiguration, TInstanceGithubAuthenticationConfigurationKeys } from "@plane/types";
// components
import { CodeBlock } from "@/components/common/code-block";
Expand Down Expand Up @@ -216,16 +216,21 @@ export function InstanceGithubConfigForm(props: Props) {
<div className="flex items-center gap-4">
<Button
variant="primary"
size="lg"
size="md"
stretch="auto"
onClick={(e) => void handleSubmit(onSubmit)(e)}
loading={isSubmitting}
disabled={!isDirty}
>
{isSubmitting ? "Saving" : "Save changes"}
</Button>
<Link href="/authentication" className={getButtonStyling("secondary", "lg")} onClick={handleGoBack}>
Go back
</Link>
label={isSubmitting ? "Saving" : "Save changes"}
/>
<Button
variant="secondary"
size="md"
stretch="auto"
nativeButton={false}
render={<Link href="/authentication" onClick={handleGoBack} />}
label="Go back"
/>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import { observer } from "mobx-react";
import { useTheme } from "next-themes";
import useSWR from "swr";
// plane internal packages
import { Skeleton } from "@plane/propel/skeleton";
import { Switch } from "@plane/propel/switch";
import { setPromiseToast } from "@plane/propel/toast";
import { Switch } from "@makeplane/propel/components/switch";
import { resolveGeneralTheme } from "@plane/utils";
// assets
import githubLightModeImage from "@/app/assets/logos/github-black.png?url";
import githubDarkModeImage from "@/app/assets/logos/github-white.png?url";
// components
import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card";
import { PageWrapper } from "@/components/common/page-wrapper";
import { Skeleton } from "@/components/common/skeleton";
import { setPromiseToast } from "@/providers/toast";
// hooks
import { useInstance } from "@/hooks/store";
// types
Expand Down Expand Up @@ -89,8 +89,8 @@ const InstanceGithubAuthenticationPage = observer(function InstanceGithubAuthent
}
config={
<Switch
value={isGithubEnabled}
onChange={() => {
checked={isGithubEnabled}
onCheckedChange={() => {
updateConfig("IS_GITHUB_ENABLED", isGithubEnabled ? "0" : "1");
}}
size="sm"
Expand Down
23 changes: 14 additions & 9 deletions apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import Link from "next/link";
import { useForm } from "react-hook-form";
// plane internal packages
import { API_BASE_URL } from "@plane/constants";
import { Button, getButtonStyling } from "@plane/propel/button";
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import { Button } from "@makeplane/propel/components/button";
import { TOAST_TYPE, setToast } from "@/providers/toast";
import type { IFormattedInstanceConfiguration, TInstanceGitlabAuthenticationConfigurationKeys } from "@plane/types";
// components
import { CodeBlock } from "@/components/common/code-block";
Expand Down Expand Up @@ -198,16 +198,21 @@ export function InstanceGitlabConfigForm(props: Props) {
<div className="flex items-center gap-4">
<Button
variant="primary"
size="lg"
size="md"
stretch="auto"
onClick={(e) => void handleSubmit(onSubmit)(e)}
loading={isSubmitting}
disabled={!isDirty}
>
{isSubmitting ? "Saving" : "Save changes"}
</Button>
<Link href="/authentication" className={getButtonStyling("secondary", "lg")} onClick={handleGoBack}>
Go back
</Link>
label={isSubmitting ? "Saving" : "Save changes"}
/>
<Button
variant="secondary"
size="md"
stretch="auto"
nativeButton={false}
render={<Link href="/authentication" onClick={handleGoBack} />}
label="Go back"
/>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
import { useState } from "react";
import { observer } from "mobx-react";
import useSWR from "swr";
import { Skeleton } from "@plane/propel/skeleton";
import { Switch } from "@plane/propel/switch";
import { setPromiseToast } from "@plane/propel/toast";
import { Switch } from "@makeplane/propel/components/switch";
// assets
import GitlabLogo from "@/app/assets/logos/gitlab-logo.svg?url";
// components
import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card";
import { PageWrapper } from "@/components/common/page-wrapper";
import { Skeleton } from "@/components/common/skeleton";
import { setPromiseToast } from "@/providers/toast";
// hooks
import { useInstance } from "@/hooks/store";
// types
Expand Down Expand Up @@ -73,8 +73,8 @@ const InstanceGitlabAuthenticationPage = observer(function InstanceGitlabAuthent
icon={<img src={GitlabLogo} height={24} width={24} alt="GitLab Logo" />}
config={
<Switch
value={Boolean(parseInt(enableGitlabConfig))}
onChange={() => {
checked={Boolean(parseInt(enableGitlabConfig))}
onCheckedChange={() => {
if (Boolean(parseInt(enableGitlabConfig)) === true) {
updateConfig("IS_GITLAB_ENABLED", "0");
} else {
Expand Down
23 changes: 14 additions & 9 deletions apps/admin/app/(all)/(dashboard)/authentication/google/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { useForm } from "react-hook-form";
import { Monitor } from "lucide-react";
// plane internal packages
import { API_BASE_URL } from "@plane/constants";
import { Button, getButtonStyling } from "@plane/propel/button";
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import { Button } from "@makeplane/propel/components/button";
import { TOAST_TYPE, setToast } from "@/providers/toast";
import type { IFormattedInstanceConfiguration, TInstanceGoogleAuthenticationConfigurationKeys } from "@plane/types";
// components
import { CodeBlock } from "@/components/common/code-block";
Expand Down Expand Up @@ -208,16 +208,21 @@ export function InstanceGoogleConfigForm(props: Props) {
<div className="flex items-center gap-4">
<Button
variant="primary"
size="lg"
size="md"
stretch="auto"
onClick={(e) => void handleSubmit(onSubmit)(e)}
loading={isSubmitting}
disabled={!isDirty}
>
{isSubmitting ? "Saving" : "Save changes"}
</Button>
<Link href="/authentication" className={getButtonStyling("secondary", "lg")} onClick={handleGoBack}>
Go back
</Link>
label={isSubmitting ? "Saving" : "Save changes"}
/>
<Button
variant="secondary"
size="md"
stretch="auto"
nativeButton={false}
render={<Link href="/authentication" onClick={handleGoBack} />}
label="Go back"
/>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
import { useState } from "react";
import { observer } from "mobx-react";
import useSWR from "swr";
import { Skeleton } from "@plane/propel/skeleton";
import { Switch } from "@plane/propel/switch";
import { setPromiseToast } from "@plane/propel/toast";
import { Switch } from "@makeplane/propel/components/switch";
// assets
import GoogleLogo from "@/app/assets/logos/google-logo.svg?url";
// components
import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card";
import { PageWrapper } from "@/components/common/page-wrapper";
import { Skeleton } from "@/components/common/skeleton";
import { setPromiseToast } from "@/providers/toast";
// hooks
import { useInstance } from "@/hooks/store";
// types
Expand Down Expand Up @@ -74,8 +74,8 @@ const InstanceGoogleAuthenticationPage = observer(function InstanceGoogleAuthent
icon={<img src={GoogleLogo} height={24} width={24} alt="Google Logo" />}
config={
<Switch
value={Boolean(parseInt(enableGoogleConfig))}
onChange={() => {
checked={Boolean(parseInt(enableGoogleConfig))}
onCheckedChange={() => {
if (Boolean(parseInt(enableGoogleConfig)) === true) {
updateConfig("IS_GOOGLE_ENABLED", "0");
} else {
Expand Down
10 changes: 5 additions & 5 deletions apps/admin/app/(all)/(dashboard)/authentication/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { observer } from "mobx-react";
import { useTheme } from "next-themes";
import useSWR from "swr";
// plane internal packages
import { Skeleton } from "@plane/propel/skeleton";
import { Switch } from "@plane/propel/switch";
import { setPromiseToast, setToast, TOAST_TYPE } from "@plane/propel/toast";
import { Switch } from "@makeplane/propel/components/switch";
import type { TInstanceConfigurationKeys, TInstanceAuthenticationModes } from "@plane/types";
import { cn, resolveGeneralTheme } from "@plane/utils";
// components
import { PageWrapper } from "@/components/common/page-wrapper";
import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card";
import { Skeleton } from "@/components/common/skeleton";
import { setPromiseToast, setToast, TOAST_TYPE } from "@/providers/toast";
// helpers
import { canDisableAuthMethod } from "@/helpers/authentication";
// hooks
Expand Down Expand Up @@ -132,8 +132,8 @@ const InstanceAuthenticationPage = observer(function InstanceAuthenticationPage(
<div className={`shrink-0 pr-4 ${isSubmitting && "opacity-70"}`}>
<div className="flex items-center gap-4">
<Switch
value={Boolean(parseInt(enableSignUpConfig))}
onChange={() => {
checked={Boolean(parseInt(enableSignUpConfig))}
onCheckedChange={() => {
if (Boolean(parseInt(enableSignUpConfig)) === true) {
updateConfig("ENABLE_SIGNUP", "0");
} else {
Expand Down
Loading