- onenote.git
- src
- electron
- window
- onenote
- action
- set-proxy.js
This file ( 913B ) 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');
module.exports = async (data) => {
let valueProxy = '';
let cancelled = false;
try {
valueProxy = await global.p3x.onenote.prompt.setProxy();
valueProxy = valueProxy === undefined ? '' : valueProxy.trim();
} catch (e) {
if (e !== undefined) {
console.error(e);
} else {
cancelled = true;
}
} finally {
if (!cancelled) {
global.p3x.onenote.data.proxy = valueProxy;
if (valueProxy === '') {
global.p3x.onenote.toast.setProxy.clear()
} else {
global.p3x.onenote.toast.setProxy.set(valueProxy)
}
//console.log('set-proxy', global.p3x.onenote.data.proxy)
ipcRenderer.send('p3x-onenote-save', global.p3x.onenote.data);
require('./load-proxy')()
}
}
}