mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-07 02:27:34 +08:00
feat: 新增贡献者勋章
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
<template v-else-if="medal.type === 'POST'">
|
||||
{{ medal.currentPostCount }}/{{ medal.targetPostCount }}
|
||||
</template>
|
||||
<template v-else-if="medal.type === 'CONTRIBUTOR'">
|
||||
{{ medal.currentContributionLines }}/{{ medal.targetContributionLines }}
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<div class="common-info-content-header">
|
||||
<div class="info-content-header-left">
|
||||
<span class="user-name">{{ comment.userName }}</span>
|
||||
<i class="fas fa-medal medal-icon"></i>
|
||||
<router-link
|
||||
v-if="comment.medal"
|
||||
class="medal-name"
|
||||
@@ -291,9 +292,19 @@ export default CommentItem
|
||||
|
||||
.medal-name {
|
||||
font-size: 12px;
|
||||
margin-left: 4px;
|
||||
margin-left: 1px;
|
||||
opacity: 0.6;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.medal-icon {
|
||||
font-size: 12px;
|
||||
opacity: 0.6;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
@keyframes highlight {
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
import { ref, computed, onMounted, watch } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { API_BASE_URL, toast } from '../main'
|
||||
import { getToken, authState } from '../utils/auth'
|
||||
import { getToken, authState } from '../../utils/auth'
|
||||
import BaseTimeline from '../components/BaseTimeline.vue'
|
||||
import UserList from '../components/UserList.vue'
|
||||
import BasePlaceholder from '../components/BasePlaceholder.vue'
|
||||
@@ -306,7 +306,11 @@ export default {
|
||||
return { exp, currentLevel, nextExp, percent }
|
||||
})
|
||||
|
||||
const isMine = computed(() => authState.username === username)
|
||||
const isMine = computed(function() {
|
||||
const mine = authState.username === username || String(authState.userId) === username
|
||||
console.log(mine)
|
||||
return mine
|
||||
})
|
||||
|
||||
const formatDate = (d) => {
|
||||
if (!d) return ''
|
||||
|
||||
Reference in New Issue
Block a user