Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX Improvements #68

Merged
merged 1 commit into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions src/components/ipcheck.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,70 +48,70 @@
" class="card-body">
<ul class="list-group list-group-flush">

<li class="list-group-item jn-list-group-item" :class="{ 'dark-mode': isDarkMode }">
<span class="jn-text">
<i class="bi bi-pc-display-horizontal"></i> {{ $t('ipInfos.IP') }}
<li class="jn-list-group-item" :class="{ 'dark-mode': isDarkMode }">
<span class="jn-text col-auto">
<i class="bi bi-pc-display-horizontal"></i> {{ $t('ipInfos.IP') }} :&nbsp;
</span>
<span>
: {{ card.ip }}
<span class="col-10 ">
{{ card.ip }}
<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)"></i>
</span>
</li>

<li class="list-group-item jn-list-group-item"
<li class="jn-list-group-item"
:class="{ 'dark-mode': isDarkMode, 'mobile-list': isMobile && isCardsCollapsed }">
<span class="jn-text">
<i class="bi bi-geo-alt-fill"></i> {{ $t('ipInfos.Country') }}
<span class="jn-text col-auto">
<i class="bi bi-geo-alt-fill"></i> {{ $t('ipInfos.Country') }} :&nbsp;
</span>
<span>
: {{ card.country_name }}
<span class="col-10 ">
{{ card.country_name }}
<span v-if="card.country_code" :class="'fi fi-' + card.country_code.toLowerCase()"></span>
</span>
</li>

<li v-show="!isMobile || !isCardsCollapsed" class="list-group-item jn-list-group-item"
<li v-show="!isMobile || !isCardsCollapsed" class="jn-list-group-item"
:class="{ 'dark-mode': isDarkMode }">
<span class="jn-text">
<span class="jn-text col-auto">
<i class="bi bi-houses"></i>
{{ $t('ipInfos.Region') }}
{{ $t('ipInfos.Region') }} :&nbsp;
</span>
<span>
: {{ card.region }}
<span class="col-10 ">
{{ card.region }}
</span>
</li>

<li v-show="!isMobile || !isCardsCollapsed" class="list-group-item jn-list-group-item"
<li v-show="!isMobile || !isCardsCollapsed" class="jn-list-group-item"
:class="{ 'dark-mode': isDarkMode }">
<span class="jn-text">
<span class="jn-text col-auto">
<i class="bi bi-sign-turn-right"></i>
{{ $t('ipInfos.City') }}
{{ $t('ipInfos.City') }} :&nbsp;
</span>
<span>
: {{ card.city }}
<span class="col-10 ">
{{ card.city }}
</span>
</li>

<li v-show="!isMobile || !isCardsCollapsed" class="list-group-item jn-list-group-item"
<li v-show="!isMobile || !isCardsCollapsed" class="jn-list-group-item"
:class="{ 'dark-mode': isDarkMode }">
<span class="jn-text">
<span class="jn-text col-auto">
<i class="bi bi-buildings"></i>
{{ $t('ipInfos.ISP') }}
{{ $t('ipInfos.ISP') }} :&nbsp;
</span>
<span>
: {{ card.isp }}
<span class="col-10 ">
{{ card.isp }}
</span>
</li>

<li v-show="!isMobile || !isCardsCollapsed" class="list-group-item jn-list-group-item"
<li v-show="!isMobile || !isCardsCollapsed" class="jn-list-group-item"
:class="{ 'dark-mode': isDarkMode }">
<span class="jn-text">
<span class="jn-text col-auto">
<i class="bi bi-reception-4"></i>
{{ $t('ipInfos.ASN') }}
{{ $t('ipInfos.ASN') }} :&nbsp;
</span>
<span v-if="card.asnlink">
: <a :href="card.asnlink" target="_blank"
<span v-if="card.asnlink" class="col-9 ">
<a :href="card.asnlink" target="_blank"
class="link-underline-opacity-50 link-underline-opacity-100-hover"
:class="[isDarkMode ? 'link-light' : 'link-dark']">
{{ card.asn }}
Expand Down
50 changes: 35 additions & 15 deletions src/components/queryip.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<template>
<!-- Search BTN -->
<button class="btn btn-primary position-fixed" style="bottom: 20px; right: 20px; z-index: 1050;" data-bs-toggle="modal"
data-bs-target="#IPCheck" @click="$trackEvent('SideButtons', 'ToggleClick', 'QueryIP');"><i class="bi bi-search"></i></button>
data-bs-target="#IPCheck" @click="$trackEvent('SideButtons', 'ToggleClick', 'QueryIP');"><i
class="bi bi-search"></i></button>

<!-- Search Modal -->
<div class="modal fade" id="IPCheck" tabindex="-1" aria-labelledby="IPCheck" aria-hidden="true">
Expand All @@ -22,26 +23,45 @@
<div class="card-body">
<ul class="list-group list-group-flush">
<li class="list-group-item jn-list-group-item" :class="{ 'dark-mode': isDarkMode }">
<span class="jn-text"><i class="bi bi-pc-display-horizontal"></i> {{ $t('ipInfos.Country') }}</span>: {{
modalQueryResult.country_name }}&nbsp;<span v-if="modalQueryResult.country_code"
:class="'fi fi-' + modalQueryResult.country_code.toLowerCase()"></span>
<span class="jn-text col-auto">
<i class="bi bi-pc-display-horizontal"></i> {{ $t('ipInfos.Country')
}}</span>&nbsp;:&nbsp;
<span class="col-10 ">{{ modalQueryResult.country_name }}&nbsp;
<span v-if="modalQueryResult.country_code"
:class="'fi fi-' + modalQueryResult.country_code.toLowerCase()"></span>
</span>
</li>
<li class="list-group-item jn-list-group-item" :class="{ 'dark-mode': isDarkMode }"><span
class="jn-text"><i class="bi bi-houses"></i> {{ $t('ipInfos.Region') }}</span>: {{
modalQueryResult.region
}}</li>
<li class="list-group-item jn-list-group-item" :class="{ 'dark-mode': isDarkMode }"><span
class="jn-text"><i class="bi bi-sign-turn-right"></i> {{ $t('ipInfos.City') }}</span>: {{
modalQueryResult.city }}
class="jn-text col-auto"><i class="bi bi-houses"></i> {{ $t('ipInfos.Region')
}}</span>&nbsp;:&nbsp;
<span class="col-10 ">
{{ modalQueryResult.region }}
</span>
</li>
<li class="list-group-item jn-list-group-item" :class="{ 'dark-mode': isDarkMode }"><span
class="jn-text"><i class="bi bi-buildings"></i> {{ $t('ipInfos.ISP') }}</span>: {{
modalQueryResult.isp }}
class="jn-text col-auto"><i class="bi bi-sign-turn-right"></i> {{ $t('ipInfos.City')
}}</span>&nbsp;:&nbsp;
<span class="col-10 ">
{{ modalQueryResult.city }}
</span>
</li>
<li class="list-group-item jn-list-group-item" :class="{ 'dark-mode': isDarkMode }"><span
class="jn-text"><i class="bi bi-reception-4"></i> {{ $t('ipInfos.ASN') }}</span>: <a
v-if="modalQueryResult.asnlink" :href="modalQueryResult.asnlink" target="_blank">{{
modalQueryResult.asn }}</a><a v-else>{{ modalQueryResult.asn }}</a></li>
class="jn-text col-auto"><i class="bi bi-buildings"></i> {{ $t('ipInfos.ISP')
}}</span>&nbsp;:&nbsp;
<span class="col-10 ">
{{ modalQueryResult.isp }}
</span>
</li>
<li class="list-group-item jn-list-group-item" :class="{ 'dark-mode': isDarkMode }">
<span class="jn-text col-auto">
<i class="bi bi-reception-4"></i> {{ $t('ipInfos.ASN') }}</span>&nbsp;:&nbsp;
<span class="col-10 ">
<a v-if="modalQueryResult.asnlink" :href="modalQueryResult.asnlink" target="_blank"
class="link-underline-opacity-50 link-underline-opacity-100-hover"
:class="[isDarkMode ? 'link-light' : 'link-dark']">{{ modalQueryResult.asn
}}</a>
</span>
</li>
</ul>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Country": "Région",
"Region": "État",
"City": "Ville",
"ISP": "Fournisseur d'accès Internet",
"ISP": "ISP",
"ASN": "ASN",
"IPv4Error": "Échec de récupération ou pas d'adresse IPv4",
"IPv6Error": "Échec de récupération ou pas d'adresse IPv6"
Expand Down
2 changes: 1 addition & 1 deletion src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Country": "地区",
"Region": "省份",
"City": "城市",
"ISP": "ISP",
"ISP": "网络",
"ASN": "ASN",
"IPv4Error": "获取失败或不存在 IPv4 地址",
"IPv6Error": "获取失败或不存在 IPv6 地址"
Expand Down
13 changes: 7 additions & 6 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,15 @@
max-width: 1400px;
}

/* .jn-text {
text-decoration-line: underline;
text-decoration-style: solid;
text-decoration-color: #1a8754;
} */
.jn-text {
height: fit-content;
}

.jn-list-group-item {
padding: 0.75rem 0.25rem;
border-bottom: 1px solid rgb(222, 226, 230);
padding: 12px 4px 12px 4px;
display: flex;
margin: 0;
}

.jn-opacity {
Expand Down
Loading