Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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: 2 additions & 1 deletion src/lang/ar-ye.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/be-by.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,5 +427,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/bn-bd.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "রিভিউ",
"overview": "সংক্ষিপ্ত বিবরণ",
"contributors": "অবদানকারী",
"quicktools:hyphen": "হাইফেন যুক্ত করুন"
"quicktools:hyphen": "হাইফেন যুক্ত করুন",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/cs-cz.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/de-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/es-sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/fr-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/he-il.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,5 +427,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/hi-in.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,5 +427,6 @@
"reviews": "समीक्षाएँ",
"overview": "ओवरव्यू",
"contributors": "सहयोगी",
"quicktools:hyphen": "हाइफ़न प्रतीक डालें"
"quicktools:hyphen": "हाइफ़न प्रतीक डालें",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/hu-hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "áttekintések",
"overview": "Áttekintés",
"contributors": "Közreműködők",
"quicktools:hyphen": "Kötőjel beszúrása"
"quicktools:hyphen": "Kötőjel beszúrása",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/id-id.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,5 +427,6 @@
"reviews": "Ulasan",
"overview": "Ikhtisar",
"contributors": "Kontributor",
"quicktools:hyphen": "Masukkan simbol tanda hubung"
"quicktools:hyphen": "Masukkan simbol tanda hubung",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/ir-fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,5 +427,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/it-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/ja-jp.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/ko-kr.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/ml-in.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/mm-unicode.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/mm-zawgyi.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/pl-pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "Avaliações",
"overview": "Visão Geral",
"contributors": "Contribuidores",
"quicktools:hyphen": "Inserir símbolo de hífen"
"quicktools:hyphen": "Inserir símbolo de hífen",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/pu-in.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/ru-ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "Отзывы",
"overview": "Обзор",
"contributors": "Авторы",
"quicktools:hyphen": "Вставить символ дефиса"
"quicktools:hyphen": "Вставить символ дефиса",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/tl-ph.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/tr-tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/uk-ua.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/uz-uz.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/vi-vn.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,5 +427,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/zh-hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
3 changes: 2 additions & 1 deletion src/lang/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,6 @@
"reviews": "reviews",
"overview": "Overview",
"contributors": "Contributors",
"quicktools:hyphen": "Insert hyphen symbol"
"quicktools:hyphen": "Insert hyphen symbol",
"search exclude": "Search Exclude"
}
20 changes: 15 additions & 5 deletions src/lib/fileList.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ files.off = function (event, callback) {
events[event] = events[event].filter((cb) => cb !== callback);
};

/**
* Are we doing a search?
* @type {boolean}
*/
files.search;

/**
* Get directory tree
* @param {Tree[]} treeList list of tree
Expand Down Expand Up @@ -300,6 +306,15 @@ async function createChildTree(parent, item, root) {
const file = await Tree.create(url, name, isDirectory);
if (!root.isConnected) return;

const ignores = files.search
? [...settings.value.excludeFiles, ...settings.value.searchExclude]
: settings.value.excludeFiles;

const ignore = !!ignores.find((folder) =>
minimatch(file.path, folder, { matchBase: true }),
);
if (ignore) return;

const existingTree = getTree(Object.values(filesTree), file.url);

if (existingTree) {
Expand All @@ -310,11 +325,6 @@ async function createChildTree(parent, item, root) {

parent.children.push(file);
if (isDirectory) {
const ignore = !!settings.value.excludeFolders.find((folder) =>
minimatch(Url.join(file.path, ""), folder, { matchBase: true }),
);
if (ignore) return;

getAllFiles(file, root);
return;
}
Expand Down
Loading
Loading