Fix formatting issues
This commit is contained in:
parent
909ff6efdf
commit
de9e22d179
@ -307,7 +307,6 @@ async function handleNextProxy() {
|
|||||||
status: 'connected',
|
status: 'connected',
|
||||||
proxy: result.proxy
|
proxy: result.proxy
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -442,7 +441,7 @@ async function handleSaveSettings(settings) {
|
|||||||
Utils.log('warn', 'Custom proxy settings invalid, disconnecting...');
|
Utils.log('warn', 'Custom proxy settings invalid, disconnecting...');
|
||||||
await ProxyManager.disconnect();
|
await ProxyManager.disconnect();
|
||||||
await Storage.setProxyEnabled(false);
|
await Storage.setProxyEnabled(false);
|
||||||
broadcastMessage({
|
broadcastMessage({
|
||||||
action: 'statusUpdate',
|
action: 'statusUpdate',
|
||||||
status: 'error',
|
status: 'error',
|
||||||
error: 'Custom proxy not configured'
|
error: 'Custom proxy not configured'
|
||||||
@ -457,7 +456,7 @@ async function handleSaveSettings(settings) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
broadcastMessage({
|
broadcastMessage({
|
||||||
action: 'statusUpdate',
|
action: 'statusUpdate',
|
||||||
status: 'connected',
|
status: 'connected',
|
||||||
proxy: { host: customProxy.ip, port: customProxy.port },
|
proxy: { host: customProxy.ip, port: customProxy.port },
|
||||||
@ -467,7 +466,7 @@ async function handleSaveSettings(settings) {
|
|||||||
// Failed to apply - disconnect
|
// Failed to apply - disconnect
|
||||||
await ProxyManager.disconnect();
|
await ProxyManager.disconnect();
|
||||||
await Storage.setProxyEnabled(false);
|
await Storage.setProxyEnabled(false);
|
||||||
broadcastMessage({
|
broadcastMessage({
|
||||||
action: 'statusUpdate',
|
action: 'statusUpdate',
|
||||||
status: 'error',
|
status: 'error',
|
||||||
error: 'Failed to apply proxy settings'
|
error: 'Failed to apply proxy settings'
|
||||||
@ -557,7 +556,6 @@ function broadcastMessage(message) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle proxy errors
|
* Handle proxy errors
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user