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

28 lines
607 B
Vue
Raw Normal View History

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