Skip to content

Commit

Permalink
fix(preferences): Update banned IP field when banning from the Peers …
Browse files Browse the repository at this point in the history
…tab (#1518)
  • Loading branch information
Larsluph committed Feb 14, 2024
1 parent a71fbcd commit 55f4865
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/TorrentDetail/Peers.vue
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { codeToFlag, formatData, formatPercent, formatSpeed, isWindows } from '@/helpers'
import { useMaindataStore, useVueTorrentStore } from '@/stores'
import { useMaindataStore, usePreferenceStore, useVueTorrentStore } from '@/stores'
import { Peer } from '@/types/qbit/models'
import { Torrent } from '@/types/vuetorrent'
import { onBeforeMount, onUnmounted, ref, watch } from 'vue'
Expand All @@ -12,6 +12,7 @@ type PeerType = Peer & { host: string }
const { t } = useI18n()
const maindataStore = useMaindataStore()
const preferenceStore = usePreferenceStore()
const vuetorrentStore = useVueTorrentStore()
const loading = ref(false)
Expand Down Expand Up @@ -44,6 +45,7 @@ function closeAddDialog() {
async function banPeer(peer: PeerType) {
await maindataStore.banPeers([peer.host])
await preferenceStore.fetchPreferences()
await updatePeers()
}
Expand Down

0 comments on commit 55f4865

Please sign in to comment.