Commit ·
6451a95
1
Parent(s): 26f3f34
feat: Apply All button shows count + empty states already functional
Browse files- src/js/ui.js +9 -2
src/js/ui.js
CHANGED
|
@@ -139,8 +139,15 @@ function updateSuggestionsList(suggestions) {
|
|
| 139 |
});
|
| 140 |
|
| 141 |
const showApplyAll = suggestions.length >= 2;
|
| 142 |
-
|
| 143 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
}
|
| 145 |
|
| 146 |
function bindSuggestionCardEvents(container) {
|
|
|
|
| 139 |
});
|
| 140 |
|
| 141 |
const showApplyAll = suggestions.length >= 2;
|
| 142 |
+
const countLabel = suggestions.length.toLocaleString('ar-EG');
|
| 143 |
+
if (applyAllBtn) {
|
| 144 |
+
applyAllBtn.classList.toggle('is-hidden', !showApplyAll);
|
| 145 |
+
if (showApplyAll) applyAllBtn.textContent = '\u062a\u0637\u0628\u064a\u0642 \u0627\u0644\u0643\u0644 (' + countLabel + ')';
|
| 146 |
+
}
|
| 147 |
+
if (applyAllSheet) {
|
| 148 |
+
applyAllSheet.classList.toggle('is-hidden', !showApplyAll);
|
| 149 |
+
if (showApplyAll) applyAllSheet.textContent = '\u062a\u0637\u0628\u064a\u0642 \u0627\u0644\u0643\u0644 (' + countLabel + ')';
|
| 150 |
+
}
|
| 151 |
}
|
| 152 |
|
| 153 |
function bindSuggestionCardEvents(container) {
|