diff --git a/apps/web/app/(app)/environments/[environmentId]/product/api-keys/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/product/api-keys/loading.tsx index 3ceb8d5b8e..fc15866d96 100644 --- a/apps/web/app/(app)/environments/[environmentId]/product/api-keys/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/product/api-keys/loading.tsx @@ -1,25 +1,34 @@ -const LoadingCard = ({ title, description }) => { +"use client"; + +import { BrushIcon, KeyIcon, LanguagesIcon, ListChecksIcon, TagIcon, UsersIcon } from "lucide-react"; +import { usePathname } from "next/navigation"; + +import { cn } from "@formbricks/lib/cn"; +import { PageContentWrapper } from "@formbricks/ui/PageContentWrapper"; +import { PageHeader } from "@formbricks/ui/PageHeader"; + +const LoadingCard = () => { return ( -
-
-

{title}

-

{description}

+
+
+

+

-
-
-
-
-
-
-
Label
-
API Key
-
Last used
-
Created at
+
+
+
+
Label
+
API Key
+
Created at
-
-
+
+
+
+
+
+ Loading
@@ -29,23 +38,76 @@ const LoadingCard = ({ title, description }) => { }; const Loading = () => { - const cards = [ + const pathname = usePathname(); + + let navigation = [ { - title: "Development Env Keys", - description: "Add and remove API keys for your Development environment.", + id: "general", + label: "General", + icon: , + current: pathname?.includes("/general"), }, { - title: "Production Env Keys", - description: "Add and remove API keys for your Production environment.", + id: "look", + label: "Look & Feel", + icon: , + current: pathname?.includes("/look"), + }, + { + id: "languages", + label: "Survey Languages", + icon: , + hidden: true, + current: pathname?.includes("/languages"), + }, + { + id: "tags", + label: "Tags", + icon: , + current: pathname?.includes("/tags"), + }, + { + id: "api-keys", + label: "API Keys", + icon: , + current: pathname?.includes("/api-keys"), + }, + { + id: "setup", + label: "Setup Guide", + icon: , + current: pathname?.includes("/setup"), }, ]; return (
-

API Keys

- {cards.map((card, index) => ( - - ))} + + +
+ +
+
+
+
+ + +
); }; diff --git a/apps/web/app/(app)/environments/[environmentId]/product/general/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/product/general/loading.tsx index a80da8cb39..b01c1c605f 100644 --- a/apps/web/app/(app)/environments/[environmentId]/product/general/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/product/general/loading.tsx @@ -1,12 +1,21 @@ +"use client"; + +import { BrushIcon, KeyIcon, LanguagesIcon, ListChecksIcon, TagIcon, UsersIcon } from "lucide-react"; +import { usePathname } from "next/navigation"; + +import { cn } from "@formbricks/lib/cn"; +import { PageContentWrapper } from "@formbricks/ui/PageContentWrapper"; +import { PageHeader } from "@formbricks/ui/PageHeader"; + const LoadingCard = ({ title, description, skeletonLines }) => { return ( -
-
+
+

{title}

{description}

-
+
{skeletonLines.map((line, index) => (
@@ -19,6 +28,8 @@ const LoadingCard = ({ title, description, skeletonLines }) => { }; const Loading = () => { + const pathname = usePathname(); + const cards = [ { title: "Product Name", @@ -38,12 +49,74 @@ const Loading = () => { }, ]; + let navigation = [ + { + id: "general", + label: "General", + icon: , + current: pathname?.includes("/general"), + }, + { + id: "look", + label: "Look & Feel", + icon: , + current: pathname?.includes("/look"), + }, + { + id: "languages", + label: "Survey Languages", + icon: , + hidden: true, + current: pathname?.includes("/languages"), + }, + { + id: "tags", + label: "Tags", + icon: , + current: pathname?.includes("/tags"), + }, + { + id: "api-keys", + label: "API Keys", + icon: , + current: pathname?.includes("/api-keys"), + }, + { + id: "setup", + label: "Setup Guide", + icon: , + current: pathname?.includes("/setup"), + }, + ]; + return (
-

Product Settings

- {cards.map((card, index) => ( - - ))} + + +
+ +
+
+
+ {cards.map((card, index) => ( + + ))} +
); }; diff --git a/apps/web/app/(app)/environments/[environmentId]/product/look/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/product/look/loading.tsx index 84edcee9db..61211dd9e0 100644 --- a/apps/web/app/(app)/environments/[environmentId]/product/look/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/product/look/loading.tsx @@ -1,9 +1,15 @@ +"use client"; + import { SettingsCard } from "@/app/(app)/environments/[environmentId]/settings/components/SettingsCard"; +import { BrushIcon, KeyIcon, LanguagesIcon, ListChecksIcon, TagIcon, UsersIcon } from "lucide-react"; +import { usePathname } from "next/navigation"; import { cn } from "@formbricks/lib/cn"; import { Badge } from "@formbricks/ui/Badge"; import { Button } from "@formbricks/ui/Button"; import { Label } from "@formbricks/ui/Label"; +import { PageContentWrapper } from "@formbricks/ui/PageContentWrapper"; +import { PageHeader } from "@formbricks/ui/PageHeader"; import { RadioGroup, RadioGroupItem } from "@formbricks/ui/RadioGroup"; import { Switch } from "@formbricks/ui/Switch"; @@ -16,130 +22,195 @@ const placements = [ ]; const Loading = () => { + const pathname = usePathname(); + + let navigation = [ + { + id: "general", + label: "General", + icon: , + current: pathname?.includes("/general"), + }, + { + id: "look", + label: "Look & Feel", + icon: , + current: pathname?.includes("/look"), + }, + { + id: "languages", + label: "Survey Languages", + icon: , + hidden: true, + current: pathname?.includes("/languages"), + }, + { + id: "tags", + label: "Tags", + icon: , + current: pathname?.includes("/tags"), + }, + { + id: "api-keys", + label: "API Keys", + icon: , + current: pathname?.includes("/api-keys"), + }, + { + id: "setup", + label: "Setup Guide", + icon: , + current: pathname?.includes("/setup"), + }, + ]; + return (
- -
-
-
-
-
- -
-

Enable custom styling

-

- Allow users to override this theme in the editor. -

-
-
-
- -
-
-
-

Form Styling

-

- Style the question texts, descriptions and input fields. -

-
-
- -
-
-

Card Styling

-

Style the survey card.

-
-
- -
-
-
-

Background Styling

- -
-

- Change the background to a color, image or animation. -

-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-

Preview

- -
Restart
-
-
- -
-

Loading preview...

-
-
-
-
-
-
- - -
-
- - {placements.map((placement) => ( -
- - + + +
+ +
+
+
+ +
+
+
+
+
+ +
+

Enable custom styling

+

+ Allow users to override this theme in the editor. +

+
+
+
+ +
+
+
+

Form Styling

+

+ Style the question texts, descriptions and input fields. +

+
+
+ +
+
+

Card Styling

+

Style the survey card.

+
+
+ +
+
+
+

Background Styling

+ +
+

+ Change the background to a color, image or animation. +

+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+

Preview

+ +
Restart
+
+
+ +
+

Loading preview...

+
+
+
- -
- + - -
-
- - + +
+
+ + {placements.map((placement) => ( +
+ + +
+ ))} +
+
+
+
+
+
-
- + + + +
+
+ + +
+
+
+
); }; diff --git a/apps/web/app/(app)/environments/[environmentId]/product/setup/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/product/setup/loading.tsx index 7d55262f0b..6ef9b7c210 100644 --- a/apps/web/app/(app)/environments/[environmentId]/product/setup/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/product/setup/loading.tsx @@ -1,15 +1,25 @@ +"use client"; + +import { BrushIcon, KeyIcon, LanguagesIcon, ListChecksIcon, TagIcon, UsersIcon } from "lucide-react"; +import { usePathname } from "next/navigation"; + +import { cn } from "@formbricks/lib/cn"; +import { PageContentWrapper } from "@formbricks/ui/PageContentWrapper"; +import { PageHeader } from "@formbricks/ui/PageHeader"; + const LoadingCard = ({ title, description, skeletonLines }) => { return ( -
-
+
+

{title}

{description}

-
+
{skeletonLines.map((line, index) => (
-
+
))}
@@ -19,11 +29,18 @@ const LoadingCard = ({ title, description, skeletonLines }) => { }; const Loading = () => { + const pathname = usePathname(); + const cards = [ { title: "Widget Status", description: "Check if the Formbricks widget is alive and kicking.", - skeletonLines: [{ classes: "h-32 max-w-full rounded-md" }], + skeletonLines: [{ classes: " h-44 max-w-full rounded-md" }], + }, + { + title: "Your EnvironmentId", + description: "This Id uniquely identifies this Formbricks environment.", + skeletonLines: [{ classes: "h-6 w-4/6 rounded-full" }], }, { title: "How to setup", @@ -39,12 +56,75 @@ const Loading = () => { }, ]; + let navigation = [ + { + id: "general", + label: "General", + icon: , + current: pathname?.includes("/general"), + }, + { + id: "look", + label: "Look & Feel", + icon: , + current: pathname?.includes("/look"), + }, + { + id: "languages", + label: "Survey Languages", + icon: , + hidden: true, + current: pathname?.includes("/languages"), + }, + { + id: "tags", + label: "Tags", + icon: , + current: pathname?.includes("/tags"), + }, + { + id: "api-keys", + label: "API Keys", + icon: , + current: pathname?.includes("/api-keys"), + }, + { + id: "setup", + label: "Setup Guide", + icon: , + current: pathname?.includes("/setup"), + }, + ]; + return (
-

Setup Checklist

- {cards.map((card, index) => ( - - ))} + + +
+ +
+
+
+
+ {cards.map((card, index) => ( + + ))} +
); };