From 98b01e054ecda506780580c0860fd7253f2a1f6d Mon Sep 17 00:00:00 2001 From: lancegin Date: Thu, 30 Nov 2017 14:06:44 +0800 Subject: [PATCH] add: dragging file enter the tray will open the upload window --- src/main/index.js | 4 +++- src/renderer/components/BucketList.vue | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index b5205d3..60270e8 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -107,7 +107,7 @@ function createWindow() { useContentSize: true, width: 400, titleBarStyle: 'hidden-inset', - resizable: true, + resizable: false, show: false, }); @@ -156,6 +156,7 @@ function createWindow() { checked: true, click() { event.sender.send('setDefaultBucket', bucketTmp); + defaultBucket = bucketTmp; }, }; } else { @@ -164,6 +165,7 @@ function createWindow() { type: 'radio', click() { event.sender.send('setDefaultBucket', bucketTmp); + defaultBucket = bucketTmp; }, }; } diff --git a/src/renderer/components/BucketList.vue b/src/renderer/components/BucketList.vue index f27442a..c9077db 100644 --- a/src/renderer/components/BucketList.vue +++ b/src/renderer/components/BucketList.vue @@ -64,10 +64,6 @@ localStorage.db = arg; }); - // send signal and transfer localstorage to the main process - ipcRenderer.send('setKey', key); - // console.log(localStorage.db); - let buckets; export default { name: 'bucket-list', @@ -115,6 +111,10 @@ localStorage.clear(); this.$router.push({ path: '/login' }); }); + + // send signal and transfer localstorage to the main process + ipcRenderer.send('setKey', key); + // console.log(localStorage.db); }, methods: { // create new bucket