diff --git a/.env.template b/.env.template index 35ac3b9b58..0ac689045f 100644 --- a/.env.template +++ b/.env.template @@ -1,2 +1,5 @@ +SITE_URL=http://localhost:3000 +API_BASE_URL=http://localhost:8080/api/v1 + # openssl rand -base64 32 AUTH_SECRET=your-secret-key diff --git a/components/filters/CustomSearchInput.tsx b/components/filters/CustomSearchInput.tsx index f5f4508a5a..d1f7edb400 100644 --- a/components/filters/CustomSearchInput.tsx +++ b/components/filters/CustomSearchInput.tsx @@ -3,7 +3,7 @@ import { XCircle } from "lucide-react"; import { useRouter, useSearchParams } from "next/navigation"; import React, { useCallback, useEffect, useState } from "react"; -// import { useDebounce } from "../../hooks/useDebounce"; +import { useDebounce } from "../../hooks/useDebounce"; export const CustomSearchInput: React.FC = () => { const router = useRouter(); @@ -13,7 +13,7 @@ export const CustomSearchInput: React.FC = () => { // }); const [searchQuery, setSearchQuery] = useState(""); - // const debouncedSearchQuery = useDebounce(searchQuery, 500); + const debouncedSearchQuery = useDebounce(searchQuery, 500); // console.log("debouncedSearchQuery", debouncedSearchQuery); const applySearch = useCallback( diff --git a/components/providers/CheckConnectionProvider.tsx b/components/providers/CheckConnectionProvider.tsx index a7d4ec8360..2fadafad04 100644 --- a/components/providers/CheckConnectionProvider.tsx +++ b/components/providers/CheckConnectionProvider.tsx @@ -27,15 +27,16 @@ export const CheckConnectionProvider = ({ id }: { id: string }) => { }); } else { toast({ - title: "Success!", - description: "The connection was updated successfully.", + title: "Checking", + description: "The task was launched successfully", }); } } + return (
- + ); }; diff --git a/components/providers/ProviderInfo.tsx b/components/providers/ProviderInfo.tsx index 39d33a62fb..96f9df0cbd 100644 --- a/components/providers/ProviderInfo.tsx +++ b/components/providers/ProviderInfo.tsx @@ -7,6 +7,7 @@ import { GCPProviderBadge, KS8ProviderBadge, } from "../icons/providers-badge"; +import { CustomLoader } from "../ui/custom"; interface ProviderInfoProps { connected: boolean | null; @@ -24,23 +25,23 @@ export const ProviderInfo: React.FC = ({ case true: return (
- +
); case false: return ( -
- +
+
); case null: return (
- +
); default: - return ; + return ; } }; @@ -67,7 +68,7 @@ export const ProviderInfo: React.FC = ({
{getIcon()}
{providerAlias} - {providerAlias} + {/* */}
diff --git a/components/providers/table/ColumnsProvider.tsx b/components/providers/table/ColumnsProvider.tsx index 725a4e6fd1..33c79a25bd 100644 --- a/components/providers/table/ColumnsProvider.tsx +++ b/components/providers/table/ColumnsProvider.tsx @@ -38,7 +38,7 @@ const iconClasses = export const ColumnsProvider: ColumnDef[] = [ { - header: "ID", + header: "n", cell: ({ row }) =>

{row.index + 1}

, }, { @@ -60,7 +60,7 @@ export const ColumnsProvider: ColumnDef[] = [ }, }, { - accessorKey: "account", + accessorKey: "id", header: ({ column }) => ( ), diff --git a/components/ui/custom/CustomLoader.tsx b/components/ui/custom/CustomLoader.tsx new file mode 100644 index 0000000000..4dd67b6e78 --- /dev/null +++ b/components/ui/custom/CustomLoader.tsx @@ -0,0 +1,16 @@ +"use client"; + +import { useEffect, useState } from "react"; + +export const CustomLoader = (props: { size?: "small" }) => { + const [loadingSpinner, setloadingSpinner] = useState(0); + const loadingChars = "|/-\\"; + + const textClasses = `w-xs px-xs ${props.size === "small" ? "!text-s" : ""}`; + + useEffect(() => { + setTimeout(() => setloadingSpinner(loadingSpinner + 1), 150); + }, [loadingSpinner]); + + return

{loadingChars[loadingSpinner % 4]}

; +}; diff --git a/components/ui/custom/index.ts b/components/ui/custom/index.ts index dbc111a3cc..1599c7850f 100644 --- a/components/ui/custom/index.ts +++ b/components/ui/custom/index.ts @@ -1,3 +1,4 @@ export * from "./CustomBox"; export * from "./CustomButtonClientAction"; export * from "./CustomInput"; +export * from "./CustomLoader";