File tree 2 files changed +11
-11
lines changed
2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1
1
<script lang="ts" setup>
2
- import { provide , onMounted } from ' vue' ;
2
+ import { provide } from ' vue' ;
3
3
import { useQueryProvider } from ' vue-query' ;
4
4
import { NConfigProvider , GlobalThemeOverrides , darkTheme } from ' naive-ui' ;
5
5
6
6
import Popup from ' @/popup/Popup.vue' ;
7
-
8
7
import useConnection , { ConnectionKey } from ' @/composables/useConnection' ;
9
- import useListProxies from ' @/composables/useListProxies' ;
10
8
11
9
const { isLoading, connection, isError } = useConnection ();
12
- const { getSocksProxies } = useListProxies ();
13
10
14
11
provide (ConnectionKey , { connection , isLoading , isError });
15
12
16
- const loadProxies = async () => {
17
- await getSocksProxies ();
18
- };
19
-
20
- onMounted (loadProxies );
21
-
22
13
useQueryProvider ();
23
14
const themeOverrides: GlobalThemeOverrides = {
24
15
common: {
Original file line number Diff line number Diff line change 1
1
<script lang="ts" setup>
2
- import { computed , inject } from ' vue' ;
2
+ import { computed , inject , onMounted } from ' vue' ;
3
3
4
4
import IconLabel from ' @/components/IconLabel.vue' ;
5
5
import LocationDrawer from ' @/components/ConnectionDetails/LocationDrawer.vue' ;
@@ -8,15 +8,24 @@ import ProxyHost from '@/components/Proxy/ProxyHost.vue';
8
8
9
9
import useActiveTab from ' @/composables/useActiveTab' ;
10
10
import { ConnectionKey , defaultConnection } from ' @/composables/useConnection' ;
11
+ import useListProxies from ' @/composables/useListProxies' ;
11
12
12
13
const { isAboutPage } = useActiveTab ();
14
+ const { getSocksProxies } = useListProxies ();
15
+
13
16
const { connection } = inject (ConnectionKey , defaultConnection );
14
17
15
18
const isWireGuard = computed (
16
19
() =>
17
20
connection .value .protocol === ' WireGuard' ||
18
21
connection .value .protocol === ' SOCKS through WireGuard' ,
19
22
);
23
+
24
+ const loadProxies = async () => {
25
+ await getSocksProxies ();
26
+ };
27
+
28
+ onMounted (loadProxies );
20
29
</script >
21
30
22
31
<template >
You can’t perform that action at this time.
0 commit comments