Skip to content

Commit

Permalink
problem: can't edit problem body text
Browse files Browse the repository at this point in the history
  • Loading branch information
gsovereignty committed Jan 23, 2024
1 parent 4b74df0 commit 77bd256
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/components/novoproblems/elements/ProblemBody.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { makeHtml } from "$lib/helpers/mundane";
import type { Problem } from "$lib/stores/nostrocket_state/types";
import { Button, Column, Row, TextArea } from "carbon-components-svelte";
import { Button, ButtonSet, Column, Row, TextArea } from "carbon-components-svelte";
import { Edit } from "carbon-icons-svelte";
export let problem: Problem;
Expand Down Expand Up @@ -35,8 +35,22 @@
{#if edit}
<Row>
<Column lg={8}
><TextArea rows={problem.FullText.split(/\r\n|\r|\n/).length} bind:value={problem.FullText} /><Button style="float:right;">PUBLISH</Button
></Column
><TextArea rows={problem.FullText.split(/\r\n|\r|\n/).length} bind:value={problem.FullText} /><ButtonSet
><Button
on:click={() => {
problem.FullText = existing;
edit = false;
}}
kind="secondary"
size="field">CANCEL</Button
><Button
on:click={() => {
edit = false;
publish();
}}
size="field">PUBLISH</Button
></ButtonSet
></Column
>
<Column lg={8}>{@html makeHtml(problem.FullText)}</Column>
</Row>
Expand Down

0 comments on commit 77bd256

Please sign in to comment.