From 3c447098c63c2fd758947067f3a3c2b3ea763078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Marseault?= <22910497+Larsluph@users.noreply.github.com> Date: Tue, 21 Nov 2023 04:22:09 +0100 Subject: [PATCH] fix(Advanced): Network interfaces doesn't fill properly (#1337) --- src/components/Settings/Advanced.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Settings/Advanced.vue b/src/components/Settings/Advanced.vue index 4c5e172e..2b8653d4 100644 --- a/src/components/Settings/Advanced.vue +++ b/src/components/Settings/Advanced.vue @@ -9,7 +9,7 @@ import { } from '@/constants/qbit/AppPreferences' import { qbit } from '@/services' import { usePreferenceStore } from '@/stores' -import { computed, onBeforeMount } from 'vue' +import { computed, onBeforeMount, ref } from 'vue' import { useI18n } from 'vue-i18n' const { t } = useI18n() @@ -19,15 +19,15 @@ const resumeDataStorageTypeOptions = [ { title: t('settings.advanced.qbittorrent.resumeDataStorageType.legacy'), value: ResumeDataStorageType.LEGACY }, { title: t('settings.advanced.qbittorrent.resumeDataStorageType.sqlite'), value: ResumeDataStorageType.SQLITE } ] -const networkInterfaceOptions = [{ +const networkInterfaceOptions = ref([{ title: t('settings.advanced.qbittorrent.networking.networkInterfaces.any'), value: '' -}] -const ipAddressesOptions = [ +}]) +const ipAddressesOptions = ref([ { title: t('settings.advanced.qbittorrent.networking.ipAddress.all'), value: '' }, { title: t('settings.advanced.qbittorrent.networking.ipAddress.allIPv4'), value: '0.0.0.0' }, { title: t('settings.advanced.qbittorrent.networking.ipAddress.allIPv6'), value: '::' } -] +]) const diskIoTypeOptions = [ { title: t('constants.diskIoType.default'), value: DiskIOType.DEFAULT }, { title: t('constants.diskIoType.memoryMappedFiles'), value: DiskIOType.MEMORY_MAPPED_FILES }, @@ -66,12 +66,12 @@ const torrentFileSizeLimit = computed({ onBeforeMount(async () => { const networkInterfaces = await qbit.getNetworkInterfaces() for (const networkInterface of networkInterfaces) { - networkInterfaceOptions.push({ title: networkInterface.name, value: networkInterface.value }) + networkInterfaceOptions.value.push({ title: networkInterface.name, value: networkInterface.value }) } const ipAddresses = await qbit.getAddresses(preferenceStore.preferences!.current_network_interface) for (const ipAddress of ipAddresses) { - ipAddressesOptions.push({ title: ipAddress, value: ipAddress }) + ipAddressesOptions.value.push({ title: ipAddress, value: ipAddress }) } })