Banned.vue 908 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <script setup lang="ts">
  2. import { storeToRefs } from "pinia";
  3. import { formatDistance } from "date-fns";
  4. import { useUserAuthStore } from "@/stores/userAuth";
  5. const userAuthStore = useUserAuthStore();
  6. const { ban } = storeToRefs(userAuthStore);
  7. </script>
  8. <template>
  9. <div class="container">
  10. <page-metadata title="Banned" />
  11. <i class="material-icons">not_interested</i>
  12. <h4>
  13. You are banned for
  14. <strong>{{
  15. formatDistance(new Date(Number(ban.expiresAt)), Date.now())
  16. }}</strong>
  17. </h4>
  18. <h5 class="reason">
  19. <strong>Reason: </strong>
  20. {{ ban.reason }}
  21. </h5>
  22. </div>
  23. </template>
  24. <style lang="less" scoped>
  25. .container {
  26. display: flex;
  27. justify-content: center;
  28. align-items: center;
  29. flex-direction: column;
  30. height: 100vh;
  31. max-width: 1000px;
  32. padding: 0 20px;
  33. }
  34. .reason {
  35. text-align: justify;
  36. }
  37. i.material-icons {
  38. cursor: default;
  39. font-size: 65px;
  40. color: tomato;
  41. }
  42. </style>