Skip to content

Commit

Permalink
Change the proxy DNS from a switch to a checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihildt committed Apr 19, 2024
1 parent 2c64c80 commit 13dfc67
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
18 changes: 7 additions & 11 deletions src/components/Proxy/ProxyGlobal.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { NCard, NSwitch, NTooltip } from 'naive-ui';
import { NCard, NCheckbox, NSwitch, NTooltip } from 'naive-ui';
import Button from '@/components/Buttons/Button.vue';
import TitleCategory from '@/components/TitleCategory.vue';
Expand Down Expand Up @@ -40,16 +40,12 @@ const handleProxySelect = () => {
<li>Proxy Server: {{ globalProxyDetails.server }}</li>
<li>
Proxy DNS
<n-tooltip v-if="globalProxyDetails.server">
<template #trigger>
<n-switch
:value="globalProxyDNSEnabled"
size="small"
@update-value="toggleGlobalProxyDNS"
/>
</template>
<span> {{ globalProxyDNSEnabled ? 'DNS proxied' : 'DNS not proxied' }}</span>
</n-tooltip>
<n-checkbox
size="large"
:checked="globalProxyDNSEnabled"
:focusable="false"
@update-checked="toggleGlobalProxyDNS"
/>
</li>
</ul>
</div>
Expand Down
18 changes: 7 additions & 11 deletions src/components/Proxy/ProxyHost.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { computed } from 'vue';
import { NCard, NSwitch, NTooltip } from 'naive-ui';
import { NCard, NCheckbox, NSwitch, NTooltip } from 'naive-ui';
import Button from '@/components/Buttons/Button.vue';
import TitleCategory from '@/components/TitleCategory.vue';
Expand Down Expand Up @@ -56,16 +56,12 @@ const handleProxySelect = () => {
<li>Proxy Server: {{ currentHostProxyDetails.server }}</li>
<li>
Proxy DNS
<n-tooltip v-if="currentHostProxyDetails && !currentHostExcluded">
<template #trigger>
<n-switch
:value="currentHostProxyDNSEnabled"
size="small"
@update-value="toggleCurrentHostProxyDNS"
/>
</template>
<span> {{ currentHostProxyDNSEnabled ? 'DNS proxied' : 'DNS not proxied' }}</span>
</n-tooltip>
<n-checkbox
size="large"
:checked="currentHostProxyDNSEnabled"
:focusable="false"
@update-checked="toggleCurrentHostProxyDNS"
/>
</li>
</ul>
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/popup/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ const themeOverrides: GlobalThemeOverrides = {
Switch: {
railColorActive: 'var(--success)',
},
Checkbox: {
colorChecked: 'var(--blue)',
checkMarkColor: 'var(--success)',
border: '1px solid var(--blue)',
borderChecked: '1px solid var(--blue)',
},
};
</script>

Expand Down

0 comments on commit 13dfc67

Please sign in to comment.