加入节点在线状态

This commit is contained in:
lingling 2023-03-19 23:15:29 +08:00
parent d40a68fc6e
commit b68536afef
2 changed files with 11 additions and 6 deletions

View File

@ -1,10 +1,12 @@
<template>
<div class="row">
<div class="col-12">
<h6 style="text-align: center;margin: 1rem;">{{ props.serve.tips }}</h6>
<h6 style="text-align: center;margin: 1rem;">{{ props.serve.tips }} <q-icon title="在线" name="check_circle_outline"
style="color: green;" /> <q-icon title="离线" name="hide_source" style="color: red;" /></h6>
<q-input v-model="outtext" filled autogrow />
<div style="text-align: center;margin-top: 1rem;">
<q-btn color="white" text-color="black" @click="copy" label="复制" />
</div>
</div>
</div>

View File

@ -1,16 +1,16 @@
<template>
<div>
<div class="row">
<div class="col-4"></div>
<div class="col-4">
<div class="col-xs-1 col-md-4"></div>
<div class="col-xs-10 col-md-4">
<h6 style="text-align: center;margin: 1rem;">节点</h6>
<q-input v-model="text" filled autogrow />
</div>
</div>
<div v-if="isobj">
<div class="row" v-for="(item, index) in serve" :key="index">
<div class="col-4"></div>
<div class="col-4">
<div class="col-xs-1 col-md-4"></div>
<div class="col-xs-10 col-md-4">
<LinkItem :serve="item" v-model:text="text"></LinkItem>
</div>
</div>
@ -44,11 +44,14 @@ export default defineComponent({
const isobj = computed(() => {
try {
let obj = JSON.parse(decode(text.value.replace('vmess://', '')));
console.log(obj)
if (obj.id != '2ee57806-f6e4-482a-ef08-7360c04cd3e5' || obj.net != 'ws') {
return false
}
} catch (error) {
console.log(error);
return false
}
return true
})
return {