blob: 0ed8cc9f1876d76ac0730b69b1bb2754974ccb7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<script lang="ts">
import type { ShortenRequest } from "$lib/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>
|