Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

Profile.vue 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <template lang="pug">
  2. .login__box
  3. h2 Profile
  4. form(@submit.prevent="onSubmit")
  5. .user__box
  6. input(type="text" required="" minlength="6" v-model="form.fullname")
  7. label Fullname
  8. .user__box
  9. input(type="text" required="" minlength="10" v-model="form.avatar")
  10. label Image URL
  11. .user__box
  12. input(type="number" required="" v-model="form.age" min="18" max="60" minlength="2" maxlength="3")
  13. label Age
  14. .user__box
  15. input(type="text" required="" minlength="10" maxlength="50" v-model="form.metadata")
  16. label Description
  17. button(type="submit")
  18. span
  19. span
  20. span
  21. span {{ requesting ? "Log..." : "Update" }}
  22. router-link.links(to="/") Back
  23. </template>
  24. <script>
  25. export default {
  26. name: "profile-update",
  27. data() {
  28. return {
  29. requesting: false,
  30. form: {
  31. fullname: "",
  32. avatar: "",
  33. age: "",
  34. metadata: "",
  35. },
  36. };
  37. },
  38. created() {
  39. this.getUser();
  40. },
  41. methods: {
  42. onSubmit() {
  43. this.requesting = true;
  44. // this.getUser()
  45. // this.setUser()
  46. },
  47. getUser() {
  48. const uid = auth.currentUser.uid;
  49. return
  50. },
  51. setUser() {
  52. // CometChat.updateUser(user, apiKey)
  53. // .then(() => this.$router.push({ name: "home" }))
  54. // .catch((error) => console.log(error))
  55. // .finally(() => this.requesting = false);
  56. },
  57. },
  58. };
  59. </script>
  60. <style lang="postcss">
  61. html
  62. background-color: #e90d77
  63. .content
  64. background: none
  65. .wrapper
  66. position: unset
  67. .login__box
  68. position: absolute
  69. top: 50%
  70. left: 50%
  71. width: 300px
  72. padding: 40px
  73. transform: translate(-50%, -50%)
  74. background: rgba(0, 0, 0, 0.5)
  75. box-sizing: border-box
  76. box-shadow: 0 15px 25px rgba(0, 0, 0, 0.6)
  77. border-radius: 10px
  78. .login__box h2
  79. margin: 0 0 30px
  80. padding: 0
  81. color: #fff
  82. text-align: center
  83. .login__box .user__box
  84. position: relative
  85. .login__box .user__box input
  86. width: 100%
  87. padding: 10px 0
  88. font-size: 16px
  89. color: #fff
  90. margin-bottom: 30px
  91. border: none
  92. border-bottom: 1px solid #fff
  93. outline: none
  94. background: transparent
  95. .login__box .user__box label
  96. position: absolute
  97. top: 0
  98. left: 0
  99. padding: 10px 0
  100. font-size: 16px
  101. color: #fff
  102. pointer-events: none
  103. transition: 0.5s
  104. .login__box .user__box input:focus ~ label,
  105. .login__box .user__box input:valid ~ label
  106. top: -20px
  107. left: 0
  108. color: #e90d77
  109. font-size: 12px
  110. .login__box form button
  111. position: relative
  112. display: inline-block
  113. padding: 10px 20px
  114. color: #e90d77
  115. font-size: 16px
  116. text-decoration: none
  117. text-transform: uppercase
  118. overflow: hidden
  119. transition: 0.5s
  120. margin-top: 40px
  121. letter-spacing: 4px
  122. background: none
  123. border: none
  124. .login__box button:hover
  125. background: #e90d77
  126. color: #fff
  127. border-radius: 5px
  128. box-shadow: 0 0 5px #e90d77, 0 0 25px #e90d77, 0 0 50px #e90d77,
  129. 0 0 100px #e90d77
  130. .login__box button span
  131. position: absolute
  132. display: block
  133. .login__box button span:nth-child(1)
  134. top: 0
  135. left: -100%
  136. width: 100%
  137. height: 2px
  138. background: linear-gradient(90deg, transparent, #e90d77)
  139. animation: btn-anim1 1s linear infinite
  140. .login__box form .forget__link
  141. color: white
  142. text-decoration: none
  143. .login__box form .forget__link:hover
  144. color: #e90d77
  145. .login__box form .links
  146. color: white
  147. text-decoration: none
  148. margin-left: 5px
  149. padding: 10px
  150. .login__box form .links:hover
  151. background: #e90d77
  152. color: #fff
  153. border-radius: 5px
  154. box-shadow: 0 0 5px #e90d77, 0 0 25px #e90d77, 0 0 50px #e90d77,
  155. 0 0 100px #e90d77
  156. @keyframes btn-anim1
  157. 0%
  158. left: -100%
  159. 50%, 100%
  160. left: 100%
  161. .login__box button span:nth-child(2)
  162. top: -100%
  163. right: 0
  164. width: 2px
  165. height: 100%
  166. background: linear-gradient(180deg, transparent, #e90d77)
  167. animation: btn-anim2 1s linear infinite
  168. animation-delay: 0.25s
  169. @keyframes btn-anim2
  170. 0%
  171. top: -100%
  172. 50%, 100%
  173. top: 100%
  174. .login__box button span:nth-child(3)
  175. bottom: 0
  176. right: -100%
  177. width: 100%
  178. height: 2px
  179. background: linear-gradient(270deg, transparent, #e90d77)
  180. animation: btn-anim3 1s linear infinite
  181. animation-delay: 0.5s
  182. @keyframes btn-anim3
  183. 0%
  184. right: -100%
  185. 50%, 100%
  186. right: 100%
  187. .login__box a span:nth-child(4)
  188. bottom: -100%
  189. left: 0
  190. width: 2px
  191. height: 100%
  192. background: linear-gradient(360deg, transparent, #e90d77)
  193. animation: btn-anim4 1s linear infinite
  194. animation-delay: 0.75s
  195. @keyframes btn-anim4
  196. 0%
  197. bottom: -100%
  198. 50%, 100%
  199. bottom: 100%
  200. </style>