Spaces:
Running
Running
Download index.html from PirateKnobi/apps: direct link, hf CLI and curl.
- Browser
- Download file 74.7 kB
-
https://huggingface.co/spaces/PirateKnobi/apps/resolve/main/index.html
- Command line
-
hf download hf://spaces/PirateKnobi/apps/index.html
-
curl -L -o index.html https://huggingface.co/spaces/PirateKnobi/apps/resolve/main/index.html
74.7 kB
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NeonFlow AI - Cyberpunk Workflow</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
cyberpurple: '#8a2be2',
cyberpink: '#ff00ff',
cyberblue: '#00ffff',
cyberdark: '#0f0f1a',
cyberdarker: '#080811',
cybergray: '#1a1a2e',
},
fontFamily: {
'cyber': ['"Rajdhani"', 'sans-serif'],
'hebrew': ['"Taamey Frank CLM"', 'sans-serif'],
},
animation: {
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
'neon-glow': 'neonGlow 2s ease-in-out infinite alternate',
},
keyframes: {
neonGlow: {
'0%, 100%': { 'text-shadow': '0 0 5px #fff, 0 0 10px #fff, 0 0 15px #ff00ff, 0 0 20px #ff00ff' },
'50%': { 'text-shadow': '0 0 5px #fff, 0 0 10px #fff, 0 0 15px #00ffff, 0 0 20px #00ffff' },
}
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Taamey+Frank+CLM:wght@400;500;700&display=swap');
body {
font-family: 'Rajdhani', sans-serif;
background-color: #0f0f1a;
color: #e0e0e0;
overflow-x: hidden;
}
.cyber-border {
border: 1px solid rgba(138, 43, 226, 0.3);
box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}
.cyber-border:hover {
border-color: rgba(255, 0, 255, 0.5);
box-shadow: 0 0 15px rgba(255, 0, 255, 0.7);
}
.neon-text {
animation: neonGlow 2s ease-in-out infinite alternate;
}
.grid-lines {
background-image:
linear-gradient(rgba(138, 43, 226, 0.1) 1px, transparent 1px),
linear-gradient(90deg, rgba(138, 43, 226, 0.1) 1px, transparent 1px);
background-size: 20px 20px;
}
.rtl {
direction: rtl;
}
/* Custom scrollbar */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
background: #8a2be2;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #ff00ff;
}
/* Terminal effect for output */
.terminal {
background-color: rgba(0, 0, 0, 0.7);
border: 1px solid #00ffff;
font-family: 'Courier New', monospace;
position: relative;
}
.terminal::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 15px;
background: linear-gradient(to right, #ff00ff, #00ffff, #8a2be2);
opacity: 0.3;
}
/* Glitch effect */
.glitch {
position: relative;
}
.glitch::before, .glitch::after {
content: attr(data-text);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.8;
}
.glitch::before {
color: #0ff;
z-index: -1;
animation: glitch-effect 3s infinite;
}
.glitch::after {
color: #f0f;
z-index: -2;
animation: glitch-effect 2s infinite reverse;
}
@keyframes glitch-effect {
0% { transform: translate(0); }
20% { transform: translate(-3px, 3px); }
40% { transform: translate(-3px, -3px); }
60% { transform: translate(3px, 3px); }
80% { transform: translate(3px, -3px); }
100% { transform: translate(0); }
}
/* Loading animation */
.loading-dots::after {
content: '.';
animation: dots 1.5s steps(5, end) infinite;
}
@keyframes dots {
0%, 20% { content: '.'; }
40% { content: '..'; }
60% { content: '...'; }
80%, 100% { content: ''; }
}
</style>
</head>
<body class="bg-cyberdark text-gray-200 grid-lines">
<!-- Language Selector -->
<div class="absolute top-4 right-4 z-50">
<div class="relative group">
<button id="languageBtn" class="bg-cybergray hover:bg-cyberpurple text-cyberblue px-4 py-2 rounded-lg flex items-center space-x-2 transition-all duration-300 cyber-border">
<i class="fas fa-globe"></i>
<span id="currentLang">English</span>
<i class="fas fa-chevron-down text-xs"></i>
</button>
<div id="languageDropdown" class="hidden group-hover:block absolute right-0 mt-2 w-48 bg-cyberdarker rounded-lg shadow-lg z-50 cyber-border">
<div class="py-1">
<a href="#" class="block px-4 py-2 text-sm hover:bg-cybergray hover:text-cyberpink transition-colors lang-option" data-lang="en">English</a>
<a href="#" class="block px-4 py-2 text-sm hover:bg-cybergray hover:text-cyberpink transition-colors lang-option" data-lang="he">עברית (Hebrew)</a>
<a href="#" class="block px-4 py-2 text-sm hover:bg-cybergray hover:text-cyberpink transition-colors lang-option" data-lang="es">Español (Spanish)</a>
<a href="#" class="block px-4 py-2 text-sm hover:bg-cybergray hover:text-cyberpink transition-colors lang-option" data-lang="fr">Français (French)</a>
<a href="#" class="block px-4 py-2 text-sm hover:bg-cybergray hover:text-cyberpink transition-colors lang-option" data-lang="de">Deutsch (German)</a>
<a href="#" class="block px-4 py-2 text-sm hover:bg-cybergray hover:text-cyberpink transition-colors lang-option" data-lang="ja">日本語 (Japanese)</a>
</div>
</div>
</div>
</div>
<!-- Main Container -->
<div class="container mx-auto px-4 py-8 max-w-6xl">
<!-- Header -->
<header class="text-center mb-12">
<h1 class="text-5xl font-bold mb-4 neon-text glitch" data-text="NeonFlow AI">NeonFlow AI</h1>
<p class="text-xl text-cyberblue" id="header-subtitle">Automate your workflow with cybernetic intelligence</p>
</header>
<!-- Main Content -->
<div class="grid grid-cols-1 lg:grid-cols-4 gap-6">
<!-- Sidebar -->
<div class="lg:col-span-1 bg-cyberdarker rounded-xl p-6 cyber-border h-fit">
<h2 class="text-2xl font-bold mb-6 text-cyberpink flex items-center">
<i class="fas fa-project-diagram mr-2"></i>
<span id="workflows-title">Workflows</span>
</h2>
<div class="mb-6">
<button id="newWorkflowBtn" class="w-full bg-cyberpurple hover:bg-cyberpink text-white py-2 px-4 rounded-lg flex items-center justify-center transition-colors mb-4">
<i class="fas fa-plus mr-2"></i>
<span id="new-workflow-text">New Workflow</span>
</button>
<div class="relative">
<input type="text" id="searchWorkflow" placeholder="Search workflows..." class="w-full bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none" id="search-placeholder">
<i class="fas fa-search absolute right-3 top-3 text-cyberblue"></i>
</div>
</div>
<div class="space-y-2 max-h-96 overflow-y-auto" id="workflowList">
<!-- Workflow items will be added here dynamically -->
<div class="workflow-item bg-cybergray hover:bg-cyberpurple/30 p-3 rounded-lg cursor-pointer transition-colors cyber-border flex justify-between items-center" data-id="1">
<div>
<h3 class="font-medium">Content Generator</h3>
<p class="text-xs text-cyberblue">Last run: 2 hours ago</p>
</div>
<i class="fas fa-play text-cyberpink hover:text-cyberblue cursor-pointer"></i>
</div>
<div class="workflow-item bg-cybergray hover:bg-cyberpurple/30 p-3 rounded-lg cursor-pointer transition-colors cyber-border flex justify-between items-center" data-id="2">
<div>
<h3 class="font-medium">Data Analyzer</h3>
<p class="text-xs text-cyberblue">Last run: 1 day ago</p>
</div>
<i class="fas fa-play text-cyberpink hover:text-cyberblue cursor-pointer"></i>
</div>
<div class="workflow-item bg-cybergray hover:bg-cyberpurple/30 p-3 rounded-lg cursor-pointer transition-colors cyber-border flex justify-between items-center" data-id="3">
<div>
<h3 class="font-medium">Image Processor</h3>
<p class="text-xs text-cyberblue">Last run: 3 days ago</p>
</div>
<i class="fas fa-play text-cyberpink hover:text-cyberblue cursor-pointer"></i>
</div>
</div>
</div>
<!-- Main Work Area -->
<div class="lg:col-span-3 space-y-6">
<!-- Workflow Builder -->
<div class="bg-cyberdarker rounded-xl p-6 cyber-border">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold text-cyberpink flex items-center">
<i class="fas fa-cogs mr-2"></i>
<span id="workflow-builder-title">Workflow Builder</span>
</h2>
<div class="flex space-x-2">
<button id="saveWorkflowBtn" class="bg-cyberblue hover:bg-cyan-400 text-cyberdarker py-1 px-4 rounded-lg transition-colors">
<i class="fas fa-save mr-1"></i>
<span id="save-text">Save</span>
</button>
<button id="runWorkflowBtn" class="bg-cyberpink hover:bg-pink-400 text-white py-1 px-4 rounded-lg transition-colors">
<i class="fas fa-play mr-1"></i>
<span id="run-text">Run</span>
</button>
</div>
</div>
<div class="mb-6">
<label for="workflowName" class="block text-sm font-medium text-cyberblue mb-1" id="workflow-name-label">Workflow Name</label>
<input type="text" id="workflowName" class="w-full bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none" placeholder="Enter workflow name">
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-cyberblue mb-1" id="workflow-description-label">Description</label>
<textarea id="workflowDescription" class="w-full bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none h-20" placeholder="Describe your workflow"></textarea>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-cyberblue mb-1" id="trigger-label">Trigger</label>
<div class="flex space-x-2">
<select id="triggerType" class="flex-1 bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none">
<option value="manual" id="trigger-manual">Manual</option>
<option value="schedule" id="trigger-schedule">Scheduled</option>
<option value="webhook" id="trigger-webhook">Webhook</option>
<option value="api" id="trigger-api">API Call</option>
</select>
<button id="configureTriggerBtn" class="bg-cyberpurple hover:bg-purple-600 text-white py-1 px-4 rounded-lg transition-colors">
<i class="fas fa-cog mr-1"></i>
<span id="configure-text">Configure</span>
</button>
</div>
</div>
<div>
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-medium text-cyberpink" id="steps-title">Steps</h3>
<button id="addStepBtn" class="bg-cyberblue hover:bg-cyan-400 text-cyberdarker py-1 px-3 rounded-lg text-sm transition-colors">
<i class="fas fa-plus mr-1"></i>
<span id="add-step-text">Add Step</span>
</button>
</div>
<div id="workflowSteps" class="space-y-4">
<!-- Steps will be added here dynamically -->
<div class="step-item bg-cybergray p-4 rounded-lg cyber-border" data-step="1">
<div class="flex justify-between items-start mb-2">
<div class="flex items-center">
<span class="bg-cyberpurple text-white rounded-full w-6 h-6 flex items-center justify-center text-sm mr-2">1</span>
<select class="bg-cyberdarker text-white px-3 py-1 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none text-sm">
<option value="llm" id="step-llm">AI Text Generation</option>
<option value="data" id="step-data">Data Processing</option>
<option value="image" id="step-image">Image Generation</option>
<option value="api" id="step-api">API Call</option>
</select>
</div>
<div class="flex space-x-2">
<button class="step-config-btn text-cyberblue hover:text-cyan-300">
<i class="fas fa-cog"></i>
</button>
<button class="step-delete-btn text-cyberpink hover:text-pink-300">
<i class="fas fa-trash"></i>
</button>
</div>
</div>
<div class="ml-8">
<input type="text" class="w-full bg-cyberdarker text-white px-3 py-1 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none text-sm mb-2" placeholder="Step description">
<div class="flex justify-end">
<button class="test-step-btn bg-cybergray hover:bg-cyberpurple/30 text-cyberblue text-xs py-1 px-2 rounded transition-colors">
<i class="fas fa-vial mr-1"></i>
<span id="test-step-text">Test</span>
</button>
</div>
</div>
</div>
<div class="step-item bg-cybergray p-4 rounded-lg cyber-border" data-step="2">
<div class="flex justify-between items-start mb-2">
<div class="flex items-center">
<span class="bg-cyberpurple text-white rounded-full w-6 h-6 flex items-center justify-center text-sm mr-2">2</span>
<select class="bg-cyberdarker text-white px-3 py-1 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none text-sm">
<option value="data" selected id="step-data2">Data Processing</option>
<option value="llm" id="step-llm2">AI Text Generation</option>
<option value="image" id="step-image2">Image Generation</option>
<option value="api" id="step-api2">API Call</option>
</select>
</div>
<div class="flex space-x-2">
<button class="step-config-btn text-cyberblue hover:text-cyan-300">
<i class="fas fa-cog"></i>
</button>
<button class="step-delete-btn text-cyberpink hover:text-pink-300">
<i class="fas fa-trash"></i>
</button>
</div>
</div>
<div class="ml-8">
<input type="text" class="w-full bg-cyberdarker text-white px-3 py-1 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none text-sm mb-2" placeholder="Step description">
<div class="flex justify-end">
<button class="test-step-btn bg-cybergray hover:bg-cyberpurple/30 text-cyberblue text-xs py-1 px-2 rounded transition-colors">
<i class="fas fa-vial mr-1"></i>
<span id="test-step-text2">Test</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Output Panel -->
<div class="bg-cyberdarker rounded-xl p-6 cyber-border">
<div class="flex justify-between items-center mb-4">
<h2 class="text-2xl font-bold text-cyberpink flex items-center">
<i class="fas fa-terminal mr-2"></i>
<span id="output-title">Output</span>
</h2>
<div class="flex space-x-2">
<button id="clearOutputBtn" class="bg-cybergray hover:bg-cyberpurple/30 text-cyberblue py-1 px-3 rounded-lg text-sm transition-colors">
<i class="fas fa-broom mr-1"></i>
<span id="clear-text">Clear</span>
</button>
<button id="copyOutputBtn" class="bg-cybergray hover:bg-cyberpurple/30 text-cyberblue py-1 px-3 rounded-lg text-sm transition-colors">
<i class="fas fa-copy mr-1"></i>
<span id="copy-text">Copy</span>
</button>
</div>
</div>
<div id="outputContent" class="terminal p-4 rounded-lg h-64 overflow-y-auto font-mono text-sm">
<div class="text-cyberblue">> Welcome to NeonFlow AI Workflow System</div>
<div class="text-cyberpink">> System initialized at <span id="current-time"></span></div>
<div class="text-cyberblue">> Ready to execute workflows</div>
<div class="my-2 border-t border-cyberpurple/30"></div>
<div id="dynamicOutput"></div>
</div>
<div class="mt-4 flex items-center">
<div class="flex-1 relative">
<input type="text" id="promptInput" class="w-full bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none" placeholder="Enter custom prompt..." id="prompt-placeholder">
<button id="sendPromptBtn" class="absolute right-2 top-2 text-cyberblue hover:text-cyan-300">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal for New Workflow -->
<div id="newWorkflowModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 hidden">
<div class="bg-cyberdarker rounded-xl p-6 w-full max-w-md cyber-border">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold text-cyberpink" id="new-workflow-modal-title">New Workflow</h3>
<button id="closeNewWorkflowModal" class="text-gray-400 hover:text-cyberpink">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-4">
<label for="newWorkflowName" class="block text-sm font-medium text-cyberblue mb-1" id="new-workflow-name-label">Name</label>
<input type="text" id="newWorkflowName" class="w-full bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none" placeholder="Workflow name">
</div>
<div class="mb-4">
<label for="newWorkflowTemplate" class="block text-sm font-medium text-cyberblue mb-1" id="template-label">Template</label>
<select id="newWorkflowTemplate" class="w-full bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none">
<option value="blank" id="template-blank">Blank Workflow</option>
<option value="content" id="template-content">Content Generator</option>
<option value="data" id="template-data">Data Processor</option>
<option value="social" id="template-social">Social Media Automator</option>
</select>
</div>
<div class="flex justify-end space-x-3 mt-6">
<button id="cancelNewWorkflowBtn" class="bg-cybergray hover:bg-cyberpurple/30 text-white py-2 px-6 rounded-lg transition-colors">
<span id="cancel-text">Cancel</span>
</button>
<button id="confirmNewWorkflowBtn" class="bg-cyberpink hover:bg-pink-600 text-white py-2 px-6 rounded-lg transition-colors">
<span id="create-text">Create</span>
</button>
</div>
</div>
</div>
<!-- Modal for Step Configuration -->
<div id="stepConfigModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 hidden">
<div class="bg-cyberdarker rounded-xl p-6 w-full max-w-2xl cyber-border">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold text-cyberpink" id="step-config-title">Step Configuration</h3>
<button id="closeStepConfigModal" class="text-gray-400 hover:text-cyberpink">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-4">
<label class="block text-sm font-medium text-cyberblue mb-1" id="step-type-label">Step Type</label>
<div class="bg-cybergray p-3 rounded-lg">
<span id="currentStepType" class="font-medium">AI Text Generation</span>
</div>
</div>
<div id="stepConfigContent">
<!-- Dynamic content based on step type -->
<div class="mb-4">
<label for="stepPrompt" class="block text-sm font-medium text-cyberblue mb-1" id="prompt-label">Prompt</label>
<textarea id="stepPrompt" class="w-full bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none h-32" placeholder="Enter your AI prompt instructions"></textarea>
</div>
<div class="grid grid-cols-2 gap-4 mb-4">
<div>
<label for="stepModel" class="block text-sm font-medium text-cyberblue mb-1" id="model-label">Model</label>
<select id="stepModel" class="w-full bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none">
<option value="gpt-4">GPT-4</option>
<option value="gpt-3.5" selected>GPT-3.5</option>
<option value="claude">Claude 2</option>
<option value="llama">Llama 2</option>
</select>
</div>
<div>
<label for="stepTemp" class="block text-sm font-medium text-cyberblue mb-1" id="temp-label">Temperature</label>
<input type="range" id="stepTemp" min="0" max="1" step="0.1" value="0.7" class="w-full">
<div class="flex justify-between text-xs text-cyberblue">
<span>Precise</span>
<span>Balanced</span>
<span>Creative</span>
</div>
</div>
</div>
<div class="mb-4">
<label class="block text-sm font-medium text-cyberblue mb-1" id="advanced-label">Advanced Options</label>
<div class="bg-cybergray p-3 rounded-lg">
<div class="flex items-center mb-2">
<input type="checkbox" id="stepJson" class="mr-2">
<label for="stepJson" class="text-sm" id="json-format-label">Force JSON output format</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="stepStream" class="mr-2" checked>
<label for="stepStream" class="text-sm" id="stream-label">Stream response</label>
</div>
</div>
</div>
</div>
<div class="flex justify-end space-x-3 mt-6">
<button id="cancelStepConfigBtn" class="bg-cybergray hover:bg-cyberpurple/30 text-white py-2 px-6 rounded-lg transition-colors">
<span id="cancel-step-text">Cancel</span>
</button>
<button id="saveStepConfigBtn" class="bg-cyberpink hover:bg-pink-600 text-white py-2 px-6 rounded-lg transition-colors">
<span id="save-step-text">Save</span>
</button>
</div>
</div>
</div>
<!-- Modal for Trigger Configuration -->
<div id="triggerConfigModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 hidden">
<div class="bg-cyberdarker rounded-xl p-6 w-full max-w-md cyber-border">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold text-cyberpink" id="trigger-config-title">Trigger Configuration</h3>
<button id="closeTriggerConfigModal" class="text-gray-400 hover:text-cyberpink">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-4">
<label for="triggerTypeSelect" class="block text-sm font-medium text-cyberblue mb-1" id="trigger-type-label">Trigger Type</label>
<select id="triggerTypeSelect" class="w-full bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none">
<option value="manual" id="trigger-type-manual">Manual</option>
<option value="schedule" id="trigger-type-schedule">Scheduled</option>
<option value="webhook" id="trigger-type-webhook">Webhook</option>
<option value="api" id="trigger-type-api">API Call</option>
</select>
</div>
<div id="scheduleConfig" class="mb-4 hidden">
<label class="block text-sm font-medium text-cyberblue mb-1" id="schedule-label">Schedule</label>
<div class="grid grid-cols-2 gap-2">
<select class="bg-cybergray text-white px-3 py-1 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none">
<option value="daily" id="schedule-daily">Daily</option>
<option value="weekly" id="schedule-weekly">Weekly</option>
<option value="monthly" id="schedule-monthly">Monthly</option>
<option value="custom" id="schedule-custom">Custom</option>
</select>
<input type="time" class="bg-cybergray text-white px-3 py-1 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none">
</div>
</div>
<div id="webhookConfig" class="mb-4 hidden">
<label for="webhookUrl" class="block text-sm font-medium text-cyberblue mb-1" id="webhook-url-label">Webhook URL</label>
<input type="text" id="webhookUrl" class="w-full bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none" placeholder="https://example.com/webhook">
<div class="mt-2">
<label for="webhookSecret" class="block text-sm font-medium text-cyberblue mb-1" id="webhook-secret-label">Secret Key</label>
<input type="text" id="webhookSecret" class="w-full bg-cybergray text-white px-4 py-2 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none" placeholder="Optional secret key">
</div>
</div>
<div class="flex justify-end space-x-3 mt-6">
<button id="cancelTriggerConfigBtn" class="bg-cybergray hover:bg-cyberpurple/30 text-white py-2 px-6 rounded-lg transition-colors">
<span id="cancel-trigger-text">Cancel</span>
</button>
<button id="saveTriggerConfigBtn" class="bg-cyberpink hover:bg-pink-600 text-white py-2 px-6 rounded-lg transition-colors">
<span id="save-trigger-text">Save</span>
</button>
</div>
</div>
</div>
<!-- Loading Overlay -->
<div id="loadingOverlay" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 hidden">
<div class="text-center">
<div class="animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-cyberpink mx-auto mb-4"></div>
<h3 class="text-xl font-bold text-cyberblue" id="loading-text">Processing Workflow<span class="loading-dots"></span></h3>
</div>
</div>
<script>
// Language translations
const translations = {
en: {
headerSubtitle: "Automate your workflow with cybernetic intelligence",
workflowsTitle: "Workflows",
newWorkflowText: "New Workflow",
searchPlaceholder: "Search workflows...",
saveText: "Save",
runText: "Run",
workflowBuilderTitle: "Workflow Builder",
workflowNameLabel: "Workflow Name",
workflowDescriptionLabel: "Description",
triggerLabel: "Trigger",
triggerManual: "Manual",
triggerSchedule: "Scheduled",
triggerWebhook: "Webhook",
triggerApi: "API Call",
configureText: "Configure",
stepsTitle: "Steps",
addStepText: "Add Step",
testStepText: "Test",
outputTitle: "Output",
clearText: "Clear",
copyText: "Copy",
promptPlaceholder: "Enter custom prompt...",
newWorkflowModalTitle: "New Workflow",
newWorkflowNameLabel: "Name",
templateLabel: "Template",
templateBlank: "Blank Workflow",
templateContent: "Content Generator",
templateData: "Data Processor",
templateSocial: "Social Media Automator",
cancelText: "Cancel",
createText: "Create",
stepConfigTitle: "Step Configuration",
stepTypeLabel: "Step Type",
promptLabel: "Prompt",
modelLabel: "Model",
tempLabel: "Temperature",
advancedLabel: "Advanced Options",
jsonFormatLabel: "Force JSON output format",
streamLabel: "Stream response",
cancelStepText: "Cancel",
saveStepText: "Save",
triggerConfigTitle: "Trigger Configuration",
triggerTypeLabel: "Trigger Type",
triggerTypeManual: "Manual",
triggerTypeSchedule: "Scheduled",
triggerTypeWebhook: "Webhook",
triggerTypeApi: "API Call",
scheduleLabel: "Schedule",
scheduleDaily: "Daily",
scheduleWeekly: "Weekly",
scheduleMonthly: "Monthly",
scheduleCustom: "Custom",
webhookUrlLabel: "Webhook URL",
webhookSecretLabel: "Secret Key",
cancelTriggerText: "Cancel",
saveTriggerText: "Save",
loadingText: "Processing Workflow"
},
he: {
headerSubtitle: "הפעל את זרימת העבודה שלך עם אינטליגנציה סייברנטית",
workflowsTitle: "זרימות עבודה",
newWorkflowText: "זרימה חדשה",
searchPlaceholder: "חפש זרימות עבודה...",
saveText: "שמור",
runText: "הפעל",
workflowBuilderTitle: "בונה זרימות עבודה",
workflowNameLabel: "שם זרימת העבודה",
workflowDescriptionLabel: "תיאור",
triggerLabel: "טריגר",
triggerManual: "ידני",
triggerSchedule: "מתוזמן",
triggerWebhook: "Webhook",
triggerApi: "קריאת API",
configureText: "הגדר",
stepsTitle: "שלבים",
addStepText: "הוסף שלב",
testStepText: "בדוק",
outputTitle: "פלט",
clearText: "נקה",
copyText: "העתק",
promptPlaceholder: "הזן פקודה מותאמת...",
newWorkflowModalTitle: "זרימת עבודה חדשה",
newWorkflowNameLabel: "שם",
templateLabel: "תבנית",
templateBlank: "זרימה ריקה",
templateContent: "מחולל תוכן",
templateData: "מעבד נתונים",
templateSocial: "אוטומציה למדיה חברתית",
cancelText: "ביטול",
createText: "צור",
stepConfigTitle: "הגדרת שלב",
stepTypeLabel: "סוג שלב",
promptLabel: "פקודה",
modelLabel: "מודל",
tempLabel: "טמפרטורה",
advancedLabel: "אפשרויות מתקדמות",
jsonFormatLabel: "הכרח פלט בפורמט JSON",
streamLabel: "תגובה בזרם",
cancelStepText: "ביטול",
saveStepText: "שמור",
triggerConfigTitle: "הגדרת טריגר",
triggerTypeLabel: "סוג טריגר",
triggerTypeManual: "ידני",
triggerTypeSchedule: "מתוזמן",
triggerTypeWebhook: "Webhook",
triggerTypeApi: "קריאת API",
scheduleLabel: "תזמון",
scheduleDaily: "יומי",
scheduleWeekly: "שבועי",
scheduleMonthly: "חודשי",
scheduleCustom: "מותאם",
webhookUrlLabel: "כתובת Webhook",
webhookSecretLabel: "מפתח סודי",
cancelTriggerText: "ביטול",
saveTriggerText: "שמור",
loadingText: "מעבד זרימת עבודה"
},
es: {
headerSubtitle: "Automatiza tu flujo de trabajo con inteligencia cibernética",
workflowsTitle: "Flujos de trabajo",
newWorkflowText: "Nuevo flujo",
searchPlaceholder: "Buscar flujos...",
saveText: "Guardar",
runText: "Ejecutar",
workflowBuilderTitle: "Constructor de flujos",
workflowNameLabel: "Nombre del flujo",
workflowDescriptionLabel: "Descripción",
triggerLabel: "Disparador",
triggerManual: "Manual",
triggerSchedule: "Programado",
triggerWebhook: "Webhook",
triggerApi: "Llamada API",
configureText: "Configurar",
stepsTitle: "Pasos",
addStepText: "Añadir paso",
testStepText: "Probar",
outputTitle: "Salida",
clearText: "Limpiar",
copyText: "Copiar",
promptPlaceholder: "Ingrese comando personalizado...",
newWorkflowModalTitle: "Nuevo flujo de trabajo",
newWorkflowNameLabel: "Nombre",
templateLabel: "Plantilla",
templateBlank: "Flujo vacío",
templateContent: "Generador de contenido",
templateData: "Procesador de datos",
templateSocial: "Automatizador de redes",
cancelText: "Cancelar",
createText: "Crear",
stepConfigTitle: "Configuración de paso",
stepTypeLabel: "Tipo de paso",
promptLabel: "Comando",
modelLabel: "Modelo",
tempLabel: "Temperatura",
advancedLabel: "Opciones avanzadas",
jsonFormatLabel: "Forzar salida JSON",
streamLabel: "Respuesta en flujo",
cancelStepText: "Cancelar",
saveStepText: "Guardar",
triggerConfigTitle: "Configuración de disparador",
triggerTypeLabel: "Tipo de disparador",
triggerTypeManual: "Manual",
triggerTypeSchedule: "Programado",
triggerTypeWebhook: "Webhook",
triggerTypeApi: "Llamada API",
scheduleLabel: "Programación",
scheduleDaily: "Diario",
scheduleWeekly: "Semanal",
scheduleMonthly: "Mensual",
scheduleCustom: "Personalizado",
webhookUrlLabel: "URL de Webhook",
webhookSecretLabel: "Clave secreta",
cancelTriggerText: "Cancelar",
saveTriggerText: "Guardar",
loadingText: "Procesando flujo"
},
fr: {
headerSubtitle: "Automatisez votre flux de travail avec une intelligence cybernétique",
workflowsTitle: "Flux de travail",
newWorkflowText: "Nouveau flux",
searchPlaceholder: "Rechercher des flux...",
saveText: "Enregistrer",
runText: "Exécuter",
workflowBuilderTitle: "Constructeur de flux",
workflowNameLabel: "Nom du flux",
workflowDescriptionLabel: "Description",
triggerLabel: "Déclencheur",
triggerManual: "Manuel",
triggerSchedule: "Planifié",
triggerWebhook: "Webhook",
triggerApi: "Appel API",
configureText: "Configurer",
stepsTitle: "Étapes",
addStepText: "Ajouter une étape",
testStepText: "Tester",
outputTitle: "Sortie",
clearText: "Effacer",
copyText: "Copier",
promptPlaceholder: "Entrez une commande personnalisée...",
newWorkflowModalTitle: "Nouveau flux de travail",
newWorkflowNameLabel: "Nom",
templateLabel: "Modèle",
templateBlank: "Flux vide",
templateContent: "Générateur de contenu",
templateData: "Processeur de données",
templateSocial: "Automatisation des réseaux",
cancelText: "Annuler",
createText: "Créer",
stepConfigTitle: "Configuration d'étape",
stepTypeLabel: "Type d'étape",
promptLabel: "Commande",
modelLabel: "Modèle",
tempLabel: "Température",
advancedLabel: "Options avancées",
jsonFormatLabel: "Forcer la sortie JSON",
streamLabel: "Réponse en flux",
cancelStepText: "Annuler",
saveStepText: "Enregistrer",
triggerConfigTitle: "Configuration du déclencheur",
triggerTypeLabel: "Type de déclencheur",
triggerTypeManual: "Manuel",
triggerTypeSchedule: "Planifié",
triggerTypeWebhook: "Webhook",
triggerTypeApi: "Appel API",
scheduleLabel: "Planification",
scheduleDaily: "Quotidien",
scheduleWeekly: "Hebdomadaire",
scheduleMonthly: "Mensuel",
scheduleCustom: "Personnalisé",
webhookUrlLabel: "URL Webhook",
webhookSecretLabel: "Clé secrète",
cancelTriggerText: "Annuler",
saveTriggerText: "Enregistrer",
loadingText: "Traitement du flux"
},
de: {
headerSubtitle: "Automatisieren Sie Ihren Workflow mit kybernetischer Intelligenz",
workflowsTitle: "Workflows",
newWorkflowText: "Neuer Workflow",
searchPlaceholder: "Workflows suchen...",
saveText: "Speichern",
runText: "Ausführen",
workflowBuilderTitle: "Workflow-Builder",
workflowNameLabel: "Workflow-Name",
workflowDescriptionLabel: "Beschreibung",
triggerLabel: "Auslöser",
triggerManual: "Manuell",
triggerSchedule: "Geplant",
triggerWebhook: "Webhook",
triggerApi: "API-Aufruf",
configureText: "Konfigurieren",
stepsTitle: "Schritte",
addStepText: "Schritt hinzufügen",
testStepText: "Testen",
outputTitle: "Ausgabe",
clearText: "Löschen",
copyText: "Kopieren",
promptPlaceholder: "Benutzerdefinierte Eingabe...",
newWorkflowModalTitle: "Neuer Workflow",
newWorkflowNameLabel: "Name",
templateLabel: "Vorlage",
templateBlank: "Leerer Workflow",
templateContent: "Inhaltsgenerator",
templateData: "Datenprozessor",
templateSocial: "Social-Media-Automatisierung",
cancelText: "Abbrechen",
createText: "Erstellen",
stepConfigTitle: "Schrittkonfiguration",
stepTypeLabel: "Schritttyp",
promptLabel: "Eingabe",
modelLabel: "Modell",
tempLabel: "Temperatur",
advancedLabel: "Erweiterte Optionen",
jsonFormatLabel: "JSON-Ausgabe erzwingen",
streamLabel: "Stream-Antwort",
cancelStepText: "Abbrechen",
saveStepText: "Speichern",
triggerConfigTitle: "Auslöserkonfiguration",
triggerTypeLabel: "Auslösertyp",
triggerTypeManual: "Manuell",
triggerTypeSchedule: "Geplant",
triggerTypeWebhook: "Webhook",
triggerTypeApi: "API-Aufruf",
scheduleLabel: "Zeitplan",
scheduleDaily: "Täglich",
scheduleWeekly: "Wöchentlich",
scheduleMonthly: "Monatlich",
scheduleCustom: "Benutzerdefiniert",
webhookUrlLabel: "Webhook-URL",
webhookSecretLabel: "Geheimer Schlüssel",
cancelTriggerText: "Abbrechen",
saveTriggerText: "Speichern",
loadingText: "Workflow wird verarbeitet"
},
ja: {
headerSubtitle: "サイバネティックインテリジェンスでワークフローを自動化",
workflowsTitle: "ワークフロー",
newWorkflowText: "新規ワークフロー",
searchPlaceholder: "ワークフローを検索...",
saveText: "保存",
runText: "実行",
workflowBuilderTitle: "ワークフロービルダー",
workflowNameLabel: "ワークフロー名",
workflowDescriptionLabel: "説明",
triggerLabel: "トリガー",
triggerManual: "手動",
triggerSchedule: "スケジュール",
triggerWebhook: "Webhook",
triggerApi: "API呼び出し",
configureText: "設定",
stepsTitle: "ステップ",
addStepText: "ステップ追加",
testStepText: "テスト",
outputTitle: "出力",
clearText: "クリア",
copyText: "コピー",
promptPlaceholder: "カスタムコマンドを入力...",
newWorkflowModalTitle: "新規ワークフロー",
newWorkflowNameLabel: "名前",
templateLabel: "テンプレート",
templateBlank: "空のワークフロー",
templateContent: "コンテンツ生成",
templateData: "データ処理",
templateSocial: "SNS自動化",
cancelText: "キャンセル",
createText: "作成",
stepConfigTitle: "ステップ設定",
stepTypeLabel: "ステップタイプ",
promptLabel: "プロンプト",
modelLabel: "モデル",
tempLabel: "温度",
advancedLabel: "詳細設定",
jsonFormatLabel: "JSON出力を強制",
streamLabel: "ストリーム応答",
cancelStepText: "キャンセル",
saveStepText: "保存",
triggerConfigTitle: "トリガー設定",
triggerTypeLabel: "トリガータイプ",
triggerTypeManual: "手動",
triggerTypeSchedule: "スケジュール",
triggerTypeWebhook: "Webhook",
triggerTypeApi: "API呼び出し",
scheduleLabel: "スケジュール",
scheduleDaily: "毎日",
scheduleWeekly: "毎週",
scheduleMonthly: "毎月",
scheduleCustom: "カスタム",
webhookUrlLabel: "Webhook URL",
webhookSecretLabel: "秘密鍵",
cancelTriggerText: "キャンセル",
saveTriggerText: "保存",
loadingText: "ワークフロー処理中"
}
};
// Current language
let currentLang = 'en';
// Set current time
function updateCurrentTime() {
const now = new Date();
document.getElementById('current-time').textContent = now.toLocaleString();
}
setInterval(updateCurrentTime, 1000);
updateCurrentTime();
// Apply translation
function applyTranslation(lang) {
currentLang = lang;
const langData = translations[lang];
// Update all elements with translations
for (const [key, value] of Object.entries(langData)) {
const elements = document.querySelectorAll(`[id="${key}"]`);
elements.forEach(el => {
if (el.tagName === 'INPUT' || el.tagName === 'TEXTAREA') {
el.placeholder = value;
} else {
el.textContent = value;
}
});
}
// Update current language display
document.getElementById('currentLang').textContent =
lang === 'he' ? 'עברית' :
lang === 'es' ? 'Español' :
lang === 'fr' ? 'Français' :
lang === 'de' ? 'Deutsch' :
lang === 'ja' ? '日本語' : 'English';
// Set RTL for Hebrew
document.body.classList.toggle('rtl', lang === 'he');
}
// Initialize with English
applyTranslation('en');
// Language selector
document.querySelectorAll('.lang-option').forEach(option => {
option.addEventListener('click', (e) => {
e.preventDefault();
const lang = option.getAttribute('data-lang');
applyTranslation(lang);
});
});
// Modal controls
const newWorkflowModal = document.getElementById('newWorkflowModal');
const stepConfigModal = document.getElementById('stepConfigModal');
const triggerConfigModal = document.getElementById('triggerConfigModal');
const loadingOverlay = document.getElementById('loadingOverlay');
// New workflow modal
document.getElementById('newWorkflowBtn').addEventListener('click', () => {
newWorkflowModal.classList.remove('hidden');
});
document.getElementById('closeNewWorkflowModal').addEventListener('click', () => {
newWorkflowModal.classList.add('hidden');
});
document.getElementById('cancelNewWorkflowBtn').addEventListener('click', () => {
newWorkflowModal.classList.add('hidden');
});
document.getElementById('confirmNewWorkflowBtn').addEventListener('click', () => {
const name = document.getElementById('newWorkflowName').value.trim();
const template = document.getElementById('newWorkflowTemplate').value;
if (name) {
// Add new workflow to the list
const workflowList = document.getElementById('workflowList');
const newId = Date.now();
const workflowItem = document.createElement('div');
workflowItem.className = 'workflow-item bg-cybergray hover:bg-cyberpurple/30 p-3 rounded-lg cursor-pointer transition-colors cyber-border flex justify-between items-center';
workflowItem.setAttribute('data-id', newId);
workflowItem.innerHTML = `
<div>
<h3 class="font-medium">${name}</h3>
<p class="text-xs text-cyberblue">${currentLang === 'he' ? 'נוצר עכשיו' : 'Just created'}</p>
</div>
<i class="fas fa-play text-cyberpink hover:text-cyberblue cursor-pointer"></i>
`;
workflowList.prepend(workflowItem);
newWorkflowModal.classList.add('hidden');
document.getElementById('newWorkflowName').value = '';
// Simulate selecting the new workflow
workflowItem.click();
}
});
// Step configuration modal
let currentStep = null;
document.querySelectorAll('.step-config-btn').forEach(btn => {
btn.addEventListener('click', () => {
const stepItem = btn.closest('.step-item');
currentStep = stepItem;
stepConfigModal.classList.remove('hidden');
});
});
document.getElementById('closeStepConfigModal').addEventListener('click', () => {
stepConfigModal.classList.add('hidden');
});
document.getElementById('cancelStepConfigBtn').addEventListener('click', () => {
stepConfigModal.classList.add('hidden');
});
document.getElementById('saveStepConfigBtn').addEventListener('click', () => {
// Here you would save the step configuration
stepConfigModal.classList.add('hidden');
});
// Add new step
document.getElementById('addStepBtn').addEventListener('click', () => {
const workflowSteps = document.getElementById('workflowSteps');
const stepCount = workflowSteps.querySelectorAll('.step-item').length + 1;
const stepItem = document.createElement('div');
stepItem.className = 'step-item bg-cybergray p-4 rounded-lg cyber-border';
stepItem.setAttribute('data-step', stepCount);
stepItem.innerHTML = `
<div class="flex justify-between items-start mb-2">
<div class="flex items-center">
<span class="bg-cyberpurple text-white rounded-full w-6 h-6 flex items-center justify-center text-sm mr-2">${stepCount}</span>
<select class="bg-cyberdarker text-white px-3 py-1 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none text-sm">
<option value="llm">${currentLang === 'he' ? 'יצירת טקסט AI' : 'AI Text Generation'}</option>
<option value="data">${currentLang === 'he' ? 'עיבוד נתונים' : 'Data Processing'}</option>
<option value="image">${currentLang === 'he' ? 'יצירת תמונה' : 'Image Generation'}</option>
<option value="api">${currentLang === 'he' ? 'קריאת API' : 'API Call'}</option>
</select>
</div>
<div class="flex space-x-2">
<button class="step-config-btn text-cyberblue hover:text-cyan-300">
<i class="fas fa-cog"></i>
</button>
<button class="step-delete-btn text-cyberpink hover:text-pink-300">
<i class="fas fa-trash"></i>
</button>
</div>
</div>
<div class="ml-8">
<input type="text" class="w-full bg-cyberdarker text-white px-3 py-1 rounded-lg border border-cyberpurple focus:border-cyberpink focus:outline-none text-sm mb-2" placeholder="${currentLang === 'he' ? 'תיאור שלב' : 'Step description'}">
<div class="flex justify-end">
<button class="test-step-btn bg-cybergray hover:bg-cyberpurple/30 text-cyberblue text-xs py-1 px-2 rounded transition-colors">
<i class="fas fa-vial mr-1"></i>
<span>${currentLang === 'he' ? 'בדיקה' : 'Test'}</span>
</button>
</div>
</div>
`;
workflowSteps.appendChild(stepItem);
// Add event listeners to new buttons
stepItem.querySelector('.step-config-btn').addEventListener('click', () => {
currentStep = stepItem;
stepConfigModal.classList.remove('hidden');
});
stepItem.querySelector('.step-delete-btn').addEventListener('click', () => {
if (confirm(currentLang === 'he' ? 'האם אתה בטוח שברצונך למחוק שלב זה?' : 'Are you sure you want to delete this step?')) {
stepItem.remove();
// Renumber remaining steps
const steps = workflowSteps.querySelectorAll('.step-item');
steps.forEach((step, index) => {
step.setAttribute('data-step', index + 1);
step.querySelector('span').textContent = index + 1;
});
}
});
stepItem.querySelector('.test-step-btn').addEventListener('click', () => {
loadingOverlay.classList.remove('hidden');
setTimeout(() => {
loadingOverlay.classList.add('hidden');
addOutputMessage(currentLang === 'he' ? 'בדיקת שלב הושלמה בהצלחה!' : 'Step test completed successfully!', 'success');
}, 1500);
});
});
// Trigger configuration
document.getElementById('configureTriggerBtn').addEventListener('click', () => {
triggerConfigModal.classList.remove('hidden');
});
document.getElementById('closeTriggerConfigModal').addEventListener('click', () => {
triggerConfigModal.classList.add('hidden');
});
document.getElementById('cancelTriggerConfigBtn').addEventListener('click', () => {
triggerConfigModal.classList.add('hidden');
});
document.getElementById('saveTriggerConfigBtn').addEventListener('click', () => {
const triggerType = document.getElementById('triggerTypeSelect').value;
document.getElementById('triggerType').value = triggerType;
triggerConfigModal.classList.add('hidden');
});
document.getElementById('triggerTypeSelect').addEventListener('change', (e) => {
const type = e.target.value;
document.getElementById('scheduleConfig').classList.add('hidden');
document.getElementById('webhookConfig').classList.add('hidden');
if (type === 'schedule') {
document.getElementById('scheduleConfig').classList.remove('hidden');
} else if (type === 'webhook') {
document.getElementById('webhookConfig').classList.remove('hidden');
}
});
// Run workflow
document.getElementById('runWorkflowBtn').addEventListener('click', () => {
const workflowName = document.getElementById('workflowName').value.trim() || 'Unnamed Workflow';
loadingOverlay.classList.remove('hidden');
// Simulate workflow execution
setTimeout(() => {
loadingOverlay.classList.add('hidden');
// Add output messages
addOutputMessage(`${currentLang === 'he' ? 'הפעלת זרימה:' : 'Running workflow:'} ${workflowName}`, 'info');
addOutputMessage(`${currentLang === 'he' ? 'שלב 1: יצירת תוכן' : 'Step 1: Generating content'}`, 'step');
// Simulate AI response
setTimeout(() => {
const aiResponse = currentLang === 'he' ?
`הנה תוכן שנוצר אוטומטית על ידי המערכת:
כותרת: עתיד הבינה המלאכותית
גוף: הטכנולוגיה מתקדמת בקצב מהיר, ובינה מלאכותית הופכת לחלק בלתי נפרד מחיי היומיום שלנו. מערכות AI משפרות את היעילות, מפשטות תהליכים ופותחות אפשרויות חדשות בכל תחומי החיים.` :
`Here's some automatically generated content:
Title: The Future of AI
Body: Technology is advancing at a rapid pace, and artificial intelligence is becoming an integral part of our daily lives. AI systems are improving efficiency, streamlining processes, and opening new possibilities across all areas of life.`;
addOutputMessage(aiResponse, 'ai');
}, 800);
setTimeout(() => {
addOutputMessage(`${currentLang === 'he' ? 'שלב 2: עיבוד נתונים' : 'Step 2: Processing data'}`, 'step');
}, 1200);
setTimeout(() => {
addOutputMessage(currentLang === 'he' ? 'עיבוד הנתונים הושלם בהצלחה!' : 'Data processing completed successfully!', 'success');
addOutputMessage(`${currentLang === 'he' ? 'זרימת העבודה הושלמה!' : 'Workflow completed!'} 🎉`, 'success');
}, 2000);
}, 1500);
});
// Output panel functions
function addOutputMessage(message, type = 'info') {
const output = document.getElementById('dynamicOutput');
const messageDiv = document.createElement('div');
let classes = 'mb-2';
if (type === 'info') classes += ' text-cyberblue';
if (type === 'success') classes += ' text-green-400';
if (type === 'error') classes += ' text-red-400';
if (type === 'ai') classes += ' text-white';
if (type === 'step') classes += ' text-cyberpink';
messageDiv.className = classes;
messageDiv.textContent = message;
output.appendChild(messageDiv);
output.scrollTop = output.scrollHeight;
}
document.getElementById('clearOutputBtn').addEventListener('click', () => {
document.getElementById('dynamicOutput').innerHTML = '';
});
document.getElementById('copyOutputBtn').addEventListener('click', () => {
const outputText = document.getElementById('dynamicOutput').textContent;
navigator.clipboard.writeText(outputText).then(() => {
const copyBtn = document.getElementById('copyOutputBtn');
const originalText = copyBtn.querySelector('span').textContent;
copyBtn.querySelector('span').textContent = currentLang === 'he' ? 'הועתק!' : 'Copied!';
setTimeout(() => {
copyBtn.querySelector('span').textContent = originalText;
}, 2000);
});
});
document.getElementById('sendPromptBtn').addEventListener('click', () => {
const prompt = document.getElementById('promptInput').value.trim();
if (prompt) {
addOutputMessage(`> ${prompt}`, 'user');
document.getElementById('promptInput').value = '';
// Simulate AI response
loadingOverlay.classList.remove('hidden');
setTimeout(() => {
loadingOverlay.classList.add('hidden');
const responses = {
en: [
"I've analyzed your request and here's what I found...",
"Based on my knowledge, the answer to your question is...",
"Processing complete. Here are the results you requested:"
],
he: [
"ניתחתי את הבקשה שלך והנה מה שמצאתי...",
"לפי הידע שלי, התשובה לשאלתך היא...",
"עיבוד הושלם. הנה התוצאות שביקשת:"
],
es: [
"He analizado tu solicitud y esto es lo que encontré...",
"Según mi conocimiento, la respuesta a tu pregunta es...",
"Procesamiento completo. Aquí están los resultados que solicitaste:"
],
fr: [
"J'ai analysé votre demande et voici ce que j'ai trouvé...",
"D'après mes connaissances, la réponse à votre question est...",
"Traitement terminé. Voici les résultats que vous avez demandés:"
],
de: [
"Ich habe Ihre Anfrage analysiert und hier ist, was ich gefunden habe...",
"Nach meinem Wissen ist die Antwort auf Ihre Frage...",
"Verarbeitung abgeschlossen. Hier sind die Ergebnisse, die Sie angefordert haben:"
],
ja: [
"リクエストを分析しました。結果は以下の通りです...",
"私の知識に基づくと、質問への答えは...",
"処理が完了しました。リクエストされた結果はこちらです:"
]
};
const randomResponse = responses[currentLang][Math.floor(Math.random() * responses[currentLang].length)];
addOutputMessage(randomResponse, 'ai');
}, 1500);
}
});
// Allow Enter key to send prompt
document.getElementById('promptInput').addEventListener('keypress', (e) => {
if (e.key === 'Enter') {
document.getElementById('sendPromptBtn').click();
}
});
// Save workflow
document.getElementById('saveWorkflowBtn').addEventListener('click', () => {
const workflowName = document.getElementById('workflowName').value.trim();
if (workflowName) {
addOutputMessage(`${currentLang === 'he' ? 'זרימה נשמרה:' : 'Workflow saved:'} ${workflowName}`, 'success');
} else {
addOutputMessage(currentLang === 'he' ? 'אנא הזן שם לזרימה לפני השמירה' : 'Please enter a workflow name before saving', 'error');
}
});
// Initialize workflow items
document.querySelectorAll('.workflow-item').forEach(item => {
item.addEventListener('click', () => {
// Remove active class from all items
document.querySelectorAll('.workflow-item').forEach(i => {
i.classList.remove('bg-cyberpurple/30');
});
// Add active class to clicked item
item.classList.add('bg-cyberpurple/30');
// Here you would load the workflow data
const workflowName = item.querySelector('h3').textContent;
document.getElementById('workflowName').value = workflowName;
document.getElementById('workflowDescription').value = `${currentLang === 'he' ? 'תיאור עבור' : 'Description for'} ${workflowName}`;
// Clear and add some default steps
const workflowSteps = document.getElementById('workflowSteps');
workflowSteps.innerHTML = '';
// Add default steps based on workflow
if (workflowName.includes('Content') || workflowName.includes('תוכן')) {
// Content generator workflow
const step1 = createStep(1, 'llm', currentLang === 'he' ? 'יצירת תוכן ראשוני' : 'Initial content generation');
const step2 = createStep(2, 'data', currentLang === 'he' ? 'עיבוד ועריכה' : 'Processing and editing');
workflowSteps.appendChild(step1);
workflowSteps.appendChild(step2);
} else if (workflowName.includes('Data') || workflowName.includes('נתונים')) {
// Data processor workflow
const step1 = createStep(1, 'data', currentLang === 'he' ? 'איסוף נתונים' : 'Data collection');
const step2 = createStep(2, 'data', currentLang === 'he' ? 'ניתוח נתונים' : 'Data analysis');
const step3 = createStep(3, 'llm', currentLang === 'he' ? 'יצירת דוח' : 'Report generation');
workflowSteps.appendChild(step1);
workflowSteps.appendChild(step2);
workflowSteps.appendChild(step3);
} else {
// Default blank workflow
const step1 = createStep(1, 'llm', currentLang === 'he' ? 'שלב ראשון' : 'First step');
workflowSteps.appendChild(step1);
}
// Add output message
addOutputMessage(`${currentLang === 'he' ? 'נטען:' : 'Loaded:'} ${workflowName}`, 'info');
});
// Play button functionality
const playBtn = item.querySelector('.fa-play');
playBtn.addEventListener('click', (e) => {
e.stopPropagation();
item.click();
document.getElementById('runWorkflowBtn').click();
});
});
// Helper function to create step elements
function createStep(number, type, description) {
const stepItem = document.createElement('div');
stepItem.className = 'step-item bg-cybergray p-4 rounded-lg cyber-border';
stepItem.setAttribute('data-step', number);
const typeText = {
en: {
llm: 'AI Text Generation',
data: 'Data Processing',
image: 'Image Generation',
api: 'API Call'
},
he: {
llm: 'יצירת טקסט AI',
data: 'עיבוד נתונים',
image: 'יצירת תמונה',
api: 'קריאת API'
},
es: {
llm: 'Generación de texto AI',
data: 'Procesamiento de datos',
image: 'Generación de imágenes',
api: 'Llamada API'
},
fr: {
llm: 'Génération de texte AI',
data: 'Traitement de données',
image: 'Génération d\'images',
api: 'Appel API'
},
de: {
llm: 'AI-Textgenerierung',
data: 'Datenverarbeitung',
image: 'Bildgenerierung',
api: 'API-Aufruf'
},
ja: {
llm: 'AIテキスト生成',
data: 'データ処理',
image: '画像生成',
api: 'API呼び出し'
}
};
stepItem.innerHTML = `
<div class="flex justify-between items-start mb-2">
<div class="flex items-center">
<span class="
</html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NeonFlow AI - Cyberpunk Workflow</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
cyberpurple: '#8a2be2',
cyberpink: '#ff00ff',
cyberblue: '#00ffff',
cyberdark: '#0f0f1a',
cyberdarker: '#080811',
cybergray: '#1a1a2e',
},
fontFamily: {
'cyber': ['"Rajdhani"', 'sans-serif'],
'hebrew': ['"Taamey Frank CLM"', 'sans-serif'],
},
animation: {
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
'neon-glow': 'neonGlow 2s ease-in-out infinite alternate',
},
keyframes: {
neonGlow: {
'0%, 100%': { 'text-shadow': '0 0 5px #fff, 0 0 10px #fff, 0 0 15px #ff00ff, 0 0 20px #ff00ff' },
'50%': { 'text-shadow': '0 0 5px #fff, 0 0 10px #fff, 0 0 15px #00ffff, 0 0 20px #00ffff' },
}
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Taamey+Frank+CLM:wght@400;500;700&display=swap');
body {
font-family: 'Rajdhani', sans-serif;
background-color: #0f0f1a;
color: #e0e0e0;
overflow-x: hidden;
}
.cyber-border {
border: 1px solid rgba(138, 43, 226, 0.3);
box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}
.cyber-border:hover {
border-color: rgba(255, 0, 255, 0.5);
box-shadow: 0 0 15px rgba(255, 0, 255, 0.7);
}
.neon-text {
animation: neonGlow 2s ease-in-out infinite alternate;
}
.grid-lines {
background-image:
linear-gradient(rgba(138, 43, 226, 0.1) 1px, transparent 1px),
linear-gradient(90deg, rgba(138, 43, 226, 0.1) 1px, transparent 1px);
background-size: 20px 20px;
}
.rtl {
direction: rtl;
}
/* Custom scrollbar */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
background: #8a2be2;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #ff00ff;
}
/* Terminal effect for output */
.terminal {
background-color: rgba(0, 0, 0, 0.7);
border: 1px solid #00ffff;
font-family: 'Courier New', monospace;
position: relative;
}