about summary refs log tree commit diff
path: root/assets/src/components/share/Selector.svelte
blob: e4c7c07bc1dd1088652ab4a2fba0ffe03c326091 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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>