File tree 2 files changed +12
-12
lines changed
2 files changed +12
-12
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
import { NCard } from ' naive-ui' ;
4
4
5
5
import Button from ' @/components/Buttons/Button.vue' ;
@@ -11,17 +11,26 @@ import TitleCategory from '@/components/TitleCategory.vue';
11
11
12
12
import useActiveTab from ' @/composables/useActiveTab' ;
13
13
import { ConnectionKey , defaultConnection } from ' @/composables/useConnection' ;
14
+ import useListProxies from ' @/composables/useListProxies' ;
14
15
import useProxyPermissions from ' @/composables/useProxyPermissions' ;
15
16
16
- const { proxyPermissionsGranted, triggerProxyPermissions } = useProxyPermissions ();
17
17
const { isAboutPage } = useActiveTab ();
18
+ const { getSocksProxies } = useListProxies ();
19
+ const { proxyPermissionsGranted, triggerProxyPermissions } = useProxyPermissions ();
20
+
18
21
const { connection } = inject (ConnectionKey , defaultConnection );
19
22
20
23
const isWireGuard = computed (
21
24
() =>
22
25
connection .value .protocol === ' WireGuard' ||
23
26
connection .value .protocol === ' SOCKS through WireGuard' ,
24
27
);
28
+
29
+ const loadProxies = async () => {
30
+ await getSocksProxies ();
31
+ };
32
+
33
+ onMounted (loadProxies );
25
34
</script >
26
35
27
36
<template >
You can’t perform that action at this time.
0 commit comments