Skip to content

Commit

Permalink
fix #889 (#1090)
Browse files Browse the repository at this point in the history
  • Loading branch information
efstajas authored Jun 3, 2024
1 parent 01947f7 commit 9f16d67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
source {
url
}
owner {
address
}
}
... on UnclaimedProject {
source {
Expand All @@ -28,12 +31,13 @@
} from '$lib/components/project-badge/project-badge.svelte';
import { createEventDispatcher } from 'svelte';
import Button from '../button/button.svelte';
import Copyable from '../copyable/copyable.svelte';
import Pen from '$lib/components/icons/Pen.svelte';
import { gql } from 'graphql-request';
import type { ProjectProfileHeaderFragment } from './__generated__/gql.generated';
import ShareButton from '../share-button/share-button.svelte';
import twemoji from '$lib/utils/twemoji';
import IdentityBadge from '../identity-badge/identity-badge.svelte';
import isClaimed from '$lib/utils/project/is-claimed';
export let project: ProjectProfileHeaderFragment;
export let description: string | undefined = undefined;
Expand All @@ -56,9 +60,12 @@
</div>
<div class="flex-1 min-w-0 flex flex-col gap-1">
<h1>{project.source.repoName}</h1>
<Copyable alwaysVisible={true} value={project.source.url}>
<ProjectBadge {project} forceUnclaimed tooltip={false} linkTo="external-url" />
</Copyable>
<div style:display="flex" style:gap="0.75rem" style:flex-wrap="wrap">
{#if isClaimed(project)}
<IdentityBadge address={project.owner.address} />
{/if}
<ProjectBadge size="tiny" {project} forceUnclaimed tooltip={false} linkTo="external-url" />
</div>
{#if description}
<span
class="typo-text-small line-clamp-2 twemoji-text"
Expand All @@ -71,7 +78,7 @@
{#if editButton || shareButton}
<div class="actions">
{#if shareButton}
<ShareButton url={shareButton.url} />
<ShareButton buttonVariant="normal" url={shareButton.url} />
{/if}
{#if editButton}
<Button icon={Pen} on:click={() => dispatch('editButtonClick')}>{editButton}</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,6 @@

<article class="project-profile" class:claimed={isClaimed(project)}>
<header class="header">
{#if isClaimed(project)}
<div class="owner">
<span class="typo-text" style:color="var(--color-foreground-level-5)"
>Project claimed by</span
>
<IdentityBadge address={project.owner.address} disableTooltip />
</div>
{/if}
<div>
<ProjectProfileHeader
{project}
Expand Down

0 comments on commit 9f16d67

Please sign in to comment.