Skip to content

Commit

Permalink
"fork" is called "edit" when it's your own article.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed May 9, 2024
1 parent 6f97b4e commit fd99cfa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/cards/Article.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@
{
id: 'article',
receivedEvent(relay, _id) {
if (seenOn.indexOf(relay.url) === -1) seenOn.push(relay.url);
if (seenOn.indexOf(relay.url) === -1) {
seenOn.push(relay.url);
seenOn = seenOn;
}
},
onevent(evt) {
if (!event || event.created_at < evt.created_at) {
Expand Down Expand Up @@ -230,7 +233,13 @@
<!-- svelte-ignore a11y-no-static-element-interactions a11y-click-events-have-key-events a11y-missing-attribute -->
</div>
<div>
<a class="cursor-pointer underline" on:click={edit}>Fork</a>
<a class="cursor-pointer underline" on:click={edit}>
{#if event?.pubkey === $account?.pubkey}
Edit
{:else}
Fork
{/if}
</a>
&nbsp;• &nbsp;
<a class="cursor-pointer underline" on:click={shareCopy}>
{#if copied}Copied!{:else}Share{/if}
Expand Down

0 comments on commit fd99cfa

Please sign in to comment.