Skip to content

Commit

Permalink
feat: v3.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed Dec 31, 2021
1 parent 8242dee commit dd2945b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "surmon.me",
"version": "3.3.0",
"version": "3.3.1",
"description": "Surmon.me blog",
"author": {
"name": "Surmon",
Expand Down
27 changes: 21 additions & 6 deletions src/components/comment/list/item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
</span>
<span v-if="comment.ip_location" class="location">
<i class="iconfont icon-earth"></i>
<span>{{ comment.ip_location.country }}</span>
<divider v-if="comment.ip_location.city" type="vertical" size="xs">•</divider>
<span>{{ comment.ip_location.city }}</span>
<span>{{ comment.ip_location.country_code || comment.ip_location.country }}</span>
<template v-if="comment.ip_location.city">
<span class="separator">•</span>
<span>{{ comment.ip_location.city }}</span>
</template>
</span>
<template v-if="!hiddenUa">
<comment-ua v-if="comment.agent" :ua="comment.agent" />
Expand Down Expand Up @@ -410,7 +412,7 @@
.moderator {
display: inline-block;
margin-left: -$sm-gap;
margin-right: $sm-gap;
margin-right: $gap;
padding: 0 $xs-gap;
font-size: 11px;
color: $text-reversal;
Expand All @@ -423,13 +425,26 @@
.location {
color: $text-dividers;
font-size: $font-size-small;
margin-right: $gap;
.iconfont {
margin-right: $xs-gap;
}
}
.location {
margin-right: $gap;
.separator {
margin: 0 3px;
}
}
::v-deep(.os) {
margin-right: $sm-gap;
}
::v-deep(.browser) {
margin-right: 0;
}
.flool {
color: $text-dividers;
font-size: $font-size-small;
Expand Down
4 changes: 2 additions & 2 deletions src/components/comment/list/ua.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<span class="os">
<i v-if="osIconName" class="iconfont" :class="`icon-${osIconName}`" />
<span>{{ uaResult.result.os.name }}</span>
<span>{{ uaResult.result.os.version }}</span>
<!-- <span>{{ uaResult.result.os.version }}</span> -->
</span>
<span class="browser">
<i class="iconfont" :class="`icon-${browserIconName}`" />
<span>{{ uaResult.result.browser.name }}</span>
<span>{{ uaResult.result.browser.major }}</span>
<!-- <span>{{ uaResult.result.browser.version }}</span> -->
</span>
</span>
</template>
Expand Down
6 changes: 5 additions & 1 deletion src/store/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ export interface Comment {
dislikes: number
ip?: string
ip_location?: {
city: string
country: string
country_code: string
region: string
region_code: string
city: string
zip: string
}
create_at: string
update_at: string
Expand Down

0 comments on commit dd2945b

Please sign in to comment.