mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-10 07:27:57 -05:00
v0.3.30: duplication, control bar fixes
This commit is contained in:
@@ -32,7 +32,6 @@ import {
|
||||
TooltipTrigger,
|
||||
} from '@/components/ui'
|
||||
import { useSession } from '@/lib/auth-client'
|
||||
import { isDev } from '@/lib/environment'
|
||||
import { createLogger } from '@/lib/logs/console/logger'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'
|
||||
@@ -414,7 +413,7 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<div className='inline-flex h-12 w-12 cursor-not-allowed items-center justify-center rounded-[11px] border bg-card text-card-foreground opacity-50 shadow-xs transition-colors'>
|
||||
<Trash2 className='h-5 w-5' />
|
||||
<Trash2 className='h-4 w-4' />
|
||||
</div>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>{getTooltipText()}</TooltipContent>
|
||||
@@ -499,7 +498,7 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
|
||||
<TooltipTrigger asChild>
|
||||
{isDisabled ? (
|
||||
<div className='inline-flex h-12 w-12 cursor-not-allowed items-center justify-center rounded-[11px] border bg-card text-card-foreground opacity-50 shadow-xs transition-colors'>
|
||||
<Copy className='h-5 w-5' />
|
||||
<Copy className='h-4 w-4' />
|
||||
</div>
|
||||
) : (
|
||||
<Button
|
||||
@@ -564,9 +563,9 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
|
||||
{isDisabled ? (
|
||||
<div className='inline-flex h-12 w-12 cursor-not-allowed items-center justify-center rounded-[11px] border bg-card text-card-foreground opacity-50 shadow-xs transition-colors'>
|
||||
{isAutoLayouting ? (
|
||||
<RefreshCw className='h-5 w-5 animate-spin' />
|
||||
<RefreshCw className='h-4 w-4 animate-spin' />
|
||||
) : (
|
||||
<Layers className='h-5 w-5' />
|
||||
<Layers className='h-4 w-4' />
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
@@ -722,7 +721,7 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
|
||||
<TooltipTrigger asChild>
|
||||
{isDisabled ? (
|
||||
<div className='inline-flex h-12 w-12 cursor-not-allowed items-center justify-center rounded-[11px] border bg-card text-card-foreground opacity-50 shadow-xs transition-colors'>
|
||||
<Store className='h-5 w-5' />
|
||||
<Store className='h-4 w-4' />
|
||||
</div>
|
||||
) : (
|
||||
<Button
|
||||
@@ -776,7 +775,7 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
|
||||
isDebugging && 'text-amber-500'
|
||||
)}
|
||||
>
|
||||
<Bug className='h-5 w-5' />
|
||||
<Bug className='h-4 w-4' />
|
||||
</div>
|
||||
) : (
|
||||
<Button variant='outline' onClick={handleDebugToggle} className={buttonClass}>
|
||||
@@ -1003,8 +1002,7 @@ export function ControlBar({ hasValidationErrors = false }: ControlBarProps) {
|
||||
{renderToggleButton()}
|
||||
{isExpanded && <ExportControls />}
|
||||
{isExpanded && renderAutoLayoutButton()}
|
||||
{!isDev && isExpanded && renderDuplicateButton()}
|
||||
{isDev && renderDuplicateButton()}
|
||||
{renderDuplicateButton()}
|
||||
{renderDeleteButton()}
|
||||
{!isDebugging && renderDebugModeToggle()}
|
||||
{isExpanded && renderPublishButton()}
|
||||
|
||||
@@ -1212,10 +1212,6 @@ export const useWorkflowRegistry = create<WorkflowRegistry>()(
|
||||
}))
|
||||
}
|
||||
|
||||
// Set as active workflow and update store
|
||||
set({ activeWorkflowId: id })
|
||||
useWorkflowStore.setState(newState)
|
||||
|
||||
// Workflow has already been persisted to the database via the duplication endpoint
|
||||
|
||||
logger.info(
|
||||
|
||||
Reference in New Issue
Block a user