A self hosted chat application with end-to-end encrypted messaging.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
4.3 KiB

  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org">
  3. <head>
  4. <div th:replace="fragments/head :: headFragment">
  5. <title id="pageTitle">Admin Home</title>
  6. </div>
  7. <script src="https://code.jquery.com/jquery-2.1.4.min.js" th:if="false"></script>
  8. <script src="http://blackpeppersoftware.github.io/thymeleaf-fragment.js/thymeleaf-fragment.js" data-template-prefix="../" defer="defer" th:if="false"></script>
  9. <script th:src="@{js/admin.js}" src="../../static/js/admin.js" defer="defer"></script>
  10. <link th:href="@{/css/master.css}" href="../../static/css/master.css" rel="stylesheet" th:if="false">
  11. <link th:href="@{/css/colors.css}" href="../../static/css/colors.css" rel="stylesheet" th:if="false">
  12. </head>
  13. <!-- TODO
  14. Make user admin / remove user from admin
  15. Change E2E passphrase
  16. Delete Messages
  17. -->
  18. <body>
  19. <div th:include="fragments/navbar :: navbarFragment"></div>
  20. <header>
  21. <div class="container bg-primary">
  22. <div class="row">
  23. <div class="col-sm py-5">
  24. <h1 class="display-4 text-center">Admin Page</h1>
  25. <p class="alert-danger px-2">Warning: these settings can be dangerous..</p>
  26. </div>
  27. </div>
  28. <div class="row">
  29. <div class="col-sm col-md-4">
  30. <h4>Make User an Admin</h4>
  31. <form id="addUserToAdminForm">
  32. <div class="form-group">
  33. <label for="addUserToDropDown">Select User:</label>
  34. <select class="form-control custom-select" size="4" id="addUserToAdminDropDown">
  35. <option th:each="userName : ${userNames}"
  36. th:value="${userName}"
  37. th:text="#{${userName}}">
  38. Wireframe
  39. </option>
  40. </select>
  41. </div>
  42. <div class="form-group">
  43. <button class="btn btn-danger form-control">Make admin</button>
  44. </div>
  45. </form>
  46. </div>
  47. <div class="col-sm col-md-4">
  48. <h4>Change passphrases</h4>
  49. <form id="changePassphraseForm">
  50. <div class="form-group">
  51. <label for="changePassphraseDropDown">Select User:</label>
  52. <select class="form-control" id="changePassphraseDropDown">
  53. <option th:each="userName : ${userNames}"
  54. th:value="${userName}"
  55. th:text="#{${userName}}">
  56. Wireframe
  57. </option>
  58. </select>
  59. </div>
  60. <div class="form-group">
  61. <label for="passphraseOld">Passphrase Old</label>
  62. <input type="password" id="passphraseOld" class="form-control">
  63. </div>
  64. <div class="form-group">
  65. <label for="passphraseNew">Passphrase New</label>
  66. <input type="password" id="passphraseNew" class="form-control">
  67. </div>
  68. <div class="form-group">
  69. <button class="btn btn-danger form-control">Change Passphrase</button>
  70. </div>
  71. </form>
  72. </div>
  73. </div>
  74. <div class="row">
  75. <!-- <div class="col-sm"></div> -->
  76. <div class="col-sm d-lg-block">
  77. <div class="d-flex justify-content-center">
  78. <div class="py-5">
  79. <h4 class="p-2 text-center">Logout</h4>
  80. <form action="#" th:action="@{/logout}" method="POST">
  81. <!-- <input type="submit" value="logout"> -->
  82. <!-- <input type="hidden" th:name="${_csrf.parameterName}"
  83. th:value="${_csrf.token}" /> -->
  84. <div class="form-group">
  85. <button class="btn btn-secondary form-control">Logout</button>
  86. </div>
  87. </form>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </header>
  94. </body>
  95. </html>