Skip to content

Commit

Permalink
修复排行榜点自己的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
SmartHypercube committed Nov 1, 2023
1 parent 9d9a194 commit 5dd3576
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/templates/board.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1>{{ filters.category?`${filters.category} 类`:'' }}{{ filters.group?groups[f
<tbody v-if="objs">
<tr v-for="(obj, obj_index) in objs" :class="{'highlight-row': obj.user===user.pk}">
<td>{{ obj_index + 1 }}</td>
<td v-if="!show_progress" style="word-break: break-all"><a :href="`/score/#${user.pk},${obj.user}${filters.category?';category='+filters.category:''}${filters.group?';group='+filters.group:''}`" style="color: #333"><span v-for="part in pretty_name(users[obj.user].display_name)" :style="part.style">{{ part.text }}</span></a></td>
<td v-if="!show_progress" style="word-break: break-all"><a :href="`/score/#${user.pk===obj.user?user.pk:user.pk+','+obj.user}${filters.category?';category='+filters.category:''}${filters.group?';group='+filters.group:''}`" style="color: #333"><span v-for="part in pretty_name(users[obj.user].display_name)" :style="part.style">{{ part.text }}</span></a></td>
<td v-if="!show_progress">{{ obj.score }}</td>
<td v-if="!show_progress" style="word-break: keep-all">{{ new Date(obj.time).toLocaleString() }}</td>
<td v-if="!show_progress&&show_profile" v-for="field in profile_fields">{{ users[obj.user][field.field] }}</td>
Expand Down
4 changes: 2 additions & 2 deletions frontend/templates/first.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ <h1>{{ filters.category?`${filters.category} 类`:'' }}{{ filters.group?groups[f
<template v-for="challenge in challenges">
<tr :class="{'highlight-row': objs.challenges[challenge.pk].user===user.pk}">
<td>{{ challenge.name }}</td>
<td style="word-break: break-all"><a v-if="objs.challenges[challenge.pk].user" :href="`/score/#${user.pk},${objs.challenges[challenge.pk].user}${filters.category?';category='+filters.category:''}${filters.group?';group='+filters.group:''}`" style="color: #333"><span v-for="part in pretty_name(users[objs.challenges[challenge.pk].user].display_name)" :style="part.style">{{ part.text }}</span></a></td>
<td style="word-break: break-all"><a v-if="objs.challenges[challenge.pk].user" :href="`/score/#${user.pk===objs.challenges[challenge.pk].user?user.pk:user.pk+','+objs.challenges[challenge.pk].user}${filters.category?';category='+filters.category:''}${filters.group?';group='+filters.group:''}`" style="color: #333"><span v-for="part in pretty_name(users[objs.challenges[challenge.pk].user].display_name)" :style="part.style">{{ part.text }}</span></a></td>
<td style="word-break: keep-all">{{ objs.challenges[challenge.pk].time }}</td>
<td v-if="show_profile" v-for="field in profile_fields">{{ (users[objs.challenges[challenge.pk].user]||{[field.field]:''})[field.field] }}</td>
</tr>
<tr v-if="challenge.flags.length>1" v-for="(flag, flag_index) in challenge.flags" :class="{'highlight-row': objs.flags[[challenge.pk, flag_index]].user===user.pk}">
<td>{{ challenge.name }} / {{ flag.name }}</td>
<td style="word-break: break-all"><a v-if="objs.flags[[challenge.pk, flag_index]].user" :href="`/score/#${user.pk},${objs.flags[[challenge.pk, flag_index]].user}${filters.category?';category='+filters.category:''}${filters.group?';group='+filters.group:''}`" style="color: #333"><span v-for="part in pretty_name(users[objs.flags[[challenge.pk, flag_index]].user].display_name)" :style="part.style">{{ part.text }}</span></a></td>
<td style="word-break: break-all"><a v-if="objs.flags[[challenge.pk, flag_index]].user" :href="`/score/#${user.pk===objs.flags[[challenge.pk, flag_index]].user?user.pk:user.pk+','+objs.flags[[challenge.pk, flag_index]].user}${filters.category?';category='+filters.category:''}${filters.group?';group='+filters.group:''}`" style="color: #333"><span v-for="part in pretty_name(users[objs.flags[[challenge.pk, flag_index]].user].display_name)" :style="part.style">{{ part.text }}</span></a></td>
<td style="word-break: keep-all">{{ objs.flags[[challenge.pk, flag_index]].time }}</td>
<td v-if="show_profile" v-for="field in profile_fields">{{ (users[objs.flags[[challenge.pk, flag_index]].user]||{[field.field]:''})[field.field] }}</td>
</tr>
Expand Down

0 comments on commit 5dd3576

Please sign in to comment.