Skip to content
Permalink
Browse files

Bug fixes, dependency updates

  • Loading branch information...
bluegill committed Mar 16, 2019
1 parent 854dd96 commit 3e673c2086a97f090d6e04c352d50513c438f19f
@@ -69,9 +69,11 @@ ipc.on('getOptions', (event, options) => {
$('#history .history-container > ul').append(element)
}

if (options.showIcon === true) $('#showIcon').prop('checked', true)
if (options.deleteOnUpload === true) $('#deleteOnUpload').prop('checked', true)
if (options.startAtLogin === true) $('#startAtLogin').prop('checked', true)
if (options.showIcon === true) { $('#showIcon').prop('checked', true) }

if (options.deleteOnUpload === true) { $('#deleteOnUpload').prop('checked', true) }

if (options.startAtLogin === true) { $('#startAtLogin').prop('checked', true) }

if (options.shortcuts) {
for (const shortcut of Object.keys(options.shortcuts)) {
@@ -91,11 +93,8 @@ ipc.on('getOptions', (event, options) => {

if (options.customService) {
$('#servicePrompt input[name="uploadPath"]').val(options.customService.uploadPath)
$('select[name="uploadService"]').val('custom')
}

if (options.customService) {
$('#servicePrompt input[name="resultPath"]').val(options.customService.resultPath)
$('select[name="uploadService"]').val('custom')
}
})

@@ -140,6 +139,7 @@ $('a[href="#cancel"]').click(() => {

$('input[type="checkbox"]').change(function () {
let option = $(this).attr('id')

optionsObj[option] = this.checked
})

@@ -149,14 +149,20 @@ $('select[name="uploadService"]').change(function () {
return (
showPrompt('#servicePrompt')
)
} else {
delete optionsObj.customService
}

if (!optionsObj.services) optionsObj.services = {}

optionsObj.services.uploadService = service
})

$('select[name="shortenerService"]').change(function () {
let service = $(this).find('option:selected').val()

if (!optionsObj.services) optionsObj.services = {}

optionsObj.services.shortenerService = service
})

@@ -198,13 +204,15 @@ function parseTime (str) {

function saveAndClose () {
ipc.send('saveOptions', optionsObj)

remote.getCurrentWindow().close()
}

function parseCombo (combo) {
if (combo.includes('meta')) {
combo = combo.replace('meta', 'command')
}

return combo
}

Oops, something went wrong.

0 comments on commit 3e673c2

Please sign in to comment.
You can’t perform that action at this time.