1
0
Fork 0
mirror of synced 2024-09-03 19:21:11 +12:00

Merge commit

This commit is contained in:
Dean 2023-03-07 12:18:48 +00:00
parent 1c4dcdf7c5
commit e4512ba91f
3 changed files with 63 additions and 3 deletions

View file

@ -0,0 +1,56 @@
<script>
import {
Layout,
Heading,
Body,
Divider,
Label,
Dropzone,
notifications,
} from "@budibase/bbui"
import { auth, organisation } from "stores/portal"
import { API } from "api"
$: logo: $organisation.logoUrl
? { url: $organisation.logoUrl, type: "image", name: "Logo" }
: null,
async function uploadLogo(file) {
try {
let data = new FormData()
data.append("file", file)
await API.uploadLogo(data)
} catch (error) {
notifications.error("Error uploading logo")
}
}
</script>
{#if $auth.isAdmin}
<Layout noPadding>
<Layout gap="XS" noPadding>
<Heading size="M">Branding</Heading>
<Body />
</Layout>
<Divider />
<div class="fields">
<div class="field logo">
<Label size="L">Logo</Label>
<div class="file">
<Dropzone
value={[logo]}
on:change={e => {
if (!e.detail || e.detail.length === 0) {
logo = null
} else {
logo = e.detail[0]
}
}}
/>
</div>
</div>
</div>
</Layout>
{/if}
<style>
</style>

View file

@ -7,7 +7,7 @@
Divider,
Label,
Input,
Dropzone,
// Dropzone,
notifications,
Toggle,
} from "@budibase/bbui"
@ -87,7 +87,7 @@
<Label size="L">Org. name</Label>
<Input thin bind:value={$values.company} />
</div>
<div class="field logo">
<!-- <div class="field logo">
<Label size="L">Logo</Label>
<div class="file">
<Dropzone
@ -101,7 +101,7 @@
}}
/>
</div>
</div>
</div> -->
{#if !$admin.cloud}
<div class="field">
<Label

View file

@ -50,6 +50,10 @@ export const menu = derived([admin, auth], ([$admin, $auth]) => {
title: "Organisation",
href: "/builder/portal/settings/organisation",
},
{
title: "Branding",
href: "/builder/portal/settings/branding",
},
{
title: "Environment",
href: "/builder/portal/settings/environment",