Skip to content

Commit

Permalink
Merge pull request jason5ng32#135 from jason5ng32/dev
Browse files Browse the repository at this point in the history
Add Proxy Rules Test
  • Loading branch information
jason5ng32 authored Mar 3, 2024
2 parents 8ad485f + f909ddd commit 189fa64
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 23 deletions.
6 changes: 3 additions & 3 deletions src/components/ipcheck.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
@click="$trackEvent('IPCheck', 'ToggleClick', 'ShowMap');">

<label class="form-check-label" for="toggleMapSwitch">
<i :class="['bi', isEnvBingMapKey ? 'bi bi-map-fill' : 'bi bi-map']" aria-hidden="true" role="button"
v-tooltip="$t('Tooltips.ToggleMaps')"></i>
<i :class="['bi', isEnvBingMapKey ? 'bi bi-map-fill' : 'bi bi-map']" aria-hidden="true"
aria-label="Toggle Map Display" v-tooltip="$t('Tooltips.ToggleMaps')"></i>
</label>
</div>

Expand Down Expand Up @@ -91,7 +91,7 @@
<i v-if="isValidIP(card.ip)"
:class="copiedStatus[card.id] ? 'bi bi-clipboard-check-fill' : 'bi bi-clipboard-plus'"
@click="copyToClipboard(card.ip, card.id)" role="button"
v-tooltip="{ title: $t('Tooltips.CopyIP'), placement: 'right' }"></i>
v-tooltip="{ title: $t('Tooltips.CopyIP'), placement: 'right' }" :aria-label="'Copy' + card.ip"></i>
</span>
<span v-else class="placeholder col-10"></span>
</div>
Expand Down
37 changes: 21 additions & 16 deletions src/components/nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
<span class=" fw-bold "> IP</span>
<span class="fw-lighter">Check.</span>
<span class="fw-lighter" :class="{
'background-animation-dark': !loaded && isDarkMode,
'background-animation-light': !loaded && !isDarkMode
}">ing</span>
'background-animation-dark': !loaded && isDarkMode,
'background-animation-light': !loaded && !isDarkMode
}">ing</span>
</a>

<div class="btn-group mx-1" :data-bs-theme="isDarkMode ? 'dark' : 'light'">
<button type="button" class="btn btn-sm dropdown-toggle jn-button" data-bs-toggle="dropdown" aria-expanded="false"
aria-label="Language Selection">
<button type="button" class="btn btn-sm dropdown-toggle jn-button" data-bs-toggle="dropdown"
aria-expanded="false" aria-label="Language Selection">
<i class="bi bi-translate"></i>
</button>
<ul class="dropdown-menu">
Expand Down Expand Up @@ -54,26 +54,26 @@
<div class="collapse navbar-collapse justify-content-end" id="navbarNavAltMarkup">
<div class="navbar-nav ">
<a class="nav-link" :class="{ 'text-white jn-deactive': isDarkMode }" href="#IPInfo"
@click="$trackEvent('Nav', 'NavClick', 'IPInfo')"> {{ $t('nav.IPinfo') }}</a>
@click="collapseNav(); $trackEvent('Nav', 'NavClick', 'IPInfo')"> {{ $t('nav.IPinfo') }}</a>
<a class="nav-link" :class="{ 'text-white jn-deactive': isDarkMode }" href="#Connectivity"
@click="$trackEvent('Nav', 'NavClick', 'Connectivity')"> {{
$t('nav.Connectivity') }}</a>
@click="collapseNav(); $trackEvent('Nav', 'NavClick', 'Connectivity')"> {{
$t('nav.Connectivity') }}</a>
<a class="nav-link" :class="{ 'text-white jn-deactive': isDarkMode }" href="#WebRTC"
@click="$trackEvent('Nav', 'NavClick', 'WebRTC')"> {{ $t('nav.WebRTC') }}</a>
@click="collapseNav(); $trackEvent('Nav', 'NavClick', 'WebRTC')"> {{ $t('nav.WebRTC') }}</a>
<a class="nav-link" :class="{ 'text-white jn-deactive': isDarkMode }" href="#DNSLeakTest"
@click="$trackEvent('Nav', 'NavClick', 'DNSLeakTest')"> {{
$t('nav.DNSLeakTest') }}</a>
@click="collapseNav(); $trackEvent('Nav', 'NavClick', 'DNSLeakTest')"> {{
$t('nav.DNSLeakTest') }}</a>
<a class="nav-link" :class="{ 'text-white jn-deactive': isDarkMode }" href="#RuleTest"
@click="$trackEvent('Nav', 'NavClick', 'RuleTest')"> {{
$t('nav.RuleTest') }}</a>
@click="collapseNav(); $trackEvent('Nav', 'NavClick', 'RuleTest')"> {{
$t('nav.RuleTest') }}</a>
<a class="nav-link" :class="{ 'text-white jn-deactive': isDarkMode }" href="#SpeedTest"
@click="$trackEvent('Nav', 'NavClick', 'SpeedTest')"> {{ $t('nav.SpeedTest')
@click="collapseNav(); $trackEvent('Nav', 'NavClick', 'SpeedTest')"> {{ $t('nav.SpeedTest')
}}</a>
<a class="nav-link" :class="{ 'text-white jn-deactive': isDarkMode }" href="#PingTest"
@click="$trackEvent('Nav', 'NavClick', 'PingTest')"> {{ $t('nav.PingTest')
@click="collapseNav(); $trackEvent('Nav', 'NavClick', 'PingTest')"> {{ $t('nav.PingTest')
}}</a>
<a class="nav-link" :class="{ 'text-white jn-deactive': isDarkMode }" href="#MTRTest"
@click="$trackEvent('Nav', 'NavClick', 'MTRTest')"> {{ $t('nav.MTRTest') }}</a>
@click="collapseNav(); $trackEvent('Nav', 'NavClick', 'MTRTest')"> {{ $t('nav.MTRTest') }}</a>
</div>
</div>
</nav>
Expand Down Expand Up @@ -111,6 +111,11 @@ export default {
this.$trackEvent('Nav', 'ToggleClick', 'DarkMode');
},
// 收起导航栏
collapseNav() {
document.querySelector('#navbarNavAltMarkup').classList.remove('show');
},
// 更新 body class
updateBodyClass() {
if (this.isDarkMode) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ruletest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}" :data-bs-theme="isDarkMode ? 'dark' : ''">
<i class="bi"
:class="[test.ip === $t('ruletest.StatusWait') || test.ip === $t('ruletest.StatusError') ? 'bi-hourglass-split' : 'bi-geo-alt-fill']"></i>
{{ $t('ruletest.country') }}: <strong>{{ test.country_code }}&nbsp;</strong>
{{ $t('ruletest.Country') }}: <strong>{{ test.country_code }}&nbsp;</strong>
<span v-if="test.country_code !== $t('ruletest.StatusWait')"
:class="'jn-fl fi fi-' + test.country_code.toLowerCase()"></span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"Note": "Rule test is used to determine if the proxy software's domain-based rules are set correctly. Before conducting the test, you need to refer to the card below and set different domain-based routing rules for the 8 different URLs of IPCheck.ing in your proxy software.",
"StatusWait": "Awaiting Test or Test Error",
"StatusError": "Test Error",
"country": "Proxy Country"
"Country": "Proxy region"
},
"Tooltips": {
"RefreshIPCard": "Refresh IP Card",
Expand Down
2 changes: 1 addition & 1 deletion src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"Note": "Le test de règles est utilisé pour déterminer si les paramètres de règles basées sur le nom de domaine de votre logiciel proxy sont corrects. Avant de procéder au test, veuillez vous référer à la carte ci-dessous et configurer des règles de redirection de domaine différentes pour les 8 URL différentes d'IPCheck.ing dans votre logiciel proxy.",
"StatusWait": "En attente du test ou erreur de connexion",
"StatusError": "Erreur de test",
"country": "Région de proxy"
"Country": "Région de proxy"
},
"Tooltips": {
"RefreshIPCard": "Actualiser la carte IP",
Expand Down
2 changes: 1 addition & 1 deletion src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"Note": "分流测试用于判断代理软件基于域名的规则设置是否正确。在进行测试之前,你需要先参考下方的卡片,在你的代理软件里对 IPCheck.ing 的 8 个不同的 URL 设置不同的域名分流规则。",
"StatusWait": "待检测",
"StatusError": "检测出错",
"country": "代理地区"
"Country": "代理地区"
},
"Tooltips": {
"RefreshIPCard": "刷新 IP 信息",
Expand Down

0 comments on commit 189fa64

Please sign in to comment.