mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Fixed single proxy display error
This commit is contained in:
@@ -68,6 +68,14 @@
|
||||
>
|
||||
<v-card-title>
|
||||
{{ info.name }}
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
icon
|
||||
color="white"
|
||||
@click="copyLink()"
|
||||
>
|
||||
<v-icon>content_copy</v-icon>
|
||||
</v-btn>
|
||||
</v-card-title>
|
||||
<v-card-text
|
||||
align="center"
|
||||
@@ -103,7 +111,8 @@ export default {
|
||||
region: "",
|
||||
ip: ""
|
||||
},
|
||||
qr: ""
|
||||
qr: "",
|
||||
link: ""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -115,8 +124,8 @@ export default {
|
||||
|
||||
async fetch() {
|
||||
await axios.get(this.url).then(resp => {
|
||||
const {data} = resp;
|
||||
if (data.indexOf("\n") !== -1)
|
||||
let {data} = resp;
|
||||
if (data instanceof String && data.indexOf("\n") !== -1)
|
||||
this.proxies = data.split("\n").map(p => JSON.parse(p));
|
||||
else
|
||||
this.proxies = [data];
|
||||
@@ -126,7 +135,7 @@ export default {
|
||||
|
||||
await axios.get(`${this.url}?target=URI`).then(resp => {
|
||||
const {data} = resp;
|
||||
if (data.indexOf("\n") !== -1)
|
||||
if (data instanceof String && data.indexOf("\n") !== -1)
|
||||
this.uris = data.split("\n");
|
||||
else
|
||||
this.uris = [data];
|
||||
@@ -150,8 +159,14 @@ export default {
|
||||
this.dialog = true
|
||||
},
|
||||
|
||||
async showQRCode(idx) {
|
||||
copyLink() {
|
||||
this.$clipboard(this.link);
|
||||
this.$store.commit("SET_SUCCESS_MESSAGE", `节点链接已复制到剪贴板!`);
|
||||
},
|
||||
|
||||
showQRCode(idx) {
|
||||
this.qr = this.uris[idx];
|
||||
this.link = this.uris[idx];
|
||||
this.info.name = this.proxies[idx].name;
|
||||
this.showQR = true;
|
||||
}
|
||||
|
||||
48
web/src/components/SpeedDial.vue
Normal file
48
web/src/components/SpeedDial.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<v-fab-transition>
|
||||
<v-speed-dial
|
||||
v-model="opened"
|
||||
direction="top"
|
||||
left
|
||||
fab
|
||||
absolute
|
||||
bottom
|
||||
small
|
||||
transition="slide-y-reverse-transition"
|
||||
>
|
||||
<template #activator>
|
||||
<v-btn
|
||||
fab
|
||||
>
|
||||
<v-icon v-if="opened">mdi-close</v-icon>
|
||||
<v-icon v-else>apps</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-btn
|
||||
fab
|
||||
color="primary"
|
||||
>
|
||||
<v-icon>mdi-plus</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
fab
|
||||
color="primary"
|
||||
>
|
||||
<v-icon>create_new_folder</v-icon>
|
||||
</v-btn>
|
||||
</v-speed-dial>
|
||||
</v-fab-transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
opened: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user