2020-06-19 09:14:03 +02:00
|
|
|
<script>
|
2020-11-25 16:30:10 +01:00
|
|
|
import { General, DangerZone, APIKeys } from "./tabs"
|
2020-10-08 10:35:11 +02:00
|
|
|
import { Switcher, ModalContent } from "@budibase/bbui"
|
2020-06-19 09:14:03 +02:00
|
|
|
|
|
|
|
const tabs = [
|
|
|
|
{
|
|
|
|
title: "General",
|
|
|
|
key: "GENERAL",
|
|
|
|
component: General,
|
|
|
|
},
|
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,
|
|
|
|
},
|
|
|
|
]
|
2020-10-02 13:22:49 +02:00
|
|
|
|
2020-06-19 09:14:03 +02:00
|
|
|
let value = "GENERAL"
|
2020-10-02 13:22:49 +02:00
|
|
|
|
2020-06-19 09:14:03 +02:00
|
|
|
$: selectedTab = tabs.find(tab => tab.key === value).component
|
|
|
|
</script>
|
|
|
|
|
2020-10-08 10:35:11 +02:00
|
|
|
<ModalContent
|
2020-10-05 12:13:09 +02:00
|
|
|
title="Settings"
|
|
|
|
showConfirmButton={false}
|
|
|
|
showCancelButton={false}>
|
|
|
|
<div class="container">
|
|
|
|
<Switcher headings={tabs} bind:value>
|
|
|
|
<svelte:component this={selectedTab} />
|
|
|
|
</Switcher>
|
|
|
|
</div>
|
2020-10-08 10:35:11 +02:00
|
|
|
</ModalContent>
|
2020-06-19 09:14:03 +02:00
|
|
|
|
|
|
|
<style>
|
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-10-02 13:22:49 +02:00
|
|
|
.container :global(textarea) {
|
|
|
|
min-height: 60px;
|
2020-06-19 09:14:03 +02:00
|
|
|
}
|
|
|
|
</style>
|