diff --git a/src/main/index.js b/src/main/index.js
index f3c996f3..7fe3c9c3 100644
--- a/src/main/index.js
+++ b/src/main/index.js
@@ -225,6 +225,10 @@ const createMiniWidow = () => {
obj.transparent = false
}
+ if (db.read().get('miniWindowOntop').value()) {
+ obj.alwaysOnTop = true
+ }
+
miniWindow = new BrowserWindow(obj)
miniWindow.loadURL(miniWinURL)
diff --git a/src/main/utils/aliYunUpload.js b/src/main/utils/aliYunUpload.js
index 3273571e..0f170a38 100644
--- a/src/main/utils/aliYunUpload.js
+++ b/src/main/utils/aliYunUpload.js
@@ -1,7 +1,7 @@
import request from 'request-promise'
import * as img2Base64 from './img2base64'
import db from '../../datastore/index'
-import { Notification, clipboard } from 'electron'
+import { Notification } from 'electron'
import crypto from 'crypto'
import mime from 'mime-types'
diff --git a/src/renderer/components/SettingView/PicGoSetting.vue b/src/renderer/components/SettingView/PicGoSetting.vue
index e3c9779c..d23a13ae 100644
--- a/src/renderer/components/SettingView/PicGoSetting.vue
+++ b/src/renderer/components/SettingView/PicGoSetting.vue
@@ -76,6 +76,16 @@
@change="handleUploadNotification"
>
+
+
+
@@ -201,7 +211,8 @@ export default {
autoStart: this.$db.get('picBed.autoStart').value() || false,
rename: this.$db.get('picBed.rename').value() || false,
autoRename: this.$db.get('picBed.autoRename').value() || false,
- uploadNotification: this.$db.get('picBed.uploadNotification').value() || false
+ uploadNotification: this.$db.get('picBed.uploadNotification').value() || false,
+ miniWindowOntop: db.read().get('miniWindowOntop').value() || false
},
picBed: this.$picBed,
keyBindingVisible: false,
@@ -316,6 +327,10 @@ export default {
},
handleUploadNotification (val) {
this.$db.read().set('picBed.uploadNotification', val).write()
+ },
+ handleMiniWindowOntop (val) {
+ this.$db.read().set('miniWindowOntop', val).write()
+ this.$message('需要重启生效')
}
},
beforeDestroy () {