Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 Repositories ausgewählt"
},
"clearAllBtn": {
"message": "Alle löschen"
},
"repoLoading": {
"message": "Lade Repositories..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@
"message": "$1 repositories selected",
"description": "Text showing the count of selected repositories. $1 is a placeholder for the number."
},
"clearAllBtn": {
"message": "Clear All"
},
"repoLoading": {
"message": "Loading repositories...",
"description": "Status message when repositories are being loaded."
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/es/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 repositorios seleccionados"
},
"clearAllBtn": {
"message": "Limpiar todo"
},
"repoLoading": {
"message": "Cargando repositorios..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/fr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 dépôts sélectionnés"
},
"clearAllBtn": {
"message": "Tout effacer"
},
"repoLoading": {
"message": "Chargement des dépôts..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/he/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "נבחרו $1 מאגרים"
},
"clearAllBtn": {
"message": "נקה הכל"
},
"repoLoading": {
"message": "טוען מאגרים..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/hi/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 रिपॉजिटरी चयनित"
},
"clearAllBtn": {
"message": "सभी हटाएं"
},
"repoLoading": {
"message": "रिपॉजिटरी लोड हो रही हैं..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/id/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 repositori dipilih"
},
"clearAllBtn": {
"message": "Hapus Semua"
},
"repoLoading": {
"message": "Memuat repositori..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/it/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 repository selezionati"
},
"clearAllBtn": {
"message": "Cancella tutto"
},
"repoLoading": {
"message": "Caricamento repository..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/ja/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@
"repoCount": {
"message": "$1件のリポジトリが選択されています"
},
"clearAllBtn": {
"message": "すべてクリア"
},
"repoLoading": {
"message": "リポジトリを読み込み中..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/ml/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 റിപ്പോസിറ്ററികൾ തിരഞ്ഞെടുത്തു"
},
"clearAllBtn": {
"message": "എല്ലാം മായ്ക്കുക"
},
"repoLoading": {
"message": "റിപ്പോസിറ്ററികൾ ലോഡ് ചെയ്യുന്നു..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/my/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@
"repoCount": {
"message": "ရွေးချယ်ထားသော repositoryအရေအတွက်သည် $1 ဖြစ်သည်။"
},
"clearAllBtn": {
"message": "အားလုံးရှင်းပါ"
},
"repoLoading": {
"message": "repositoryကို ဖွင့်နေသည်....."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/nb/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 repositorier valgt"
},
"clearAllBtn": {
"message": "Fjern alle"
},
"repoLoading": {
"message": "Laster repositorier..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/pt/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 repositórios selecionados"
},
"clearAllBtn": {
"message": "Limpar tudo"
},
"repoLoading": {
"message": "Carregando repositórios..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/pt_BR/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 repositórios selecionados"
},
"clearAllBtn": {
"message": "Limpar tudo"
},
"repoLoading": {
"message": "Carregando repositórios..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/ru/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 репозиториев выбрано"
},
"clearAllBtn": {
"message": "Очистить всё"
},
"repoLoading": {
"message": "Загрузка репозиториев..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/te/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@
"repoCount": {
"message": "$1 రిపోజిటరీలు ఎంపిక చేయబడ్డాయి"
},
"clearAllBtn": {
"message": "అన్నీ తొలగించు"
},
"repoLoading": {
"message": "రిపోజిటరీలు లోడ్ అవుతున్నాయి..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/uk/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "Вибрано $1 репозиторіїв"
},
"clearAllBtn": {
"message": "Очистити все"
},
"repoLoading": {
"message": "Завантаження репозиторіїв..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/vi/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "$1 kho lưu trữ đã chọn"
},
"clearAllBtn": {
"message": "Xóa tất cả"
},
"repoLoading": {
"message": "Đang tải kho lưu trữ..."
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
"repoCount": {
"message": "已选择 $1 个仓库"
},
"clearAllBtn": {
"message": "全部清除"
},
"repoLoading": {
"message": "正在加载仓库..."
},
Expand Down
5 changes: 4 additions & 1 deletion src/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,10 @@ <h4 class="font-semibold text-xl" data-i18n="noteTitle">Note:</h4>
<!-- Status/Info -->
<div class="mt-2 text-xs text-gray-600 flex justify-between">
<span id="repoCount" data-i18n="repoCountNone">0 repositories selected</span>
<span id="repoStatus" class="text-blue-600"></span>
<div class="flex items-center gap-2">
<button id="clearAllReposBtn" class="font-semibold cursor-pointer hidden hover:underline" data-i18n="clearAllBtn">Clear All</button>
<span id="repoStatus" class="text-blue-600"></span>
</div>
</div>
</div>
</div>
Expand Down
11 changes: 11 additions & 0 deletions src/scripts/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@ document.addEventListener('DOMContentLoaded', () => {
const repoPlaceholder = document.getElementById('repoPlaceholder');
const repoCount = document.getElementById('repoCount');
const repoStatus = document.getElementById('repoStatus');
const clearAllReposBtn = document.getElementById('clearAllReposBtn');
const useRepoFilter = document.getElementById('useRepoFilter');
const repoFilterContainer = document.getElementById('repoFilterContainer');

Expand Down Expand Up @@ -1547,6 +1548,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (selectedRepos.length === 0) {
repoTags.innerHTML = `<span class="text-xs text-gray-500 select-none" id="repoPlaceholder">${browser.i18n.getMessage('repoPlaceholder')}</span>`;
repoCount.textContent = browser.i18n.getMessage('repoCountNone');
if (clearAllReposBtn) clearAllReposBtn.classList.add('hidden');
} else {
repoTags.innerHTML = selectedRepos
.map((repoFullName) => {
Expand All @@ -1569,9 +1571,18 @@ document.addEventListener('DOMContentLoaded', () => {
});
});
repoCount.textContent = browser.i18n.getMessage('repoCount', [selectedRepos.length]);
if (clearAllReposBtn) clearAllReposBtn.classList.remove('hidden');
}
}

if (clearAllReposBtn) {
clearAllReposBtn.addEventListener('click', () => {
selectedRepos = [];
updateRepoDisplay();
saveRepoSelection();
Comment thread
JaYRaNa213 marked this conversation as resolved.
Outdated
});
}

function saveRepoSelection() {
const cleanedRepos = selectedRepos.filter((repo) => repo !== null);
browser.storage.local.set({
Expand Down
Loading