Avoid issue creation without title or description

This commit is contained in:
Sebastian Martinez
2024-12-13 12:26:51 +01:00
parent ca4d9d13fd
commit 5f26f71b86
2 changed files with 6 additions and 1 deletions
+4 -1
View File
@@ -26,6 +26,7 @@
body?: string;
embeds?: Map<string, Embed>;
submitInProgress?: boolean;
disableSubmit?: boolean;
disallowEmptyBody?: boolean;
isValid?: () => boolean;
preview?: boolean;
@@ -50,6 +51,7 @@
body = $bindable(""),
embeds = new Map(),
submitInProgress = false,
disableSubmit = false,
disallowEmptyBody = false,
isValid = () => true,
stylePadding,
@@ -276,7 +278,7 @@
</div>
{/if}
<div class="buttons">
<OutlineButton variant="ghost" onclick={selectFiles}>
<OutlineButton variant="ghost" onclick={selectFiles} disabled={preview}>
<Icon name="attachment" />
<span class="global-hide-on-small-desktop-down">Attach</span>
</OutlineButton>
@@ -293,6 +295,7 @@
variant="ghost"
disabled={!isValid() ||
submitInProgress ||
disableSubmit ||
(disallowEmptyBody && body.trim() === "")}
onclick={submitFn}>
<Icon name="checkmark" />
+2
View File
@@ -134,6 +134,8 @@
</div>
<ExtendedTextarea
disableSubmit={title.trim() === ""}
disallowEmptyBody
submitCaption="Save"
close={() => window.history.back()}
submit={async ({ comment, embeds }) => {