mirror of https://github.com/Budibase/budibase.git
6 changed files with 82 additions and 4 deletions
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,22 @@ |
|||
<script> |
|||
import { Body, Input, Select, ModalContent } from "@budibase/bbui" |
|||
|
|||
const options = ["Email onboarding", "Basic onboarding"] |
|||
let selected = options[0] |
|||
</script> |
|||
|
|||
<ModalContent |
|||
size="M" |
|||
title="Add new user options" |
|||
confirmText="Add user" |
|||
cancelText="Cancel" |
|||
showCloseIcon={false} |
|||
> |
|||
<Body noPadding |
|||
>If you have SMTP configured and an email for the new user, you can use the |
|||
automated email onboarding flow. Otherwise, use our basic onboarding process |
|||
with autogenerated passwords.</Body |
|||
> |
|||
<Select bind:value={selected} label="Add new user via:" {options} /> |
|||
<Input label="Email" /> |
|||
</ModalContent> |
|||
@ -1,2 +1,3 @@ |
|||
export { organisation } from "./organisation" |
|||
export { users } from "./users" |
|||
export { admin } from "./admin" |
|||
|
|||
@ -0,0 +1,32 @@ |
|||
import { writable } from "svelte/store" |
|||
import api from "builderStore/api" |
|||
|
|||
export function createUsersStore() { |
|||
const { subscribe, set } = writable({}) |
|||
|
|||
async function init() { |
|||
try { |
|||
const response = await api.get(`/api/admin/users`) |
|||
const json = await response.json() |
|||
set(json) |
|||
} catch (error) { |
|||
console.log(error) |
|||
} |
|||
} |
|||
|
|||
return { |
|||
subscribe, |
|||
// save: async config => {
|
|||
// try {
|
|||
// await api.post("/api/admin/configs", { type: "settings", config })
|
|||
// await init()
|
|||
// return { status: 200 }
|
|||
// } catch (error) {
|
|||
// return { error }
|
|||
// }
|
|||
// },
|
|||
init, |
|||
} |
|||
} |
|||
|
|||
export const users = createUsersStore() |
|||
Loading…
Reference in new issue