From 4b0758aba741a89db2f996b27e27b214957d3b10 Mon Sep 17 00:00:00 2001 From: Mircea Roata Date: Mon, 21 Aug 2023 15:37:59 +0300 Subject: [PATCH] chore: use GQL TargetName enum --- .../components/sml-versions/SMLVersionForm.svelte | 12 ++++++------ src/lib/models/sml-versions.ts | 4 ++-- src/lib/models/versions.ts | 5 ++++- src/lib/utils/formatting.ts | 10 ++++++---- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/lib/components/sml-versions/SMLVersionForm.svelte b/src/lib/components/sml-versions/SMLVersionForm.svelte index 02d86107f..8c2d67109 100644 --- a/src/lib/components/sml-versions/SMLVersionForm.svelte +++ b/src/lib/components/sml-versions/SMLVersionForm.svelte @@ -8,7 +8,7 @@ import { smlVersionSchema } from '$lib/models/sml-versions'; import Textfield from '@smui/textfield'; import Button from '@smui/button'; - import { VersionStabilities } from '$lib/generated'; + import { TargetName, VersionStabilities } from '$lib/generated'; import Select, { Option } from '@smui/select'; export let onSubmit: (data: SMLVersionData) => void; @@ -22,7 +22,7 @@ satisfactory_version: 0, stability: VersionStabilities.Alpha, version: '', - targets: [{ targetName: 'Windows', link: '' }] + targets: [{ targetName: TargetName.Windows, link: '' }] }; export let submitText = 'Create'; @@ -33,7 +33,7 @@ }); const addTarget = () => { - addField('targets', { targetName: '', link: '' }); + addField('targets', { targetName: TargetName.Windows, link: '' }); }; const removeTarget = (i: number) => { @@ -106,9 +106,9 @@