diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/new/page-client.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/new/page-client.tsx
index a3232640c..f6896da34 100644
--- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/new/page-client.tsx
+++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/new/page-client.tsx
@@ -1,5 +1,6 @@
"use client";
+import { Link } from "@/components/link";
import { ItemDialog } from "@/components/payments/item-dialog";
import { useRouter } from "@/components/router";
import {
@@ -26,7 +27,7 @@ import {
} from "@/components/ui";
import { useUpdateConfig } from "@/lib/config-update";
import { cn } from "@/lib/utils";
-import { ArrowLeftIcon, BuildingOfficeIcon, CaretDownIcon, ChatIcon, ClockIcon, CodeIcon, CopyIcon, GearIcon, HardDriveIcon, LightningIcon, PlusIcon, PuzzlePieceIcon, StackIcon, TrashIcon, UserIcon } from "@phosphor-icons/react";
+import { ArrowLeftIcon, ArrowSquareOutIcon, BuildingOfficeIcon, CaretDownIcon, ChatIcon, ClockIcon, CodeIcon, CopyIcon, GearIcon, HardDriveIcon, LightningIcon, PlusIcon, PuzzlePieceIcon, StackIcon, TrashIcon, UserIcon } from "@phosphor-icons/react";
import { CompleteConfig } from "@stackframe/stack-shared/dist/config/schema";
import { getUserSpecifiedIdErrorMessage, isValidUserSpecifiedId, sanitizeUserSpecifiedId } from "@stackframe/stack-shared/dist/schema-fields";
import { typedEntries } from "@stackframe/stack-shared/dist/utils/objects";
@@ -70,13 +71,48 @@ const CUSTOMER_TYPE_OPTIONS = [
},
] as const;
+const COLOR_CLASSES = {
+ blue: {
+ hover: 'hover:border-blue-500/40 hover:shadow-[0_0_12px_rgba(59,130,246,0.1)]',
+ bg: 'bg-blue-500/10 dark:bg-blue-500/[0.15] group-hover:bg-blue-500/20',
+ icon: 'text-blue-600 dark:text-blue-400',
+ },
+ emerald: {
+ hover: 'hover:border-emerald-500/40 hover:shadow-[0_0_12px_rgba(16,185,129,0.1)]',
+ bg: 'bg-emerald-500/10 dark:bg-emerald-500/[0.15] group-hover:bg-emerald-500/20',
+ icon: 'text-emerald-600 dark:text-emerald-400',
+ },
+ amber: {
+ hover: 'hover:border-amber-500/40 hover:shadow-[0_0_12px_rgba(245,158,11,0.1)]',
+ bg: 'bg-amber-500/10 dark:bg-amber-500/[0.15] group-hover:bg-amber-500/20',
+ icon: 'text-amber-600 dark:text-amber-400',
+ },
+ gray: {
+ hover: '',
+ bg: 'bg-foreground/[0.05]',
+ icon: 'text-foreground/40',
+ },
+} as const;
+
function CustomerTypeSelection({
onSelectCustomerType,
onCancel,
+ isTeamsEnabled,
+ projectId,
}: {
onSelectCustomerType: (type: 'user' | 'team' | 'custom') => void,
onCancel: () => void,
+ isTeamsEnabled: boolean,
+ projectId: string,
}) {
+ // Split options into available and unavailable
+ const availableOptions = CUSTOMER_TYPE_OPTIONS.filter(
+ (option) => option.value !== 'team' || isTeamsEnabled
+ );
+ const unavailableOptions = CUSTOMER_TYPE_OPTIONS.filter(
+ (option) => option.value === 'team' && !isTeamsEnabled
+ );
+
return (
@@ -97,26 +133,11 @@ function CustomerTypeSelection({
Who will this product be for?
+ {/* Available options */}
- {CUSTOMER_TYPE_OPTIONS.map((option) => {
+ {availableOptions.map((option) => {
const Icon = option.icon;
- const colorClasses = {
- blue: {
- hover: 'hover:border-blue-500/40 hover:shadow-[0_0_12px_rgba(59,130,246,0.1)]',
- bg: 'bg-blue-500/10 dark:bg-blue-500/[0.15] group-hover:bg-blue-500/20',
- icon: 'text-blue-600 dark:text-blue-400',
- },
- emerald: {
- hover: 'hover:border-emerald-500/40 hover:shadow-[0_0_12px_rgba(16,185,129,0.1)]',
- bg: 'bg-emerald-500/10 dark:bg-emerald-500/[0.15] group-hover:bg-emerald-500/20',
- icon: 'text-emerald-600 dark:text-emerald-400',
- },
- amber: {
- hover: 'hover:border-amber-500/40 hover:shadow-[0_0_12px_rgba(245,158,11,0.1)]',
- bg: 'bg-amber-500/10 dark:bg-amber-500/[0.15] group-hover:bg-amber-500/20',
- icon: 'text-amber-600 dark:text-amber-400',
- },
- }[option.color];
+ const colorClasses = COLOR_CLASSES[option.color];
return (
+
+ {/* Unavailable options section */}
+ {unavailableOptions.length > 0 && (
+
+
+ Unavailable options
+
+
+ These options require additional apps or configuration.
+
+
+ {unavailableOptions.map((option) => {
+ const Icon = option.icon;
+ const colorClasses = COLOR_CLASSES.gray;
+
+ return (
+
+
+
+
+
+
+
+
+ {option.label}
+
+ Enable the Teams app to choose this customer type
+
+
+
+
+
+
+
+ );
+ })}
+
+
+ )}
@@ -458,12 +532,17 @@ export default function PageClient() {
}
};
+ // Check if Teams app is enabled
+ const isTeamsEnabled = config.apps.installed.teams?.enabled ?? false;
+
// Show customer type selection if not selected yet
if (!hasSelectedCustomerType) {
return (
);
}
diff --git a/apps/dashboard/src/components/cmdk-search.tsx b/apps/dashboard/src/components/cmdk-search.tsx
index 767d5d2b9..6ec01b07b 100644
--- a/apps/dashboard/src/components/cmdk-search.tsx
+++ b/apps/dashboard/src/components/cmdk-search.tsx
@@ -119,33 +119,17 @@ const CyclingPlaceholder = memo(function CyclingPlaceholder({
onSelectQuery?: (query: string) => void,
}) {
return (
-
-
+
+ {/* Top spacer */}
- {/* Welcome header */}
-
- {/* Keybind reminder - like tape on the corner */}
-
- ⌘
- +
- K
-
-
- Welcome to Control Center
-
-
- Your shortcut to everything
-
-
-
- {/* Feature highlights with floating icons */}
+ {/* Welcome header + Feature highlights grouped together */}
{/* Floating decorative icons - left and right sides only */}
-
+
-
+
@@ -154,13 +138,29 @@ const CyclingPlaceholder = memo(function CyclingPlaceholder({
-
+
-
+
+ {/* Welcome header */}
+
+ {/* Keybind reminder - like tape on the corner */}
+
+ ⌘
+ +
+ K
+
+
+ Welcome to Control Center
+
+
+ Your shortcut to everything
+
+
+
{/* Feature text content */}
{FEATURE_HIGHLIGHTS.map((feature, index) => {
@@ -185,40 +185,45 @@ const CyclingPlaceholder = memo(function CyclingPlaceholder({
-
-
- {/* Cycling example */}
-
-
Try something like
-
-
-
-
-
+ {/* Bottom spacer */}
- {/* Keyboard hints footer */}
-
-
-
⌘
- +
-
K
-
open
+ {/* Bottom section - separator, cycling example, and footer grouped together */}
+
+ {/* Separator */}
+
+
+ {/* Cycling example */}
+
+
Try something like
+
+
+
-
- ↑
- ↓
- →
- ←
- navigate
-
-
- ↵
- select
-
-
-
esc
-
close
+
+ {/* Keyboard hints footer */}
+
+
+ ⌘
+ +
+ K
+ open
+
+
+ ↑
+ ↓
+ →
+ ←
+ navigate
+
+
+ ↵
+ select
+
+
+ esc
+ close
+