From 7513d723ef52a899515f2b48e2ef1ad2658c908d Mon Sep 17 00:00:00 2001 From: evlist Date: Fri, 3 Mar 2023 09:27:44 +0100 Subject: [PATCH] Adding an invitation link --- src/components/user/User.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/user/User.tsx b/src/components/user/User.tsx index a6bd43d..102ed67 100644 --- a/src/components/user/User.tsx +++ b/src/components/user/User.tsx @@ -11,7 +11,7 @@ import { import { TextField, Button, Progress } from '@kobalte/core'; import reporter from '@felte/reporter-tippy'; import './style.css'; -import { useNavigate } from 'solid-start'; +import { A, useNavigate } from 'solid-start'; import { adminCredentials } from '../credentials'; import { put } from '~/lib/put'; import { del } from '~/lib/del'; @@ -50,6 +50,14 @@ const User: Component = (props) => { return { token: uuid(), subscriptions: [], ...values() }; }; + const invitationLink = () => { + // TODO: make these URLs configurable + const configUrl = `https://admin.dyomedea.app/api/conf/${ + getValues().token + }`; + return `https://web.dyomedea.app#${btoa(configUrl)}`; + }; + const submitHandler = async (values: any, context: any) => { console.log({ caller: 'User / submitHandler', @@ -320,6 +328,11 @@ const User: Component = (props) => {

{userId(data('username'), data('database'))}

+

+ + Invitation + +

Mail address