app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

commit 075a0e39d98d22ef08c6e65cbe44b74180d4b80d
parent c18772a21a85039ed9b186be08d96ee2b5dabfc2
Author: triesap <137732411+triesap@users.noreply.github.com>
Date:   Fri, 23 Aug 2024 09:32:25 +0000

Add `@radroots/client`

Diffstat:
Mpackage.json | 1+
Asrc/lib/client.ts | 4++++
Msrc/routes/+page.svelte | 9+++++++++
3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/package.json b/package.json @@ -27,6 +27,7 @@ }, "type": "module", "dependencies": { + "@radroots/client": "workspace:*", "@radroots/theme": "workspace:*", "@radroots/svelte-lib": "workspace:*" } diff --git a/src/lib/client.ts b/src/lib/client.ts @@ -0,0 +1,3 @@ +import { ClientCapacitor } from "@radroots/client"; + +export const cl = new ClientCapacitor(); +\ No newline at end of file diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte @@ -1,4 +1,5 @@ <script lang="ts"> + import { cl } from "$lib/client"; import { t } from "@radroots/svelte-lib"; </script> @@ -10,4 +11,12 @@ {$t(`app.name`)} </p> </div> + <button + class={`flex flex-row justify-center items-center`} + onclick={async () => { + alert(`Hi! You're platform is ${cl.platform}`); + }} + > + {`platform`} + </button> </div>