diff options
| author | Melonai <einebeere@gmail.com> | 2021-01-20 23:18:09 +0100 |
|---|---|---|
| committer | Melonai <einebeere@gmail.com> | 2021-01-20 23:18:09 +0100 |
| commit | 826c7c47785ee01d2b9267919132ada696425344 (patch) | |
| tree | 901cc90be9a953a6c3f968b6c1abe33cc13774b4 /client/src/Components/Response.svelte | |
| parent | 2953dec527cedaabaa5f0eb48637c5ddd4a4103b (diff) | |
| download | shorest-826c7c47785ee01d2b9267919132ada696425344.tar.zst shorest-826c7c47785ee01d2b9267919132ada696425344.zip | |
Remade the client in SvelteKit
Diffstat (limited to 'client/src/Components/Response.svelte')
| -rw-r--r-- | client/src/Components/Response.svelte | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/client/src/Components/Response.svelte b/client/src/Components/Response.svelte new file mode 100644 index 0000000..215af1b --- /dev/null +++ b/client/src/Components/Response.svelte @@ -0,0 +1,33 @@ +<script lang="ts"> + import type { ShortenRequest } from "$actions/shorten"; + + export let info: ShortenRequest; +</script> + +<style> + div { + display: flex; + justify-content: space-between; + } + + .url { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .output { + margin-left: 50px; + } +</style> + +<div> + <span class="url">{info.url}</span> + {#await info.response} + <span class="output">Loading...</span> + {:then { hash }} + <a class="output" href="https://sho.rest/{hash}">sho.rest/{hash}</a> + {:catch { error }} + <span class="output">{error}</span> + {/await} +</div> \ No newline at end of file |
