Merge pull request #3482 from h3poteto/iss-3373

refs #3373 Unwrap proxy object when save network preferences
This commit is contained in:
AkiraFukushima 2022-07-10 11:57:08 +09:00 committed by GitHub
commit 60162bdd46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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.