From f9b1194d169b6b692894af2d3ccc1fd37d19a756 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 1 Sep 2024 22:20:06 -0600 Subject: [PATCH] feat: add empty states to git providers --- .../dashboard/application/general/generic/show.tsx | 4 ++-- .../dashboard/settings/git/show-git-providers.tsx | 10 ++++++++++ apps/dokploy/components/icons/data-tools-icons.tsx | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/general/generic/show.tsx b/apps/dokploy/components/dashboard/application/general/generic/show.tsx index 252d1af7..6b44246a 100644 --- a/apps/dokploy/components/dashboard/application/general/generic/show.tsx +++ b/apps/dokploy/components/dashboard/application/general/generic/show.tsx @@ -106,8 +106,8 @@ export const ShowProviderForm = ({ applicationId }: Props) => { {githubProviders && githubProviders?.length > 0 ? ( ) : ( -
- +
+ To deploy using GitHub, you need to configure your account first. Please, go to{" "} diff --git a/apps/dokploy/components/dashboard/settings/git/show-git-providers.tsx b/apps/dokploy/components/dashboard/settings/git/show-git-providers.tsx index 798eff6c..cffd25cc 100644 --- a/apps/dokploy/components/dashboard/settings/git/show-git-providers.tsx +++ b/apps/dokploy/components/dashboard/settings/git/show-git-providers.tsx @@ -4,6 +4,7 @@ import { AddGitlabProvider } from "./gitlab/add-gitlab-provider"; import { BitbucketIcon, GithubIcon, + GitIcon, GitlabIcon, } from "@/components/icons/data-tools-icons"; import { AddGithubProvider } from "./github/add-github-provider"; @@ -49,6 +50,15 @@ export const ShowGitProviders = () => {
+ {data && data.length === 0 && ( +
+ + + No Git Providers found. To add a provider, create a new one such + as GitHub, GitLab, or Bitbucket. + +
+ )} {data?.map((gitProvider, index) => { const isGithub = gitProvider.providerType === "github"; const isGitlab = gitProvider.providerType === "gitlab"; diff --git a/apps/dokploy/components/icons/data-tools-icons.tsx b/apps/dokploy/components/icons/data-tools-icons.tsx index 9e61a8d9..43c2b371 100644 --- a/apps/dokploy/components/icons/data-tools-icons.tsx +++ b/apps/dokploy/components/icons/data-tools-icons.tsx @@ -244,6 +244,7 @@ export const DockerIcon = ({ className }: Props) => { viewBox="-.557 117.607 598.543 423.631" width="24" xmlns="http://www.w3.org/2000/svg" + className={className} > @@ -261,6 +262,7 @@ export const GitIcon = ({ className }: Props) => { viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" + className={className} >