2020-06-19 09:14:03 +02:00
|
|
|
<script>
|
2020-07-02 17:28:33 +02:00
|
|
|
import { General, Users, DangerZone, APIKeys } from "./tabs"
|
2020-06-19 09:14:03 +02:00
|
|
|
|
|
|
|
import { Input, TextArea, Button, Switcher } from "@budibase/bbui"
|
|
|
|
import { SettingsIcon, CloseIcon } from "components/common/Icons/"
|
|
|
|
import { getContext } from "svelte"
|
|
|
|
import { post } from "builderStore/api"
|
|
|
|
|
|
|
|
export let name = ""
|
|
|
|
export let description = ""
|
|
|
|
const tabs = [
|
|
|
|
{
|
|
|
|
title: "General",
|
|
|
|
key: "GENERAL",
|
|
|
|
component: General,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "Users",
|
|
|
|
key: "USERS",
|
|
|
|
component: Users,
|
|
|
|
},
|
2020-07-02 17:28:33 +02:00
|
|
|
{
|
|
|
|
title: "API Keys",
|
|
|
|
key: "API_KEYS",
|
|
|
|
component: APIKeys,
|
|
|
|
},
|
2020-06-19 09:14:03 +02:00
|
|
|
{
|
|
|
|
title: "Danger Zone",
|
|
|
|
key: "DANGERZONE",
|
|
|
|
component: DangerZone,
|
|
|
|
},
|
|
|
|
]
|
|
|
|
let value = "GENERAL"
|
|
|
|
$: selectedTab = tabs.find(tab => tab.key === value).component
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="container">
|
2020-09-30 11:24:16 +02:00
|
|
|
<div class="heading">
|
|
|
|
<i class="ri-settings-2-fill" />
|
|
|
|
<h3>Settings</h3>
|
2020-06-19 09:14:03 +02:00
|
|
|
</div>
|
2020-09-30 11:24:16 +02:00
|
|
|
<Switcher headings={tabs} bind:value>
|
|
|
|
<svelte:component this={selectedTab} />
|
|
|
|
</Switcher>
|
2020-06-19 09:14:03 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.container {
|
2020-10-01 12:29:43 +02:00
|
|
|
padding: 30px;
|
2020-09-30 11:24:16 +02:00
|
|
|
display: grid;
|
|
|
|
grid-gap: var(--spacing-xl);
|
2020-06-19 09:14:03 +02:00
|
|
|
}
|
2020-09-30 11:24:16 +02:00
|
|
|
.container :global(section > header) {
|
|
|
|
/* Fix margin defined in BBUI as L rather than XL */
|
|
|
|
margin-bottom: var(--spacing-xl);
|
2020-06-19 09:14:03 +02:00
|
|
|
}
|
2020-09-30 11:24:16 +02:00
|
|
|
|
2020-06-19 09:14:03 +02:00
|
|
|
.heading {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2020-09-30 11:24:16 +02:00
|
|
|
.heading h3 {
|
|
|
|
font-size: var(--font-size-xl);
|
|
|
|
color: var(--ink);
|
|
|
|
font-weight: 600;
|
2020-06-19 09:14:03 +02:00
|
|
|
margin: 0;
|
|
|
|
}
|
2020-09-30 11:24:16 +02:00
|
|
|
.heading i {
|
|
|
|
margin-right: var(--spacing-m);
|
|
|
|
font-size: 28px;
|
|
|
|
color: var(--grey-6);
|
2020-06-19 09:14:03 +02:00
|
|
|
}
|
|
|
|
</style>
|