Banned.vue 915 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <div class="container">
  3. <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="scss" scoped>
  28. @import "styles/global.scss";
  29. .container {
  30. display: flex;
  31. justify-content: center;
  32. align-items: center;
  33. flex-direction: column;
  34. height: 100vh;
  35. max-width: 1000px;
  36. padding: 0 20px;
  37. }
  38. .reason {
  39. text-align: justify;
  40. }
  41. i.material-icons {
  42. cursor: default;
  43. font-size: 65px;
  44. color: tomato;
  45. }
  46. </style>