Skip to content
Merged
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
25 changes: 24 additions & 1 deletion src/components/checkbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export function updateSwitchHandle($handle, checked, animateToggle = true) {
* @property {string} [id]
* @property {string} [size]
* @property {"checkbox"|"radio"} [type]
* @property {string} [title]
* @property {string} [ariaLabel]
* @property {string} [description]
*/

/**
Expand All @@ -51,14 +54,30 @@ export function updateSwitchHandle($handle, checked, animateToggle = true) {
* @returns {Checkbox & HTMLLabelElement}
*/
function Checkbox(text, checked, name, id, type, ref, size, isSwitch) {
let title;
let ariaLabel;
let description;
if (typeof text === "object") {
({ text, checked, name, id, type, ref, size, isSwitch } = text);
({
text,
checked,
name,
id,
type,
ref,
size,
isSwitch,
title,
ariaLabel,
description,
} = text);
}

size = size || "1rem";

const $input = ref || Ref();
const $handle = Ref();
const label = ariaLabel || title;
const $checkbox = (
<label className={`input-checkbox ${isSwitch ? "switch" : ""}`}>
<input
Expand All @@ -76,6 +95,10 @@ function Checkbox(text, checked, name, id, type, ref, size, isSwitch) {
</label>
);

if (title) $checkbox.setAttribute("title", title);
if (label) $checkbox.setAttribute("aria-label", label);
if (description) $checkbox.dataset.description = description;

function updateToggle(animateToggle = true) {
const isSwitch =
$checkbox.classList.contains("switch") ||
Expand Down
3 changes: 2 additions & 1 deletion src/components/tooltip/longPress.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export function installIconTooltips(root, show, hide) {
if (path.some((node) => node?.id === "quick-tools")) return;
return path.find(
(node) =>
node?.matches?.("button, [role='button'], .icon") && labelOf(node),
node?.matches?.("button, [role='button'], .icon, .input-checkbox") &&
labelOf(node),
);
};
function dismiss() {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/ar-ye.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/az-az.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "Bu cihazda kifayət qədər boş yaddaş sahəsi qalmayıb.",
"error-network": "Serverlə əlaqə qurmaq mümkün olmadı. Əlaqəni yoxla və yenidən cəhd et.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/be-by.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/bn-bd.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/cs-cz.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/de-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/es-sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/fr-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/he-il.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/hi-in.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/hu-hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "Ezen az eszközön nincs elegendő szabad tárhely.",
"error-network": "Nem sikerült kapcsolódni a kiszolgálóhoz. Ellenőrizze az internetkapcsolatát, majd próbálja meg újra.",
"files saved count": "{count} fájl mentve",
"files not saved count": "{count} fájl nem lett mentve"
"files not saved count": "{count} fájl nem lett mentve",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/id-id.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
2 changes: 2 additions & 0 deletions src/lang/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,8 @@ declare type LangStrings = {
"error-network": string;
"files saved count": string;
"files not saved count": string;
"use native index": string;
"use native index hint": string;
};

declare var strings: LangStrings;
4 changes: 3 additions & 1 deletion src/lang/ir-fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/it-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/ja-jp.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/ko-kr.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/ln-ln.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/ml-in.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/mm-unicode.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/mm-zawgyi.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/pl-pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/pu-in.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/ru-ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/tl-ph.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/tr-tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/uk-ua.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/uz-uz.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/vi-vn.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "此设备的剩余存储空间不足。",
"error-network": "无法连接到服务器。请检查网络连接后重试。",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/zh-hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "此裝置的剩餘儲存空間不足。",
"error-network": "無法連線至伺服器。請檢查網路連線後重試。",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
4 changes: 3 additions & 1 deletion src/lang/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,7 @@
"error-no-space": "There isn't enough storage space left on this device.",
"error-network": "Couldn't reach the server. Check your connection and try again.",
"files saved count": "Files saved: {count}",
"files not saved count": "Files not saved: {count}"
"files not saved count": "Files not saved: {count}",
"use native index": "Use native index",
"use native index hint": "Search local folders faster using the native file index."
}
5 changes: 5 additions & 0 deletions src/sidebarApps/searchInFiles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,24 +225,29 @@ export default [
size="10px"
text="aA"
ref={$caseSensitive}
title={strings["case sensitive"]}
/>
<Checkbox
checked={store.wholeWord}
size="10px"
text="a-z"
ref={$wholeWord}
title={strings["whole word"]}
/>
<Checkbox
checked={store.regExp}
size="10px"
text=".*"
ref={$regExp}
title={strings["regular expression"]}
/>
<Checkbox
checked={store.useIndex}
size="10px"
text="IDX"
ref={$useIndex}
title={strings["use native index"]}
description={strings["use native index hint"]}
/>
</div>

Expand Down
Loading
Loading