fix: add isSaving prop and back-to-dashboard navigation to Toolbar
Add isSaving as a prop so the save button properly shows disabled/spinner state. Add a back arrow link to /dashboard for editor navigation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
8f6cff52a9
commit
b6d85b1a47
|
|
@ -1,5 +1,6 @@
|
|||
'use client'
|
||||
|
||||
import Link from 'next/link'
|
||||
import type { ConnectionState, PresenceUser } from '@/lib/collaboration/realtime'
|
||||
import PresenceAvatars from './PresenceAvatars'
|
||||
|
||||
|
|
@ -8,6 +9,7 @@ type ToolbarProps = {
|
|||
onAddChoice: () => void
|
||||
onAddVariable: () => void
|
||||
onSave: () => void
|
||||
isSaving?: boolean
|
||||
onExport: () => void
|
||||
onExportRenpy: () => void
|
||||
onImport: () => void
|
||||
|
|
@ -36,6 +38,7 @@ export default function Toolbar({
|
|||
onAddChoice,
|
||||
onAddVariable,
|
||||
onSave,
|
||||
isSaving,
|
||||
onExport,
|
||||
onExportRenpy,
|
||||
onImport,
|
||||
|
|
@ -47,6 +50,15 @@ export default function Toolbar({
|
|||
return (
|
||||
<div className="flex items-center justify-between border-b border-zinc-200 bg-zinc-50 px-4 py-2 dark:border-zinc-700 dark:bg-zinc-800">
|
||||
<div className="flex items-center gap-2">
|
||||
<Link
|
||||
href="/dashboard"
|
||||
className="mr-2 flex items-center gap-1 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-50"
|
||||
title="Back to Dashboard"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
||||
<path fillRule="evenodd" d="M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z" clipRule="evenodd" />
|
||||
</svg>
|
||||
</Link>
|
||||
<span className="mr-2 text-sm font-medium text-zinc-500 dark:text-zinc-400">
|
||||
Add Node:
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Reference in New Issue