Update templates/fluxpro.html
Browse files- templates/fluxpro.html +3 -5
templates/fluxpro.html
CHANGED
|
@@ -6,7 +6,6 @@
|
|
| 6 |
<title>مولد تصویر آلفا - Flux Pro</title>
|
| 7 |
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;600;800&display=swap" rel="stylesheet">
|
| 8 |
<style>
|
| 9 |
-
/* CSS دقیقاً همان استایلهای خودتان بدون هیچ حذفیاتی */
|
| 10 |
:root {
|
| 11 |
--igadlm-alpha-color-primary: #5A67D8;
|
| 12 |
--igadlm-alpha-color-primary-darker: #4C51BF;
|
|
@@ -73,7 +72,7 @@
|
|
| 73 |
<div class="app-content">
|
| 74 |
<div class="app-header">
|
| 75 |
<h1>🖼️ مولد تصویر آلفا</h1>
|
| 76 |
-
<p><span style="color: #339966; font-weight: bold;">Flux
|
| 77 |
<p>ایده خود را به یک تصویر خلاقانه تبدیل کنید</p>
|
| 78 |
</div>
|
| 79 |
|
|
@@ -131,7 +130,6 @@
|
|
| 131 |
|
| 132 |
let pollTimer;
|
| 133 |
|
| 134 |
-
// ساخت دکمههای ابعاد بر اساس استایل اصلی شما
|
| 135 |
Object.keys(PREDEFINED_DIMENSIONS_MAP).forEach((key) => {
|
| 136 |
const dimInfo = PREDEFINED_DIMENSIONS_MAP[key];
|
| 137 |
const button = document.createElement('button');
|
|
@@ -168,7 +166,6 @@
|
|
| 168 |
const dims = PREDEFINED_DIMENSIONS_MAP[selectedAspectRatioKey];
|
| 169 |
|
| 170 |
try {
|
| 171 |
-
// ارسال درخواست به سرور داکر خودمان
|
| 172 |
const res = await fetch('/api/generate', {
|
| 173 |
method: 'POST',
|
| 174 |
headers: {'Content-Type': 'application/json'},
|
|
@@ -183,7 +180,7 @@
|
|
| 183 |
const data = await res.json();
|
| 184 |
|
| 185 |
if (data.status === 'success') {
|
| 186 |
-
updateStatus(`متن ترجمه شد: "${data.translated_prompt.substring(0,
|
| 187 |
pollTimer = setInterval(() => checkResult(data.run_id), 3000);
|
| 188 |
} else {
|
| 189 |
updateStatus('خطا در برقراری ارتباط با گیتهاب.', 'error');
|
|
@@ -202,6 +199,7 @@
|
|
| 202 |
|
| 203 |
if (data.status === 'ready') {
|
| 204 |
clearInterval(pollTimer);
|
|
|
|
| 205 |
updateStatus('تصویر با موفقیت ساخته شد! 🎉 (مرحله ۳ از ۳)', 'success', false);
|
| 206 |
|
| 207 |
imgEl.src = data.url;
|
|
|
|
| 6 |
<title>مولد تصویر آلفا - Flux Pro</title>
|
| 7 |
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;600;800&display=swap" rel="stylesheet">
|
| 8 |
<style>
|
|
|
|
| 9 |
:root {
|
| 10 |
--igadlm-alpha-color-primary: #5A67D8;
|
| 11 |
--igadlm-alpha-color-primary-darker: #4C51BF;
|
|
|
|
| 72 |
<div class="app-content">
|
| 73 |
<div class="app-header">
|
| 74 |
<h1>🖼️ مولد تصویر آلفا</h1>
|
| 75 |
+
<p><span style="color: #339966; font-weight: bold;">Flux Pro</span></p>
|
| 76 |
<p>ایده خود را به یک تصویر خلاقانه تبدیل کنید</p>
|
| 77 |
</div>
|
| 78 |
|
|
|
|
| 130 |
|
| 131 |
let pollTimer;
|
| 132 |
|
|
|
|
| 133 |
Object.keys(PREDEFINED_DIMENSIONS_MAP).forEach((key) => {
|
| 134 |
const dimInfo = PREDEFINED_DIMENSIONS_MAP[key];
|
| 135 |
const button = document.createElement('button');
|
|
|
|
| 166 |
const dims = PREDEFINED_DIMENSIONS_MAP[selectedAspectRatioKey];
|
| 167 |
|
| 168 |
try {
|
|
|
|
| 169 |
const res = await fetch('/api/generate', {
|
| 170 |
method: 'POST',
|
| 171 |
headers: {'Content-Type': 'application/json'},
|
|
|
|
| 180 |
const data = await res.json();
|
| 181 |
|
| 182 |
if (data.status === 'success') {
|
| 183 |
+
updateStatus(`متن ترجمه شد: "${data.translated_prompt.substring(0, 30)}..."\nدر حال ساخت تصویر... (مرحله ۲ از ۳)`, 'info', true);
|
| 184 |
pollTimer = setInterval(() => checkResult(data.run_id), 3000);
|
| 185 |
} else {
|
| 186 |
updateStatus('خطا در برقراری ارتباط با گیتهاب.', 'error');
|
|
|
|
| 199 |
|
| 200 |
if (data.status === 'ready') {
|
| 201 |
clearInterval(pollTimer);
|
| 202 |
+
loader.style.display = 'none';
|
| 203 |
updateStatus('تصویر با موفقیت ساخته شد! 🎉 (مرحله ۳ از ۳)', 'success', false);
|
| 204 |
|
| 205 |
imgEl.src = data.url;
|