feat: add observatory result in GUI

This commit is contained in:
mzz2017 committed 2021-08-06 23:22:40 +08:00
1 parent bd05c0e90c
commit d722d15003
22 files changed
+421 -87

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@
"buefy": "0.9.3",
"clipboard": "^2.0.4",
"core-js": "^3.1.2",
"dayjs": "^1.8.16",
"dayjs": "^1.10.6",
"js-base64": "^2.5.1",
"normalize.css": "^8.0.1",
"qrcode": "^1.4.2",
+1
View File
@@ -0,0 +1 @@
<svg t="1628253142116" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="984" width="200" height="200"><path d="M512 835.38c-78.7 0-154.49-28.67-213.41-80.74-58.39-51.6-96.11-122.37-106.21-199.26-1.79-13.6 7.79-26.07 21.38-27.85 13.59-1.79 26.07 7.79 27.85 21.38 8.54 65.01 40.45 124.86 89.86 168.52 49.83 44.04 113.94 68.29 180.52 68.29 66.58 0 130.69-24.25 180.52-68.29 49.41-43.66 81.32-103.51 89.86-168.52 1.79-13.6 14.26-23.17 27.85-21.38 13.6 1.79 23.17 14.26 21.38 27.85-10.1 76.9-47.82 147.66-106.21 199.26-58.9 52.07-134.69 80.74-213.39 80.74zM217.3 496.69c-1.13 0-2.28-0.08-3.43-0.24-13.58-1.88-23.07-14.41-21.19-28 10.57-76.4 48.46-146.64 106.7-197.78 58.79-51.62 134.3-80.05 212.62-80.05s153.83 28.43 212.62 80.05c58.24 51.14 96.13 121.38 106.7 197.78 1.88 13.58-7.61 26.12-21.19 28-13.59 1.88-26.12-7.61-28-21.19-8.94-64.59-41-124-90.28-167.27-49.73-43.66-113.6-67.71-179.86-67.71s-130.13 24.05-179.86 67.71c-49.28 43.27-81.34 102.68-90.28 167.27-1.7 12.43-12.35 21.43-24.55 21.43z" fill="#333333" p-id="985"></path><path d="M278.98 607.83c-3.79 0-7.63-0.87-11.23-2.7l-60.96-31c-12.22-6.22-17.09-21.16-10.88-33.39 6.22-12.22 21.16-17.09 33.39-10.88l60.96 31c12.22 6.22 17.09 21.16 10.88 33.39-4.39 8.62-13.11 13.58-22.16 13.58zM805.68 496.83c-3.02 0-6.09-0.55-9.07-1.72l-63.69-25c-12.76-5.01-19.05-19.42-14.04-32.18 5.01-12.76 19.42-19.05 32.18-14.04l63.69 25c12.76 5.01 19.05 19.42 14.04 32.18-3.83 9.79-13.2 15.76-23.11 15.76z" fill="#333333" p-id="986"></path><path d="M373.5 392m-24.83 0a24.83 24.83 0 1 0 49.66 0 24.83 24.83 0 1 0-49.66 0Z" fill="#333333" p-id="987"></path><path d="M654 416.83H452c-13.71 0-24.83-11.12-24.83-24.83s11.12-24.83 24.83-24.83h202c13.71 0 24.83 11.12 24.83 24.83s-11.12 24.83-24.83 24.83z" fill="#333333" p-id="988"></path><path d="M373.5 520.5m-24.83 0a24.83 24.83 0 1 0 49.66 0 24.83 24.83 0 1 0-49.66 0Z" fill="#448AFF" p-id="989"></path><path d="M654 545.33H452c-13.71 0-24.83-11.12-24.83-24.83 0-13.71 11.12-24.83 24.83-24.83h202c13.71 0 24.83 11.12 24.83 24.83 0 13.71-11.12 24.83-24.83 24.83z" fill="#448AFF" p-id="990"></path><path d="M373.5 649m-24.83 0a24.83 24.83 0 1 0 49.66 0 24.83 24.83 0 1 0-49.66 0Z" fill="#333333" p-id="991"></path><path d="M654 673.83H452c-13.71 0-24.83-11.12-24.83-24.83s11.12-24.83 24.83-24.83h202c13.71 0 24.83 11.12 24.83 24.83s-11.12 24.83-24.83 24.83z" fill="#333333" p-id="992"></path></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

+76 -14
View File
@@ -26,9 +26,9 @@
@active-change="handleOutboundDropdownActiveChange"
>
<template #trigger>
<b-tag class="pointerTag" type="is-info" icon-right="menu-down">{{
outboundName.toUpperCase()
}}</b-tag>
<b-tag class="pointerTag" type="is-info" icon-right="menu-down"
>{{ outboundName.toUpperCase() }}
</b-tag>
</template>
<b-dropdown-item
@@ -59,12 +59,12 @@
aria-role="listitem"
class="is-flex padding-right-1rem"
@click="handleAddOutbound"
>{{ $t("operations.addOutbound") }}</b-dropdown-item
>
>{{ $t("operations.addOutbound") }}
</b-dropdown-item>
</b-dropdown>
</b-navbar-item>
</template>
<template slot="start"> </template>
<template slot="start"></template>
<template slot="end">
<!-- <b-navbar-item tag="router-link" to="/node" :active="nav === 'node'">-->
@@ -129,7 +129,11 @@
</b-dropdown>
</template>
</b-navbar>
<node v-model="runningState" :outbound="outboundName" />
<node
v-model="runningState"
:outbound="outboundName"
:observatory="observatory"
/>
<b-modal
:active.sync="showCustomPorts"
has-modal-card
@@ -149,7 +153,7 @@ import ModalSetting from "@/components/modalSetting";
import node from "@/node";
import { Base64 } from "js-base64";
import ModalCustomAddress from "./components/modalCustomPorts";
import { parseURL } from "./assets/js/utils";
import { isVersionGreaterEqual, parseURL } from "./assets/js/utils";
import { waitingConnected } from "./assets/js/networkInspect";
import axios from "./plugins/axios";
@@ -157,6 +161,9 @@ export default {
components: { ModalCustomAddress, node },
data() {
return {
ws: null,
observatory: null,
showSidebar: true,
statusMap: {
[this.$t("common.checkRunning")]: "is-light",
[this.$t("common.notRunning")]: "is-danger",
@@ -189,7 +196,7 @@ export default {
return payload["uname"];
}
},
created() {
mounted() {
console.log("app created");
let ba = localStorage.getItem("backendAddress");
if (ba) {
@@ -234,6 +241,10 @@ export default {
localStorage["iptablesMode"] = res.data.data.iptablesMode;
localStorage["dohValid"] = res.data.data.dohValid;
localStorage["vlessValid"] = res.data.data.vlessValid;
localStorage["observatorySidebarValid"] = isVersionGreaterEqual(
localStorage["version"],
"1.4.4"
);
}
}
});
@@ -244,8 +255,57 @@ export default {
this.outbounds = res.data.data.outbounds;
}
});
this.connectWsMessage();
},
beforeDestroy() {
if (this.ws) {
this.ws.close();
}
},
methods: {
connectWsMessage() {
const that = this;
let url = apiRoot;
if (!url.trim() || url.startsWith("/")) {
url = location.protocol + "//" + location.host + url;
}
let protocol = "ws";
let u = parseURL(url);
if (u.protocol === "https") {
protocol = "wss";
}
url = `${protocol}://${u.host}:${
u.port
}/api/message?Authorization=${encodeURIComponent(localStorage["token"])}`;
if (this.ws) {
// console.log("ws close");
this.ws.close();
}
const ws = new WebSocket(url);
ws.onopen = () => {
// console.log("ws opened");
//
};
ws.onmessage = msg => {
msg.data && that.handleMessage(JSON.parse(msg.data));
};
ws.onclose = () => {
ws.onmessage = null;
that.ws = null;
// console.log("ws closed");
setTimeout(() => {
if (that.ws === null) {
that.connectWsMessage();
}
}, 3000);
};
this.ws = ws;
},
handleMessage(msg) {
if (msg.type === "observatory") {
this.observatory = msg;
}
},
handleOutboundDropdownActiveChange(active) {
if (active) {
this.updateOutboundDropdown = false;
@@ -263,12 +323,8 @@ export default {
} else {
return `${outbound} - ${this.runningState.outboundToServerName[outbound]}`;
}
} else {
return outbound;
}
return this.runningState.outboundToServerName[outbound]
? `${outbound} - ${this.runningState.outboundToServerName[outbound]}`
: outbound;
return outbound;
},
handleAddOutbound() {
this.$buefy.dialog.prompt({
@@ -583,6 +639,7 @@ a {
color: rgba(0, 0, 0, 0.45);
animation: loading-rotate 2s infinite linear;
}
.modal-custom-ports {
z-index: 999;
}
@@ -592,20 +649,25 @@ a {
margin-bottom: 0.5em;
}
}
.about-small {
font-size: 0.85em;
text-indent: 1em;
color: rgba(0, 0, 0, 0.6);
}
.margin-right-2em {
margin-right: 2em;
}
.justify-content-space-between {
justify-content: space-between;
}
.padding-right-1rem {
padding-right: 1rem !important;
}
#statusTag {
width: 5em;
}
@@ -51,7 +51,7 @@
</style>
<body>
<div class="info">
<h3>iconfont (30)</h3>
<h3>iconfont (31)</h3>
<div>Class name prefix: icon-</div>
</div>
<hr/>
@@ -187,6 +187,11 @@
<div><i class="icon-share"></i></div>
</section>
<section>
<header contenteditable>icon-switch-menu</header>
<div><i class="icon-switch-menu"></i></div>
</section>
<section>
<header contenteditable>icon-sync</header>
<div><i class="icon-sync"></i></div>
+13 -9
View File
@@ -1,10 +1,10 @@
@font-face {
font-family: iconfont;
src: url("iconfont.eot");src: url("iconfont.eot?5b1dd27b#iefix") format("embedded-opentype"),
url("iconfont.woff2?5b1dd27b") format("woff2"),
url("iconfont.woff?5b1dd27b") format("woff"),
url("iconfont.ttf?5b1dd27b") format("truetype"),
url("iconfont.svg?5b1dd27b#iconfont") format("svg");
src: url("iconfont.eot");src: url("iconfont.eot?238fde36#iefix") format("embedded-opentype"),
url("iconfont.woff2?238fde36") format("woff2"),
url("iconfont.woff?238fde36") format("woff"),
url("iconfont.ttf?238fde36") format("truetype"),
url("iconfont.svg?238fde36#iconfont") format("svg");
font-weight: normal;
font-style: normal;
}
@@ -121,18 +121,22 @@
content: "\ea1a";
}
.icon-sync::before {
.icon-switch-menu::before {
content: "\ea1b";
}
.icon-wave::before {
.icon-sync::before {
content: "\ea1c";
}
.icon-wendangxiugai::before {
.icon-wave::before {
content: "\ea1d";
}
.icon-winfo-icon-chakanbaogao::before {
.icon-wendangxiugai::before {
content: "\ea1e";
}
.icon-winfo-icon-chakanbaogao::before {
content: "\ea1f";
}
+9 -4
View File
@@ -131,23 +131,28 @@ export default [
"svg": "<svg t=\"1577169055872\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"4491\" width=\"200\" height=\"200\"><path d=\"M752 664c-28.5 0-54.8 10-75.4 26.7L469.4 540.8c1.7-9.3 2.6-19 2.6-28.8s-0.9-19.4-2.6-28.8l207.2-149.9C697.2 350 723.5 360 752 360c66.2 0 120-53.8 120-120s-53.8-120-120-120-120 53.8-120 120c0 11.6 1.6 22.7 4.7 33.3L439.9 415.8C410.7 377.1 364.3 352 312 352c-88.4 0-160 71.6-160 160s71.6 160 160 160c52.3 0 98.7-25.1 127.9-63.8l196.8 142.5c-3.1 10.6-4.7 21.8-4.7 33.3 0 66.2 53.8 120 120 120s120-53.8 120-120-53.8-120-120-120z m0-476c28.7 0 52 23.3 52 52s-23.3 52-52 52-52-23.3-52-52 23.3-52 52-52zM312 600c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88z m440 236c-28.7 0-52-23.3-52-52s23.3-52 52-52 52 23.3 52 52-23.3 52-52 52z\" p-id=\"4492\"></path></svg>"
},
{
"name": "sync",
"name": "switch-menu",
"unicode": "ea1b",
"svg": "<svg t=\"1628253142116\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"984\" width=\"200\" height=\"200\"><path d=\"M512 835.38c-78.7 0-154.49-28.67-213.41-80.74-58.39-51.6-96.11-122.37-106.21-199.26-1.79-13.6 7.79-26.07 21.38-27.85 13.59-1.79 26.07 7.79 27.85 21.38 8.54 65.01 40.45 124.86 89.86 168.52 49.83 44.04 113.94 68.29 180.52 68.29 66.58 0 130.69-24.25 180.52-68.29 49.41-43.66 81.32-103.51 89.86-168.52 1.79-13.6 14.26-23.17 27.85-21.38 13.6 1.79 23.17 14.26 21.38 27.85-10.1 76.9-47.82 147.66-106.21 199.26-58.9 52.07-134.69 80.74-213.39 80.74zM217.3 496.69c-1.13 0-2.28-0.08-3.43-0.24-13.58-1.88-23.07-14.41-21.19-28 10.57-76.4 48.46-146.64 106.7-197.78 58.79-51.62 134.3-80.05 212.62-80.05s153.83 28.43 212.62 80.05c58.24 51.14 96.13 121.38 106.7 197.78 1.88 13.58-7.61 26.12-21.19 28-13.59 1.88-26.12-7.61-28-21.19-8.94-64.59-41-124-90.28-167.27-49.73-43.66-113.6-67.71-179.86-67.71s-130.13 24.05-179.86 67.71c-49.28 43.27-81.34 102.68-90.28 167.27-1.7 12.43-12.35 21.43-24.55 21.43z\" fill=\"#333333\" p-id=\"985\"></path><path d=\"M278.98 607.83c-3.79 0-7.63-0.87-11.23-2.7l-60.96-31c-12.22-6.22-17.09-21.16-10.88-33.39 6.22-12.22 21.16-17.09 33.39-10.88l60.96 31c12.22 6.22 17.09 21.16 10.88 33.39-4.39 8.62-13.11 13.58-22.16 13.58zM805.68 496.83c-3.02 0-6.09-0.55-9.07-1.72l-63.69-25c-12.76-5.01-19.05-19.42-14.04-32.18 5.01-12.76 19.42-19.05 32.18-14.04l63.69 25c12.76 5.01 19.05 19.42 14.04 32.18-3.83 9.79-13.2 15.76-23.11 15.76z\" fill=\"#333333\" p-id=\"986\"></path><path d=\"M373.5 392m-24.83 0a24.83 24.83 0 1 0 49.66 0 24.83 24.83 0 1 0-49.66 0Z\" fill=\"#333333\" p-id=\"987\"></path><path d=\"M654 416.83H452c-13.71 0-24.83-11.12-24.83-24.83s11.12-24.83 24.83-24.83h202c13.71 0 24.83 11.12 24.83 24.83s-11.12 24.83-24.83 24.83z\" fill=\"#333333\" p-id=\"988\"></path><path d=\"M373.5 520.5m-24.83 0a24.83 24.83 0 1 0 49.66 0 24.83 24.83 0 1 0-49.66 0Z\" fill=\"#448AFF\" p-id=\"989\"></path><path d=\"M654 545.33H452c-13.71 0-24.83-11.12-24.83-24.83 0-13.71 11.12-24.83 24.83-24.83h202c13.71 0 24.83 11.12 24.83 24.83 0 13.71-11.12 24.83-24.83 24.83z\" fill=\"#448AFF\" p-id=\"990\"></path><path d=\"M373.5 649m-24.83 0a24.83 24.83 0 1 0 49.66 0 24.83 24.83 0 1 0-49.66 0Z\" fill=\"#333333\" p-id=\"991\"></path><path d=\"M654 673.83H452c-13.71 0-24.83-11.12-24.83-24.83s11.12-24.83 24.83-24.83h202c13.71 0 24.83 11.12 24.83 24.83s-11.12 24.83-24.83 24.83z\" fill=\"#333333\" p-id=\"992\"></path></svg>"
},
{
"name": "sync",
"unicode": "ea1c",
"svg": "<svg t=\"1577169075376\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"4608\" width=\"200\" height=\"200\"><path d=\"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27c40.9 17.3 77.7 42.1 109.3 73.8 9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47c-5.3 4.1-3.5 12.5 3 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l0.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8c-0.1 4.5 3.5 8.2 8 8.2h60c4.4 0 7.9-3.5 8-7.8zM924 512h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4S687 811.7 646 829c-42.4 17.9-87.4 27-133.9 27s-91.5-9.1-133.9-27c-40.9-17.3-77.7-42.1-109.3-73.8-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47c5.3-4.1 3.5-12.5-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-0.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8 0.1-4.5-3.5-8.2-8-8.2z\" p-id=\"4609\"></path></svg>"
},
{
"name": "wave",
"unicode": "ea1c",
"unicode": "ea1d",
"svg": "<svg t=\"1577168879633\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2257\" width=\"200\" height=\"200\"><path d=\"M853.56074463 666.76220703a34.29052734 34.29052734 0 0 1-34.13232422-34.40917969V391.64697266c0-18.984375 15.26660156-34.40917969 34.13232422-34.40917969s34.171875 15.42480469 34.171875 34.40917969v240.70605468c0 9.13623047-3.59912109 17.87695313-10.00634766 24.32373047a34.01367188 34.01367188 0 0 1-24.12597656 10.08544922z m-170.78027344 137.55761719a34.01367188 34.01367188 0 0 1-24.12597656-10.04589844 34.52783203 34.52783203 0 0 1-10.00634766-24.32373047V254.04980469c0-18.984375 15.26660156-34.40917969 34.13232422-34.40917969s34.171875 15.42480469 34.171875 34.40917969v515.90039062c0 9.09667969-3.59912109 17.87695313-10.00634765 24.32373047a34.01367188 34.01367188 0 0 1-24.12597657 10.04589844zM512.00019776 907.5078125a34.29052734 34.29052734 0 0 1-34.171875-34.40917969V150.90136719c0-18.984375 15.30615234-34.40917969 34.171875-34.40917969s34.171875 15.42480469 34.171875 34.40917969v722.19726562c0 18.984375-15.30615234 34.40917969-34.171875 34.40917969z m-170.78027344-103.18798828a34.01367188 34.01367188 0 0 1-24.12597655-10.04589844 34.52783203 34.52783203 0 0 1-10.04589845-24.32373047V254.04980469c0-18.984375 15.30615234-34.40917969 34.171875-34.40917969s34.13232422 15.42480469 34.13232422 34.40917969v515.90039062c0 9.09667969-3.55957031 17.87695313-9.96679688 24.32373047a34.01367188 34.01367188 0 0 1-24.16552734 10.04589844zM170.43965088 666.76220703a34.29052734 34.29052734 0 0 1-34.171875-34.40917969V391.64697266c0-18.984375 15.30615234-34.40917969 34.171875-34.40917969s34.13232422 15.42480469 34.13232422 34.40917969v240.70605468c0 9.13623047-3.55957031 17.87695313-10.00634765 24.32373047a34.01367188 34.01367188 0 0 1-24.12597657 10.08544922z\" p-id=\"2258\"></path></svg>"
},
{
"name": "wendangxiugai",
"unicode": "ea1d",
"unicode": "ea1e",
"svg": "<svg t=\"1577168935222\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2838\" width=\"200\" height=\"200\"><path d=\"M826 472c-17.673 0-32-14.327-32-32V136a8 8 0 0 0-8-8H136a8 8 0 0 0-8 8v752a8 8 0 0 0 8 8h289c17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32H96c-17.673 0-32-14.327-32-32V96c0-17.673 14.327-32 32-32h730c17.673 0 32 14.327 32 32v344c0 17.673-14.327 32-32 32zM211 270h471c17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32H211c-17.673 0-32-14.327-32-32 0-17.673 14.327-32 32-32z m5 206h212c17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32H216c-17.673 0-32-14.327-32-32 0-17.673 14.327-32 32-32z m304 0h44c17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32h-44c-17.673 0-32-14.327-32-32 0-17.673 14.327-32 32-32z m28.821 332.061l285.434-285.434c12.497-12.496 32.758-12.496 45.255 0l70.003 70.004c12.497 12.497 12.497 32.758 0 45.255L664.08 923.32a32 32 0 0 1-21.043 9.333l-91.301 4.525c-8.826 0.437-16.335-6.363-16.772-15.188a16 16 0 0 1 0-1.584l4.525-91.302a32 32 0 0 1 9.333-21.043z m30.875 48.32l-1.4 28.902a8 8 0 0 0 8.325 8.38l29.138-1.219 267.993-267.993a8 8 0 0 0 0-11.314l-24.748-24.749a8 8 0 0 0-11.314 0L579.696 856.382zM216 746c-17.673 0-32-14.327-32-32 0-17.673 14.327-32 32-32 17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32z m104 0c-17.673 0-32-14.327-32-32 0-17.673 14.327-32 32-32 17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32z m104 0c-17.673 0-32-14.327-32-32 0-17.673 14.327-32 32-32 17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32z\" p-id=\"2839\"></path></svg>"
},
{
"name": "winfo-icon-chakanbaogao",
"unicode": "ea1e",
"unicode": "ea1f",
"svg": "<svg t=\"1577168950499\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2955\" width=\"200\" height=\"200\"><path d=\"M687.1 303.7c0-19-15.4-34.4-34.4-34.4H307.5c-19 0-34.4 15.4-34.4 34.4s15.4 34.4 34.4 34.4h345.2c19 0 34.4-15.4 34.4-34.4zM548.8 510.7c0-19-15.4-34.4-34.4-34.4h-207c-19 0-34.4 15.4-34.4 34.4s15.4 34.4 34.4 34.4h207c19-0.1 34.4-15.4 34.4-34.4zM307.5 682.9c-19 0-34.4 15.4-34.4 34.4s15.4 34.4 34.4 34.4h69.1c19 0 34.4-15.4 34.4-34.4s-15.4-34.4-34.4-34.4h-69.1z\" p-id=\"2956\"></path><path d=\"M485.7 890.6H170.1V134.8h619.5v361.9c24.9 8.5 48.1 20.5 69 35.6v-432c0-19-15.5-34.5-34.5-34.5H135.6c-19 0-34.5 15.5-34.5 34.5v824.8c0 19 15.5 34.5 34.5 34.5h416.6c-26.2-18.8-48.8-42.2-66.5-69z\" p-id=\"2957\"></path><path d=\"M917.9 900.9L869.1 852c-0.7-0.7-1.5-1.4-2.2-2 20.4-29.9 32.3-66.1 32.3-105 0-103.2-83.6-186.8-186.8-186.8S525.5 641.8 525.5 745s83.6 186.8 186.8 186.8c39.5 0 76.1-12.3 106.3-33.2 0.6 0.7 1.2 1.4 1.9 2l48.9 48.9c13.4 13.4 35.2 13.4 48.6 0 13.4-13.4 13.4-35.2-0.1-48.6z m-122.3-72.6c-22.3 22.3-51.9 34.5-83.3 34.5-31.5 0-61.1-12.3-83.3-34.5-22.3-22.3-34.5-51.9-34.5-83.3s12.3-61.1 34.5-83.3c22.3-22.3 51.9-34.5 83.3-34.5 31.5 0 61.1 12.3 83.3 34.5 22.3 22.3 34.5 51.9 34.5 83.3s-12.2 61-34.5 83.3z\" p-id=\"2958\"></path></svg>"
}
]
Binary file not shown.
+7 -4
View File
@@ -85,17 +85,20 @@
<glyph glyph-name="share"
unicode="&#xEA1A;"
horiz-adv-x="1000" d="M734.375 351.5625C706.54296875 351.5625 680.859375 341.796875 660.7421875 325.48828125L458.3984375 471.8750000000001C460.05859375 480.9570312500001 460.9375 490.4296875000001 460.9375 500.0000000000001S460.05859375 518.9453125 458.3984375 528.125L660.7421875 674.51171875C680.859375 658.203125 706.54296875 648.4375 734.375 648.4375C799.0234375 648.4375 851.5625 700.9765625 851.5625 765.625S799.0234375 882.8125 734.375 882.8125S617.1875 830.2734375 617.1875 765.625C617.1875 754.296875 618.75 743.45703125 621.77734375 733.10546875L429.58984375 593.9453125C401.07421875 631.73828125 355.76171875 656.25 304.6875 656.25C218.359375 656.25 148.4375 586.328125 148.4375 500S218.359375 343.75 304.6875 343.75C355.76171875 343.75 401.07421875 368.26171875 429.58984375 406.0546875L621.77734375 266.89453125C618.75 256.54296875 617.1875 245.60546875 617.1875 234.375C617.1875 169.7265625 669.7265625 117.1875 734.375 117.1875S851.5625 169.7265625 851.5625 234.375S799.0234375 351.5625 734.375 351.5625zM734.375 816.40625C762.40234375 816.40625 785.15625 793.65234375 785.15625 765.625S762.40234375 714.84375 734.375 714.84375S683.59375 737.59765625 683.59375 765.625S706.34765625 816.40625 734.375 816.40625zM304.6875 414.0625C257.32421875 414.0625 218.75 452.63671875 218.75 500S257.32421875 585.9375 304.6875 585.9375S390.625 547.36328125 390.625 500S352.05078125 414.0625 304.6875 414.0625zM734.375 183.59375C706.34765625 183.59375 683.59375 206.34765625 683.59375 234.375S706.34765625 285.15625 734.375 285.15625S785.15625 262.40234375 785.15625 234.375S762.40234375 183.59375 734.375 183.59375z" />
<glyph glyph-name="sync"
<glyph glyph-name="switch-menu"
unicode="&#xEA1B;"
horiz-adv-x="1000" d="M500.0096775856397 184.19921875C423.1542088356398 184.19921875 349.1405369606398 212.197265625 291.6014744606398 263.046875C234.5799900856398 313.4375 197.7440525856397 382.548828125 187.8807713356397 457.63671875C186.1327244606397 470.91796875 195.4881932106397 483.095703125 208.7596775856397 484.833984375C222.0311619606397 486.58203125 234.2186619606398 477.2265625 235.9569432106398 463.955078125C244.2967869606398 400.46875 275.4588963356398 342.021484375 323.7108494606398 299.384765625C372.3729588356398 256.376953125 434.9803807106398 232.6953125 499.9999119606397 232.6953125C565.0194432106398 232.6953125 627.6268650856398 256.376953125 676.2889744606398 299.384765625C724.5409275856398 342.021484375 755.7030369606398 400.46875 764.0428807106398 463.955078125C765.7909275856398 477.236328125 777.9686619606398 486.58203125 791.2401463356398 484.833984375C804.5213963356398 483.0859375 813.8670994606398 470.908203125 812.1190525856398 457.63671875C802.2557713356398 382.5390625 765.4198338356398 313.4375 708.3983494606398 263.046875C650.8788182106398 212.197265625 576.8651463356398 184.19921875 500.0096775856397 184.19921875zM212.2167088356397 514.951171875C211.1131932106397 514.951171875 209.9901463356397 515.029296875 208.8670994606397 515.185546875C195.6053807106397 517.021484375 186.3378025856397 529.2578125 188.1737400856397 542.529296875C198.4960057106397 617.138671875 235.4979588356398 685.732421875 292.3729588356398 735.673828125C349.7850682106398 786.083984375 423.5253025856398 813.84765625 500.0096775856397 813.84765625S650.2342869606398 786.083984375 707.6463963356398 735.673828125C764.5213963356398 685.732421875 801.5233494606398 617.138671875 811.8456150856398 542.529296875C813.6815525856398 529.267578125 804.4139744606398 517.021484375 791.1522557106398 515.185546875C777.8807713356398 513.349609375 765.6444432106398 522.6171875 763.8085057106398 535.87890625C755.0780369606398 598.955078125 723.7694432106398 656.97265625 675.6444432106398 699.228515625C627.0799900856398 741.865234375 564.7069432106398 765.3515625 499.9999119606397 765.3515625S372.9198338356398 741.865234375 324.3553807106398 699.228515625C276.2303807106398 656.97265625 244.9217869606398 598.955078125 236.1913182106398 535.87890625C234.5311619606398 523.740234375 224.1307713356397 514.951171875 212.2167088356397 514.951171875zM272.4510838356398 406.4160156249999C268.7499119606398 406.4160156249999 264.9999119606398 407.2656249999999 261.4842869606398 409.0527343749999L201.9530369606397 439.3261718749999C190.0194432106397 445.4003906249999 185.2635838356397 459.9902343749999 191.3280369606397 471.9335937499999C197.4022557106397 483.8671874999999 211.9920994606397 488.6230468749999 223.9354588356397 482.5585937499999L283.4667088356398 452.2851562499999C295.4003025856398 446.2109374999999 300.1561619606398 431.6210937499999 294.0917088356398 419.6777343749999C289.8045994606398 411.2597656249999 281.2889744606398 406.4160156249999 272.4510838356398 406.4160156249999zM786.8065525856398 514.814453125C783.8573338356398 514.814453125 780.8592869606398 515.3515625 777.9491307106398 516.494140625L715.7518650856398 540.908203125C703.2909275856398 545.80078125 697.1483494606398 559.873046875 702.0409275856398 572.333984375C706.9335057106398 584.794921875 721.0057713356398 590.9375 733.4667088356398 586.044921875L795.6639744606398 561.630859375C808.1249119606398 556.73828125 814.2674900856398 542.666015625 809.3749119606398 530.205078125C805.6346775856398 520.64453125 796.4842869606398 514.814453125 786.8065525856398 514.814453125zM364.7557713356398 617.1875M340.5077244606398 617.1875A24.248046875 24.248046875 0 1 1 389.0038182106398 617.1875A24.248046875 24.248046875 0 1 1 340.5077244606398 617.1875zM638.6815525856398 592.939453125H441.4159275856398C428.0272557106398 592.939453125 417.1678807106398 603.798828125 417.1678807106398 617.1875S428.0272557106398 641.435546875 441.4159275856398 641.435546875H638.6815525856398C652.0702244606398 641.435546875 662.9295994606398 630.576171875 662.9295994606398 617.1875S652.0702244606398 592.939453125 638.6815525856398 592.939453125zM364.7557713356398 491.69921875M340.5077244606398 491.69921875A24.248046875 24.248046875 0 1 1 389.0038182106398 491.69921875A24.248046875 24.248046875 0 1 1 340.5077244606398 491.69921875zM638.6815525856398 467.4511718749999H441.4159275856398C428.0272557106398 467.4511718749999 417.1678807106398 478.3105468749999 417.1678807106398 491.6992187499999C417.1678807106398 505.0878906249999 428.0272557106398 515.947265625 441.4159275856398 515.947265625H638.6815525856398C652.0702244606398 515.947265625 662.9295994606398 505.0878906249999 662.9295994606398 491.6992187499999C662.9295994606398 478.3105468749999 652.0702244606398 467.4511718749999 638.6815525856398 467.4511718749999zM364.7557713356398 366.2109375M340.5077244606398 366.2109375A24.248046875 24.248046875 0 1 1 389.0038182106398 366.2109375A24.248046875 24.248046875 0 1 1 340.5077244606398 366.2Line truncated
<glyph glyph-name="sync"
unicode="&#xEA1C;"
horiz-adv-x="1000" d="M164.0625 507.6171875C165.0390625 550.29296875 173.828125 591.69921875 190.33203125 630.6640625C207.2265625 670.703125 231.4453125000001 706.54296875 262.3046875 737.5S329.1015625 792.67578125 369.140625 809.5703125C410.546875 827.05078125 454.4921875 835.9375 499.90234375 835.9375S589.2578125 827.05078125 630.56640625 809.5703125C670.5078125 792.67578125 706.4453125 768.45703125 737.3046875 737.5C746.97265625 727.83203125 756.0546875 717.578125 764.453125 706.8359375L705.6640625 660.9375C700.48828125 656.93359375 702.24609375 648.73046875 708.59375 647.16796875L880.17578125 605.17578125C885.05859375 604.00390625 889.84375 607.71484375 889.84375 612.6953125L890.625 789.35546875C890.625 795.8984375 883.10546875 799.609375 878.02734375 795.5078125L822.94921875 752.44140625C747.8515625 848.53515625 631.0546875000001 910.15625 499.8046875 910.15625C276.07421875 910.15625 94.04296875 730.859375 89.84375 508.0078125C89.74609375 503.61328125 93.26171875 500 97.65625 500H156.25C160.546875 500 163.96484375 503.41796875 164.0625 507.6171875zM902.34375 500H843.75C839.453125 500 836.03515625 496.58203125 835.9375 492.3828125C834.9609375 449.70703125 826.171875 408.30078125 809.66796875 369.3359375C792.7734375 329.296875 768.5546875 293.359375 737.6953125 262.5S670.8984375 207.32421875 630.859375 190.4296875C589.453125 172.94921875 545.5078125 164.0625 500.09765625 164.0625S410.7421875 172.94921875 369.3359375 190.4296875C329.39453125 207.32421875 293.45703125 231.54296875 262.59765625 262.5C252.9296875000001 272.16796875 243.8476562500001 282.421875 235.4492187500001 293.1640625L294.23828125 339.0625C299.4140625 343.06640625 297.65625 351.26953125 291.30859375 352.83203125L119.7265625 394.82421875C114.84375 395.99609375 110.05859375 392.28515625 110.05859375 387.3046875L109.375 210.546875C109.375 204.00390625 116.89453125 200.29296875 121.97265625 204.39453125L177.05078125 247.4609375C252.1484375000001 151.46484375 368.9453125 89.84375 500.1953125000001 89.84375C724.0234375 89.84375 905.95703125 269.23828125 910.15625 491.9921875C910.25390625 496.38671875 906.73828125 500 902.34375 500z" />
<glyph glyph-name="wave"
unicode="&#xEA1C;"
unicode="&#xEA1D;"
horiz-adv-x="1000" d="M833.5553221386594 348.8650321972657A33.4868431054687 33.4868431054687 0 0 0 800.2229742675657 382.4677467382812V617.5322532617188C800.2229742675657 636.0716819726563 815.1317648535031 651.1349678027343 833.5553221386594 651.1349678027343S866.926293818347 636.0716819726563 866.926293818347 617.5322532617188V382.4677467382812C866.926293818347 373.5456466699219 863.4115271288939 365.0097846972657 857.1544699316281 358.7141037011719A33.2164764453125 33.2164764453125 0 0 0 833.5939459472532 348.8650321972657zM666.7777113574094 214.5314216601562A33.2164764453125 33.2164764453125 0 0 0 643.2171873730344 224.3418693554688A33.7185859667969 33.7185859667969 0 0 0 633.4453634863156 248.0955123925782V751.9044876074219C633.4453634863156 770.4439163183594 648.3541540722532 785.5072021484375 666.7777113574094 785.5072021484375S700.1486830370969 770.4439163183594 700.1486830370969 751.9044876074219V248.0955123925782C700.1486830370969 239.2120361328125 696.6339163476438 230.6375503515625 690.3768591601439 224.3418693554688A33.2164764453125 33.2164764453125 0 0 0 666.8163351660031 214.5314216601562zM500.0001005859251 113.7619018554688A33.4868431054687 33.4868431054687 0 0 0 466.6291289062376 147.3646163964844V852.6353836035156C466.6291289062376 871.1748123144531 481.5765433007688 886.2380981445312 500.0001005859251 886.2380981445312S533.3710722656126 871.1748123144531 533.3710722656126 852.6353836035156V147.3646163964843C533.3710722656126 128.8251876855468 518.4236578710814 113.7619018554686 500.0001005859251 113.7619018554686zM333.2224898046751 214.5314216601562A33.2164764453125 33.2164764453125 0 0 0 309.6619658300657 224.3418693554688A33.7185859667969 33.7185859667969 0 0 0 299.8515181249876 248.0955123925782V751.9044876074219C299.8515181249876 770.4439163183594 314.7989325195189 785.5072021484375 333.2224898046751 785.5072021484375S366.5548376757688 770.4439163183594 366.5548376757688 751.9044876074219V248.0955123925782C366.5548376757688 239.2120361328125 363.0786947949095 230.6375503515625 356.8216375976439 224.3418693554688A33.2164764453125 33.2164764453125 0 0 0 333.2224898046751 214.5314216601562zM166.4448790234251 348.8650321972657A33.4868431054687 33.4868431054687 0 0 0 133.0739073437376 382.4677467382812V617.5322532617188C133.0739073437376 636.0716819726563 148.0213217382688 651.1349678027343 166.4448790234251 651.1349678027343S199.7772268945188 636.0716819726563 199.7772268945188 617.5322532617188V382.4677467382812C199.7772268945188 373.5456466699219 196.3010840136594 365.0097846972657 190.0054030175657 358.7141037011719A33.2164764453125 33.2164764453125 0 0 0 166.4448790234251 348.8650321972657z" />
<glyph glyph-name="wendangxiugai"
unicode="&#xEA1D;"
unicode="&#xEA1E;"
horiz-adv-x="1000" d="M807.1846923828125 539.0625C789.9259033203125 539.0625 775.9346923828125 553.0537109375 775.9346923828125 570.3125V867.1875A7.8125 7.8125 0 0 1 768.1221923828125 875H133.3565673828125A7.8125 7.8125 0 0 1 125.5440673828125 867.1875V132.8125A7.8125 7.8125 0 0 1 133.3565673828125 125H415.5831298828125C432.8419189453125 125 446.8331298828125 111.0087890625 446.8331298828125 93.75C446.8331298828125 76.4912109375 432.8419189453125 62.5 415.5831298828125 62.5H94.2940673828125C77.0352783203125 62.5 63.0440673828125 76.4912109375 63.0440673828125 93.75V906.25C63.0440673828125 923.5087890625 77.0352783203125 937.5 94.2940673828125 937.5H807.1846923828125C824.4434814453125 937.5 838.4346923828125 923.5087890625 838.4346923828125 906.25V570.3125C838.4346923828125 553.0537109375 824.4434814453125 539.0625 807.1846923828125 539.0625zM206.5987548828125 736.328125H666.5596923828125C683.8184814453125 736.328125 697.8096923828125 722.3369140625 697.8096923828125 705.078125C697.8096923828125 687.8193359375 683.8184814453125 673.828125 666.5596923828125 673.828125H206.5987548828125C189.3399658203125 673.828125 175.3487548828125 687.8193359375 175.3487548828125 705.078125C175.3487548828125 722.3369140625 189.3399658203125 736.328125 206.5987548828125 736.328125zM211.4815673828125 535.15625H418.5128173828125C435.7716064453125 535.15625 449.7628173828125 521.1650390625 449.7628173828125 503.90625C449.7628173828125 486.6474609375 435.7716064453125 472.65625 418.5128173828125 472.65625H211.4815673828125C194.2227783203125 472.65625 180.2315673828125 486.6474609375 180.2315673828125 503.90625C180.2315673828125 521.1650390625 194.2227783203125 535.15625 211.4815673828125 535.15625zM508.3565673828125 535.15625H551.3253173828125C568.5841064453125 535.15625 582.5753173828125 521.1650390625 582.5753173828125 503.90625C582.5753173828125 486.6474609375 568.5841064453125 472.65625 551.3253173828125 472.65625H508.3565673828125C491.0977783203125 472.65625 477.1065673828125 486.6474609375 477.1065673828125 503.90625C477.1065673828125 521.1650390625 491.0977783203125 535.15625 508.3565673828125 535.15625zM536.5020751953125 210.8779296875L815.2462158203125 489.6220703124999C827.4503173828125 501.8251953124999 847.2364501953125 501.8251953124999 859.4405517578125 489.6220703124999L927.8028564453124 421.2587890625C940.0069580078124 409.0546875 940.0069580078124 389.2685546874999 927.8028564453124 377.064453125L649.0596923828125 98.3203125A31.25 31.25 0 0 0 628.5098876953125 89.2060546875L539.3487548828125 84.787109375C530.7296142578125 84.3603515625 523.3966064453125 91.0009765625 522.9698486328125 99.619140625A15.625 15.625 0 0 0 522.9698486328125 101.166015625L527.3887939453125 190.3281249999999A31.25 31.25 0 0 0 536.5030517578125 210.8779296875zM566.6534423828125 163.6904296875L565.2862548828125 135.4658203125A7.8125 7.8125 0 0 1 573.4161376953125 127.2822265625L601.8712158203125 128.4726562499999L863.5831298828125 390.1845703125A7.8125 7.8125 0 0 1 863.5831298828125 401.2333984375L839.4151611328125 425.40234375A7.8125 7.8125 0 0 1 828.3663330078125 425.40234375L566.6534423828125 163.689453125zM211.4815673828125 271.484375C194.2227783203125 271.484375 180.2315673828125 285.4755859375 180.2315673828125 302.734375C180.2315673828125 319.9931640625 194.2227783203125 333.984375 211.4815673828125 333.984375C228.7403564453125 333.984375 242.7315673828125 319.9931640625 242.7315673828125 302.734375C242.7315673828125 285.4755859375 228.7403564453125 271.484375 211.4815673828125 271.484375zM313.0440673828125 271.484375C295.7852783203125 271.484375 281.7940673828125 285.4755859375 281.7940673828125 302.734375C281.7940673828125 319.9931640625 295.7852783203125 333.984375 313.0440673828125 333.984375C330.3028564453125 333.984375 344.2940673828125 319.9931640625 344.2940673828125 302.734375C344.2940673828125 285.4755859375 330.3028564453125 271.484375 313.0440673828125 271.484375zM414.6065673828125 271.484375C397.3477783203125 271.484375 383.3565673828125 285.4755859375 383.3565673828125 302.734375C383.3565673828125 319.9931640625 397.3477783203125 333.984375 414.6065673828125 333.984375C431.8653564453125 333.984375 445.8565673828125 319.9931640625 445.8565673828125 302.734375C445.8565673828125 285.4755859375 431.8653564453125 271.484375 414.6065673828125 271.484375z" />
<glyph glyph-name="winfo-icon-chakanbaogao"
unicode="&#xEA1E;"
unicode="&#xEA1F;"
horiz-adv-x="1000" d="M668.4875318108489 703.41796875C668.4875318108489 721.97265625 653.4484693108489 737.01171875 634.8937818108489 737.01171875H297.7844068108489C279.2297193108489 737.01171875 264.1906568108489 721.97265625 264.1906568108489 703.41796875S279.2297193108489 669.82421875 297.7844068108489 669.82421875H634.8937818108489C653.4484693108489 669.82421875 668.4875318108489 684.86328125 668.4875318108489 703.41796875zM533.4289380608489 501.26953125C533.4289380608489 519.82421875 518.3898755608489 534.86328125 499.8351880608489 534.86328125H297.6867505608489C279.1320630608489 534.86328125 264.0930005608489 519.82421875 264.0930005608489 501.26953125S279.1320630608489 467.67578125 297.6867505608489 467.67578125H499.8351880608489C518.3898755608489 467.7734375 533.4289380608489 482.71484375 533.4289380608489 501.26953125zM297.7844068108489 333.10546875C279.2297193108489 333.10546875 264.1906568108489 318.06640625 264.1906568108489 299.51171875S279.2297193108489 265.91796875 297.7844068108489 265.91796875H365.2648755608489C383.8195630608489 265.91796875 398.8586255608489 280.95703125 398.8586255608489 299.51171875S383.8195630608489 333.10546875 365.2648755608489 333.10546875H297.7844068108489zM471.8078443108489 130.2734375H163.6047193108489V868.359375H768.5851880608489V514.94140625C792.9015943108489 506.640625 815.5578443108489 494.921875 835.9680005608489 480.17578125V902.05078125C835.9680005608489 920.60546875 820.8312818108489 935.7421875 802.2765943108489 935.7421875H129.9133130608489C111.3586255608489 935.7421875 96.2219068108489 920.60546875 96.2219068108489 902.05078125V96.58203125C96.2219068108489 78.02734375 111.3586255608489 62.890625 129.9133130608489 62.890625H536.7492505608489C511.1633130608489 81.25 489.0930005608489 104.1015625 471.8078443108489 130.2734375zM893.8781568108489 120.21484375L846.2219068108489 167.96875C845.5383130608489 168.65234375 844.7570630608489 169.3359375 844.0734693108489 169.921875C863.9953443108489 199.12109375 875.6164380608489 234.47265625 875.6164380608489 272.4609375C875.6164380608489 373.2421875 793.9758130608489 454.8828125 693.1945630608489 454.8828125S510.6750318108489 373.2421875000001 510.6750318108489 272.4609375S592.3156568108489 90.0390625 693.0969068108489 90.0390625C731.6711255608489 90.0390625 767.4133130608489 102.05078125 796.9055005608489 122.4609375C797.4914380608489 121.77734375 798.0773755608489 121.09375 798.7609693108489 120.5078125L846.5148755608489 72.75390625C859.6008130608489 59.66796875 880.8898755608489 59.66796875 893.9758130608489 72.75390625C907.0617505608489 85.83984375 907.0617505608489 107.12890625 893.8781568108489 120.21484375zM774.4445630608489 191.11328125C752.6672193108489 169.3359375 723.7609693108489 157.421875 693.0969068108489 157.421875C662.3351880608489 157.421875 633.4289380608489 169.43359375 611.7492505608489 191.11328125C589.9719068108489 212.890625 578.0578443108489 241.796875 578.0578443108489 272.4609375S590.0695630608489 332.12890625 611.7492505608489 353.80859375C633.5265943108489 375.5859375 662.4328443108489 387.5 693.0969068108489 387.5C723.8586255608489 387.5 752.7648755608489 375.48828125 774.4445630608489 353.80859375C796.2219068108489 332.03125 808.1359693108489 303.125 808.1359693108489 272.4609375S796.2219068108489 212.890625 774.4445630608489 191.11328125z" />
</font>
</defs>

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
<svg t="1628253142116" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="984" width="200" height="200"><path d="M512 835.38c-78.7 0-154.49-28.67-213.41-80.74-58.39-51.6-96.11-122.37-106.21-199.26-1.79-13.6 7.79-26.07 21.38-27.85 13.59-1.79 26.07 7.79 27.85 21.38 8.54 65.01 40.45 124.86 89.86 168.52 49.83 44.04 113.94 68.29 180.52 68.29 66.58 0 130.69-24.25 180.52-68.29 49.41-43.66 81.32-103.51 89.86-168.52 1.79-13.6 14.26-23.17 27.85-21.38 13.6 1.79 23.17 14.26 21.38 27.85-10.1 76.9-47.82 147.66-106.21 199.26-58.9 52.07-134.69 80.74-213.39 80.74zM217.3 496.69c-1.13 0-2.28-0.08-3.43-0.24-13.58-1.88-23.07-14.41-21.19-28 10.57-76.4 48.46-146.64 106.7-197.78 58.79-51.62 134.3-80.05 212.62-80.05s153.83 28.43 212.62 80.05c58.24 51.14 96.13 121.38 106.7 197.78 1.88 13.58-7.61 26.12-21.19 28-13.59 1.88-26.12-7.61-28-21.19-8.94-64.59-41-124-90.28-167.27-49.73-43.66-113.6-67.71-179.86-67.71s-130.13 24.05-179.86 67.71c-49.28 43.27-81.34 102.68-90.28 167.27-1.7 12.43-12.35 21.43-24.55 21.43z" fill="#333333" p-id="985"></path><path d="M278.98 607.83c-3.79 0-7.63-0.87-11.23-2.7l-60.96-31c-12.22-6.22-17.09-21.16-10.88-33.39 6.22-12.22 21.16-17.09 33.39-10.88l60.96 31c12.22 6.22 17.09 21.16 10.88 33.39-4.39 8.62-13.11 13.58-22.16 13.58zM805.68 496.83c-3.02 0-6.09-0.55-9.07-1.72l-63.69-25c-12.76-5.01-19.05-19.42-14.04-32.18 5.01-12.76 19.42-19.05 32.18-14.04l63.69 25c12.76 5.01 19.05 19.42 14.04 32.18-3.83 9.79-13.2 15.76-23.11 15.76z" fill="#333333" p-id="986"></path><path d="M373.5 392m-24.83 0a24.83 24.83 0 1 0 49.66 0 24.83 24.83 0 1 0-49.66 0Z" fill="#333333" p-id="987"></path><path d="M654 416.83H452c-13.71 0-24.83-11.12-24.83-24.83s11.12-24.83 24.83-24.83h202c13.71 0 24.83 11.12 24.83 24.83s-11.12 24.83-24.83 24.83z" fill="#333333" p-id="988"></path><path d="M373.5 520.5m-24.83 0a24.83 24.83 0 1 0 49.66 0 24.83 24.83 0 1 0-49.66 0Z" fill="#448AFF" p-id="989"></path><path d="M654 545.33H452c-13.71 0-24.83-11.12-24.83-24.83 0-13.71 11.12-24.83 24.83-24.83h202c13.71 0 24.83 11.12 24.83 24.83 0 13.71-11.12 24.83-24.83 24.83z" fill="#448AFF" p-id="990"></path><path d="M373.5 649m-24.83 0a24.83 24.83 0 1 0 49.66 0 24.83 24.83 0 1 0-49.66 0Z" fill="#333333" p-id="991"></path><path d="M654 673.83H452c-13.71 0-24.83-11.12-24.83-24.83s11.12-24.83 24.83-24.83h202c13.71 0 24.83 11.12 24.83 24.83s-11.12 24.83-24.83 24.83z" fill="#333333" p-id="992"></path></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

+5 -1
View File
@@ -95,7 +95,11 @@ function parseURL(u) {
password: a.password,
protocol: fakeProto ? protocol : a.protocol.replace(":", ""),
host: a.hostname,
port: a.port ? parseInt(a.port) : 80,
port: a.port
? parseInt(a.port)
: protocol === "https" || protocol === "wss"
? 443
: 80,
query: a.search,
params: (function() {
var ret = {},
+4 -1
View File
@@ -8,6 +8,8 @@ $primary: $warning;
$primary-invert: findColorInvert($primary);
$twitter: #4099FF;
$twitter-invert: findColorInvert($twitter);
$lightblue: #acd1f0;
$lightblue-invert: findColorInvert($lightblue);
$warning: #ff845e;
$warning-invert: findColorInvert($warning);
@@ -35,7 +37,8 @@ $colors: (
"danger": ($danger, $danger-invert),
"twitter": ($twitter, $twitter-invert),
"green": ($green, $green-invert),
"delete": ($delete, $delete-invert)
"delete": ($delete, $delete-invert),
"lightblue": ($lightblue, $lightblue-invert)
);
// Links
+236 -18
View File
@@ -1,5 +1,61 @@
<template>
<section id="node-section" class="node-section container hero">
<b-sidebar
v-show="observatorySidebarValid && connectedServerInfo.length"
:open="true"
class="node-status-sidebar-reduced"
@mouseenter.native="showSidebar = true"
@click.native="showSidebar = true"
>
<img src="/img/icons/switch-menu.svg" width="36px" />
</b-sidebar>
<b-sidebar
v-if="observatorySidebarValid"
:open="showSidebar"
type="is-light"
:fullheight="false"
:fullwidth="false"
:overlay="false"
:right="false"
class="node-status-sidebar"
@close="showSidebar = false"
@mouseleave.native="showSidebar = false"
>
<b-message
v-for="v of connectedServerInfo"
:key="v.value"
:title="
`${v.info.name}${
v.info.subscription_name ? ` [${v.info.subscription_name}]` : ''
}`
"
:closable="false"
size="is-small"
:type="
v.info.alive
? v.selected
? 'is-primary'
: 'is-success'
: v.info.alive === null
? 'is-light'
: 'is-danger'
"
@click.native="handleClickConnectedServer(v.which)"
>
<div v-if="v.showContent">
<p>协议:{{ v.info.net }}</p>
<p v-if="v.info.delay && v.info.delay < 99999">
时延:{{ v.info.delay }}ms
</p>
<p v-if="!v.info.alive && v.info.last_seen_time">
上一次存活时间:{{ v.info.last_seen_time | unix2datetime }}
</p>
<p v-if="v.info.last_try_time">
上一次测试时间:{{ v.info.last_try_time | unix2datetime }}
</p>
</div>
</b-message>
</b-sidebar>
<div v-if="ready" class="hero-body">
<b-field
id="toolbar"
@@ -128,6 +184,7 @@
v-model="tab"
position="is-centered"
type="is-toggle-rounded"
class="main-tabs"
@input="handleTabsChange"
>
<b-tab-item label="SUBSCRIPTION">
@@ -231,7 +288,9 @@
</b-tab-item>
<b-tab-item
label="SERVER"
:icon="`${connectedServer['server'] ? ' iconfont icon-dian' : ''}`"
:icon="
`${connectedServerInTab['server'] ? ' iconfont icon-dian' : ''}`
"
>
<b-field :label="`SERVER(${tableData.servers.length})`">
<b-table
@@ -351,7 +410,7 @@
"
:icon="
`${
connectedServer['subscriptionServer'][subi]
connectedServerInTab['subscriptionServer'][subi]
? ' iconfont icon-dian'
: ''
}`
@@ -629,18 +688,32 @@ import ModalServer from "@/components/modalServer";
import ModalSubscription from "@/components/modalSuscription";
import { waitingConnected } from "@/assets/js/networkInspect";
import axios from "@/plugins/axios";
import dayjs from "dayjs";
export default {
name: "Node",
components: { ModalSubscription, ModalServer },
filters: {
unix2datetime(x) {
return dayjs.unix(x).format("YYYY-MM-DD HH:mm:ss");
}
},
props: {
outbound: {
type: String,
default: "proxy"
},
observatory: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
enterReducedSidebar: false,
showSidebar: false,
importWhat: "",
showModalImport: false,
showModalImportInBatch: false,
@@ -662,20 +735,55 @@ export default {
which: null,
modalServerReadOnly: false,
showModalSubscription: false,
connectedServer: {
connectedServerInTab: {
subscriptionServer: Array(100),
server: false
},
connectedServerInfo: [],
overHeight: false,
clipboard: null
};
},
computed: {
observatorySidebarValid() {
return localStorage["observatorySidebarValid"];
}
},
watch: {
"runningState.running"() {
this.updateConnectView();
},
outbound() {
this.updateConnectView();
},
observatory(val) {
console.log(val);
for (const info of val.body) {
this.connectedServerInfo.some(x => {
if (JSON.stringify(info.which) === JSON.stringify(x.which)) {
for (const k in info) {
if (k === "which" || !info.hasOwnProperty(k)) {
continue;
}
x.info[k] = info[k];
}
return true;
}
return false;
});
}
let minDelay = 99999;
let index = -1;
this.connectedServerInfo.forEach((x, i) => {
x.selected = false;
if (x.info.delay && x.info.delay < minDelay) {
minDelay = x.info.delay;
index = i;
}
});
if (index >= 0) {
this.connectedServerInfo[index].selected = true;
}
}
},
created() {
@@ -738,6 +846,53 @@ export default {
});
},
methods: {
handleClickConnectedServer(which) {
const that = this;
this.locateTabToConnected(which);
let tabIndex = -1;
if (which._type === "server") {
tabIndex = 1;
} else {
tabIndex = 2 + which.sub;
}
let tryCnt = 0;
const maxTry = 5;
const tryInterval = 500;
function waitingAndLocate() {
let nodes = document.querySelectorAll(".main-tabs .tabs li");
if (!nodes[tabIndex].classList.contains("is-active")) {
tryCnt++;
if (tryCnt > maxTry) {
return;
}
setTimeout(waitingAndLocate, tryInterval);
return;
}
console.log("ok");
that.$nextTick(() => {
let nodes = document.querySelectorAll(".main-tabs .b-table");
if (which._type === "subscriptionServer") {
// solid
tabIndex = 2;
}
nodes = nodes[tabIndex].querySelectorAll("tbody tr");
const node = nodes[which.id - 1];
node.scrollIntoView({ block: "end", inline: "center" });
node.classList.add("highlight-row");
setTimeout(() => {
node.classList.remove("highlight-row");
setTimeout(() => {
node.classList.add("highlight-row");
setTimeout(() => {
node.classList.remove("highlight-row");
}, 200);
}, 50);
}, 200);
});
}
waitingAndLocate();
},
handleClickImportInBatch() {
this.showModalImportInBatch = true;
},
@@ -865,12 +1020,41 @@ export default {
}
} else {
server.connected = true;
server = [server];
}
if (this.observatorySidebarValid) {
this.connectedServerInfo = [];
for (const i in server) {
let subscription_name = null;
if (connectedServer[i]._type === "subscriptionServer") {
subscription_name = this.tableData.subscriptions[
connectedServer[i].sub
].host.toUpperCase();
}
this.connectedServerInfo.push({
info: {
...server[i],
subscription_name,
alive: null,
delay: null,
outbound_tag: null,
last_seen_time: null,
last_error_reason: null,
last_try_time: null
},
which: connectedServer[i],
showContent: true,
selected: false
});
}
}
} else {
this.connectedServerInfo = [];
}
this.connectedServer.server = false;
for (const i in this.connectedServer.subscriptionServer) {
this.connectedServer.subscriptionServer[i] = false;
this.connectedServerInTab.server = false;
for (const i in this.connectedServerInTab.subscriptionServer) {
this.connectedServerInTab.subscriptionServer[i] = false;
}
if (connectedServer) {
let servers = connectedServer;
@@ -879,16 +1063,19 @@ export default {
}
for (const s of servers) {
if (s._type === "server") {
this.connectedServer.server = true;
this.connectedServerInTab.server = true;
} else if (s._type === "subscriptionServer") {
this.connectedServer.subscriptionServer[s.sub] = true;
this.connectedServerInTab.subscriptionServer[s.sub] = true;
}
}
}
this.$emit("input", this.runningState);
},
locateTabToConnected() {
let whichServer = this.runningState.connectedServer;
locateTabToConnected(which) {
let whichServer = which;
if (!whichServer) {
whichServer = this.runningState.connectedServer;
}
if (!whichServer) {
return;
}
@@ -1367,14 +1554,6 @@ export default {
queue: false
});
this.showModalSubscription = false;
this.tableData = res.data.data.touch;
this.runningState = {
running: res.data.data.running
? this.$t("common.isRunning")
: this.$t("common.notRunning"),
connectedServer: this.tableData.connectedServer
};
this.updateConnectView();
});
});
}
@@ -1557,4 +1736,43 @@ $coverBackground: rgba(0, 0, 0, 0.6);
font-size: 0.75rem;
}
}
.b-sidebar.node-status-sidebar-reduced > .sidebar-content.is-fixed {
left: 1px;
top: 4.25rem;
background-color: white;
width: unset;
line-height: 0;
border-radius: 4px;
}
.b-sidebar.node-status-sidebar > .sidebar-content.is-fixed {
left: 1px;
top: 4.25rem;
background-color: white;
max-height: calc(100vh - 5rem);
overflow-y: scroll;
.message {
cursor: pointer;
}
.tabs:not(:last-child),
.pagination:not(:last-child),
.message:not(:last-child),
.level:not(:last-child),
.breadcrumb:not(:last-child),
.highlight:not(:last-child),
.block:not(:last-child),
.title:not(:last-child),
.subtitle:not(:last-child),
.table-container:not(:last-child),
.table:not(:last-child),
.progress:not(:last-child),
.notification:not(:last-child),
.content:not(:last-child),
.box:not(:last-child) {
margin-bottom: 0.25rem;
}
}
tr.highlight-row {
transition: background-color 0.05s linear;
background-color: #a8cff0;
}
</style>
+4 -4
View File
@@ -3108,10 +3108,10 @@ dashdash@^1.12.0:
dependencies:
assert-plus "^1.0.0"
dayjs@^1.8.16:
version "1.10.2"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.2.tgz#8f3a424ceb944a8193506804b0045a773d2d0672"
integrity sha512-h/YtykNNTR8Qgtd1Fxl5J1/SFP1b7SOk/M1P+Re+bCdFMV0IMkuKNgHPN7rlvvuhfw24w0LX78iYKt4YmePJNQ==
dayjs@^1.10.6:
version "1.10.6"
resolved "https://registry.nlark.com/dayjs/download/dayjs-1.10.6.tgz?cache=0&sync_timestamp=1625557417200&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdayjs%2Fdownload%2Fdayjs-1.10.6.tgz#288b2aa82f2d8418a6c9d4df5898c0737ad02a63"
integrity sha1-KIsqqC8thBimydTfWJjAc3rQKmM=
de-indent@^1.0.2:
version "1.0.2"
+26 -5
View File
@@ -1,7 +1,6 @@
package jwt
import (
"github.com/v2rayA/v2rayA/common"
"encoding/base64"
"fmt"
"github.com/dgrijalva/jwt-go"
@@ -9,22 +8,44 @@ import (
"github.com/gin-gonic/gin"
"github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/v2rayA/v2rayA/common"
"strconv"
"strings"
"time"
)
// stripBearerPrefixFromTokenString strips 'Bearer ' prefix from bearer token string
func stripBearerPrefixFromTokenString(tok string) (string, error) {
// Should be a bearer token
if len(tok) > 6 && strings.ToUpper(tok[0:7]) == "BEARER " {
return tok[7:], nil
}
return tok, nil
}
// AuthorizationArgumentExtractor extracts bearer token from Argument header
// Uses PostExtractionFilter to strip "Bearer " prefix from header
var AuthorizationArgumentExtractor = &request.PostExtractionFilter{
request.ArgumentExtractor{"Authorization"},
stripBearerPrefixFromTokenString,
}
func JWTAuth(Admin bool) gin.HandlerFunc {
return func(ctx *gin.Context) {
token, err := request.ParseFromRequest(ctx.Request, request.AuthorizationHeaderExtractor,
func(token *jwt.Token) (interface{}, error) {
// 我们使用固定的secret,直接返回就好
return getSecret(), nil
})
if err != nil {
common.Response(ctx, common.UNAUTHORIZED, err.Error())
ctx.Abort()
return
token, err = request.ParseFromRequest(ctx.Request, AuthorizationArgumentExtractor,
func(token *jwt.Token) (interface{}, error) {
return getSecret(), nil
});
if err != nil {
common.Response(ctx, common.UNAUTHORIZED, err.Error())
ctx.Abort()
return
}
}
//如果需要Admin权限
mapClaims := token.Claims.(jwt.MapClaims)
+13 -10
View File
@@ -23,16 +23,19 @@ var (
ApiFeed *Feed
)
const ApiFeedBoxSize = 10
const (
ApiFeedBoxSize = 10
ApiFeedInterval = 3 * time.Second
)
type OutboundStatus struct {
Alive bool `json:"alive,omitempty"`
Delay int64 `json:"delay,omitempty"`
LastErrorReason string `json:"last_error_reason,omitempty"`
OutboundTag string `json:"outbound_tag,omitempty"`
Which *configure.Which `json:"which,omitempty"`
LastSeenTime int64 `json:"last_seen_time,omitempty"`
LastTryTime int64 `json:"last_try_time,omitempty"`
Alive bool `json:"alive"`
Delay int64 `json:"delay"`
LastErrorReason string `json:"last_error_reason"`
OutboundTag string `json:"outbound_tag"`
Which *configure.Which `json:"which"`
LastSeenTime int64 `json:"last_seen_time"`
LastTryTime int64 `json:"last_try_time"`
}
func init() {
@@ -62,7 +65,7 @@ func observatoryProducer() {
var conn *grpc.ClientConn
for {
if ApiPort() == 0 {
time.Sleep(5 * time.Second)
time.Sleep(ApiFeedInterval)
continue
}
// Set up a connection to the server.
@@ -92,6 +95,6 @@ func observatoryProducer() {
}
ApiFeed.ProductMessage(product, os)
}
time.Sleep(5 * time.Second)
time.Sleep(ApiFeedInterval)
}
}
+4 -2
View File
@@ -11,7 +11,7 @@ type Feed struct {
boxSize int
}
type Message struct {
ProduceTime time.Time
ProduceTime int64
Product string
Body interface{}
}
@@ -50,6 +50,8 @@ func (s *Feed) SubscribeMessage(product string) (box *Box) {
s.boxes[product] = append(s.boxes[product], &messages)
index := len(s.boxes[product]) - 1
cancel := func() {
s.mu.Lock()
defer s.mu.Unlock()
if index >= len(s.boxes[product]) || s.boxes[product][index] != &messages {
index = -1
for i := range s.boxes[product] {
@@ -74,7 +76,7 @@ func (s *Feed) SubscribeMessage(product string) (box *Box) {
func (s *Feed) ProductMessage(product string, message interface{}) (numConsumer int) {
msg := Message{
ProduceTime: time.Now(),
ProduceTime: time.Now().Unix(),
Body: message,
Product: product,
}
+5
View File
@@ -4,16 +4,21 @@ import (
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"github.com/v2rayA/v2rayA/server/service"
"net/http"
)
var upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
CheckOrigin: func(r *http.Request) bool {
return true
},
}
func WsMessage(ctx *gin.Context) {
conn, err := upgrader.Upgrade(ctx.Writer, ctx.Request, nil)
if err != nil {
logError(err)
return
}
h := service.NewMessageHandler(conn)
+3
View File
@@ -63,6 +63,7 @@ func nocache(c *gin.Context) {
c.Header("Cache-Control", "no-cache, no-store, max-age=0, must-revalidate")
c.Header("Pragma", "no-cache")
c.Header("Expires", "0")
c.Next()
}
func Run() error {
@@ -74,6 +75,8 @@ func Run() error {
corsConfig.AllowMethods = []string{
"GET", "POST", "DELETE", "PUT", "PATCH", "OPTIONS", "HEAD",
}
corsConfig.AllowWebSockets = true
corsConfig.AllowCredentials = true
corsConfig.AddAllowHeaders("Authorization")
engine.Use(cors.New(corsConfig))
noAuth := engine.Group("api", nocache)
+7 -13
View File
@@ -2,15 +2,13 @@ package service
import (
"github.com/gorilla/websocket"
jsoniter "github.com/json-iterator/go"
"github.com/v2rayA/v2rayA/core/v2ray"
"log"
"sync"
"time"
)
const (
writeWait = 5 * time.Second
writeWait = v2ray.ApiFeedInterval
)
type MessageHandler struct {
@@ -18,7 +16,7 @@ type MessageHandler struct {
boxes map[string]*v2ray.Box
}
type Message struct {
ProductTime time.Time `json:"product_time"`
ProduceTime int64 `json:"produce_time"`
Type string `json:"type"`
Body interface{} `json:"body"`
}
@@ -45,7 +43,7 @@ func (h *MessageHandler) Read() {
}()
for {
if _, _, err := h.conn.ReadMessage(); err != nil {
log.Println(err)
//log.Println(err)
break
}
}
@@ -62,16 +60,12 @@ func (h *MessageHandler) Write() {
go func(box *v2ray.Box) {
defer wg.Done()
for msg := range box.Messages {
b, err := jsoniter.Marshal(Message{
ProductTime: msg.ProduceTime,
_ = h.conn.SetWriteDeadline(time.Now().Add(writeWait))
if err := h.conn.WriteJSON(Message{
ProduceTime: msg.ProduceTime,
Type: msg.Product,
Body: msg.Body,
})
if err != nil {
log.Printf("[Warning] %v", err)
}
_ = h.conn.SetWriteDeadline(time.Now().Add(writeWait))
if err := h.conn.WriteMessage(websocket.TextMessage, b); err != nil {
}); err != nil {
return
}
}