Commit 30a214a3 authored by antoor's avatar antoor

Update clear-all-cache features

更新清空所有缓存功能
parent 09a9f891
...@@ -301,7 +301,19 @@ class ContextMenu { ...@@ -301,7 +301,19 @@ class ContextMenu {
* @return {[type]} [description] * @return {[type]} [description]
*/ */
clearAllCache() { clearAllCache() {
layer.confirm(
LANG['list']['clearAllCache']['confirm'], {
icon: 2, shift: 6,
title: `<i class="fa fa-trash"></i> ${LANG['list']['clearAllCache']['title']}`
}, (_) => {
layer.close(_);
const ret = antSword['ipcRenderer'].sendSync('cache-clearAll');
if (ret === true) {
toastr.success(LANG['list']['clearAllCache']['success'], LANG_T['success']);
}else{
toastr.error(LANG['list']['clearAllCache']['error'](ret), LANG_T['error']);
}
});
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment