fix: add back link to Manage Templates and fix script preview scroll
Add 'Back to Script Library' link at top of ScriptTemplateListView. Change right pane in ScriptLibraryPage from overflow-hidden to overflow-y-auto so the script preview scrolls for long scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import { Plus, Search, Pencil, Trash2, Users, User as UserIcon, Loader2, FileCode } from 'lucide-react'
|
import { Plus, Search, Pencil, Trash2, Users, User as UserIcon, Loader2, FileCode, ArrowLeft } from 'lucide-react'
|
||||||
|
import { Link } from 'react-router-dom'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
import { usePermissions } from '@/hooks/usePermissions'
|
import { usePermissions } from '@/hooks/usePermissions'
|
||||||
import { scriptsApi } from '@/api'
|
import { scriptsApi } from '@/api'
|
||||||
@@ -67,6 +68,15 @@ export function ScriptTemplateListView({ onEdit, onCreate }: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex flex-col gap-4">
|
||||||
|
{/* Back link */}
|
||||||
|
<Link
|
||||||
|
to="/scripts"
|
||||||
|
className="flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors w-fit"
|
||||||
|
>
|
||||||
|
<ArrowLeft size={12} />
|
||||||
|
Back to Script Library
|
||||||
|
</Link>
|
||||||
|
|
||||||
{/* Header row */}
|
{/* Header row */}
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export default function ScriptLibraryPage() {
|
|||||||
<p className="text-sm text-muted-foreground">Select a template to get started</p>
|
<p className="text-sm text-muted-foreground">Select a template to get started</p>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="glass-card-static h-full overflow-hidden p-4">
|
<div className="glass-card-static h-full overflow-y-auto p-4">
|
||||||
<ScriptPreview />
|
<ScriptPreview />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user