-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathApp.vue
55 lines (47 loc) · 1.3 KB
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<script lang="ts" setup>
import { provide, onMounted } from 'vue';
import { useQueryProvider } from 'vue-query';
import { NConfigProvider, GlobalThemeOverrides, darkTheme } from 'naive-ui';
import Popup from '@/popup/Popup.vue';
import useConnection, { ConnectionKey } from '@/composables/useConnection';
import useListProxies from '@/composables/useListProxies';
const { isLoading, connection, isError } = useConnection();
const { getSocksProxies } = useListProxies();
provide(ConnectionKey, { connection, isLoading, isError });
const loadProxies = async () => {
await getSocksProxies();
};
onMounted(loadProxies);
useQueryProvider();
const themeOverrides: GlobalThemeOverrides = {
common: {
cardColor: 'rgba(41, 77, 115, 0.5)',
fontSize: '1rem',
lineHeight: '1.4',
},
Avatar: {
color: 'transparent',
},
Card: {
actionColor: 'transparent',
borderRadius: '8px',
},
Drawer: {
color: 'var(--dark-blue)',
},
Switch: {
railColorActive: 'var(--success)',
},
Checkbox: {
colorChecked: 'var(--blue)',
checkMarkColor: 'var(--success)',
border: '1px solid var(--blue)',
borderChecked: '1px solid var(--blue)',
},
};
</script>
<template>
<n-config-provider :theme-overrides="themeOverrides" :theme="darkTheme">
<Popup />
</n-config-provider>
</template>