about summary refs log tree commit diff
path: root/assets/src/components/share/Request.svelte
blob: e34f6334e8ef53d38dd961a5396f7063ecfec48a (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<script lang="ts">
    import { offer } from "../../network/transfer/share";
    import CheckIcon from "../icons/CheckIcon.svelte";
    import CloseIcon from "../icons/CloseIcon.svelte";

    export let token: string;

    async function accept() {
        const transfer = await offer(token);
    }

    function decline() {}
</script>

<!-- TODO: Replace placeholder values and show IP instead of token. -->
<ul class="request">
    <div class="buttons">
        <div class="round-button" on:click={accept}>
            <CheckIcon color="white" />
        </div>
        <div class="plain-button" on:click={decline}>
            <CloseIcon color="black" />
        </div>
    </div>
    <li>Requested at 14:38</li>
    <li class="ip">{token}</li>
    <li>Trusowo, Russia</li>
    <li>Firefox 89</li>
</ul>

<style>
    .request {
        background-color: white;
        color: #626262;
        padding: 17px 20px;
        font-size: 12px;
        line-height: 1.5rem;
        position: relative;
    }

    ul {
        list-style-type: none;
    }

    .ip {
        line-height: 1.75rem;
        font-size: 16px;
        color: black;
    }

    .buttons {
        position: absolute;
        right: 20px;
        display: flex;
        justify-content: space-between;
        width: 50px;
        align-items: center;
    }

    .round-button {
        width: 24px;
        height: 24px;
        border-radius: 100%;
        background-color: black;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .plain-button {
        display: flex;
        align-items: center;
    }
</style>