Banned.vue 889 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <div class="container">
  3. <page-metadata title="Banned" />
  4. <i class="material-icons">not_interested</i>
  5. <h4>
  6. You are banned for
  7. <strong>{{
  8. formatDistance(new Date(ban.expiresAt), Date.now())
  9. }}</strong>
  10. </h4>
  11. <h5 class="reason">
  12. <strong>Reason: </strong>
  13. {{ ban.reason }}
  14. </h5>
  15. </div>
  16. </template>
  17. <script>
  18. import { mapState } from "vuex";
  19. import { formatDistance } from "date-fns"; // eslint-disable-line no-unused-vars
  20. export default {
  21. computed: mapState({
  22. ban: state => state.user.auth.ban
  23. }),
  24. methods: { formatDistance }
  25. };
  26. </script>
  27. <style lang="less" scoped>
  28. .container {
  29. display: flex;
  30. justify-content: center;
  31. align-items: center;
  32. flex-direction: column;
  33. height: 100vh;
  34. max-width: 1000px;
  35. padding: 0 20px;
  36. }
  37. .reason {
  38. text-align: justify;
  39. }
  40. i.material-icons {
  41. cursor: default;
  42. font-size: 65px;
  43. color: tomato;
  44. }
  45. </style>