diff --git a/app/w/components/control-bar/components/notification-dropdown-item.tsx b/app/w/components/control-bar/components/notification-dropdown-item.tsx index 30038b39b5..c3248e1c23 100644 --- a/app/w/components/control-bar/components/notification-dropdown-item.tsx +++ b/app/w/components/control-bar/components/notification-dropdown-item.tsx @@ -37,12 +37,10 @@ export function NotificationDropdownItem({ type, message, timestamp, - options, }: NotificationDropdownItemProps) { - const { removeNotification } = useNotificationStore() + const { showNotification } = useNotificationStore() const Icon = NotificationIcon[type] const [, forceUpdate] = useState({}) - const [copied, setCopied] = useState(false) // Update the time display every minute useEffect(() => { @@ -52,58 +50,18 @@ export function NotificationDropdownItem({ const timeAgo = formatDistanceToNow(timestamp, { addSuffix: true }) - const handleCopy = async () => { - if (options?.copyableContent) { - await navigator.clipboard.writeText(options.copyableContent) - setCopied(true) - setTimeout(() => setCopied(false), 2000) - } - } - return ( e.preventDefault()} + className="flex items-start gap-2 p-3 cursor-pointer" + onClick={() => showNotification(id)} > - -
-
-
- - {type === 'error' ? 'Error' : type === 'api' ? 'API' : 'Console'} - - {timeAgo} -
- {options?.isPersistent && ( - - )} + +
+
+ {type === 'error' ? 'Error' : 'Console'} + {timeAgo}
-

{message}

- {options?.copyableContent && ( -
-
-              {options.copyableContent}
-            
- - {copied && ( - Copied! - )} -
- )} +

{message}

) diff --git a/app/w/components/control-bar/control-bar.tsx b/app/w/components/control-bar/control-bar.tsx index f104df8584..21a1090d9d 100644 --- a/app/w/components/control-bar/control-bar.tsx +++ b/app/w/components/control-bar/control-bar.tsx @@ -128,6 +128,7 @@ export function ControlBar() { checkStatus() }, [activeWorkflowId]) + // Deploy the workflow const handleDeploy = async () => { if (!activeWorkflowId) return try { diff --git a/app/w/components/notifications/notifications.tsx b/app/w/components/notifications/notifications.tsx index c6b772f54e..1b23983f2e 100644 --- a/app/w/components/notifications/notifications.tsx +++ b/app/w/components/notifications/notifications.tsx @@ -87,16 +87,16 @@ export function NotificationList() { NotificationColors[notification.type] )} > -
+
-
- +
+ {notification.type === 'error' ? 'Error' @@ -108,26 +108,28 @@ export function NotificationList() { )} - -

{notification.message}

+ +

{notification.message}

{notification.options?.sections?.map((section, index) => ( -
-
{section.label}
+
+
+ {section.label} +
handleCopy(notification.id, index, section.content)} > -
+                        
                           {section.content}
                         
-
+
{copiedMap[`${notification.id}-${index}`] ? 'Copied!' : 'Click to copy'}
diff --git a/package-lock.json b/package-lock.json index c032dc9b0f..b2113e24bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6589,6 +6589,111 @@ "optional": true } } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.1.3.tgz", + "integrity": "sha512-aw8901rjkVBK5mbq5oV32IqkJg+CQa6aULNlN8zyCWSsePzEG3kpDkAFkkTOh3eJ0p95KbkLyWBzslQKamXsLA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.1.3.tgz", + "integrity": "sha512-YbdaYjyHa4fPK4GR4k2XgXV0p8vbU1SZh7vv6El4bl9N+ZSiMfbmqCuCuNU1Z4ebJMumafaz6UCC2zaJCsdzjw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.1.3.tgz", + "integrity": "sha512-qgH/aRj2xcr4BouwKG3XdqNu33SDadqbkqB6KaZZkozar857upxKakbRllpqZgWl/NDeSCBYPmUAZPBHZpbA0w==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.1.3.tgz", + "integrity": "sha512-uzafnTFwZCPN499fNVnS2xFME8WLC9y7PLRs/yqz5lz1X/ySoxfaK2Hbz74zYUdEg+iDZPd8KlsWaw9HKkLEVw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.1.3.tgz", + "integrity": "sha512-el6GUFi4SiDYnMTTlJJFMU+GHvw0UIFnffP1qhurrN1qJV3BqaSRUjkDUgVV44T6zpw1Lc6u+yn0puDKHs+Sbw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.1.3.tgz", + "integrity": "sha512-6RxKjvnvVMM89giYGI1qye9ODsBQpHSHVo8vqA8xGhmRPZHDQUE4jcDbhBwK0GnFMqBnu+XMg3nYukNkmLOLWw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.1.3.tgz", + "integrity": "sha512-VId/f5blObG7IodwC5Grf+aYP0O8Saz1/aeU3YcWqNdIUAmFQY3VEPKPaIzfv32F/clvanOb2K2BR5DtDs6XyQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } } } }