mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:09:01 +08:00
Fixed single proxy display error
This commit is contained in:
parent
3d208c9e9f
commit
d30ece21ae
@ -45,7 +45,7 @@ function initStore(store) {
|
||||
export default {
|
||||
components: {
|
||||
TopToolbar,
|
||||
BottomNav
|
||||
BottomNav,
|
||||
},
|
||||
|
||||
created() {
|
||||
|
@ -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>
|
@ -48,7 +48,6 @@ const router = new Router({
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
const {meta} = to;
|
||||
// document.title = to.meta.title
|
||||
store.commit("SET_NAV_TITLE", meta.title);
|
||||
next();
|
||||
})
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Axios from 'axios';
|
||||
import Vue from 'vue';
|
||||
import store from "@/store";
|
||||
import {BACKEND_BASE} from "@/config";
|
||||
|
||||
@ -7,6 +8,8 @@ export const axios = Axios.create({
|
||||
timeout: 10000
|
||||
});
|
||||
|
||||
export const EventBus = new Vue();
|
||||
|
||||
export function isEmptyObj(obj) {
|
||||
return Object.keys(obj).length === 0;
|
||||
}
|
||||
|
@ -98,11 +98,10 @@
|
||||
v-if="!showProxyList"
|
||||
v-model="opened"
|
||||
direction="top"
|
||||
right
|
||||
left
|
||||
fab
|
||||
absolute
|
||||
bottom
|
||||
small
|
||||
transition="slide-y-reverse-transition"
|
||||
>
|
||||
<template #activator>
|
||||
|
Loading…
x
Reference in New Issue
Block a user