Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #889 #1090

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,11 +31,12 @@
} 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 IdentityBadge from '../identity-badge/identity-badge.svelte';
import isClaimed from '$lib/utils/project/is-claimed';

export let project: ProjectProfileHeaderFragment;
export let editButton: string | undefined = undefined;
Expand All @@ -54,14 +58,17 @@
</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>
</div>
{#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 @@ -351,14 +351,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
Loading