mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-20 22:00:43 +08:00
Improve edit buttons on issue and patch
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
import Embeds from "@app/views/projects/Cob/Embeds.svelte";
|
||||
import ErrorModal from "@app/modals/ErrorModal.svelte";
|
||||
import ExtendedTextarea from "@app/components/ExtendedTextarea.svelte";
|
||||
import IconButton from "@app/components/IconButton.svelte";
|
||||
import Button from "@app/components/Button.svelte";
|
||||
import IconSmall from "@app/components/IconSmall.svelte";
|
||||
import InlineMarkdown from "@app/components/InlineMarkdown.svelte";
|
||||
import LabelInput from "./Cob/LabelInput.svelte";
|
||||
@@ -495,15 +495,17 @@
|
||||
content={issue.title} />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div style="display: flex; gap: 0.5rem;">
|
||||
{#if session && role.isDelegateOrAuthor(session.publicKey, project.delegates, issue.author.id) && issueState === "read"}
|
||||
<IconButton
|
||||
<Button
|
||||
variant="outline"
|
||||
title="edit issue"
|
||||
on:click={() => (issueState = "edit")}>
|
||||
<IconSmall name={"edit"} />
|
||||
</IconButton>
|
||||
Edit
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
<div style="display: flex; gap: 1rem;">
|
||||
<Share {preferredSeeds} {publicExplorer} {baseUrl} />
|
||||
{#if session && role.isDelegateOrAuthor(session.publicKey, project.delegates, issue.author.id)}
|
||||
<CobStateButton
|
||||
|
||||
@@ -717,7 +717,8 @@
|
||||
<div class="main">
|
||||
<CobHeader>
|
||||
<svelte:fragment slot="title">
|
||||
<div style="display: flex; gap: 1rem; width: 100%;">
|
||||
<div
|
||||
style="display: flex; align-items: center; gap: 1rem; width: 100%;">
|
||||
{#if patchState !== "read"}
|
||||
<TextInput
|
||||
placeholder="Title"
|
||||
@@ -733,14 +734,16 @@
|
||||
content={patch.title} />
|
||||
</div>
|
||||
{/if}
|
||||
{#if session && role.isDelegateOrAuthor(session.publicKey, project.delegates, patch.author.id) && patchState === "read"}
|
||||
<IconButton
|
||||
title="edit patch"
|
||||
on:click={() => (patchState = "edit")}>
|
||||
<IconSmall name={"edit"} />
|
||||
</IconButton>
|
||||
{/if}
|
||||
</div>
|
||||
{#if session && role.isDelegateOrAuthor(session.publicKey, project.delegates, patch.author.id) && patchState === "read"}
|
||||
<Button
|
||||
variant="outline"
|
||||
title="edit patch"
|
||||
on:click={() => (patchState = "edit")}>
|
||||
<IconSmall name={"edit"} />
|
||||
Edit
|
||||
</Button>
|
||||
{/if}
|
||||
<Share {preferredSeeds} {publicExplorer} {baseUrl} />
|
||||
{#if session && role.isDelegateOrAuthor(session.publicKey, project.delegates, patch.author.id)}
|
||||
<CobStateButton
|
||||
|
||||
Reference in New Issue
Block a user