state-flow-builder / index.html
Mtothexmax's picture
there should not be a seperate move and connect mode and also when having a connection and moving it becomes quite slow
afe3f6e verified
Raw History Blame Contribute Delete
3.52 kB
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>State Flow Builder</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
</head>
<body class="bg-gray-50 h-screen overflow-hidden">
<div id="app" class="flex h-full">
<!-- Sidebar -->
<div class="w-80 bg-white shadow-lg z-10 flex flex-col">
<div class="p-6 border-b bg-gradient-to-r from-blue-600 to-indigo-600">
<h1 class="text-2xl font-bold text-white flex items-center gap-2">
<i data-feather="git-branch" class="w-7 h-7"></i>
State Flow Builder
</h1>
<p class="text-blue-100 text-sm mt-2">Erstelle Zustandsautomaten ganz einfach</p>
</div>
<div class="flex-1 overflow-y-auto p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-4 flex items-center gap-2">
<i data-feather="box" class="w-5 h-5 text-gray-600"></i>
Verfügbare Zustände
</h2>
<div id="stateTemplates" class="space-y-3">
<!-- Templates will be inserted here -->
</div>
</div>
<div class="p-4 border-t bg-gray-50">
<button id="clearCanvas" class="w-full px-4 py-2 bg-red-500 text-white rounded-lg hover:bg-red-600 transition-colors flex items-center justify-center gap-2">
<i data-feather="trash-2" class="w-4 h-4"></i>
Canvas leeren
</button>
</div>
</div>
<!-- Main Canvas Area -->
<div class="flex-1 flex flex-col">
<!-- Toolbar -->
<div class="bg-white shadow-sm border-b px-6 py-3 flex items-center justify-between">
<div class="flex items-center gap-2 text-sm text-gray-500">
<i data-feather="info" class="w-4 h-4"></i>
Ziehe Zustände auf die Canvas und verbinde sie
</div>
</div>
<!-- Canvas -->
<div id="canvas" class="flex-1 relative bg-gray-100 overflow-auto">
<svg id="connectionsSvg" class="absolute inset-0 w-full h-full pointer-events-none" style="z-index: 1;">
<defs>
<marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
<polygon points="0 0, 10 3.5, 0 7" fill="#4F46E5" />
</marker>
</defs>
</svg>
<div id="canvasContent" class="relative w-full h-full" style="min-width: 2000px; min-height: 2000px;">
<!-- States will be inserted here -->
</div>
</div>
</div>
</div>
<!-- Toast Notification Container -->
<div id="toastContainer" class="fixed bottom-4 right-4 z-50 space-y-2"></div>
<script src="script.js"></script>
<script>feather.replace();</script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>