Merge commit
This commit is contained in:
parent
1c4dcdf7c5
commit
e4512ba91f
|
@ -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>
|
|
@ -7,7 +7,7 @@
|
||||||
Divider,
|
Divider,
|
||||||
Label,
|
Label,
|
||||||
Input,
|
Input,
|
||||||
Dropzone,
|
// Dropzone,
|
||||||
notifications,
|
notifications,
|
||||||
Toggle,
|
Toggle,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
<Label size="L">Org. name</Label>
|
<Label size="L">Org. name</Label>
|
||||||
<Input thin bind:value={$values.company} />
|
<Input thin bind:value={$values.company} />
|
||||||
</div>
|
</div>
|
||||||
<div class="field logo">
|
<!-- <div class="field logo">
|
||||||
<Label size="L">Logo</Label>
|
<Label size="L">Logo</Label>
|
||||||
<div class="file">
|
<div class="file">
|
||||||
<Dropzone
|
<Dropzone
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
{#if !$admin.cloud}
|
{#if !$admin.cloud}
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<Label
|
<Label
|
||||||
|
|
|
@ -50,6 +50,10 @@ export const menu = derived([admin, auth], ([$admin, $auth]) => {
|
||||||
title: "Organisation",
|
title: "Organisation",
|
||||||
href: "/builder/portal/settings/organisation",
|
href: "/builder/portal/settings/organisation",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "Branding",
|
||||||
|
href: "/builder/portal/settings/branding",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "Environment",
|
title: "Environment",
|
||||||
href: "/builder/portal/settings/environment",
|
href: "/builder/portal/settings/environment",
|
||||||
|
|
Loading…
Reference in New Issue