Update Saqel Platform: 2026-08-28 16:40:48

This commit is contained in:
Hamza-Ayed
2026-08-28 16:40:48 +03:00
parent f941c53035
commit cdcfa71c96
2 changed files with 28 additions and 2 deletions
+21
View File
@@ -439,6 +439,27 @@ class CurriculumStudio
return d.innerHTML;
}
</script>
<!-- Upload Progress Modal -->
<div id="upload_progress_overlay" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 15, 26, 0.85); backdrop-filter: blur(8px); z-index: 9999; flex-direction: column; align-items: center; justify-content: center;">
<div style="background: var(--bg-card); padding: 30px; border-radius: 16px; border: 1px solid var(--border-color); width: 400px; max-width: 90%; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.5);">
<div id="ai_spinner" style="font-size: 40px; margin-bottom: 15px; animation: pulse 1.5s infinite;">🧠</div>
<h3 style="color: var(--text-primary); margin-bottom: 10px; font-family: 'SF Arabic', sans-serif;">معالجة الذكاء الاصطناعي</h3>
<div style="width: 100%; background: var(--bg-hover); border-radius: 10px; height: 10px; margin-bottom: 15px; overflow: hidden; position: relative;">
<div id="upload_progress_bar" style="height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent-gold), #ffed4a); transition: width 0.4s ease;"></div>
</div>
<p id="upload_progress_text" style="color: var(--text-secondary); font-size: 13px; font-weight: bold;">جاري التهيئة...</p>
<p id="upload_progress_percent" style="color: var(--accent-gold); font-size: 12px; margin-top: 5px;">0%</p>
</div>
</div>
<style>
@keyframes pulse {
0% { transform: scale(1); opacity: 1; }
50% { transform: scale(1.1); opacity: 0.7; }
100% { transform: scale(1); opacity: 1; }
}
</style>
</body>
</html>
<?php
+7 -2
View File
@@ -164,8 +164,13 @@ $payload = [
updateState($stateFile, 'analyzing', 70, 'جاري تطبيقหน่วงزمني (4 ثوانٍ) لتفادي حدود الاستخدام (Rate Limit)...');
sleep(4);
// Using gemini-2.0-flash as requested by the user
$url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=" . $geminiKey;
// Allow custom model from .env (e.g. gemini-2.0-flash-lite-preview-02-05 or gemini-2.0-flash)
$geminiModel = Env::get('GEMINI_MODEL') ?: getenv('GEMINI_MODEL');
if (empty($geminiModel)) {
$geminiModel = "gemini-2.0-flash-lite-preview-02-05"; // fallback to latest flash lite
}
updateState($stateFile, 'analyzing', 75, "جاري إرسال البيانات للنموذج [{$geminiModel}]...");
$url = "https://generativelanguage.googleapis.com/v1beta/models/{$geminiModel}:generateContent?key=" . $geminiKey;
$ch = curl_init($url);
curl_setopt_array($ch, [