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

Profile.vue 4.8KB

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