frp/web/frps/src/components/ProxiesSUDP.vue

28 lines
607 B
Vue
Raw Normal View History

2021-05-11 13:37:14 +08:00
<template>
<ProxyView :proxies="proxies" proxyType="sudp" @refresh="fetchData"/>
2021-05-11 13:37:14 +08:00
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { SUDPProxy } from '../utils/proxy.js'
import ProxyView from './ProxyView.vue'
let proxies = ref<SUDPProxy[]>([])
const fetchData = () => {
fetch('../api/proxy/sudp', { credentials: 'include' })
.then((res) => {
return res.json()
})
.then((json) => {
proxies.value = []
for (let proxyStats of json.proxies) {
proxies.value.push(new SUDPProxy(proxyStats))
2021-05-11 13:37:14 +08:00
}
})
}
fetchData()
2021-05-11 13:37:14 +08:00
</script>
<style></style>