-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
561 lines (530 loc) · 25 KB
/
index.html
File metadata and controls
561 lines (530 loc) · 25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GraTech Commander - AI Your Way | الذكاء الاصطناعي بطريقتك</title>
<!-- SEO Meta Tags -->
<meta name="description" content="GraTech Commander - Your privacy-first, multi-model AI interface. 5 AI models, 12 languages, 100% local. Built in Saudi Arabia 🇸🇦">
<meta name="keywords" content="AI, ChatGPT, Claude, DeepSeek, Arabic AI, Saudi Arabia, Privacy, BYOK, GraTech">
<meta name="author" content="Suliman Nazal Alshammari - GraTech">
<meta name="robots" content="index, follow">
<!-- Open Graph / Social Media -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://commander.gratech.sa/">
<meta property="og:title" content="GraTech Commander - AI Your Way">
<meta property="og:description" content="Privacy-first AI interface with 5 models, 12 languages. Your keys stay on YOUR device.">
<meta property="og:image" content="https://commander.gratech.sa/assets/og-image.png">
<meta property="og:locale" content="ar_SA">
<meta property="og:locale:alternate" content="en_US">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="GraTech Commander - AI Your Way">
<meta name="twitter:description" content="Privacy-first AI interface with 5 models, 12 languages.">
<!-- PWA / Mobile -->
<meta name="theme-color" content="#667eea">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="manifest" href="manifest.json">
<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚡</text></svg>">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Fira+Code:wght@400;500&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- 🎉 Onboarding Wizard -->
<div id="onboarding-overlay" class="onboarding-overlay">
<div class="onboarding-container">
<!-- Step 1: Welcome -->
<div class="onboarding-step active" data-step="1">
<div class="logo-animation">⚡</div>
<h1 class="gradient-text">مرحباً بك في GraTech Commander</h1>
<p class="subtitle">الذكاء الاصطناعي بطريقتك، بخصوصيتك، بلغتك 🇸🇦</p>
<div class="features-grid">
<div class="feature-card"><span>🤖</span><p>5 نماذج AI</p></div>
<div class="feature-card"><span>🔐</span><p>خصوصية 100%</p></div>
<div class="feature-card"><span>🗣️</span><p>يفهم العربي</p></div>
<div class="feature-card"><span>🛡️</span><p>حماية ذكية</p></div>
</div>
<button class="onboarding-btn primary pulse" onclick="nextStep()">يلا نبدأ! 🚀</button>
</div>
<!-- Step 2: Choose AI Model -->
<div class="onboarding-step" data-step="2">
<h2>🤖 اختر نموذج الذكاء المفضل</h2>
<p class="step-desc">كل نموذج له قوته - اختر اللي يناسبك</p>
<div class="model-selection">
<div class="model-option" data-model="gpt-4.1" onclick="selectModel(this)">
<span class="model-emoji">💬</span>
<h4>GPT-4.1</h4>
<p>متوازن وسريع</p>
<span class="badge popular">الأكثر شعبية</span>
</div>
<div class="model-option" data-model="claude-opus-4-5" onclick="selectModel(this)">
<span class="model-emoji">🧠</span>
<h4>Claude Opus 4.5</h4>
<p>تحليل عميق</p>
<span class="badge pro">للمهام المعقدة</span>
</div>
<div class="model-option" data-model="DeepSeek-R1" onclick="selectModel(this)">
<span class="model-emoji">🔥</span>
<h4>DeepSeek R1</h4>
<p>كود ومنطق</p>
<span class="badge dev">للمبرمجين</span>
</div>
<div class="model-option" data-model="gpt-4o" onclick="selectModel(this)">
<span class="model-emoji">🚀</span>
<h4>GPT-4o</h4>
<p>الأسرع</p>
<span class="badge fast">سريع جداً</span>
</div>
</div>
<div class="step-nav">
<button class="onboarding-btn secondary" onclick="prevStep()">← رجوع</button>
<button class="onboarding-btn primary" onclick="nextStep()">التالي →</button>
</div>
</div>
<!-- Step 3: API Setup (BYOK) -->
<div class="onboarding-step" data-step="3">
<h2>🔑 إعداد المفتاح</h2>
<p class="step-desc">استخدم مفتاحك الخاص أو جرب بدون</p>
<div class="api-options">
<div class="api-option selected" data-option="demo" onclick="selectApiOption(this)">
<span>🎮</span>
<h4>تجربة مجانية</h4>
<p>جرب بدون مفتاح (محدود)</p>
</div>
<div class="api-option" data-option="byok" onclick="selectApiOption(this)">
<span>🔐</span>
<h4>مفتاحك الخاص (BYOK)</h4>
<p>تحكم كامل بـ API</p>
</div>
</div>
<div id="byok-fields" class="byok-fields hidden">
<div class="input-field">
<label>🔑 API Key</label>
<input type="password" id="setup-api-key" placeholder="sk-... أو Azure Key">
</div>
<div class="input-field">
<label>🌐 Endpoint (اختياري)</label>
<input type="text" id="setup-endpoint" placeholder="https://your-resource.openai.azure.com/">
</div>
</div>
<div class="privacy-box">
<span>🛡️</span>
<p><strong>وعدنا:</strong> مفاتيحك تبقى على جهازك فقط</p>
</div>
<div class="step-nav">
<button class="onboarding-btn secondary" onclick="prevStep()">← رجوع</button>
<button class="onboarding-btn primary" onclick="nextStep()">التالي →</button>
</div>
</div>
<!-- Step 4: Safety Consent -->
<div class="onboarding-step" data-step="4">
<h2>🛡️ نظام الحماية الذكي</h2>
<p class="step-desc">نحميك بموافقتك - كل شيء بيدك</p>
<div class="consent-options">
<label class="consent-item"><input type="checkbox" checked> 🗑️ تأكيد قبل أي حذف</label>
<label class="consent-item"><input type="checkbox" checked> ☁️ تأكيد قبل عمليات السحابة</label>
<label class="consent-item"><input type="checkbox" checked> 📝 شرح كل عملية قبل التنفيذ</label>
<label class="consent-item"><input type="checkbox" checked> 📜 تسجيل الموافقات</label>
</div>
<div class="philosophy-quote">
<blockquote>"أنا هنا لخدمتك، مو أداة عليك.<br>القرار لك دائماً."</blockquote>
</div>
<div class="step-nav">
<button class="onboarding-btn secondary" onclick="prevStep()">← رجوع</button>
<button class="onboarding-btn primary" onclick="nextStep()">التالي →</button>
</div>
</div>
<!-- Step 5: Ready! -->
<div class="onboarding-step" data-step="5">
<div class="success-icon">🎉</div>
<h2 class="gradient-text">جاهز!</h2>
<p class="step-desc">كل شيء معد - يلا نبدأ المحادثة</p>
<div class="tips-box">
<h4>💡 نصائح سريعة:</h4>
<ul>
<li>اكتب بالعربي العامية - أفهمك!</li>
<li>استخدم "🔒 آمن" للمواضيع الحساسة</li>
<li>اضغط "🙈 أخفي" لإخفاء المفاتيح</li>
<li>زر 🚨 يوقف كل شيء فوراً</li>
</ul>
</div>
<button class="onboarding-btn primary large" onclick="finishOnboarding()">🚀 ابدأ المحادثة</button>
<p class="skip-link"><a href="#" onclick="skipOnboarding()">تخطي دائماً</a></p>
</div>
<!-- Progress Dots -->
<div class="progress-dots">
<span class="dot active" data-step="1"></span>
<span class="dot" data-step="2"></span>
<span class="dot" data-step="3"></span>
<span class="dot" data-step="4"></span>
<span class="dot" data-step="5"></span>
</div>
</div>
</div>
<div class="app-container">
<!-- Top Bar -->
<div class="top-bar">
<div class="language-selector">
<select id="language-select">
<option value="ar">🇸🇦 العربية</option>
<option value="en">🇺🇸 English</option>
<option value="fr">🇫🇷 Français</option>
<option value="de">🇩🇪 Deutsch</option>
<option value="es">🇪🇸 Español</option>
<option value="zh">🇨🇳 中文</option>
<option value="ja">🇯🇵 日本語</option>
<option value="ko">🇰🇷 한국어</option>
<option value="tr">🇹🇷 Türkçe</option>
<option value="ru">🇷🇺 Русский</option>
<option value="hi">🇮🇳 हिन्दी</option>
<option value="ur">🇵🇰 اردو</option>
</select>
</div>
<div class="top-bar-title">⚡ GraTech Commander</div>
<div class="top-bar-actions">
<button id="attach-file-btn" class="top-btn" title="إرفاق ملف">📎</button>
<button id="quick-note-btn" class="top-btn" title="ملاحظة سريعة">📝</button>
<button id="export-btn" class="top-btn" title="تصدير">📤</button>
</div>
</div>
<div class="main-wrapper">
<!-- Sidebar -->
<aside class="sidebar">
<div class="logo">
<h1>⚡ GraTech</h1>
<span class="version">Commander v1.0</span>
</div>
<nav class="nav-menu">
<button class="nav-btn active" data-view="chat">
💬 المحادثة
</button>
<button class="nav-btn" data-view="vault">
🔐 الخزنة
</button>
<button class="nav-btn" data-view="notes">
📝 ملاحظاتي
</button>
<button class="nav-btn" data-view="github">
🐙 GitHub
</button>
<button class="nav-btn" data-view="azure">
☁️ Azure
</button>
<button class="nav-btn" data-view="accounts">
👤 حساباتي
</button>
<button class="nav-btn" data-view="settings">
⚙️ الإعدادات
</button>
<button class="nav-btn" data-view="safety">
🛡️ الحماية
</button>
</nav>
<div class="sidebar-footer">
<p>صنع بـ ❤️ بواسطة</p>
<strong>سليمان نزال الشمري</strong>
<div class="footer-accounts">
<a href="https://github.com/Grar00t" target="_blank">@Grar00t</a>
<span>|</span>
<a href="https://github.com/GrAxOS" target="_blank">@GrAxOS</a>
</div>
<span class="company-link">🌐 <a href="https://gratech.sa" target="_blank">GraTech.sa</a></span>
<span class="email-link">📧 <a href="mailto:admin@gratech.sa">admin@gratech.sa</a></span>
</div>
</aside>
<!-- Main Content -->
<main class="main-content">
<!-- Chat View -->
<section id="chat-view" class="view active">
<div class="view-header">
<h2>💬 المحادثة مع الذكاء الاصطناعي</h2>
<div class="header-actions">
<span id="usage-display" class="usage-badge">🎁 20 رسالة مجانية</span>
<select id="model-select" class="model-selector">
<option value="gpt-4o">GPT-4o 🚀</option>
<option value="gpt-4.1">GPT-4.1 💬</option>
<option value="gpt-35-turbo">GPT-3.5 ⚡</option>
</select>
</div>
</div>
<div class="chat-container" id="chat-container">
<div class="welcome-message">
<h3>مرحباً! 👋</h3>
<p>أنا جاهز للمساعدة. اختر النموذج وابدأ المحادثة.</p>
<p class="demo-notice">🎁 <strong>تجربة مجانية:</strong> 20 رسالة/ساعة • بدون تسجيل</p>
<div class="quick-prompts">
<button class="quick-prompt" onclick="insertPrompt('اشرح لي')">💡 اشرح لي...</button>
<button class="quick-prompt" onclick="insertPrompt('ساعدني أكتب')">✍️ ساعدني أكتب...</button>
<button class="quick-prompt" onclick="insertPrompt('حلل هذا')">🔍 حلل هذا...</button>
<button class="quick-prompt" onclick="insertPrompt('اكتب لي كود')">💻 اكتب لي كود...</button>
</div>
</div>
</div>
<div class="chat-input-area">
<div class="input-mode-selector">
<button class="mode-btn active" data-mode="normal">💬 عادي</button>
<button class="mode-btn" data-mode="code">💻 كود</button>
<button class="mode-btn" data-mode="safe">🔒 آمن</button>
<button class="mode-btn" data-mode="research">🔍 بحث</button>
</div>
<textarea id="message-input" placeholder="اكتب بالعربي براحتك... أنا أفهمك 😊" rows="3"></textarea>
<div class="input-actions">
<button id="voice-btn" class="action-btn" title="تحدث بصوتك">🎤</button>
<button id="send-btn" class="send-button">إرسال ▶</button>
</div>
</div>
</section>
<!-- GitHub View -->
<section id="github-view" class="view">
<div class="view-header">
<h2>🐙 GitHub Dashboard</h2>
</div>
<div class="github-content">
<div class="github-stats">
<div class="stat-card">
<span class="stat-icon">📦</span>
<h3 id="repos-count">-</h3>
<p>المستودعات</p>
</div>
<div class="stat-card">
<span class="stat-icon">⭐</span>
<h3 id="stars-count">-</h3>
<p>النجوم</p>
</div>
<div class="stat-card">
<span class="stat-icon">👥</span>
<h3 id="followers-count">-</h3>
<p>المتابعين</p>
</div>
</div>
<div class="repos-list" id="repos-list">
<p class="loading">جاري التحميل...</p>
</div>
</div>
</section>
<!-- Azure View -->
<section id="azure-view" class="view">
<div class="view-header">
<h2>☁️ Azure Cloud Status</h2>
</div>
<div class="azure-content">
<div class="azure-info">
<div class="info-card">
<h4>🎓 Academic Subscription</h4>
<code id="azure-sub">376e945d-1f65-4f42-885e-ed9efda6716f</code>
</div>
<div class="info-card">
<h4>📍 Project</h4>
<p>alshammaris-2770 (East US 2)</p>
</div>
<div class="info-card">
<h4>🔗 Microsoft Foundry</h4>
<p>متصل ✅</p>
</div>
</div>
<div class="models-grid">
<div class="model-card">
<h4>🧠 Claude Opus 4.5</h4>
<span class="status online">متوفر</span>
</div>
<div class="model-card">
<h4>💬 GPT-4.1</h4>
<span class="status online">متوفر</span>
</div>
<div class="model-card">
<h4>🔥 DeepSeek R1</h4>
<span class="status online">متوفر</span>
</div>
<div class="model-card">
<h4>⚡ DeepSeek V3.2</h4>
<span class="status online">متوفر</span>
</div>
<div class="model-card">
<h4>🚀 GPT-4o</h4>
<span class="status online">متوفر</span>
</div>
</div>
</div>
</section>
<!-- Settings View - Updated -->
<section id="settings-view" class="view">
<div class="view-header">
<h2>⚙️ الإعدادات</h2>
</div>
<div class="settings-content">
<div class="settings-section">
<h3>🎁 الوضع الحالي: تجربة مجانية</h3>
<p class="settings-info">20 رسالة/ساعة مجاناً • للاستخدام غير المحدود أدخل مفتاحك</p>
</div>
<div class="setting-group">
<label>🔑 مفتاح API الخاص (اختياري)</label>
<input type="password" id="azure-api-key" placeholder="أدخل مفتاحك للاستخدام غير المحدود">
</div>
<div class="setting-group">
<label>🌐 Endpoint</label>
<input type="text" id="azure-endpoint" placeholder="https://your-resource.openai.azure.com/">
</div>
<div class="setting-group">
<label>🐙 GitHub Token</label>
<input type="password" id="github-token" placeholder="ghp_xxxxxxxxxxxx">
</div>
<button id="save-settings" class="save-btn">💾 حفظ الإعدادات</button>
<p class="settings-note">🔒 الإعدادات تُحفظ محلياً على جهازك فقط - لا نرسلها لأي سيرفر</p>
</div>
</section>
<!-- Vault View -->
<section id="vault-view" class="view">
<div class="view-header">
<h2>🔐 الخزنة السرية</h2>
<button id="add-vault-item" class="add-btn">+ إضافة</button>
</div>
<div class="vault-content">
<div class="vault-categories">
<button class="vault-cat active" data-cat="keys">🔑 مفاتيح API</button>
<button class="vault-cat" data-cat="accounts">👤 حسابات</button>
<button class="vault-cat" data-cat="files">📁 ملفات مهمة</button>
<button class="vault-cat" data-cat="secrets">🤫 أسرار</button>
</div>
<div class="vault-items" id="vault-items">
<div class="vault-item">
<div class="vault-item-icon">🔑</div>
<div class="vault-item-info">
<h4>Microsoft Foundry (Academic)</h4>
<p>alshammaris-2770</p>
<code class="hidden-key">BLB5uq...GT8UC</code>
</div>
<button class="copy-btn" title="نسخ">📋</button>
</div>
</div>
</div>
</section>
<!-- Notes View -->
<section id="notes-view" class="view">
<div class="view-header">
<h2>📝 ملاحظاتي</h2>
<button id="add-note" class="add-btn">+ ملاحظة جديدة</button>
</div>
<div class="notes-content">
<div class="notes-sidebar">
<div class="notes-search">
<input type="text" placeholder="🔍 بحث..." id="notes-search">
</div>
<div class="notes-list" id="notes-list">
<div class="note-item active">
<span class="note-emoji">💡</span>
<div class="note-preview">
<h5>أفكار GraTech</h5>
<p>نقلة نوعية في الذكاء الاصطناعي...</p>
</div>
</div>
</div>
</div>
<div class="note-editor">
<div class="note-editor-header">
<input type="text" class="note-title" placeholder="عنوان الملاحظة..." value="💡 أفكار GraTech">
<div class="note-tags">
<span class="tag">مهم</span>
<span class="tag">أفكار</span>
<button class="add-tag">+</button>
</div>
</div>
<textarea class="note-content" placeholder="اكتب ملاحظتك هنا...">🚀 GraTech Commander</textarea>
<div class="note-footer">
<span class="note-date">📅 27 ديسمبر 2025</span>
<div class="note-actions">
<button class="note-action">📎 إرفاق</button>
<button class="note-action">📤 تصدير</button>
</div>
</div>
</div>
</div>
</section>
<!-- Accounts View -->
<section id="accounts-view" class="view">
<div class="view-header">
<h2>👤 حساباتي</h2>
</div>
<div class="accounts-content">
<div class="account-card primary">
<div class="account-avatar">👨💻</div>
<div class="account-info">
<h3>GrAtech X</h3>
<p>admin@gratech.sa</p>
<span class="account-type">🏢 Business - Primary</span>
</div>
<span class="account-status active">✅ متصل</span>
</div>
</div>
</section>
<!-- Safety View -->
<section id="safety-view" class="view">
<div class="view-header">
<h2>🛡️ نظام الحماية الذكي</h2>
</div>
<div class="safety-content">
<div class="safety-philosophy">
<div class="philosophy-card">
<h3>🙏 فلسفتنا</h3>
<blockquote>
"أنا هنا لخدمتك، مو أداة عليك.<br>
القرار لك دائماً - وأنا أشرح وأنصح فقط."
</blockquote>
</div>
</div>
<div class="risk-levels">
<h3>📊 مستويات الخطورة</h3>
<div class="risk-grid">
<div class="risk-card safe"><span class="risk-icon">🟢</span><h4>آمن</h4></div>
<div class="risk-card low"><span class="risk-icon">🟡</span><h4>منخفض</h4></div>
<div class="risk-card medium"><span class="risk-icon">🟠</span><h4>متوسط</h4></div>
<div class="risk-card high"><span class="risk-icon">🔴</span><h4>عالي</h4></div>
<div class="risk-card critical"><span class="risk-icon">⛔</span><h4>حرج</h4></div>
</div>
</div>
<div class="emergency-section">
<button id="emergency-stop" class="emergency-btn">🚨 إيقاف طوارئ</button>
<p class="emergency-note">يوقف جميع العمليات فوراً</p>
</div>
</div>
</section>
</main>
</div>
<!-- Modals -->
<div id="quick-note-modal" class="modal hidden">
<div class="modal-content">
<div class="modal-header">
<h3>📝 ملاحظة سريعة</h3>
<button class="close-modal">×</button>
</div>
<textarea id="quick-note-text" placeholder="اكتب ملاحظتك السريعة..."></textarea>
<div class="modal-actions">
<button id="save-quick-note" class="save-btn">💾 حفظ</button>
</div>
</div>
</div>
<div id="attach-modal" class="modal hidden">
<div class="modal-content">
<div class="modal-header">
<h3>📎 إرفاق ملف</h3>
<button class="close-modal">×</button>
</div>
<div class="attach-dropzone" id="dropzone">
<p>📁 اسحب الملفات هنا</p>
<input type="file" id="file-input" multiple>
<button id="browse-files" class="browse-btn">تصفح الملفات</button>
</div>
</div>
</div>
</div>
<!-- Scripts - Order matters! -->
<script src="api.js"></script>
<script src="onboarding.js"></script>
<script src="translator.js"></script>
<script src="web-renderer.js"></script>
</body>
</html>