From b9c84ee455e20db5d9b46f9df7bf3cf3a2aa9af5 Mon Sep 17 00:00:00 2001 From: typicalninja <65993466+typicalninja493@users.noreply.github.com> Date: Mon, 11 Sep 2023 22:41:00 +0530 Subject: [PATCH] feat: options (test) --- src/components/commandList.svelte | 14 ++------------ src/components/commandOptions.svelte | 27 +++++++++++++++++++++++++++ src/components/icons/Add.svelte | 21 +++++++++++++++++++++ src/routes/editor/+page.svelte | 8 +++++--- 4 files changed, 55 insertions(+), 15 deletions(-) create mode 100644 src/components/commandOptions.svelte create mode 100644 src/components/icons/Add.svelte diff --git a/src/components/commandList.svelte b/src/components/commandList.svelte index 8d89728..b718786 100644 --- a/src/components/commandList.svelte +++ b/src/components/commandList.svelte @@ -16,6 +16,7 @@ import { fade } from 'svelte/transition'; import { sineIn } from 'svelte/easing' + import Add from './icons/Add.svelte'; // get basePath since same component can be used to get guild commands export let basePath = ''; @@ -130,18 +131,7 @@
+
+ {#each options as option} +
+ {option.type} +
+ {/each} + \ No newline at end of file diff --git a/src/components/icons/Add.svelte b/src/components/icons/Add.svelte new file mode 100644 index 0000000..3f59719 --- /dev/null +++ b/src/components/icons/Add.svelte @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/src/routes/editor/+page.svelte b/src/routes/editor/+page.svelte index 8bc24ff..76cae02 100644 --- a/src/routes/editor/+page.svelte +++ b/src/routes/editor/+page.svelte @@ -2,6 +2,7 @@ import { browser } from '$app/environment'; import { base } from '$app/paths'; import { page } from '$app/stores'; + import CommandOptions from '$components/commandOptions.svelte'; import Back from '$components/icons/Back.svelte'; import { fetchAPI } from '$lib/api'; import { discordIdRegex, typeToName, type DiscordInteraction } from '$lib/constants'; @@ -160,9 +161,9 @@ {/if} -
{#if $data.type === "1"} +