This commit is contained in:
Vanessa 2022-11-03 14:45:06 +08:00
parent c8680c9fb3
commit 5e6bc7b933
6 changed files with 11 additions and 8 deletions

View file

@ -1,6 +1,6 @@
{
"notBatchRemove": "Notebooks do not support batch deletion",
"confirmRemove": "Are you sure you want to delete the ${count} selected files?",
"confirmRemoveAll": "Are you sure you want to delete all selected files?",
"microphoneDenied": "Need to allow Siyuan to access the microphone in System Preferences",
"microphoneNotAccess": "Access to the microphone is denied, go to System Preferences to reset",
"dynamicLoadBlocks": "Number of dynamically loaded blocks",

View file

@ -1,6 +1,6 @@
{
"notBatchRemove": "Los portátiles no admiten la eliminación por lotes",
"confirmRemove": "¿Está seguro de que desea eliminar los ${count} archivos seleccionados?",
"confirmRemoveAll": "¿Está seguro de que desea eliminar todos los archivos seleccionados?",
"microphoneDenied": "Necesito permitir que Siyuan acceda al micrófono en Preferencias del Sistema",
"microphoneNotAccess": "Acceso al micrófono denegado, ve a Preferencias del Sistema para reiniciar",
"dynamicLoadBlocks": "Número de bloques cargados dinámicamente",

View file

@ -1,6 +1,6 @@
{
"notBatchRemove": "Les blocs-notes ne prennent pas en charge la suppression par lots",
"confirmRemove": "Êtes-vous sûr de vouloir supprimer les ${count} fichiers sélectionnés ?",
"confirmRemoveAll": "Êtes-vous sûr de vouloir supprimer tous les fichiers sélectionnés ?",
"microphoneDenied": "Vous devez autoriser Siyuan à accéder au microphone dans les Préférences Système",
"microphoneNotAccess": "L'accès au microphone est refusé, allez dans les Préférences Système pour réinitialiser",
"dynamicLoadBlocks": "Nombre de blocs chargés dynamiquement",

View file

@ -1,6 +1,6 @@
{
"notBatchRemove": "筆記本不支持批量刪除",
"confirmRemove": "確定刪除選中的 ${count} 個文件?",
"confirmRemoveAll": "确定删除选中的所有文件?",
"microphoneDenied": "需在系統偏好設置中允許思源訪問麥克風",
"microphoneNotAccess": "麥克風被拒絕訪問,可前往系統偏好設置中重新設置",
"dynamicLoadBlocks": "動態加載塊數",

View file

@ -1,6 +1,6 @@
{
"notBatchRemove": "笔记本不支持批量删除",
"confirmRemove": "确定删除选中的 ${count} 个文件?",
"confirmRemoveAll": "确定删除选中的所有文件?",
"microphoneDenied": "需在系统偏好设置中允许思源访问麦克风",
"microphoneNotAccess": "麦克风被拒绝访问,可前往系统偏好设置中重新设置",
"dynamicLoadBlocks": "动态加载块数",

View file

@ -49,14 +49,17 @@ export const deleteFiles = (liElements: Element[]) => {
} else {
const paths: string[] = []
liElements.forEach(item => {
paths.push(item.getAttribute("data-path"));
const dataPath = item.getAttribute("data-path")
if(dataPath !== "/") {
paths.push(item.getAttribute("data-path"));
}
})
if (paths.includes("/")) {
if (paths.length === 0) {
showMessage(window.siyuan.languages.notBatchRemove);
return;
}
confirmDialog(window.siyuan.languages.deleteOpConfirm,
window.siyuan.languages.confirmRemove.replace("${count}", liElements.length), () => {
window.siyuan.languages.confirmRemoveAll, () => {
fetchPost("/api/notebook/removeDocs", {
paths
});