about summary refs log tree commit diff
path: root/assets/src/components/share/Info.svelte
blob: 2d648ce0def0e58510651a8b6bc4a729c4de52dd (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
<script lang="ts">
    import {
        ConnectionState,
        getOwnToken,
        getStateStore,
    } from "../../network/channel/connection";
    import data from "../../stores/data";
    import Selector from "./Selector.svelte";

    let connection = getStateStore();
</script>

<div class="info">
    {#if !$data.locked}
        <h1>What do you want to share?</h1>
        <Selector />
    {:else}
        <h1>
            You are <br />
            sharing <b>a text.</b>
        </h1>
        {#if $connection === ConnectionState.CONNECTED}
            <p>
                Your share is available under: <br />
                rook.rnrd.eu/<span>{getOwnToken()}</span>
            </p>
            <!-- TODO: Display actual data. -->
            <div class="data">••••••••••••••••••••••••••••••</div>
        {:else}
            <p>Connecting to signaling server...</p>
        {/if}
    {/if}
</div>

<style>
    h1 {
        font-size: 35px;
        color: white;
        font-weight: 400;
    }

    p {
        color: #626262;
        font-size: 16px;
        margin-bottom: 30px;
    }

    span {
        color: white;
    }

    .info {
        width: 315px;
    }

    .data {
        font-size: 14px;
        width: 100%;
        background-color: white;
        color: black;
        padding: 10px 20px;
        box-sizing: border-box;
    }
</style>