|
15 | 15 | //import { getTransactions } from '../service/blockchains/stellar';
|
16 | 16 | import { horizonEventSource } from '../service/blockchains/stellar';
|
17 | 17 | import { paymentsdones } from '../service/blockchains/stellar';
|
18 |
| - import { paymentRealized } from '../service/blockchains/stellar'; |
| 18 | + import { paymentRealized,pagoProcess } from '../service/blockchains/stellar'; |
19 | 19 | import { createEventDispatcher } from 'svelte';
|
20 | 20 | export let address: string;
|
21 | 21 | export let pasword: string;
|
|
123 | 123 | </Modal>
|
124 | 124 |
|
125 | 125 | <div class="flex items-center flex-wrap gap-4">
|
126 |
| - {#if paymentDone} |
127 |
| - {#if paymentRealized} |
128 |
| - <div |
129 |
| - class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative" |
130 |
| - role="alert" |
131 |
| - > |
132 |
| - <strong class="font-bold">Pago realizado!</strong> |
133 |
| - <span class="block sm:inline" |
134 |
| - >Se envió {paymentDone.amount} a {paymentDone.destination}</span |
135 |
| - > |
136 |
| - </div> |
137 |
| - {/if} |
138 |
| - {/if} |
| 126 | + |
139 | 127 | <h1 class="text-gray-800 text-3xl sixa-max">{saldoFormateado}</h1>
|
140 | 128 | <ButtonGroup>
|
141 | 129 | <Button
|
|
212 | 200 | </svg>
|
213 | 201 | </Button>
|
214 | 202 | </ButtonGroup>
|
| 203 | + <div class="payRealized "> |
| 204 | + {#if paymentRealized=="proceso"} |
| 205 | + <div class="loader"></div> |
| 206 | + {/if} |
| 207 | + {#if paymentDone} |
| 208 | + |
| 209 | + {#if paymentRealized=="hecho"} |
| 210 | + <div |
| 211 | + class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative" |
| 212 | + role="alert" |
| 213 | + > |
| 214 | + <strong class="font-bold">Pago realizado!</strong> |
| 215 | + <span class="block sm:inline" |
| 216 | + >Se envió {paymentDone.amount} a {paymentDone.destination}</span |
| 217 | + > |
| 218 | + </div> |
| 219 | + {/if} |
| 220 | + {#if paymentRealized=="fallido"} |
| 221 | + <div |
| 222 | + class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative" |
| 223 | + role="alert" |
| 224 | + > |
| 225 | + <strong class="font-bold">Pago fallido!</strong> |
| 226 | + <span class="block sm:inline" |
| 227 | + >No se envió {paymentDone.amount} a {paymentDone.destination}</span |
| 228 | + > |
| 229 | + </div> |
| 230 | + {/if} |
| 231 | + |
| 232 | + {/if} |
| 233 | + </div> |
215 | 234 | </div>
|
| 235 | +<style> |
| 236 | + .loader { |
| 237 | + width: 48px; |
| 238 | + height: 48px; |
| 239 | + border: 3px solid #FFF; |
| 240 | + border-radius: 50%; |
| 241 | + display: inline-block; |
| 242 | + position: relative; |
| 243 | + box-sizing: border-box; |
| 244 | + animation: rotation 1s linear infinite; |
| 245 | + } |
| 246 | + |
| 247 | + .loader::after { |
| 248 | + content: ''; |
| 249 | + box-sizing: border-box; |
| 250 | + position: absolute; |
| 251 | + left: 50%; |
| 252 | + top: 50%; |
| 253 | + transform: translate(-50%, -50%); |
| 254 | + width: 40px; |
| 255 | + height: 40px; |
| 256 | + border-radius: 50%; |
| 257 | + border: 3px solid; |
| 258 | + border-color: #FF3D00 transparent; |
| 259 | + } |
| 260 | + |
| 261 | + @keyframes rotation { |
| 262 | + 0% { |
| 263 | + transform: rotate(0deg); |
| 264 | + } |
| 265 | + 100% { |
| 266 | + transform: rotate(360deg); |
| 267 | + } |
| 268 | + } |
| 269 | + .payRealized{ |
| 270 | + width: 100%; |
| 271 | + display: flex; |
| 272 | + justify-content: center; |
| 273 | + align-items: center; |
| 274 | + } |
| 275 | + </style> |
0 commit comments