Browse Source

Merge branch 'master' of https://git.fanruan.com/zhaojunzhe/fair-web into feature/unlimited-reply

* 'master' of https://git.fanruan.com/zhaojunzhe/fair-web:
  bugfix:在匿名是去除user和userid
  feat:去除测评列表的调试信息。
  bugfix:昵称修改bug修复。
pull/27/head
zjz1993 5 years ago
parent
commit
7051e6d752
  1. 4
      libs/submissions_process.js
  2. 2
      views/submissions.ejs
  3. 9
      views/user_edit.ejs

4
libs/submissions_process.js

@ -5,8 +5,8 @@ const getSubmissionInfo = (s, displayConfig) => {
return { return {
submissionId: s.id, submissionId: s.id,
taskId: s.task_id, taskId: s.task_id,
user: s.user.username, user: s.is_anonymous ? null: s.user.username,
userId: s.user_id, userId: s.is_anonymous ? null : s.user_id,
problemName: s.problem.title, problemName: s.problem.title,
problemId: s.problem_id, problemId: s.problem_id,
language: displayConfig.showCode ? ((s.language != null && s.language !== '') ? syzoj.languages[s.language].show : null) : null, language: displayConfig.showCode ? ((s.language != null && s.language !== '') ? syzoj.languages[s.language].show : null) : null,

2
views/submissions.ejs

@ -161,8 +161,6 @@ const itemList = <%- serializejs(items) %>;
const socketUrl = "/rough"; const socketUrl = "/rough";
const displayConfig = <%- serializejs(displayConfig) %>; const displayConfig = <%- serializejs(displayConfig) %>;
console.log(itemList);
const vueApp = new Vue({ const vueApp = new Vue({
el: '#vueAppFuckSafari', el: '#vueAppFuckSafari',
data: { data: {

9
views/user_edit.ejs

@ -22,6 +22,10 @@
<% } %> <% } %>
> >
</div> </div>
<div class="field">
<label for="nickname">昵称</label>
<input type="text" id="nickname" name="nickname" value="<%= edited_user.nickname %>">
</div>
<div class="field"> <div class="field">
<label for="username">匿名名称</label> <label for="username">匿名名称</label>
<input type="text" id="anonymous_name" name="anonymous_name" value="<%= edited_user.anonymous_name %>"> <input type="text" id="anonymous_name" name="anonymous_name" value="<%= edited_user.anonymous_name %>">
@ -72,11 +76,6 @@
<input type="hidden" name="information"> <input type="hidden" name="information">
<div class="ui form"> <div class="ui form">
<div class="field">
<label class="ui header">昵称</label>
<input type="text" placeholder="昵称" name="nickname" value="<%= edited_user.nickname %>" id="nickname">
</div>
<div class="field"> <div class="field">
<label class="ui header">密码</label> <label class="ui header">密码</label>
<input type="password" placeholder="原密码(留空则不修改)" name="old_password" id="old_password"> <input type="password" placeholder="原密码(留空则不修改)" name="old_password" id="old_password">

Loading…
Cancel
Save