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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  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>
  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. }
  182. 50%,
  183. 100% {
  184. left: 100%;
  185. }
  186. }
  187. .login__box button span:nth-child(2)
  188. top: -100%
  189. right: 0
  190. width: 2px
  191. height: 100%
  192. background: linear-gradient(180deg, transparent, #e90d77)
  193. animation: btn-anim2 1s linear infinite
  194. animation-delay: 0.25s
  195. @keyframes btn-anim2 {
  196. 0% {
  197. top: -100%;
  198. }
  199. 50%,
  200. 100% {
  201. top: 100%;
  202. }
  203. }
  204. .login__box button span:nth-child(3)
  205. bottom: 0
  206. right: -100%
  207. width: 100%
  208. height: 2px
  209. background: linear-gradient(270deg, transparent, #e90d77)
  210. animation: btn-anim3 1s linear infinite
  211. animation-delay: 0.5s
  212. @keyframes btn-anim3 {
  213. 0% {
  214. right: -100%;
  215. }
  216. 50%,
  217. 100% {
  218. right: 100%;
  219. }
  220. }
  221. .login__box a span:nth-child(4)
  222. bottom: -100%
  223. left: 0
  224. width: 2px
  225. height: 100%
  226. background: linear-gradient(360deg, transparent, #e90d77)
  227. animation: btn-anim4 1s linear infinite
  228. animation-delay: 0.75s
  229. @keyframes btn-anim4 {
  230. 0% {
  231. bottom: -100%;
  232. }
  233. 50%,
  234. 100% {
  235. bottom: 100%;
  236. }
  237. }
  238. </style>