about summary refs log tree commit diff
path: root/assets/src/components/SharePage.svelte
blob: 123f918341df9ed1f4ed75d021d468af8ecddebc (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
<script lang="ts">
    import Header from "./Header.svelte";
    import ShareStatus from "./share/ShareStatus.svelte";
    import RequestList from "./share/RequestList.svelte";
    import { getShareState, ShareStateType } from "../state/share";
    import Toasts from "./Toasts.svelte";

    const state = getShareState().type;
</script>

<Header color="black" />
<Toasts />
<main>
    <div class="left-segment">
        <ShareStatus />
    </div>
    <div class="right-segment">
        {#if $state === ShareStateType.SHARING}
            <h1>Requests</h1>
            <RequestList />
        {/if}
    </div>
</main>

<svelte:head>
    <style>
        html,
        body {
            background-color: black;
            color: white;
        }

        .data-view {
            border: solid 1px #626262;
        }

        .toast {
            color: white;
            background-color: black;
            border: solid 1px #626262;
        }
    </style>
</svelte:head>

<style>
    .right-segment {
        height: 100%;
        margin-top: 15rem;
    }

    @media (max-width: 850px) {
        .right-segment {
            margin-top: 0;
        }
    }
</style>