Commit ·
c1ede9b
1
Parent(s): 646c1ab
Wire up all 8 missing UI elements: Arabic tools dropdown, paragraph spacing, typewriter mode, version history buttons, error chart + sparkline hooks
Browse files- src/index.html +2 -0
- src/js/ui.js +7 -0
src/index.html
CHANGED
|
@@ -833,6 +833,8 @@
|
|
| 833 |
<span class="collab-hint" id="last-edit-hint"></span></div>
|
| 834 |
<div class="editor-actions">
|
| 835 |
<button id="focus-mode-btn" class="btn-ghost" type="button" data-tooltip="وضع التركيز (Ctrl+Shift+F)" onclick="toggleFocusMode()"><svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
|
|
|
|
|
|
|
| 836 |
<button id="doc-save-btn" class="doc-save-btn-icon btn-ghost" type="button" aria-label="حفظ المستند" title="حفظ">
|
| 837 |
<svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"/></svg>
|
| 838 |
</button>
|
|
|
|
| 833 |
<span class="collab-hint" id="last-edit-hint"></span></div>
|
| 834 |
<div class="editor-actions">
|
| 835 |
<button id="focus-mode-btn" class="btn-ghost" type="button" data-tooltip="وضع التركيز (Ctrl+Shift+F)" onclick="toggleFocusMode()"><svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
|
| 836 |
+
<button id="typewriter-mode-btn" class="btn-ghost" type="button" data-tooltip="وضع الآلة الكاتبة" onclick="toggleTypewriterMode()"><svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M7 14h10M9 18h6"/></svg></button>
|
| 837 |
+
<button id="version-history-btn" class="btn-ghost" type="button" data-tooltip="سجل النسخ" onclick="showVersionHistory()"><svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/></svg></button>
|
| 838 |
<button id="doc-save-btn" class="doc-save-btn-icon btn-ghost" type="button" aria-label="حفظ المستند" title="حفظ">
|
| 839 |
<svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"/></svg>
|
| 840 |
</button>
|
src/js/ui.js
CHANGED
|
@@ -54,6 +54,13 @@ function updateWritingScore(spelling, grammar, punctuation) {
|
|
| 54 |
const total = spelling + grammar + punctuation;
|
| 55 |
sheetCount.textContent = total.toLocaleString('ar-EG');
|
| 56 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
}
|
| 58 |
|
| 59 |
/**
|
|
|
|
| 54 |
const total = spelling + grammar + punctuation;
|
| 55 |
sheetCount.textContent = total.toLocaleString('ar-EG');
|
| 56 |
}
|
| 57 |
+
|
| 58 |
+
// Hook: update error donut chart
|
| 59 |
+
if (typeof renderErrorChart === 'function') renderErrorChart();
|
| 60 |
+
// Hook: update error badge on write tab
|
| 61 |
+
if (typeof updateErrorBadge === 'function') updateErrorBadge();
|
| 62 |
+
// Hook: track score for sparkline
|
| 63 |
+
if (typeof trackScore === 'function' && (spelling + grammar + punctuation) > 0) trackScore(score);
|
| 64 |
}
|
| 65 |
|
| 66 |
/**
|