Compare commits

..
Author SHA1 Message Date
PiEgg 6e855384e0 🎉 Release: v2.3.0-beta.3 2020-07-12 22:02:58 +08:00
PiEgg 21d3942d2b 🐛 Fix: choose default picBed failure
ISSUES CLOSED: #537
2020-07-12 22:01:37 +08:00
PiEgg 4f0809e6b3 🐛 Fix: shortkey disabled failure
ISSUES CLOSED: #534
2020-07-12 18:19:31 +08:00
11 changed files with 39 additions and 14 deletions
+10
View File
@@ -1,3 +1,13 @@
# :tada: 2.3.0-beta.3 (2020-07-12)
### :bug: Bug Fixes
* choose default picBed failure ([21d3942](https://github.com/Molunerfinn/PicGo/commit/21d3942)), closes [#537](https://github.com/Molunerfinn/PicGo/issues/537)
* shortkey disabled failure ([4f0809e](https://github.com/Molunerfinn/PicGo/commit/4f0809e)), closes [#534](https://github.com/Molunerfinn/PicGo/issues/534)
# :tada: 2.3.0-beta.2 (2020-07-12)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "picgo",
"version": "2.3.0-beta.2",
"version": "2.3.0-beta.3",
"private": true,
"scripts": {
"dev": "vue-cli-service electron:serve",
+13 -5
View File
@@ -24,11 +24,14 @@ class ShortKeyHandler {
const commands = db.get('settings.shortKey') as IShortKeyConfigs
Object.keys(commands)
.filter(item => item.includes('picgo:'))
.map(command => {
.forEach(command => {
const config = commands[command]
globalShortcut.register(config.key, () => {
this.handler(command)
})
// if disabled, don't register #534
if (config.enable) {
globalShortcut.register(config.key, () => {
this.handler(command)
})
}
})
}
private initPluginsShortKey () {
@@ -46,7 +49,10 @@ class ShortKeyHandler {
const command = `${item}:${cmd.name}`
if (db.has(`settings.shortKey[${command}]`)) {
const commandConfig = db.get(`settings.shortKey.${command}`) as IShortKeyConfig
this.registerShortKey(commandConfig, command, cmd.handle, false)
// if disabled, don't register #534
if (commandConfig.enable) {
this.registerShortKey(commandConfig, command, cmd.handle, false)
}
} else {
this.registerShortKey(cmd, command, cmd.handle, true)
}
@@ -65,6 +71,8 @@ class ShortKeyHandler {
} else {
logger.warn(`${command} do not provide a key to bind`)
}
// if the configfile already had this command
// then writeFlag -> false
if (writeFlag) {
picgo.saveConfig({
[`settings.shortKey.${command}`]: {
+2 -1
View File
@@ -28,7 +28,8 @@ export function createContextMenu () {
checked: db.get('picBed.current') === item.type,
click () {
picgo.saveConfig({
'picBed.current': item.type
'picBed.current': item.type,
'picBed.uploader': item.type
})
if (windowManager.has(IWindowList.SETTING_WINDOW)) {
windowManager.get(IWindowList.SETTING_WINDOW)!.webContents.send('syncPicBed')
+2 -1
View File
@@ -28,7 +28,8 @@ export default {
methods: {
choosePicBed (val) {
this.letPicGoSaveData({
'picBed.current': this.type
'picBed.current': this.type,
'picBed.uploader': this.type
})
this.$emit('update:choosed', this.type)
}
+2 -1
View File
@@ -145,7 +145,8 @@ export default class extends Vue {
checked: this.$db.get('picBed.current') === item.type,
click () {
_this.letPicGoSaveData({
'picBed.current': item.type
'picBed.current': item.type,
'picBed.uploader': item.type
})
ipcRenderer.send('syncPicBed')
}
+2 -1
View File
@@ -433,7 +433,8 @@ export default class extends Vue {
const current = this.$db.get('picBed.current')
if (current === name) {
this.letPicGoSaveData({
'picBed.current': 'smms'
'picBed.current': 'smms',
'picBed.uploader': 'smms'
})
}
}
+2 -1
View File
@@ -222,7 +222,8 @@ export default class extends Vue {
checked: this.$db.get('picBed.current') === item.type,
click () {
_this.letPicGoSaveData({
'picBed.current': item.type
'picBed.current': item.type,
'picBed.uploader': item.type
})
ipcRenderer.send('syncPicBed')
}
+2 -1
View File
@@ -69,7 +69,8 @@ export default class extends Vue {
}
setDefaultPicBed (type: string) {
this.letPicGoSaveData({
'picBed.current': type
'picBed.current': type,
'picBed.uploader': type
})
// @ts-ignore 来自mixin的数据
this.defaultPicBed = type
+2 -1
View File
@@ -5,7 +5,8 @@ export default class extends Vue {
defaultPicBed = this.$db.get('picBed.current')
setDefaultPicBed (type: string) {
this.letPicGoSaveData({
'picBed.current': type
'picBed.current': type,
'picBed.uploader': type
})
this.defaultPicBed = type
const successNotification = new Notification('设置默认图床', {
+1 -1
View File
@@ -29,7 +29,7 @@ class DB {
if (!this.db.has('picBed').value()) {
this.db.set('picBed', {
current: 'smms',
current: 'smms', // deprecated
uploader: 'smms',
smms: {
token: ''