update all areas where ai flags come from license to come from feature flag
This commit is contained in:
parent
7b867abd19
commit
7c918302a9
|
@ -9,7 +9,7 @@
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { onMount, createEventDispatcher } from "svelte"
|
import { onMount, createEventDispatcher } from "svelte"
|
||||||
import { flags } from "stores/builder"
|
import { flags } from "stores/builder"
|
||||||
import { featureFlags } from "stores/portal"
|
import { featureFlags, licensing } from "stores/portal"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
import MagicWand from "../../../../assets/MagicWand.svelte"
|
import MagicWand from "../../../../assets/MagicWand.svelte"
|
||||||
|
|
||||||
|
@ -26,7 +26,9 @@
|
||||||
let aiCronPrompt = ""
|
let aiCronPrompt = ""
|
||||||
let loadingAICronExpression = false
|
let loadingAICronExpression = false
|
||||||
|
|
||||||
$: aiEnabled = $featureFlags.AI_CUSTOM_CONFIGS || $featureFlags.BUDIBASE_AI
|
$: aiEnabled =
|
||||||
|
($featureFlags.AI_CUSTOM_CONFIGS && $licensing.customAIConfigsEnabled) ||
|
||||||
|
($featureFlags.BUDIBASE_AI && $licensing.budibaseAIEnabled)
|
||||||
$: {
|
$: {
|
||||||
if (cronExpression) {
|
if (cronExpression) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
Tags,
|
Tags,
|
||||||
Tag,
|
Tag,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { admin, licensing } from "stores/portal"
|
import { admin, licensing, featureFlags } from "stores/portal"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
import AIConfigModal from "./ConfigModal.svelte"
|
import AIConfigModal from "./ConfigModal.svelte"
|
||||||
import AIConfigTile from "./AIConfigTile.svelte"
|
import AIConfigTile from "./AIConfigTile.svelte"
|
||||||
|
@ -27,7 +27,8 @@
|
||||||
let editingUuid
|
let editingUuid
|
||||||
|
|
||||||
$: isCloud = $admin.cloud
|
$: isCloud = $admin.cloud
|
||||||
$: customAIConfigsEnabled = $licensing.customAIConfigsEnabled
|
$: customAIConfigsEnabled =
|
||||||
|
$featureFlags.AI_CUSTOM_CONFIGS && $licensing.customAIConfigsEnabled
|
||||||
|
|
||||||
async function fetchAIConfig() {
|
async function fetchAIConfig() {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<script>
|
<script>
|
||||||
import { redirect } from "@roxi/routify"
|
import { redirect } from "@roxi/routify"
|
||||||
import { licensing } from "stores/portal"
|
import { licensing, featureFlags } from "stores/portal"
|
||||||
|
|
||||||
if ($licensing.customAIConfigsEnabled) {
|
if ($featureFlags.AI_CUSTOM_CONFIGS && $licensing.customAIConfigsEnabled) {
|
||||||
$redirect("./ai")
|
$redirect("./ai")
|
||||||
} else {
|
} else {
|
||||||
$redirect("./auth")
|
$redirect("./auth")
|
||||||
|
|
Loading…
Reference in New Issue