diff --git a/src/lib/app.css b/src/lib/app.css index 191f143..d59a3da 100644 --- a/src/lib/app.css +++ b/src/lib/app.css @@ -90,4 +90,4 @@ img.emoji { to { opacity: 1; } -} +} \ No newline at end of file diff --git a/src/lib/ui/Composer.svelte b/src/lib/ui/Composer.svelte new file mode 100644 index 0000000..c8f474c --- /dev/null +++ b/src/lib/ui/Composer.svelte @@ -0,0 +1,132 @@ + + +
+
+ + + +
+ +
+
+
+
+ +
+
+ + + +
+ + diff --git a/src/lib/ui/Modal.svelte b/src/lib/ui/Modal.svelte new file mode 100644 index 0000000..695dc43 --- /dev/null +++ b/src/lib/ui/Modal.svelte @@ -0,0 +1,88 @@ + + +{#if visible} +
visible = !visible}>
+
+ +
+{/if} + + \ No newline at end of file diff --git a/src/lib/ui/Navigation.svelte b/src/lib/ui/Navigation.svelte index 6d514ef..a37365a 100644 --- a/src/lib/ui/Navigation.svelte +++ b/src/lib/ui/Navigation.svelte @@ -6,6 +6,7 @@ import { goto } from '$app/navigation'; import { page } from '$app/stores'; import { get } from 'svelte/store'; + import { createEventDispatcher } from 'svelte'; import { unread_notif_count, last_read_notif_id } from '$lib/notifications.js'; import Logo from '$lib/../img/campfire-logo.svg'; @@ -26,6 +27,8 @@ const VERSION = APP_VERSION; + const dispatch = createEventDispatcher(); + function handle_btn(name) { if (!get(logged_in)) return; let route; @@ -122,12 +125,12 @@ - +
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index ff9ede3..a718d7b 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -9,8 +9,12 @@ import { get } from 'svelte/store'; import Navigation from '$lib/ui/Navigation.svelte'; + import Modal from '@cf/ui/Modal.svelte'; + import Composer from '@cf/ui/Composer.svelte'; import Widgets from '$lib/ui/Widgets.svelte'; + let show_composer = false; + async function init() { if (!get(app) || !get(app).token) { account.set(false); @@ -40,9 +44,8 @@
-
- + show_composer = true} />
@@ -59,6 +62,9 @@
+ + +