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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>ComfyUI Workflow</title>
|
| 7 |
+
<style>
|
| 8 |
+
* {
|
| 9 |
+
margin: 0;
|
| 10 |
+
padding: 0;
|
| 11 |
+
box-sizing: border-box;
|
| 12 |
+
}
|
| 13 |
+
body {
|
| 14 |
+
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
|
| 15 |
+
background-color: #000000;
|
| 16 |
+
color: #f5f5f7;
|
| 17 |
+
line-height: 1.6;
|
| 18 |
+
padding: 20px;
|
| 19 |
+
min-height: 100vh;
|
| 20 |
+
}
|
| 21 |
+
.container {
|
| 22 |
+
max-width: 1200px;
|
| 23 |
+
margin: 0 auto;
|
| 24 |
+
}
|
| 25 |
+
.header {
|
| 26 |
+
text-align: center;
|
| 27 |
+
margin-bottom: 40px;
|
| 28 |
+
padding: 40px 20px;
|
| 29 |
+
}
|
| 30 |
+
.header h1 {
|
| 31 |
+
font-size: 48px;
|
| 32 |
+
font-weight: 600;
|
| 33 |
+
color: #ffffff;
|
| 34 |
+
margin-bottom: 12px;
|
| 35 |
+
letter-spacing: -0.02em;
|
| 36 |
+
}
|
| 37 |
+
.header p {
|
| 38 |
+
font-size: 18px;
|
| 39 |
+
color: #86868b;
|
| 40 |
+
font-weight: 400;
|
| 41 |
+
}
|
| 42 |
+
.controls {
|
| 43 |
+
display: flex;
|
| 44 |
+
gap: 12px;
|
| 45 |
+
margin-bottom: 24px;
|
| 46 |
+
justify-content: center;
|
| 47 |
+
}
|
| 48 |
+
.btn {
|
| 49 |
+
padding: 12px 24px;
|
| 50 |
+
border: none;
|
| 51 |
+
border-radius: 24px;
|
| 52 |
+
font-size: 14px;
|
| 53 |
+
font-weight: 500;
|
| 54 |
+
cursor: pointer;
|
| 55 |
+
transition: all 0.2s;
|
| 56 |
+
font-family: inherit;
|
| 57 |
+
}
|
| 58 |
+
.btn-primary {
|
| 59 |
+
background: #ffffff;
|
| 60 |
+
color: #000000;
|
| 61 |
+
}
|
| 62 |
+
.btn-primary:hover {
|
| 63 |
+
background: #f5f5f7;
|
| 64 |
+
transform: scale(0.98);
|
| 65 |
+
}
|
| 66 |
+
.btn-secondary {
|
| 67 |
+
background: #1d1d1f;
|
| 68 |
+
color: #f5f5f7;
|
| 69 |
+
border: 1px solid #424245;
|
| 70 |
+
}
|
| 71 |
+
.btn-secondary:hover {
|
| 72 |
+
background: #2d2d2f;
|
| 73 |
+
transform: scale(0.98);
|
| 74 |
+
}
|
| 75 |
+
.json-container {
|
| 76 |
+
background-color: #1d1d1f;
|
| 77 |
+
border-radius: 16px;
|
| 78 |
+
padding: 32px;
|
| 79 |
+
overflow-x: auto;
|
| 80 |
+
border: 1px solid #424245;
|
| 81 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
| 82 |
+
}
|
| 83 |
+
pre {
|
| 84 |
+
margin: 0;
|
| 85 |
+
font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
|
| 86 |
+
font-size: 13px;
|
| 87 |
+
line-height: 1.6;
|
| 88 |
+
white-space: pre-wrap;
|
| 89 |
+
word-wrap: break-word;
|
| 90 |
+
}
|
| 91 |
+
.json-key {
|
| 92 |
+
color: #9cdcfe;
|
| 93 |
+
}
|
| 94 |
+
.json-string {
|
| 95 |
+
color: #ce9178;
|
| 96 |
+
}
|
| 97 |
+
.json-number {
|
| 98 |
+
color: #b5cea8;
|
| 99 |
+
}
|
| 100 |
+
.json-boolean {
|
| 101 |
+
color: #569cd6;
|
| 102 |
+
}
|
| 103 |
+
.json-null {
|
| 104 |
+
color: #569cd6;
|
| 105 |
+
}
|
| 106 |
+
.success {
|
| 107 |
+
color: #30d158;
|
| 108 |
+
}
|
| 109 |
+
@media (max-width: 768px) {
|
| 110 |
+
.header h1 {
|
| 111 |
+
font-size: 32px;
|
| 112 |
+
}
|
| 113 |
+
.controls {
|
| 114 |
+
flex-direction: column;
|
| 115 |
+
}
|
| 116 |
+
.json-container {
|
| 117 |
+
padding: 20px;
|
| 118 |
+
}
|
| 119 |
+
}
|
| 120 |
+
</style>
|
| 121 |
+
</head>
|
| 122 |
+
<body>
|
| 123 |
+
<div class="container">
|
| 124 |
+
<div class="header">
|
| 125 |
+
<h1>ComfyUI Workflow</h1>
|
| 126 |
+
<p>View and download your workflow JSON</p>
|
| 127 |
+
</div>
|
| 128 |
+
|
| 129 |
+
<div class="controls">
|
| 130 |
+
<button class="btn btn-primary" onclick="downloadJSON()">Download JSON</button>
|
| 131 |
+
<button class="btn btn-secondary" onclick="copyToClipboard()">Copy to Clipboard</button>
|
| 132 |
+
</div>
|
| 133 |
+
|
| 134 |
+
<div class="json-container">
|
| 135 |
+
<pre id="json-content">{
|
| 136 |
+
"client_id": "data-science-agent-ui",
|
| 137 |
+
"description": "A fancy UI for Data Science Agent with ComfyUI-inspired design",
|
| 138 |
+
"name": "Data Science Agent UI",
|
| 139 |
+
"nodes": {},
|
| 140 |
+
"version": 0.4
|
| 141 |
+
}</pre>
|
| 142 |
+
</div>
|
| 143 |
+
</div>
|
| 144 |
+
|
| 145 |
+
<script>
|
| 146 |
+
function copyToClipboard() {
|
| 147 |
+
const jsonContent = document.getElementById('json-content').textContent;
|
| 148 |
+
navigator.clipboard.writeText(jsonContent).then(() => {
|
| 149 |
+
const btn = event.target;
|
| 150 |
+
const originalText = btn.textContent;
|
| 151 |
+
btn.textContent = 'Copied!';
|
| 152 |
+
btn.classList.add('success');
|
| 153 |
+
setTimeout(() => {
|
| 154 |
+
btn.textContent = originalText;
|
| 155 |
+
btn.classList.remove('success');
|
| 156 |
+
}, 2000);
|
| 157 |
+
}).catch(err => {
|
| 158 |
+
alert('Failed to copy to clipboard');
|
| 159 |
+
});
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
function downloadJSON() {
|
| 163 |
+
const jsonContent = document.getElementById('json-content').textContent;
|
| 164 |
+
const blob = new Blob([jsonContent], { type: 'application/json' });
|
| 165 |
+
const url = URL.createObjectURL(blob);
|
| 166 |
+
const a = document.createElement('a');
|
| 167 |
+
a.href = url;
|
| 168 |
+
a.download = 'comfyui_workflow.json';
|
| 169 |
+
document.body.appendChild(a);
|
| 170 |
+
a.click();
|
| 171 |
+
document.body.removeChild(a);
|
| 172 |
+
URL.revokeObjectURL(url);
|
| 173 |
+
|
| 174 |
+
const btn = event.target;
|
| 175 |
+
const originalText = btn.textContent;
|
| 176 |
+
btn.textContent = 'Downloaded!';
|
| 177 |
+
btn.classList.add('success');
|
| 178 |
+
setTimeout(() => {
|
| 179 |
+
btn.textContent = originalText;
|
| 180 |
+
btn.classList.remove('success');
|
| 181 |
+
}, 2000);
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
// Add syntax highlighting
|
| 185 |
+
function highlightJSON() {
|
| 186 |
+
const content = document.getElementById('json-content');
|
| 187 |
+
let html = content.innerHTML;
|
| 188 |
+
|
| 189 |
+
// Highlight different JSON elements
|
| 190 |
+
html = html.replace(/"([^"]+)":/g, '<span class="json-key">"$1":</span>');
|
| 191 |
+
html = html.replace(/: "([^"]*)"/g, ': <span class="json-string">"$1"</span>');
|
| 192 |
+
html = html.replace(/: (-?\d+\.?\d*)/g, ': <span class="json-number">$1</span>');
|
| 193 |
+
html = html.replace(/: (true|false)/g, ': <span class="json-boolean">$1</span>');
|
| 194 |
+
html = html.replace(/: null/g, ': <span class="json-null">null</span>');
|
| 195 |
+
|
| 196 |
+
content.innerHTML = html;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
// Apply syntax highlighting after page load
|
| 200 |
+
window.addEventListener('load', highlightJSON);
|
| 201 |
+
</script>
|
| 202 |
+
</body>
|
| 203 |
+
</html>
|