mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-01 17:50:29 +08:00
Allow patch descriptions to be empty
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
export let body: string = "";
|
||||
export let embeds: Map<string, Embed> = new Map();
|
||||
export let submitInProgress: boolean = false;
|
||||
export let validateBody: boolean = true;
|
||||
|
||||
let preview: boolean = false;
|
||||
let selectionStart = 0;
|
||||
@@ -177,7 +178,7 @@
|
||||
</Button>
|
||||
<Button
|
||||
styleBorderRadius="0"
|
||||
disabled={body === ""}
|
||||
disabled={validateBody && !body}
|
||||
variant={preview ? "gray-white" : "dim"}
|
||||
on:click={() => {
|
||||
preview = true;
|
||||
@@ -234,7 +235,7 @@
|
||||
</Button>
|
||||
<Button
|
||||
variant="secondary"
|
||||
disabled={!body || submitInProgress}
|
||||
disabled={(validateBody && !body) || submitInProgress}
|
||||
on:click={submit}>
|
||||
{#if submitInProgress}
|
||||
<Loading small noDelay />
|
||||
|
||||
@@ -694,6 +694,7 @@
|
||||
<div class="revision-description">
|
||||
{#if session && patchState !== "read"}
|
||||
<ExtendedTextarea
|
||||
validateBody={false}
|
||||
rawPath={rawPath(patch.revisions[0].id)}
|
||||
body={newDescription}
|
||||
submitCaption="Save"
|
||||
|
||||
Reference in New Issue
Block a user