Skip to content

Commit

Permalink
Workaround globalProxyDetails state note updating
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihildt committed Dec 7, 2023
1 parent bf8d9d3 commit f843137
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/ProxyStatus/ProxyGlobal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import ProxyButton from '@/components/ProxyStatus/ProxyButton.vue';
import TitleCategory from '@/components/TitleCategory.vue';
import useSocksProxy from '@/composables/useSocksProxy';
import useStore from '@/composables/useStore';
const { globalProxyEnabled, toggleGlobalProxy } = useSocksProxy();
const { globalProxyDetails } = useStore();
const { globalProxyDetails, globalProxyEnabled, toggleGlobalProxy } = useSocksProxy();
// TODO Figure out why getting the state from useStore doesn't work
// const { globalProxyDetails } = useStore();
const status = computed(() => (globalProxyEnabled.value ? 'enabled' : 'disabled'));
</script>
Expand Down
1 change: 1 addition & 0 deletions src/composables/useSocksProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const useSocksProxy = () => {
return {
disableGlobalProxy,
enableGlobalProxy,
globalProxyDetails,
globalProxyEnabled,
initGlobalProxy,
setCustomProxy,
Expand Down

0 comments on commit f843137

Please sign in to comment.