gaoshuaixing %!s(int64=4) %!d(string=hai) anos
pai
achega
d35f4222a7
Modificáronse 3 ficheiros con 2 adicións e 22 borrados
  1. 1 2
      electron/apis/example.js
  2. 1 1
      electron/lib/shortcut.js
  3. 0 19
      electron/lib/storage.js

+ 1 - 2
electron/apis/example.js

@@ -4,8 +4,7 @@ const path = require('path');
 const {
   app,
   webContents,
-  shell,
-  globalShortcut
+  shell
 } = require('electron');
 const shortcut = require('../lib/shortcut');
 

+ 1 - 1
electron/lib/shortcut.js

@@ -13,7 +13,7 @@ exports.register = function (shortcutObj, force = true, fn) {
     return false;
   }
   const isRegistered = this.isRegistered(shortcutObj['cmd']);
-  console.log('[shortcut] [register] cmd:', [shortcutObj['cmd'], isRegistered]);
+  // console.log('[shortcut] [register] cmd:', [shortcutObj['cmd'], isRegistered]);
   if (isRegistered && !force) {
     return false;
   }

+ 0 - 19
electron/lib/storage.js

@@ -114,25 +114,6 @@ exports.setShortcuts = function (data) {
     .assign(data)
     .write();
   }
-  // const count = this.instance()
-  // .get(key)
-  // .filter(function(o) {
-  //   let isHas = false;
-  //   if (o.cmd == data.cmd) {
-  //     isHas = true;
-  //   }
-  //   return isHas;
-  // })
-  // .size()
-  // .value();
-  // if (count > 0) {
-  //   return false;
-  // }
-
-  // this.instance()
-  // .get(key)
-  // .push(data)
-  // .write();
 
   return true;
 };