- onenote.git
- src
- electron
- window
- onenote
- action
- set-proxy.js
This file ( 1kB ) exceeds the allowed full mode (48 kb) size.
The editor full hight is disabled, only scrolling is allowed..
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height
mode, although some users like it.
const { ipcRenderer} = require('electron');
const vex = require('vex-js');
module.exports = (data) => {
vex.dialog.prompt({
message: p3x.onenote.lang.label.setProxy,
placeholder: p3x.onenote.lang.dialog.setProxy.placeholder,
input: `<input name="vex" type="text" class="vex-dialog-prompt-input" placeholder="${p3x.onenote.lang.dialog.setProxy.placeholder}" value="${global.p3x.onenote.data.proxy}">`,
buttons: [
Object.assign({}, vex.dialog.buttons.YES, {
text: p3x.onenote.lang.button.save,
}),
Object.assign({}, vex.dialog.buttons.NO, {
text: p3x.onenote.lang.button.cancel
}),
],
callback: function (value) {
try {
global.p3x.onenote.data.proxy = value;
//console.log('set-proxy', global.p3x.onenote.data.proxy)
ipcRenderer.send('p3x-onenote-save', global.p3x.onenote.data);
require('./load-proxy')()
} catch(e) {
console.error(e)
}
}
})
}