about summary refs log tree commit diff
path: root/assets/src/components/share/Info.svelte
diff options
context:
space:
mode:
authorMelonai <einebeere@gmail.com>2021-06-17 00:30:58 +0200
committerMelonai <einebeere@gmail.com>2021-06-17 00:30:58 +0200
commitf6f44950e79041e4f7afe441fc4b850e1030f27a (patch)
tree027751b354414260606251c631481f6a4b2c94b9 /assets/src/components/share/Info.svelte
parentb98b1cd0e5d07fd37be54592edd362f443a145ad (diff)
downloadrook-f6f44950e79041e4f7afe441fc4b850e1030f27a.tar.zst
rook-f6f44950e79041e4f7afe441fc4b850e1030f27a.zip
Share page design
Diffstat (limited to 'assets/src/components/share/Info.svelte')
-rw-r--r--assets/src/components/share/Info.svelte64
1 files changed, 64 insertions, 0 deletions
diff --git a/assets/src/components/share/Info.svelte b/assets/src/components/share/Info.svelte
new file mode 100644
index 0000000..2d648ce
--- /dev/null
+++ b/assets/src/components/share/Info.svelte
@@ -0,0 +1,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>