import React, { useState } from 'react'; import { Card } from '../ui/card'; import { Button } from '../ui/button'; import { Input } from '../ui/input'; import { Globe, Copy, Plus, Trash2, CheckCircle, Folder } from 'lucide-react'; import { useToast } from '../../context/ToastContext'; export const ConnectivityView: React.FC = () => { const { addToast } = useToast(); // WebDAV State const [webdavPass, setWebdavPass] = useState('****'); // Webhooks State const [webhooks, setWebhooks] = useState([ { id: '1', url: 'https://api.myapp.com/hooks/veza', events: ['file.upload', 'file.delete'], }, ]); const [newHookUrl, setNewHookUrl] = useState(''); const generateWebdavPass = () => { setWebdavPass(`wd-${Math.random().toString(36).substr(2, 10)}`); addToast('New WebDAV password generated', 'success'); }; const addWebhook = () => { if (!newHookUrl) return; setWebhooks([ ...webhooks, { id: Date.now().toString(), url: newHookUrl, events: ['file.upload'] }, ]); setNewHookUrl(''); addToast('Webhook endpoint added', 'success'); }; const copyToClipboard = (text: string) => { navigator.clipboard.writeText(text); addToast('Copied to clipboard'); }; return (
{/* WebDAV Mount Section */}

Directory Mount (WebDAV)

Access your Cloud Studio files directly from your OS file explorer or DAW.

PROTOCOL ACTIVE
https://webdav.veza.io/u/cyber_producer
cyber_producer
{webdavPass}

Use this specific password for mounting. Do not use your account login password.

{/* Webhooks Section */}

Storage Webhooks

Trigger actions in external apps when files change.

setNewHookUrl(e.target.value)} />
{webhooks.map((hook) => (
{hook.url}
{hook.events.map((ev) => ( {ev} ))}
Active
))}
); };