mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-28 04:07:04 -05:00
Compare commits
6 Commits
edit/edt-6
...
edit/edt-9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f6db308c0 | ||
|
|
40a4ff52c7 | ||
|
|
c09a343d08 | ||
|
|
9893567a30 | ||
|
|
771405961f | ||
|
|
437e2b353c |
@@ -1,4 +1,4 @@
|
|||||||
import { ChevronDown, ChevronUp } from 'lucide-react';
|
import { ChevronDown } from 'lucide-react';
|
||||||
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@/components/ui/collapsible';
|
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@/components/ui/collapsible';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
@@ -49,16 +49,17 @@ export function DetailedViewCollapsible({
|
|||||||
<span className="text-xs text-muted-foreground normal-case font-normal">
|
<span className="text-xs text-muted-foreground normal-case font-normal">
|
||||||
{isCollapsed ? 'Show' : 'Hide'}
|
{isCollapsed ? 'Show' : 'Hide'}
|
||||||
</span>
|
</span>
|
||||||
{isCollapsed ? (
|
<ChevronDown
|
||||||
<ChevronDown className="h-4 w-4 text-muted-foreground transition-transform duration-200" />
|
className={cn(
|
||||||
) : (
|
"h-4 w-4 text-muted-foreground transition-all duration-300 ease-out",
|
||||||
<ChevronUp className="h-4 w-4 text-muted-foreground transition-transform duration-200" />
|
!isCollapsed && "rotate-180"
|
||||||
)}
|
)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
</CollapsibleTrigger>
|
</CollapsibleTrigger>
|
||||||
|
|
||||||
<CollapsibleContent className="mt-3 data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down">
|
<CollapsibleContent className="mt-3">
|
||||||
{children}
|
{children}
|
||||||
</CollapsibleContent>
|
</CollapsibleContent>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,9 +1,30 @@
|
|||||||
|
import * as React from "react";
|
||||||
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
const Collapsible = CollapsiblePrimitive.Root;
|
const Collapsible = CollapsiblePrimitive.Root;
|
||||||
|
|
||||||
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
||||||
|
|
||||||
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
const CollapsibleContent = React.forwardRef<
|
||||||
|
React.ElementRef<typeof CollapsiblePrimitive.Content>,
|
||||||
|
React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Content>
|
||||||
|
>(({ className, children, ...props }, ref) => (
|
||||||
|
<CollapsiblePrimitive.Content
|
||||||
|
ref={ref}
|
||||||
|
className={cn(
|
||||||
|
"overflow-hidden transition-all duration-300 ease-out",
|
||||||
|
"data-[state=closed]:animate-accordion-up",
|
||||||
|
"data-[state=open]:animate-accordion-down",
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
|
<div className="animate-fade-in">
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
</CollapsiblePrimitive.Content>
|
||||||
|
));
|
||||||
|
CollapsibleContent.displayName = "CollapsibleContent";
|
||||||
|
|
||||||
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
-- Add moderation_preferences column to user_preferences table
|
||||||
|
-- This stores moderator UI preferences like detailed view collapsed state
|
||||||
|
|
||||||
|
ALTER TABLE public.user_preferences
|
||||||
|
ADD COLUMN IF NOT EXISTS moderation_preferences JSONB NOT NULL DEFAULT '{}'::jsonb;
|
||||||
|
|
||||||
|
COMMENT ON COLUMN public.user_preferences.moderation_preferences IS
|
||||||
|
'Stores moderator UI preferences like detailed view collapsed state';
|
||||||
|
|
||||||
|
-- Add GIN index for efficient JSONB queries
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_user_preferences_moderation_prefs
|
||||||
|
ON public.user_preferences USING gin(moderation_preferences);
|
||||||
Reference in New Issue
Block a user