This commit is contained in:
marko-kraemer 2025-08-29 20:48:36 -07:00
parent 399d18f9ce
commit 39c59fc88e
3 changed files with 17 additions and 3 deletions

View File

@ -369,7 +369,7 @@ class AgentService:
creator_name = None
if template_data.get('creator_id'):
try:
creator_result = await self.db.table('accounts').select('name, slug').eq('id', template_data['creator_id']).single().execute()
creator_result = await self.db.schema('basejump').from_('accounts').select('name, slug').eq('id', template_data['creator_id']).single().execute()
if creator_result.data:
creator_name = creator_result.data.get('name') or creator_result.data.get('slug')
except Exception as e:

View File

@ -238,7 +238,7 @@ export function BillingModal({ open, onOpenChange, returnUrl = typeof window !==
</DialogHeader>
<>
{/* Usage Limit Alert */}
{/* Usage Limit Alert
{showUsageLimitAlert && (
<div className="mb-6">
<div className="flex items-start p-3 sm:p-4 bg-destructive/5 border border-destructive/50 rounded-lg">
@ -255,7 +255,7 @@ export function BillingModal({ open, onOpenChange, returnUrl = typeof window !==
</div>
</div>
</div>
)}
)} */}
{/* Usage section - show loading state or actual data */}
{isLoading || authLoading ? (

View File

@ -20,6 +20,7 @@ import {
Moon,
KeyRound,
Plug,
Zap,
} from 'lucide-react';
import { useAccounts } from '@/hooks/use-accounts';
import NewTeamForm from '@/components/basejump/new-team-form';
@ -53,6 +54,7 @@ import { createClient } from '@/lib/supabase/client';
import { useTheme } from 'next-themes';
import { isLocalMode } from '@/lib/config';
import { clearUserLocalStorage } from '@/lib/utils/clear-local-storage';
import { BillingModal } from '@/components/billing/billing-modal';
export function NavUserWithTeams({
user,
@ -67,6 +69,7 @@ export function NavUserWithTeams({
const { isMobile } = useSidebar();
const { data: accounts } = useAccounts();
const [showNewTeamDialog, setShowNewTeamDialog] = React.useState(false);
const [showBillingModal, setShowBillingModal] = React.useState(false);
const { theme, setTheme } = useTheme();
// Prepare personal account and team accounts
@ -287,6 +290,10 @@ export function NavUserWithTeams({
{/* User Settings Section */}
<DropdownMenuGroup>
<DropdownMenuItem onClick={() => setShowBillingModal(true)}>
<Zap className="h-4 w-4" />
Upgrade
</DropdownMenuItem>
<DropdownMenuItem asChild>
<Link href="/settings/billing">
<CreditCard className="h-4 w-4" />
@ -352,6 +359,13 @@ export function NavUserWithTeams({
</DialogHeader>
<NewTeamForm />
</DialogContent>
{/* Billing Modal */}
<BillingModal
open={showBillingModal}
onOpenChange={setShowBillingModal}
returnUrl={typeof window !== 'undefined' ? window?.location?.href || '/' : '/'}
/>
</Dialog>
);
}