From f6f44950e79041e4f7afe441fc4b850e1030f27a Mon Sep 17 00:00:00 2001
From: Melonai <einebeere@gmail.com>
Date: Thu, 17 Jun 2021 00:30:58 +0200
Subject: Share page design

---
 assets/src/components/share/Selector.svelte | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 assets/src/components/share/Selector.svelte

(limited to 'assets/src/components/share/Selector.svelte')

diff --git a/assets/src/components/share/Selector.svelte b/assets/src/components/share/Selector.svelte
new file mode 100644
index 0000000..e4c7c07
--- /dev/null
+++ b/assets/src/components/share/Selector.svelte
@@ -0,0 +1,20 @@
+<script lang="ts">
+    import { start } from "../../network/channel/connection";
+    import { startShare } from "../../network/channel/share";
+
+    import data from "../../stores/data";
+
+    let value = "";
+
+    const submit = () => {
+        data.set(value);
+        start().then(startShare);
+    };
+
+    // TODO: Accept data other than text.
+</script>
+
+<form on:submit|preventDefault={submit}>
+    <input type="text" bind:value />
+    <input type="submit" value="Submit" />
+</form>
-- 
cgit 1.4.1

