mas file permission tips

This commit is contained in:
qishibo 2021-02-27 17:27:57 +08:00
parent 31587ed75f
commit 7945daf9f2
10 changed files with 25 additions and 7 deletions

View File

@ -108,6 +108,7 @@ const cn = {
delete_all: '全部删除',
clear_cache: '清除缓存',
mark_color: '标记颜色',
key_no_permission: '文件读取权限已过期,请手动重新选择密钥文件',
},
};

View File

@ -108,6 +108,7 @@ const de = {
delete_all: 'Alle löschen',
clear_cache: 'Cache leeren',
mark_color: 'Farbe markieren',
key_no_permission: 'Die Berechtigung zum Lesen von Dateien ist abgelaufen. Wählen Sie die Schlüsseldatei erneut manuell aus',
},
};

View File

@ -108,6 +108,7 @@ const en = {
delete_all: 'Delete All',
clear_cache: 'Clear Cache',
mark_color: 'Mark Color',
key_no_permission: 'File read permission has expired, please reselect the key file manually',
},
};

View File

@ -108,6 +108,7 @@ const fr = {
delete_all: 'Supprimer tout',
clear_cache: 'Vider le cache',
mark_color: 'Couleur de la marque',
key_no_permission: 'L\'autorisation de lecture de fichier a expiré, veuillez resélectionner le fichier de clé manuellement',
},
};

View File

@ -108,6 +108,7 @@ const pt = {
delete_all: 'Apagar Tudo',
clear_cache: 'Limpar cache',
mark_color: 'Cor da marca',
key_no_permission: 'A permissão de leitura do arquivo expirou, selecione novamente o arquivo de chave manualmente',
},
};

View File

@ -108,6 +108,7 @@ const ru = {
delete_all: 'Удалить все',
clear_cache: 'Oчистить кэш',
mark_color: 'Цвет отметки',
key_no_permission: 'Срок действия разрешения на чтение файла истек, пожалуйста, повторно выберите ключевой файл вручную',
},
};

View File

@ -108,6 +108,7 @@ const tr = {
delete_all: 'Hepsini sil',
clear_cache: 'önbelleği temizle',
mark_color: 'Mark rengi',
key_no_permission: 'Dosya okuma izninin süresi doldu, lütfen anahtar dosyasını manuel olarak yeniden seçin',
},
};

View File

@ -108,6 +108,7 @@ const tw = {
delete_all: '全部删除',
clear_cache: '清除緩存',
mark_color: '標記顏色',
key_no_permission: '文件讀取權限已過期,請手動重新選擇密鑰文件',
},
};

View File

@ -108,6 +108,7 @@ const ua = {
delete_all: 'Видалити все',
clear_cache: 'Oчистити кеш',
mark_color: 'Позначити колір',
key_no_permission: 'Термін дії дозволу на читання файлу закінчився, будь-ласка, виберіть файл ключа вручну',
},
};

View File

@ -227,15 +227,24 @@ export default {
return undefined;
}
// mac app store version, read through bookmark
if (bookmark) {
const bookmarkClose = remote.app.startAccessingSecurityScopedResource(bookmark);
try {
// mac app store version, read through bookmark
if (bookmark) {
const bookmarkClose = remote.app.startAccessingSecurityScopedResource(bookmark);
}
const content = fs.readFileSync(file);
(typeof bookmarkClose == 'function') && bookmarkClose();
return content;
}
catch (e) {
// force alert
alert(vue.$t('message.key_no_permission') + `\n[${e.message}]`);
vue.$bus.$emit('closeConnection');
const content = fs.readFileSync(file);
(typeof bookmarkClose == 'function') && bookmarkClose();
return content;
return undefined;
}
},
};