Merge pull request #1069 from h3poteto/iss-982

refs #982 Reload proxy configuration after changed
This commit is contained in:
AkiraFukushima 2019-10-31 09:05:09 +09:00 committed by GitHub
commit b677a706ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 5 deletions

6
package-lock.json generated
View File

@ -8166,9 +8166,9 @@
"dev": true
},
"element-ui": {
"version": "2.12.0",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.12.0.tgz",
"integrity": "sha512-DapyT0PW4i/1ETPHk8K8Qbe8B6hj10+dXsRTrOTFryV9wAs6e9mCxbV65awokyR2/v/KuIHJmqX+mH3wUa4rOQ==",
"version": "2.4.11",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.4.11.tgz",
"integrity": "sha512-RtgK0t840NAFTajGMWvylzZRSX1EkZ7V4YgAoBxhv4TtkeMscLuk/IdYOzPdlQq6IN0byx1YVBxCX+u4yYkGvw==",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",

View File

@ -171,7 +171,7 @@
"electron-json-storage": "^4.1.5",
"electron-log": "^2.2.17",
"electron-window-state": "^5.0.3",
"element-ui": "^2.12.0",
"element-ui": "2.4.11",
"emoji-mart-vue": "^2.6.6",
"emojilib": "^2.4.0",
"hawk": "^7.0.10",

View File

@ -122,11 +122,17 @@ const actions: ActionTree<NetworkState, RootState> = {
updatePassword: ({ commit }, password: string) => {
commit(MUTATION_TYPES.UPDATE_PASSWORD, password)
},
saveProxyConfig: ({ state }) => {
saveProxyConfig: ({ state, dispatch }) => {
const proxy: Proxy = {
source: state.source,
manualProxyConfig: state.proxy
}
ipcRenderer.once('response-update-proxy-config', async () => {
dispatch('App/loadProxy', {}, { root: true })
// Originally we have to restart all streamings after user change proxy configuration.
// But streamings are restart after close preferences.
// So we don't have to restart streaming here.
})
ipcRenderer.send('update-proxy-config', proxy)
}
}