mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Merge pull request #2235 from appwrite/feat-SER-270-remove-feature-flag-checks
This commit is contained in:
+1
-5
@@ -14,8 +14,6 @@
|
||||
import { type Attributes, collection, indexes } from '../store';
|
||||
import { Icon, Layout } from '@appwrite.io/pink-svelte';
|
||||
import { IconPlus } from '@appwrite.io/pink-icons-svelte';
|
||||
import { flags } from '$lib/flags';
|
||||
|
||||
export let showCreateIndex = false;
|
||||
export let externalAttribute: Attributes = null;
|
||||
|
||||
@@ -39,8 +37,6 @@
|
||||
|
||||
let attributeList = [{ value: '', order: '', length: null }];
|
||||
|
||||
const showLengths = flags.showIndexLengths(page.data);
|
||||
|
||||
function generateIndexKey() {
|
||||
let indexKeys = $indexes.map((index) => index.key);
|
||||
|
||||
@@ -152,7 +148,7 @@
|
||||
placeholder="Select Order" />
|
||||
|
||||
<Layout.Stack direction="row" alignItems="flex-end" gap="xs">
|
||||
{#if selectedType === IndexType.Key && showLengths}
|
||||
{#if selectedType === IndexType.Key}
|
||||
<InputNumber
|
||||
id={`length-${i}`}
|
||||
label={i === 0 ? 'Length' : undefined}
|
||||
|
||||
+6
-12
@@ -3,13 +3,9 @@
|
||||
import { InputText } from '$lib/elements/forms';
|
||||
import { Layout } from '@appwrite.io/pink-svelte';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { page } from '$app/state';
|
||||
import { flags } from '$lib/flags';
|
||||
|
||||
export let showOverview = false;
|
||||
export let selectedIndex: Models.Index = null;
|
||||
|
||||
const showLengths = flags.showIndexLengths(page.data);
|
||||
</script>
|
||||
|
||||
<Modal title="Overview" bind:show={showOverview}>
|
||||
@@ -43,14 +39,12 @@
|
||||
id={`value-${selectedIndex.orders[i]}`}
|
||||
value={selectedIndex.orders[i]}
|
||||
readonly />
|
||||
{#if showLengths}
|
||||
<InputText
|
||||
required
|
||||
label={i === 0 ? 'Length' : ''}
|
||||
id={`value-${selectedIndex.lengths[i]}`}
|
||||
value={selectedIndex.lengths[i]?.toString() ?? null}
|
||||
readonly />
|
||||
{/if}
|
||||
<InputText
|
||||
required
|
||||
label={i === 0 ? 'Length' : ''}
|
||||
id={`value-${selectedIndex.lengths[i]}`}
|
||||
value={selectedIndex.lengths[i]?.toString() ?? null}
|
||||
readonly />
|
||||
</Layout.Stack>
|
||||
{/each}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user