Merge pull request #3482 from h3poteto/iss-3373
refs #3373 Unwrap proxy object when save network preferences
This commit is contained in:
commit
60162bdd46
|
@ -1,4 +1,5 @@
|
||||||
import { Module, MutationTree, ActionTree, GetterTree } from 'vuex'
|
import { Module, MutationTree, ActionTree, GetterTree } from 'vuex'
|
||||||
|
import { toRaw } from 'vue'
|
||||||
import { RootState } from '@/store'
|
import { RootState } from '@/store'
|
||||||
import { BaseConfig } from '~/src/types/preference'
|
import { BaseConfig } from '~/src/types/preference'
|
||||||
import { Proxy, ProxySource, ProxyProtocol, ManualProxy } from '~/src/types/proxy'
|
import { Proxy, ProxySource, ProxyProtocol, ManualProxy } from '~/src/types/proxy'
|
||||||
|
@ -128,8 +129,8 @@ const actions: ActionTree<NetworkState, RootState> = {
|
||||||
},
|
},
|
||||||
[ACTION_TYPES.SAVE_PROXY_CONFIG]: async ({ state }) => {
|
[ACTION_TYPES.SAVE_PROXY_CONFIG]: async ({ state }) => {
|
||||||
const proxy: Proxy = {
|
const proxy: Proxy = {
|
||||||
source: state.source,
|
source: toRaw(state.source),
|
||||||
manualProxyConfig: state.proxy
|
manualProxyConfig: toRaw(state.proxy)
|
||||||
}
|
}
|
||||||
// Originally we have to restart all streamings after user change proxy configuration.
|
// Originally we have to restart all streamings after user change proxy configuration.
|
||||||
// But streamings are restart after close preferences.
|
// But streamings are restart after close preferences.
|
||||||
|
|
Loading…
Reference in New Issue