Remove flag from frontend
This commit is contained in:
parent
efff3612b9
commit
9f4d1470ba
|
@ -11,8 +11,7 @@
|
||||||
import { goto } from "@roxi/routify"
|
import { goto } from "@roxi/routify"
|
||||||
import { appStore, oauth2 } from "@/stores/builder"
|
import { appStore, oauth2 } from "@/stores/builder"
|
||||||
import DetailPopover from "@/components/common/DetailPopover.svelte"
|
import DetailPopover from "@/components/common/DetailPopover.svelte"
|
||||||
import { featureFlag } from "@/helpers"
|
import { RestAuthType } from "@budibase/types"
|
||||||
import { FeatureFlag, RestAuthType } from "@budibase/types"
|
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
|
|
||||||
type Config = { label: string; value: string }
|
type Config = { label: string; value: string }
|
||||||
|
@ -57,15 +56,13 @@
|
||||||
|
|
||||||
$: title = !authConfig ? "Authentication" : `Auth: ${authConfig.label}`
|
$: title = !authConfig ? "Authentication" : `Auth: ${authConfig.label}`
|
||||||
|
|
||||||
$: oauth2Enabled = featureFlag.isEnabled(FeatureFlag.OAUTH2_CONFIG)
|
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
oauth2.fetch()
|
oauth2.fetch()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<DetailPopover bind:this={popover} {title} align={PopoverAlignment.Right}>
|
<DetailPopover bind:this={popover} {title} align={PopoverAlignment.Right}>
|
||||||
<div slot="anchor" class:display-new={!authConfig && oauth2Enabled}>
|
<div slot="anchor" class:display-new={!authConfig}>
|
||||||
<ActionButton icon="LockClosed" quiet selected>
|
<ActionButton icon="LockClosed" quiet selected>
|
||||||
{#if !authConfig}
|
{#if !authConfig}
|
||||||
Authentication
|
Authentication
|
||||||
|
@ -96,25 +93,23 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if oauth2Enabled}
|
<Divider />
|
||||||
<Divider />
|
|
||||||
|
|
||||||
<Body size="S" color="var(--spectrum-global-color-gray-700)">
|
<Body size="S" color="var(--spectrum-global-color-gray-700)">
|
||||||
OAuth 2.0 (Token-Based Authentication)
|
OAuth 2.0 (Token-Based Authentication)
|
||||||
</Body>
|
</Body>
|
||||||
|
|
||||||
|
{#if $oauth2.configs.length}
|
||||||
|
<List>
|
||||||
|
{#each $oauth2.configs as config}
|
||||||
|
<ListItem
|
||||||
|
title={config.name}
|
||||||
|
on:click={() => selectConfiguration(config._id, RestAuthType.OAUTH2)}
|
||||||
|
selected={config._id === authConfigId}
|
||||||
|
/>
|
||||||
|
{/each}
|
||||||
|
</List>
|
||||||
|
|
||||||
{#if $oauth2.configs.length}
|
|
||||||
<List>
|
|
||||||
{#each $oauth2.configs as config}
|
|
||||||
<ListItem
|
|
||||||
title={config.name}
|
|
||||||
on:click={() =>
|
|
||||||
selectConfiguration(config._id, RestAuthType.OAUTH2)}
|
|
||||||
selected={config._id === authConfigId}
|
|
||||||
/>
|
|
||||||
{/each}
|
|
||||||
</List>
|
|
||||||
{/if}
|
|
||||||
<div>
|
<div>
|
||||||
<Button secondary icon="Add" on:click={addOAuth2Configuration}
|
<Button secondary icon="Add" on:click={addOAuth2Configuration}
|
||||||
>Add OAuth2</Button
|
>Add OAuth2</Button
|
||||||
|
|
|
@ -4,12 +4,8 @@
|
||||||
import { url, isActive } from "@roxi/routify"
|
import { url, isActive } from "@roxi/routify"
|
||||||
import DeleteModal from "@/components/deploy/DeleteModal.svelte"
|
import DeleteModal from "@/components/deploy/DeleteModal.svelte"
|
||||||
import { isOnlyUser, appStore } from "@/stores/builder"
|
import { isOnlyUser, appStore } from "@/stores/builder"
|
||||||
import { featureFlag } from "@/helpers"
|
|
||||||
import { FeatureFlag } from "@budibase/types"
|
|
||||||
|
|
||||||
let deleteModal: DeleteModal
|
let deleteModal: DeleteModal
|
||||||
|
|
||||||
$: oauth2Enabled = featureFlag.isEnabled(FeatureFlag.OAUTH2_CONFIG)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- routify:options index=4 -->
|
<!-- routify:options index=4 -->
|
||||||
|
@ -48,13 +44,11 @@
|
||||||
url={$url("./version")}
|
url={$url("./version")}
|
||||||
active={$isActive("./version")}
|
active={$isActive("./version")}
|
||||||
/>
|
/>
|
||||||
{#if oauth2Enabled}
|
<SideNavItem
|
||||||
<SideNavItem
|
text="OAuth2"
|
||||||
text="OAuth2"
|
url={$url("./oauth2")}
|
||||||
url={$url("./oauth2")}
|
active={$isActive("./oauth2")}
|
||||||
active={$isActive("./oauth2")}
|
/>
|
||||||
/>
|
|
||||||
{/if}
|
|
||||||
<SideNavItem
|
<SideNavItem
|
||||||
text="App scripts"
|
text="App scripts"
|
||||||
url={$url("./scripts")}
|
url={$url("./scripts")}
|
||||||
|
|
Loading…
Reference in New Issue