update: svelte5 runes migrations.

This commit is contained in:
Darshan
2025-07-17 13:22:24 +05:30
parent 9ab367ab8a
commit 131517a200
2 changed files with 22 additions and 13 deletions
@@ -33,28 +33,33 @@
import { page } from '$app/state';
import SideSheet from '../layout/sidesheet.svelte';
import { flags } from '$lib/flags';
import type { PageData } from './$types';
export let data;
let {
data
}: {
data: PageData;
} = $props();
let showCreateIndex = false;
let selectedIndex: Models.Index = null;
let showCreateIndex = $state(false);
let selectedIndex: Models.Index = $state(null);
let selectedIndexes = [];
let selectedIndexes = $state([]);
let createIndex: CreateIndex;
let error = '';
let showFailed = false;
let showDelete = false;
let showOverview = false;
let error = $state('');
let showFailed = $state(false);
let showDelete = $state(false);
let showOverview = $state(false);
let columns = [
let columns = $state([
{ id: 'key' },
{ id: 'type' },
{ id: 'columns' },
// { id: 'orders' }, // design doesn't have orders atm
{ id: 'lengths' },
{ id: 'actions', width: 40, isAction: true }
];
]);
function getAttributeStatusBadge(status: string): ComponentProps<Badge>['type'] {
switch (status) {
@@ -1,11 +1,15 @@
<script lang="ts">
import { page } from '$app/state';
import { flags } from '$lib/flags';
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 selectedIndex: Models.Index = null;
let {
selectedIndex = null
}: {
selectedIndex: Models.Index;
} = $props();
const showLengths = flags.showIndexLengths(page.data);
</script>