safe.ejs 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <% include ./sub_menu.ejs %>
  2. <div class="panel-content" id="app">
  3. <div class="panel-title">
  4. <div class="title-main">
  5. <h2>账号安全</h2>
  6. </div>
  7. </div>
  8. <div class="content-wrap">
  9. <div class="c-body">
  10. <div class="sjs-height-0">
  11. <div class="row m-0">
  12. <div class="col-5 my-3">
  13. <!--账号安全-->
  14. <form action="/profile/password" method="post" id="password-form">
  15. <% if(accountData.password !== 'SSO password') { %>
  16. <input-text label="旧密码" password="true" name="password"></input-text>
  17. <input-text label="新密码" password="true" name="new_password" id="new_password"></input-text>
  18. <input-text label="确认新密码" password="true" name="confirm_password"></input-text>
  19. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
  20. <button type="submit" class="btn btn-primary btn-sm" id="modify-password">修改密码</button>
  21. <% } else { %>
  22. <p>SSO用户请到<a href="#">此处</a>修改密码</p>
  23. <% } %>
  24. </form>
  25. <!-- 访问日志 -->
  26. <div class="col-12 mt-5">
  27. <h4>访问日志</h4>
  28. <table class="table table-hover">
  29. <thead>
  30. <tr>
  31. <th></th>
  32. <th>系统</th>
  33. <th>浏览器</th>
  34. <th>登录时间</th>
  35. <th>登录地址</th>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. <% loginLogging.forEach((item, idx) => { %>
  40. <tr>
  41. <td><%- idx + 1 %></td>
  42. <td><%- item.os %></td>
  43. <td><%- item.browser %></td>
  44. <td><%- ctx.helper.formatFullDate(item.create_time) %></td>
  45. <td><%- item.address %></td>
  46. </tr>
  47. <% }) %>
  48. </tbody>
  49. </table>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <%- passwordJsValidator %>
  58. <script type="text/javascript">
  59. new Vue({
  60. el: '#app',
  61. });
  62. const csrf = '<%= ctx.csrf %>';
  63. </script>
  64. <script type="text/javascript" src="/public/js/profile.js"></script>