File tree 3 files changed +20
-22
lines changed
3 files changed +20
-22
lines changed Original file line number Diff line number Diff line change 1
1
<script lang="ts" setup>
2
- import { NCard , NSwitch , NTooltip } from ' naive-ui' ;
2
+ import { NCard , NCheckbox , NSwitch , NTooltip } from ' naive-ui' ;
3
3
4
4
import Button from ' @/components/Buttons/Button.vue' ;
5
5
import TitleCategory from ' @/components/TitleCategory.vue' ;
@@ -40,16 +40,12 @@ const handleProxySelect = () => {
40
40
<li >Proxy Server: {{ globalProxyDetails.server }}</li >
41
41
<li >
42
42
Proxy DNS
43
- <n-tooltip v-if =" globalProxyDetails.server" >
44
- <template #trigger >
45
- <n-switch
46
- :value =" globalProxyDNSEnabled"
47
- size =" small"
48
- @update-value =" toggleGlobalProxyDNS"
49
- />
50
- </template >
51
- <span > {{ globalProxyDNSEnabled ? 'DNS proxied' : 'DNS not proxied' }}</span >
52
- </n-tooltip >
43
+ <n-checkbox
44
+ size =" large"
45
+ :checked =" globalProxyDNSEnabled"
46
+ :focusable =" false"
47
+ @update-checked =" toggleGlobalProxyDNS"
48
+ />
53
49
</li >
54
50
</ul >
55
51
</div >
Original file line number Diff line number Diff line change 1
1
<script lang="ts" setup>
2
2
import { computed } from ' vue' ;
3
- import { NCard , NSwitch , NTooltip } from ' naive-ui' ;
3
+ import { NCard , NCheckbox , NSwitch , NTooltip } from ' naive-ui' ;
4
4
5
5
import Button from ' @/components/Buttons/Button.vue' ;
6
6
import TitleCategory from ' @/components/TitleCategory.vue' ;
@@ -56,16 +56,12 @@ const handleProxySelect = () => {
56
56
<li >Proxy Server: {{ currentHostProxyDetails.server }}</li >
57
57
<li >
58
58
Proxy DNS
59
- <n-tooltip v-if =" currentHostProxyDetails && !currentHostExcluded" >
60
- <template #trigger >
61
- <n-switch
62
- :value =" currentHostProxyDNSEnabled"
63
- size =" small"
64
- @update-value =" toggleCurrentHostProxyDNS"
65
- />
66
- </template >
67
- <span > {{ currentHostProxyDNSEnabled ? 'DNS proxied' : 'DNS not proxied' }}</span >
68
- </n-tooltip >
59
+ <n-checkbox
60
+ size =" large"
61
+ :checked =" currentHostProxyDNSEnabled"
62
+ :focusable =" false"
63
+ @update-checked =" toggleCurrentHostProxyDNS"
64
+ />
69
65
</li >
70
66
</ul >
71
67
</div >
Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ const themeOverrides: GlobalThemeOverrides = {
39
39
Switch: {
40
40
railColorActive: ' var(--success)' ,
41
41
},
42
+ Checkbox: {
43
+ colorChecked: ' var(--blue)' ,
44
+ checkMarkColor: ' var(--success)' ,
45
+ border: ' 1px solid var(--blue)' ,
46
+ borderChecked: ' 1px solid var(--blue)' ,
47
+ },
42
48
};
43
49
</script >
44
50
You can’t perform that action at this time.
0 commit comments