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
5.0 KiB

2 years ago
  1. <template>
  2. <!-- v-click-outside="closeDrawer" -->
  3. <div :class="[
  4. 'tw-overflow-auto tw-fixed tw-top-0 tw-bottom-0 tw-left-0 tw-right-0 tw-w-full tw-h-full tw-z-10 tw-transition-all tw-duration-300 tw-ease-in-out ',
  5. show ? '' : 'tw-pointer-events-none',
  6. ]">
  7. <div :class="[
  8. 'tw-bg-black tw-top-0 tw-bottom-0 tw-left-0 tw-w-full tw-h-full tw-fixed tw-overflow-auto tw-z-10 tw-transition-all tw-duration-600',
  9. show ? 'tw-opacity-80' : 'tw-pointer-events-none tw-opacity-0',
  10. ]" @click="close()"></div>
  11. <div ref="mobileUserInfo" :class="[
  12. 'mobileUserInfo tw-bg-white tw-absolute tw-left-0 tw-right-0 tw-top-0 tw-bottom-0 tw-m-auto tw-z-20 tw-overflow-auto tw-w-4/5 tw-h-fit tw-transition-all tw-duration-300 tw-delay-75 tw-ease-in-out tw-rounded-[20px] md:tw-w-2/5',
  13. show ? 'tw-translate-y-0' : 'tw-pointer-events-none tw-translate-y-[200%]',
  14. ]">
  15. <div class="tw-grid tw-grid-cols-2 tw-grid-rows-4 tw-p-[15px]">
  16. <nuxt-link :to="localePath('/user/editPersonalInfo')" class="tw-flex tw-flex-col tw-items-center tw-py-[15px]"
  17. @click.native="close()">
  18. <div class="tw-max-w-[40px] tw-max-h-[40px] tw-bg-neutrals-100 tw-rounded-[10px] tw-mb-[10px] tw-p-[10px]">
  19. <img src="~/assets/svg/profile.svg" class="tw-max-w-[20px] tw-max-y-[20px]" alt="" />
  20. </div>
  21. <div class="tw-head-body tw-text-neutrals-900">{{ $t("userProfile.editPersonalInfo") }}</div>
  22. </nuxt-link>
  23. <!-- <nuxt-link :to="localePath('/user/myBooking')" class="tw-flex tw-flex-col tw-items-center tw-py-[15px]">
  24. <img src="~/assets/svg/myBooking_popup.svg" class="tw-max-w-[40px] tw-max-h-[40px] tw-mb-[10px]" alt="" />
  25. <div class="tw-head-body tw-text-neutrals-900">{{ $t('My Bookings') }}</div>
  26. </nuxt-link> -->
  27. <nuxt-link :to="localePath('/user/saveExhibition')" class="tw-flex tw-flex-col tw-items-center tw-py-[15px]"
  28. @click.native="close()">
  29. <img src="~/assets/svg/savedExhibitions_popup.svg" class="tw-max-w-[40px] tw-max-h-[40px] tw-mb-[10px]"
  30. alt="" />
  31. <div class="tw-head-body tw-text-neutrals-900">{{ $t('userProfile.savedExhibitions') }}</div>
  32. </nuxt-link>
  33. <!-- <nuxt-link :to="localePath('/user/saveService')" class="tw-flex tw-flex-col tw-items-center tw-py-[15px]"
  34. @click.native="close()">
  35. <img src="~/assets/svg/savedServices_popup.svg" class="tw-max-w-[40px] tw-max-h-[40px] tw-mb-[10px]" alt="" />
  36. <div class="tw-head-body tw-text-neutrals-900">{{ $t('userProfile.savedServices') }}</div>
  37. </nuxt-link> -->
  38. <nuxt-link :to="localePath('/user/companyInfo')" class="tw-flex tw-flex-col tw-items-center tw-py-[15px]"
  39. @click.native="close()">
  40. <img src="~/assets/svg/companyInfo_popup.svg" class="tw-max-w-[40px] tw-max-h-[40px] tw-mb-[10px]" alt="" />
  41. <div class="tw-head-body tw-text-neutrals-900">{{ $t('userProfile.companyInfo') }}</div>
  42. </nuxt-link>
  43. <nuxt-link :to="localePath('/user/contactInfo')" class="tw-flex tw-flex-col tw-items-center tw-py-[15px]"
  44. @click.native="close()">
  45. <img src="~/assets/svg/contactInfo_popup.svg" class="tw-max-w-[40px] tw-max-h-[40px] tw-mb-[10px]" alt="" />
  46. <div class="tw-head-body tw-text-neutrals-900">{{ $t('Contact Info') }}</div>
  47. </nuxt-link>
  48. <nuxt-link :to="localePath('/user/setting')" class="tw-flex tw-flex-col tw-items-center tw-py-[15px]"
  49. @click.native="close()">
  50. <img src="~/assets/svg/setting_popup.svg" class="tw-max-w-[40px] tw-max-h-[40px] tw-mb-[10px]" alt="" />
  51. <div class="tw-head-body tw-text-neutrals-900">{{ $t('userProfile.setting') }}</div>
  52. </nuxt-link>
  53. <button class="tw-flex tw-flex-col tw-items-center tw-py-[15px]" @click="logout()">
  54. <img src="~/assets/svg/logOut_popup.svg" class="tw-max-w-[40px] tw-max-h-[40px] tw-mb-[10px]" alt="" />
  55. <div class="tw-head-body tw-text-error-default">{{ $t('userProfile.logout') }}</div>
  56. </button>
  57. </div>
  58. </div>
  59. </div>
  60. </template>
  61. <script>
  62. export default {
  63. props: {
  64. show: {
  65. type: Boolean,
  66. },
  67. width: {
  68. type: Number
  69. }
  70. },
  71. data() {
  72. return {};
  73. },
  74. computed: {},
  75. created() { },
  76. mounted() { },
  77. methods: {
  78. close() {
  79. this.$emit("popup", false);
  80. },
  81. logout() {
  82. this.$auth.$storage.removeUniversal("jwt");
  83. this.$auth.$storage.removeUniversal("userPicture");
  84. this.$auth.$storage.removeUniversal("userLastName");
  85. this.$auth.$storage.removeUniversal("userBeforePath");
  86. if (this.width < 1024) {
  87. this.$router.push(this.localePath("/"));
  88. } else {
  89. this.$router.push(this.localePath("/user"));
  90. }
  91. this.$auth.logout();
  92. this.$nuxt.refresh();
  93. this.$emit("popup", false);
  94. },
  95. },
  96. };
  97. </script>
  98. <style lang="scss" scoped>
  99. .drawer-title {
  100. font-weight: 500;
  101. font-size: 14px;
  102. line-height: 20px;
  103. letter-spacing: 0.02em;
  104. color: #ee9546;
  105. }
  106. </style>