Remove flag from frontend

This commit is contained in:
Adria Navarro 2025-03-31 15:48:54 +02:00
parent efff3612b9
commit 9f4d1470ba
2 changed files with 22 additions and 33 deletions

View File

@ -11,8 +11,7 @@
import { goto } from "@roxi/routify"
import { appStore, oauth2 } from "@/stores/builder"
import DetailPopover from "@/components/common/DetailPopover.svelte"
import { featureFlag } from "@/helpers"
import { FeatureFlag, RestAuthType } from "@budibase/types"
import { RestAuthType } from "@budibase/types"
import { onMount } from "svelte"
type Config = { label: string; value: string }
@ -57,15 +56,13 @@
$: title = !authConfig ? "Authentication" : `Auth: ${authConfig.label}`
$: oauth2Enabled = featureFlag.isEnabled(FeatureFlag.OAUTH2_CONFIG)
onMount(() => {
oauth2.fetch()
})
</script>
<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>
{#if !authConfig}
Authentication
@ -96,25 +93,23 @@
>
</div>
{#if oauth2Enabled}
<Divider />
<Divider />
<Body size="S" color="var(--spectrum-global-color-gray-700)">
OAuth 2.0 (Token-Based Authentication)
</Body>
<Body size="S" color="var(--spectrum-global-color-gray-700)">
OAuth 2.0 (Token-Based Authentication)
</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>
<Button secondary icon="Add" on:click={addOAuth2Configuration}
>Add OAuth2</Button

View File

@ -4,12 +4,8 @@
import { url, isActive } from "@roxi/routify"
import DeleteModal from "@/components/deploy/DeleteModal.svelte"
import { isOnlyUser, appStore } from "@/stores/builder"
import { featureFlag } from "@/helpers"
import { FeatureFlag } from "@budibase/types"
let deleteModal: DeleteModal
$: oauth2Enabled = featureFlag.isEnabled(FeatureFlag.OAUTH2_CONFIG)
</script>
<!-- routify:options index=4 -->
@ -48,13 +44,11 @@
url={$url("./version")}
active={$isActive("./version")}
/>
{#if oauth2Enabled}
<SideNavItem
text="OAuth2"
url={$url("./oauth2")}
active={$isActive("./oauth2")}
/>
{/if}
<SideNavItem
text="OAuth2"
url={$url("./oauth2")}
active={$isActive("./oauth2")}
/>
<SideNavItem
text="App scripts"
url={$url("./scripts")}