Skip to content

Commit 4299044

Browse files
authored
Merge pull request #231 from jason5ng32/dev
Improvements
2 parents 70ee698 + 364571c commit 4299044

File tree

10 files changed

+117
-83
lines changed

10 files changed

+117
-83
lines changed

frontend/components/ConnectivityTest.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="card jn-card keyboard-shortcut-card"
1818
:class="{ 'dark-mode dark-mode-border': isDarkMode, 'jn-hover-card': !isMobile }">
1919
<div class="card-body">
20-
<p class="jn-con-title card-title"><i class="bi" :class="'bi-' + test.icon"></i> {{ test.name }}</p>
20+
<p class="jn-con-title card-title" @click.prevent="checkConnectivityHandler(test, onTestComplete, true)" :title="t('connectivity.RefreshThisTest')"><i class="bi" :class="'bi-' + test.icon"></i> {{ test.name }}</p>
2121
<p class="card-text" :class="{
2222
'text-info': test.status === t('connectivity.StatusWait'),
2323
'text-success': test.status.includes(t('connectivity.StatusAvailable')) && test.time < 200,
@@ -147,13 +147,13 @@ const connectivityTests = reactive([
147147
]);
148148
149149
// 检查网络连通性
150-
const checkConnectivityHandler = (test, onTestComplete, isManualRun) => {
150+
const checkConnectivityHandler = (test, onTestComplete = () => {}, isManualRun) => {
151151
const beginTime = +new Date();
152152
manualRun.value = isManualRun;
153153
let img = new Image();
154154
let timeout = setTimeout(() => {
155155
test.status = t('connectivity.StatusUnavailable');
156-
onTestComplete(false);
156+
onTestComplete(false);
157157
}, 3 * 1200);
158158
159159
img.onload = () => {
@@ -172,7 +172,6 @@ const checkConnectivityHandler = (test, onTestComplete, isManualRun) => {
172172
} else {
173173
test.time = testTime;
174174
}
175-
176175
onTestComplete(true);
177176
};
178177

frontend/components/WebRtcTest.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ const stunServers = reactive([
6767
natType: t('webrtc.StatusWait'),
6868
},
6969
{
70-
id: "nextcloud",
71-
name: "NextCloud (QUIC)",
72-
url: "stun.nextcloud.com:443",
70+
id: "blackberry",
71+
name: "BlackBerry",
72+
url: "stun.voip.blackberry.com:3478",
7373
ip: t('webrtc.StatusWait'),
7474
natType: t('webrtc.StatusWait'),
7575
},

frontend/components/advanced-tools/InvisibilityTest.vue

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,12 @@
8585
<i class="bi"
8686
:class="(testResults.blocklist.proxy || testResults.blocklist.vpn) ? 'bi-x-circle-fill text-danger' : 'bi-check-circle-fill text-success'"></i>
8787
</td>
88-
<td class="opacity-75">
89-
<span
88+
<td>
89+
<span class="opacity-75"
9090
v-if="(testResults.blocklist.proxy || testResults.blocklist.vpn)">{{
9191
t('invisibilitytest.blocklist.proxy') }}</span>
92-
<span v-else>{{ t('invisibilitytest.blocklist.notProxy') }}</span>
92+
<span class="opacity-75" v-else>{{
93+
t('invisibilitytest.blocklist.notProxy') }}</span>
9394
</td>
9495
</tr>
9596

@@ -100,10 +101,11 @@
100101
<i class="bi"
101102
:class="testResults.headers.proxy ? 'bi-x-circle-fill text-danger' : 'bi-check-circle-fill text-success'"></i>
102103
</td>
103-
<td class="opacity-75">
104-
<span v-if="testResults.headers.proxy">{{
104+
<td>
105+
<span class="opacity-75" v-if="testResults.headers.proxy">{{
105106
t('invisibilitytest.headers.proxy') }}</span>
106-
<span v-else>{{ t('invisibilitytest.headers.notProxy') }}</span>
107+
<span class="opacity-75" v-else>{{
108+
t('invisibilitytest.headers.notProxy') }}</span>
107109
</td>
108110
</tr>
109111

@@ -114,13 +116,14 @@
114116
<i class="bi"
115117
:class="(testResults.datacenter.proxy || testResults.datacenter.vpn) ? 'bi-x-circle-fill text-danger' : 'bi-check-circle-fill text-success'"></i>
116118
</td>
117-
<td class="opacity-75">
118-
<span
119+
<td>
120+
<span class="opacity-75"
119121
v-if="(testResults.datacenter.proxy || testResults.datacenter.vpn)">
120122
{{ t('invisibilitytest.datacenter.proxy') }}
121123
<strong>{{ testResults.datacenter.hosting }}</strong>
122124
</span>
123-
<span v-else>{{ t('invisibilitytest.datacenter.notProxy') }}</span>
125+
<span class="opacity-75" v-else>{{
126+
t('invisibilitytest.datacenter.notProxy') }}</span>
124127
</td>
125128
</tr>
126129

@@ -131,8 +134,8 @@
131134
<i class="bi"
132135
:class="testResults.tcp.proxy ? 'bi-x-circle-fill text-danger' : 'bi-check-circle-fill text-success'"></i>
133136
</td>
134-
<td class="opacity-75">
135-
<span v-if="testResults.tcp.proxy">
137+
<td>
138+
<span class="opacity-75" v-if="testResults.tcp.proxy">
136139
{{ t('invisibilitytest.tcp.proxy') }}
137140
<br />
138141
{{ t('invisibilitytest.tcp.computer') }}
@@ -142,7 +145,8 @@
142145
<strong>{{ testResults.tcp.ipos }}</strong>
143146

144147
</span>
145-
<span v-else>{{ t('invisibilitytest.tcp.notProxy') }}</span>
148+
<span class="opacity-75" v-else>{{ t('invisibilitytest.tcp.notProxy')
149+
}}</span>
146150
</td>
147151
</tr>
148152

@@ -153,16 +157,18 @@
153157
<i class="bi"
154158
:class="(testResults.timezone.proxy || testResults.timezone.vpn) ? 'bi-x-circle-fill text-danger' : 'bi-check-circle-fill text-success'"></i>
155159
</td>
156-
<td class="opacity-75">
157-
<span v-if="(testResults.timezone.proxy || testResults.timezone.vpn)">
160+
<td>
161+
<span class="opacity-75"
162+
v-if="(testResults.timezone.proxy || testResults.timezone.vpn)">
158163
{{ t('invisibilitytest.timezone.proxy') }}
159164
<br />
160165
{{ t('invisibilitytest.timezone.computer') }}
161166
<strong>{{ testResults.timezone.clienttimezone }}</strong>.
162167
{{ t('invisibilitytest.timezone.server') }}
163168
<strong>{{ testResults.timezone.iptimezone }}</strong>
164169
</span>
165-
<span v-else>{{ t('invisibilitytest.timezone.notProxy') }}</span>
170+
<span class="opacity-75" v-else>{{
171+
t('invisibilitytest.timezone.notProxy') }}</span>
166172
</td>
167173
</tr>
168174

@@ -173,10 +179,12 @@
173179
<i class="bi"
174180
:class="testResults.net.proxy ? 'bi-x-circle-fill text-danger' : 'bi-check-circle-fill text-success'"></i>
175181
</td>
176-
<td class="opacity-75">
177-
<span v-if="testResults.net.proxy">{{ t('invisibilitytest.net.proxy')
182+
<td>
183+
<span class="opacity-75" v-if="testResults.net.proxy">{{
184+
t('invisibilitytest.net.proxy')
185+
}}</span>
186+
<span class="opacity-75" v-else>{{ t('invisibilitytest.net.notProxy')
178187
}}</span>
179-
<span v-else>{{ t('invisibilitytest.net.notProxy') }}</span>
180188
</td>
181189
</tr>
182190

@@ -187,8 +195,8 @@
187195
<i class="bi"
188196
:class="testResults.webrtc.proxy ? 'bi-x-circle-fill text-danger' : 'bi-check-circle-fill text-success'"></i>
189197
</td>
190-
<td class="opacity-75">
191-
<span v-if="testResults.webrtc.proxy">
198+
<td>
199+
<span class="opacity-75" v-if="testResults.webrtc.proxy">
192200
{{ t('invisibilitytest.webrtc.proxy') }}
193201
<br />
194202
{{ t('invisibilitytest.webrtc.ipsAre') }}
@@ -198,7 +206,8 @@
198206
}}</strong>, </span>
199207
<strong>{{ testResults.webrtc.ip }}</strong>
200208
</span>
201-
<span v-else>{{ t('invisibilitytest.webrtc.notProxy') }}</span>
209+
<span class="opacity-75" v-else>{{ t('invisibilitytest.webrtc.notProxy')
210+
}}</span>
202211
</td>
203212
</tr>
204213

@@ -209,10 +218,12 @@
209218
<i class="bi"
210219
:class="testResults.flow.proxy ? 'bi-x-circle-fill text-danger' : 'bi-check-circle-fill text-success'"></i>
211220
</td>
212-
<td class="opacity-75">
213-
<span v-if="testResults.flow.proxy">{{ t('invisibilitytest.flow.proxy')
221+
<td>
222+
<span class="opacity-75" v-if="testResults.flow.proxy">{{
223+
t('invisibilitytest.flow.proxy')
224+
}}</span>
225+
<span class="opacity-75" v-else>{{ t('invisibilitytest.flow.notProxy')
214226
}}</span>
215-
<span v-else>{{ t('invisibilitytest.flow.notProxy') }}</span>
216227
</td>
217228
</tr>
218229

@@ -223,8 +234,8 @@
223234
<i class="bi"
224235
:class="testResults.latency.proxy ? 'bi-x-circle-fill text-danger' : 'bi-check-circle-fill text-success'"></i>
225236
</td>
226-
<td class="opacity-75">
227-
<span v-if="testResults.latency.proxy">
237+
<td>
238+
<span class="opacity-75" v-if="testResults.latency.proxy">
228239
{{ t('invisibilitytest.latency.proxy') }}
229240
<br />
230241
{{ t('invisibilitytest.latency.fromTCP') }}
@@ -233,7 +244,8 @@
233244
{{ t('invisibilitytest.latency.fromWS') }}
234245
<strong>{{ testResults.latency.wsTime }}ms</strong>
235246
</span>
236-
<span v-else>{{ t('invisibilitytest.latency.notProxy') }}</span>
247+
<span class="opacity-75" v-else>{{
248+
t('invisibilitytest.latency.notProxy') }}</span>
237249
</td>
238250
</tr>
239251

@@ -244,10 +256,11 @@
244256
<i class="bi"
245257
:class="testResults.highlatency.proxy ? 'bi-x-circle-fill text-danger' : 'bi-check-circle-fill text-success'"></i>
246258
</td>
247-
<td class="opacity-75">
248-
<span v-if="testResults.highlatency.proxy">{{
259+
<td>
260+
<span class="opacity-75" v-if="testResults.highlatency.proxy">{{
249261
t('invisibilitytest.highlatency.proxy') }}</span>
250-
<span v-else>{{ t('invisibilitytest.highlatency.notProxy') }}</span>
262+
<span class="opacity-75" v-else>{{
263+
t('invisibilitytest.highlatency.notProxy') }}</span>
251264
</td>
252265
</tr>
253266
</tbody>
@@ -338,7 +351,7 @@ const getResult = async () => {
338351
if (data.message === "Data not found" && retryCount.value < 3) {
339352
setTimeout(() => {
340353
getResult();
341-
}, 4000, retryCount.value++ );
354+
}, 4000, retryCount.value++);
342355
return;
343356
}
344357
testResults.value = data;

frontend/components/advanced-tools/MacChecker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
{{ t('macchecker.country') }}
6666
</span>
6767
<span class="jn-con-title card-title mt-1">
68-
{{ getCountryName(macCheckResult.country, lang) }}
6968
<span
7069
:class="'jn-fl fi fi-' + macCheckResult.country.toLowerCase()"></span>
70+
{{ getCountryName(macCheckResult.country, lang) }}
7171
</span>
7272
</div>
7373
<div class="jn-detail">

frontend/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@
273273
"StatusUnavailable": "Unavailable",
274274
"StatusTimeout": "Timeout or Unavailable",
275275
"checking": "Checking...",
276-
"minTestTime": "Min Test Time: "
276+
"minTestTime": "Min Test Time: ",
277+
"RefreshThisTest": "Refresh This Test"
277278
},
278279
"webrtc": {
279280
"id": "webrtc",

frontend/locales/fr.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@
273273
"StatusUnavailable": "Non disponible",
274274
"StatusTimeout": "Délai dépassé",
275275
"checking": "Vérification en cours...",
276-
"minTestTime": "Minimal: "
276+
"minTestTime": "Minimal: ",
277+
"RefreshThisTest": "Rafraîchir ce test"
277278
},
278279
"webrtc": {
279280
"id": "webrtc",

frontend/locales/zh.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@
273273
"StatusUnavailable": "不可用",
274274
"StatusTimeout": "超时或不可用",
275275
"checking": "检查中...",
276-
"minTestTime": "最小测试时间:"
276+
"minTestTime": "最小测试时间:",
277+
"RefreshThisTest": "刷新此测试"
277278
},
278279
"webrtc": {
279280
"id": "webrtc",

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,31 @@
1414
"dependencies": {
1515
"@analytics/google-analytics": "^1.0.7",
1616
"@cloudflare/speedtest": "^1.3.0",
17-
"@khmyznikov/pwa-install": "^0.3.9",
18-
"analytics": "^0.8.13",
17+
"@khmyznikov/pwa-install": "^0.4.3",
18+
"analytics": "^0.8.14",
1919
"bootstrap": "^5.3.3",
2020
"bootstrap-icons": "^1.11.3",
21-
"code-inspector-plugin": "^0.14.2",
21+
"code-inspector-plugin": "^0.15.2",
2222
"concurrently": "^8.2.2",
2323
"country-code-lookup": "^0.1.3",
2424
"dotenv": "^16.4.5",
2525
"express": "^4.19.2",
26-
"express-rate-limit": "^7.3.1",
26+
"express-rate-limit": "^7.4.0",
2727
"express-slow-down": "^2.0.3",
2828
"flag-icons": "^7.2.3",
2929
"http-proxy-middleware": "^3.0.0",
30-
"maxmind": "^4.3.20",
30+
"maxmind": "^4.3.21",
3131
"nodemon": "^3.1.4",
32-
"pinia": "^2.1.7",
33-
"svgmap": "^2.10.1",
34-
"vue": "^3.4.31",
32+
"pinia": "^2.2.1",
33+
"svgmap": "^2.11.1",
34+
"vue": "^3.4.36",
3535
"vue-i18n": "^9.13.1",
36-
"vue-router": "^4.4.0",
37-
"whoiser": "^1.17.3"
36+
"vue-router": "^4.4.3",
37+
"whoiser": "^1.18.0"
3838
},
3939
"devDependencies": {
40-
"@vitejs/plugin-vue": "^5.0.5",
41-
"vite": "^5.3.3",
42-
"vite-plugin-pwa": "^0.20.0"
40+
"@vitejs/plugin-vue": "^5.1.2",
41+
"vite": "^5.4.0",
42+
"vite-plugin-pwa": "^0.20.1"
4343
}
4444
}

vercel.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)