Ver código fonte

merge branch 'test'

nieyuge 2 anos atrás
pai
commit
3b26160a64
2 arquivos alterados com 16 adições e 1 exclusões
  1. 13 1
      src/components/header.vue
  2. 3 0
      src/static/img/header-loading.svg

+ 13 - 1
src/components/header.vue

@@ -7,7 +7,7 @@
                 <span>Create NFTs</span>
             </div>
             <div class="login disabled" v-else>
-                <img class="add" src="../static/img/header-add.svg" alt="" />
+                <img class="add loading" src="../static/img/header-loading.svg" alt="" />
                 <span>Create NFTs</span>
             </div>
             <div class="down" @click="install">
@@ -185,6 +185,9 @@ const twitterLogin = (data: { authToken: string, consumerKey: string }) => {
         .add {
             width: 20px;
             margin-right: 4px;
+            &.loading {
+                animation: rotate 1s infinite linear;
+            }
         }
         &.disabled {
             opacity: .5;
@@ -212,4 +215,13 @@ const twitterLogin = (data: { authToken: string, consumerKey: string }) => {
         height: 60px;
     }
 }
+
+@keyframes rotate {
+    0% {
+        transform: rotate(0deg)
+    }
+    100% {
+        transform: rotate(360deg)
+    }
+}
 </style>

+ 3 - 0
src/static/img/header-loading.svg

@@ -0,0 +1,3 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M10.0009 3V4.75C11.1533 4.75024 12.2737 5.12967 13.1891 5.82974C14.1045 6.52982 14.7641 7.51165 15.0662 8.62378C15.3683 9.73591 15.2961 10.9165 14.8607 11.9835C14.4252 13.0506 13.6508 13.9447 12.6569 14.5279C11.663 15.1112 10.5048 15.3512 9.36091 15.211C8.21705 15.0707 7.15111 14.558 6.32752 13.7519C5.50394 12.9458 4.96847 11.8911 4.80372 10.7505C4.63897 9.60994 4.85409 8.44683 5.4159 7.44062L3.88815 6.5875C3.13906 7.92913 2.85223 9.47998 3.07192 11.0008C3.29161 12.5216 4.0056 13.9279 5.10375 15.0027C6.2019 16.0775 7.6232 16.761 9.14838 16.948C10.6736 17.1349 12.2179 16.8148 13.5431 16.0371C14.8683 15.2593 15.9008 14.0671 16.4813 12.6444C17.0618 11.2217 17.158 9.64746 16.7551 8.16462C16.3522 6.68178 15.4726 5.37271 14.252 4.43935C13.0313 3.50599 11.5375 3.0002 10.0009 3V3Z" fill="#1D9BF0"/>
+</svg>