mirror of
https://github.com/EasyTier/EasytierGame.git
synced 2025-05-19 10:27:56 +00:00
once改为listen修复日志监听无法触发的bug 增加输入框右键菜单 增加成员列表接收和传输的字符大小 优化成员列表nat_type为中文 修复ipv4无法显示的问题
This commit is contained in:
@@ -37,7 +37,7 @@ export default async (
|
||||
defaultOpts.y = logicalPosition.y;
|
||||
}
|
||||
dialog = new WebviewWindow(label, { ...defaultOpts, ...options });
|
||||
unlistenLogCreated = await dialog.once("tauri://webview-created", async () => {
|
||||
unlistenLogCreated = await dialog.listen("tauri://webview-created", async () => {
|
||||
if (dialog) {
|
||||
afterCreatedFunc && (await afterCreatedFunc(dialog, appWindow));
|
||||
await dialog.show();
|
||||
|
||||
+2
-1
@@ -5,7 +5,8 @@
|
||||
<script setup lang="tsx">
|
||||
//屏蔽右键菜单
|
||||
document.addEventListener("contextmenu", (e: MouseEvent) => {
|
||||
if (import.meta.env.PROD) {
|
||||
const el = (e.target as HTMLElement);
|
||||
if (import.meta.env.PROD && !el.classList.contains("el-input__inner") && !el.classList.contains("el-textarea__inner")) { // 所有输入框不禁用右键
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -9,6 +9,8 @@ export default defineNuxtConfig({
|
||||
port: 5000
|
||||
},
|
||||
|
||||
telemetry: false,
|
||||
|
||||
imports: {
|
||||
autoImport: false
|
||||
},
|
||||
|
||||
+3
-3
@@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"author": "leizi97",
|
||||
"description": "A simple network initiator based on Easytier",
|
||||
"version": "1.2.7",
|
||||
"version": "1.2.8",
|
||||
"scripts": {
|
||||
"dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0",
|
||||
"build": "nuxt generate --dotenv env/.env.prod",
|
||||
@@ -13,7 +13,7 @@
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@element-plus/nuxt": "^1.1.0",
|
||||
"@nuxtjs/tailwindcss": "^6.12.0",
|
||||
"@pinia/nuxt": "^0.7.0",
|
||||
"@pinia/nuxt": "0.8.0",
|
||||
"@tauri-apps/api": "^2.1.1",
|
||||
"@tauri-apps/cli": "^2.1.0",
|
||||
"@tauri-apps/plugin-autostart": "~2",
|
||||
@@ -26,7 +26,7 @@
|
||||
"@tauri-apps/plugin-window-state": "~2",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.0",
|
||||
"@vueuse/core": "^11.2.0",
|
||||
"@vueuse/core": "12.0.0",
|
||||
"archiver": "^7.0.1",
|
||||
"element-plus": "^2.8.7",
|
||||
"less": "^4.2.0",
|
||||
|
||||
+5
-9
@@ -215,7 +215,7 @@
|
||||
:icon="SetUp"
|
||||
command="create_server"
|
||||
>
|
||||
自建服务({{ listenObj.server_thread_id.value ? "运行中" : "未运行" }})
|
||||
自建服务器<ElTag size="small" class="ml-[5px]" :type="listenObj.server_thread_id.value ? 'success' : 'info'">{{ listenObj.server_thread_id.value ? "运行中" : "未运行" }}</ElTag>
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem
|
||||
:icon="Tools"
|
||||
@@ -642,15 +642,11 @@
|
||||
if (event.payload.includes("new peer connection added") && !data.isSuccessGetIp) {
|
||||
await setTrayRunState(tray, true);
|
||||
data.isSuccessGetIp = true;
|
||||
await setTrayTooltip(tray, `IP: ${config.ipv4}`);
|
||||
await setTrayTooltip(tray, `IP: ${mainStore.config.ipv4}`);
|
||||
}
|
||||
if (config.dhcp || mainStore.configStartEnable) {
|
||||
if (ipv4) {
|
||||
config.ipv4 = ipv4;
|
||||
await setTrayRunState(tray, true);
|
||||
data.isSuccessGetIp = true;
|
||||
await setTrayTooltip(tray, `IP: ${ipv4}`);
|
||||
}
|
||||
if (ipv4) {
|
||||
mainStore.config.ipv4 = ipv4;
|
||||
await setTrayTooltip(tray, `IP: ${ipv4}`);
|
||||
}
|
||||
if (
|
||||
devName &&
|
||||
|
||||
+22
-5
@@ -13,7 +13,11 @@
|
||||
width="140"
|
||||
label="主机名"
|
||||
prop="hostname"
|
||||
></ElTableColumn>
|
||||
>
|
||||
<template #default="{row}">
|
||||
{{ (row.hostname || "").toLowerCase().includes('publicserver') ? (row.hostname || "").replace("PublicServer", "服务器") : (row.hostname || "-") }}
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
width="90"
|
||||
@@ -54,8 +58,8 @@
|
||||
<ElTableColumn
|
||||
sortable
|
||||
width="120"
|
||||
label="nat_type"
|
||||
prop="NAT类型"
|
||||
label="NAT类型"
|
||||
prop="nat_type"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ natMaps[row.nat_type.toLowerCase() as natKyes] || row.nat_type || "-" }}
|
||||
@@ -72,6 +76,16 @@
|
||||
prop="tunnel_proto"
|
||||
label="隧道协议"
|
||||
></ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
prop="rx_bytes"
|
||||
label="接收"
|
||||
></ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
prop="tx_bytes"
|
||||
label="传输"
|
||||
></ElTableColumn>
|
||||
</ElTable>
|
||||
</div>
|
||||
</div>
|
||||
@@ -109,7 +123,7 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
};
|
||||
type natKyes = keyof typeof natMaps;
|
||||
|
||||
const data = reactive<{ member: any[] }>({
|
||||
const data = reactive<{ member: {hostname: string, cost: string, ipv4: string, lat_msg: string, loss_rate: string, nat_type: string}[] }>({
|
||||
member: []
|
||||
});
|
||||
|
||||
@@ -121,7 +135,9 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
["loss_rate", "丢包率"],
|
||||
["nat_type", "NAT类型"],
|
||||
["version", "版本"],
|
||||
["tunnel_proto", "隧道协议"]
|
||||
["tunnel_proto", "隧道协议"],
|
||||
['rx_bytes', '接收'],
|
||||
['tx_bytes', '传输']
|
||||
];
|
||||
|
||||
let timer: NodeJS.Timeout | null = null;
|
||||
@@ -157,6 +173,7 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
value.ipv4 = value.ipv4.split("/")[0];
|
||||
}
|
||||
});
|
||||
// console.log(peerInfo)
|
||||
data.member = peerInfo;
|
||||
startTimer();
|
||||
};
|
||||
|
||||
Generated
+31
-36
@@ -18,8 +18,8 @@ importers:
|
||||
specifier: ^6.12.0
|
||||
version: 6.12.2(magicast@0.3.5)(rollup@4.25.0)
|
||||
'@pinia/nuxt':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(magicast@0.3.5)(rollup@4.25.0)(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))
|
||||
specifier: 0.8.0
|
||||
version: 0.8.0(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0)
|
||||
'@tauri-apps/api':
|
||||
specifier: ^2.1.1
|
||||
version: 2.1.1
|
||||
@@ -57,8 +57,8 @@ importers:
|
||||
specifier: ^4.1.0
|
||||
version: 4.1.0(vite@5.4.11(@types/node@22.9.0)(less@4.2.0)(terser@5.36.0))(vue@3.5.13(typescript@5.6.3))
|
||||
'@vueuse/core':
|
||||
specifier: ^11.2.0
|
||||
version: 11.2.0(vue@3.5.13(typescript@5.6.3))
|
||||
specifier: 12.0.0
|
||||
version: 12.0.0(typescript@5.6.3)
|
||||
archiver:
|
||||
specifier: ^7.0.1
|
||||
version: 7.0.1
|
||||
@@ -79,7 +79,7 @@ importers:
|
||||
version: 2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))
|
||||
pinia-plugin-persistedstate:
|
||||
specifier: ^4.1.3
|
||||
version: 4.1.3(@pinia/nuxt@0.7.0(magicast@0.3.5)(rollup@4.25.0)(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0)
|
||||
version: 4.1.3(@pinia/nuxt@0.8.0(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0))(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0)
|
||||
postcss:
|
||||
specifier: ^8.4.38
|
||||
version: 8.4.49
|
||||
@@ -772,8 +772,10 @@ packages:
|
||||
resolution: {integrity: sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==}
|
||||
engines: {node: '>= 10.0.0'}
|
||||
|
||||
'@pinia/nuxt@0.7.0':
|
||||
resolution: {integrity: sha512-IAKRl7mQCrFKQtD8Z6EzOz5bQ/px0FdeyaB+70A3igkFzHzKVJVblLCjFwXPBC/IO0EwHuMRk/SMgwkUn82jwg==}
|
||||
'@pinia/nuxt@0.8.0':
|
||||
resolution: {integrity: sha512-BWPUKOg3KGnRSgz54x9IUzCKTqUxZx4UJezPRbRwY5BVt18rfiP4Cqq8kxtR8WWDZa5PTRJpx0Jxz+qyUdLvjQ==}
|
||||
peerDependencies:
|
||||
pinia: ^2.2.7
|
||||
|
||||
'@pkgjs/parseargs@0.11.0':
|
||||
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
|
||||
@@ -1316,20 +1318,20 @@ packages:
|
||||
'@vue/shared@3.5.13':
|
||||
resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==}
|
||||
|
||||
'@vueuse/core@11.2.0':
|
||||
resolution: {integrity: sha512-JIUwRcOqOWzcdu1dGlfW04kaJhW3EXnnjJJfLTtddJanymTL7lF1C0+dVVZ/siLfc73mWn+cGP1PE1PKPruRSA==}
|
||||
'@vueuse/core@12.0.0':
|
||||
resolution: {integrity: sha512-C12RukhXiJCbx4MGhjmd/gH52TjJsc3G0E0kQj/kb19H3Nt6n1CA4DRWuTdWWcaFRdlTe0npWDS942mvacvNBw==}
|
||||
|
||||
'@vueuse/core@9.13.0':
|
||||
resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==}
|
||||
|
||||
'@vueuse/metadata@11.2.0':
|
||||
resolution: {integrity: sha512-L0ZmtRmNx+ZW95DmrgD6vn484gSpVeRbgpWevFKXwqqQxW9hnSi2Ppuh2BzMjnbv4aJRiIw8tQatXT9uOB23dQ==}
|
||||
'@vueuse/metadata@12.0.0':
|
||||
resolution: {integrity: sha512-Yzimd1D3sjxTDOlF05HekU5aSGdKjxhuhRFHA7gDWLn57PRbBIh+SF5NmjhJ0WRgF3my7T8LBucyxdFJjIfRJQ==}
|
||||
|
||||
'@vueuse/metadata@9.13.0':
|
||||
resolution: {integrity: sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==}
|
||||
|
||||
'@vueuse/shared@11.2.0':
|
||||
resolution: {integrity: sha512-VxFjie0EanOudYSgMErxXfq6fo8vhr5ICI+BuE3I9FnX7ePllEsVrRQ7O6Q1TLgApeLuPKcHQxAXpP+KnlrJsg==}
|
||||
'@vueuse/shared@12.0.0':
|
||||
resolution: {integrity: sha512-3i6qtcq2PIio5i/vVYidkkcgvmTjCqrf26u+Fd4LhnbBmIT6FN8y6q/GJERp8lfcB9zVEfjdV0Br0443qZuJpw==}
|
||||
|
||||
'@vueuse/shared@9.13.0':
|
||||
resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==}
|
||||
@@ -4526,13 +4528,12 @@ snapshots:
|
||||
std-env: 3.8.0
|
||||
ufo: 1.5.4
|
||||
uncrypto: 0.1.3
|
||||
unimport: 3.13.1(rollup@4.25.0)
|
||||
unimport: 3.13.3(rollup@4.25.0)
|
||||
untyped: 1.5.1
|
||||
transitivePeerDependencies:
|
||||
- magicast
|
||||
- rollup
|
||||
- supports-color
|
||||
- webpack-sources
|
||||
|
||||
'@nuxt/schema@3.14.1592(magicast@0.3.5)(rollup@4.25.0)':
|
||||
dependencies:
|
||||
@@ -4725,18 +4726,14 @@ snapshots:
|
||||
'@parcel/watcher-win32-ia32': 2.5.0
|
||||
'@parcel/watcher-win32-x64': 2.5.0
|
||||
|
||||
'@pinia/nuxt@0.7.0(magicast@0.3.5)(rollup@4.25.0)(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))':
|
||||
'@pinia/nuxt@0.8.0(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0)':
|
||||
dependencies:
|
||||
'@nuxt/kit': 3.14.159(magicast@0.3.5)(rollup@4.25.0)
|
||||
'@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.25.0)
|
||||
pinia: 2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- magicast
|
||||
- rollup
|
||||
- supports-color
|
||||
- typescript
|
||||
- vue
|
||||
- webpack-sources
|
||||
|
||||
'@pkgjs/parseargs@0.11.0':
|
||||
optional: true
|
||||
@@ -5115,7 +5112,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@babel/types': 7.26.0
|
||||
'@rollup/pluginutils': 5.1.3(rollup@4.25.0)
|
||||
'@vue/compiler-sfc': 3.5.12
|
||||
'@vue/compiler-sfc': 3.5.13
|
||||
ast-kit: 1.3.1
|
||||
local-pkg: 0.5.0
|
||||
magic-string-ast: 0.6.2
|
||||
@@ -5268,15 +5265,14 @@ snapshots:
|
||||
|
||||
'@vue/shared@3.5.13': {}
|
||||
|
||||
'@vueuse/core@11.2.0(vue@3.5.13(typescript@5.6.3))':
|
||||
'@vueuse/core@12.0.0(typescript@5.6.3)':
|
||||
dependencies:
|
||||
'@types/web-bluetooth': 0.0.20
|
||||
'@vueuse/metadata': 11.2.0
|
||||
'@vueuse/shared': 11.2.0(vue@3.5.13(typescript@5.6.3))
|
||||
vue-demi: 0.14.10(vue@3.5.13(typescript@5.6.3))
|
||||
'@vueuse/metadata': 12.0.0
|
||||
'@vueuse/shared': 12.0.0(typescript@5.6.3)
|
||||
vue: 3.5.13(typescript@5.6.3)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
- typescript
|
||||
|
||||
'@vueuse/core@9.13.0(vue@3.5.13(typescript@5.6.3))':
|
||||
dependencies:
|
||||
@@ -5288,16 +5284,15 @@ snapshots:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
|
||||
'@vueuse/metadata@11.2.0': {}
|
||||
'@vueuse/metadata@12.0.0': {}
|
||||
|
||||
'@vueuse/metadata@9.13.0': {}
|
||||
|
||||
'@vueuse/shared@11.2.0(vue@3.5.13(typescript@5.6.3))':
|
||||
'@vueuse/shared@12.0.0(typescript@5.6.3)':
|
||||
dependencies:
|
||||
vue-demi: 0.14.10(vue@3.5.13(typescript@5.6.3))
|
||||
vue: 3.5.13(typescript@5.6.3)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
- typescript
|
||||
|
||||
'@vueuse/shared@9.13.0(vue@3.5.13(typescript@5.6.3))':
|
||||
dependencies:
|
||||
@@ -7033,14 +7028,14 @@ snapshots:
|
||||
pify@4.0.1:
|
||||
optional: true
|
||||
|
||||
pinia-plugin-persistedstate@4.1.3(@pinia/nuxt@0.7.0(magicast@0.3.5)(rollup@4.25.0)(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0):
|
||||
pinia-plugin-persistedstate@4.1.3(@pinia/nuxt@0.8.0(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0))(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0):
|
||||
dependencies:
|
||||
'@nuxt/kit': 3.14.159(magicast@0.3.5)(rollup@4.25.0)
|
||||
deep-pick-omit: 1.2.1
|
||||
defu: 6.1.4
|
||||
destr: 2.0.3
|
||||
optionalDependencies:
|
||||
'@pinia/nuxt': 0.7.0(magicast@0.3.5)(rollup@4.25.0)(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))
|
||||
'@pinia/nuxt': 0.8.0(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0)
|
||||
pinia: 2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))
|
||||
transitivePeerDependencies:
|
||||
- magicast
|
||||
@@ -7982,7 +7977,7 @@ snapshots:
|
||||
'@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.0)
|
||||
'@babel/plugin-transform-typescript': 7.25.9(@babel/core@7.26.0)
|
||||
'@vue/babel-plugin-jsx': 1.2.5(@babel/core@7.26.0)
|
||||
'@vue/compiler-dom': 3.5.12
|
||||
'@vue/compiler-dom': 3.5.13
|
||||
kolorist: 1.8.0
|
||||
magic-string: 0.30.14
|
||||
vite: 5.4.11(@types/node@22.9.0)(less@4.2.0)(terser@5.36.0)
|
||||
|
||||
Generated
+1
-1
@@ -1176,7 +1176,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
|
||||
|
||||
[[package]]
|
||||
name = "easytier-game"
|
||||
version = "1.2.7"
|
||||
version = "1.2.8"
|
||||
dependencies = [
|
||||
"log",
|
||||
"planif",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "easytier-game"
|
||||
version = "1.2.7"
|
||||
version = "1.2.8"
|
||||
homepage = "https://github.com/EasyTier/EasyTier"
|
||||
repository = "https://github.com/EasyTier/EasytierGame"
|
||||
description = "A simple network initiator based on Easytier"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "easytier-game",
|
||||
"version": "1.2.7",
|
||||
"version": "1.2.8",
|
||||
"identifier": "com.tauri.easytier-game",
|
||||
|
||||
"build": {
|
||||
@@ -13,7 +13,7 @@
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "easytier-game 1.2.7",
|
||||
"title": "easytier-game 1.2.8",
|
||||
"label": "main",
|
||||
"minWidth": 340,
|
||||
"width": 340,
|
||||
|
||||
Reference in New Issue
Block a user