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: fixed private tag in the pipeline/model header #1268

Merged
Show file tree
Hide file tree
Changes from all commits
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
27 changes: 10 additions & 17 deletions packages/toolkit/src/view/model/view-model/ModelHead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,16 @@ export const ModelSettingsHead = ({
/<span className="text-semantic-fg-primary">{model?.id}</span>
</div>
{modelState ? <StateLabel state={modelState} /> : null}
<Tag
className="my-auto h-6 gap-x-1 !border-0 !py-0 !text-sm"
variant="lightNeutral"
size="sm"
>
{model?.visibility === "VISIBILITY_PUBLIC" ? (
<React.Fragment>
<Icons.BookOpen02 className="h-3 w-3 stroke-semantic-fg-primary" />
Public
</React.Fragment>
) : (
<React.Fragment>
Private
<Icons.Lock03 className="h-3 w-3 stroke-semantic-fg-primary" />
</React.Fragment>
)}
</Tag>
{model?.visibility !== "VISIBILITY_PUBLIC" ? (
<Tag
className="my-auto h-6 gap-x-1 !border-0 !py-0 !text-sm"
variant="lightNeutral"
size="sm"
>
<Icons.Lock03 className="h-3 w-3 stroke-semantic-fg-primary" />
Private
</Tag>
) : null}
{model?.sourceUrl ? (
<ExternalLink href={model.sourceUrl}>
<GitHubIcon
Expand Down
17 changes: 5 additions & 12 deletions packages/toolkit/src/view/pipeline/view-pipeline/Head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,22 +260,15 @@ export const Head = ({
</Popover.Content>
</Popover.Root>
) : null}
{pipeline.isSuccess ? (
{pipeline.isSuccess &&
!isPublicPipeline(pipeline.data) ? (
<Tag
className="my-auto h-6 !border-0 !py-0"
className="my-auto h-6 gap-x-1 !border-0 !py-0 !text-sm"
variant="lightNeutral"
size="sm"
>
{isPublicPipeline(pipeline.data) ? (
<div className="flex flex-row gap-x-1">
<span className="my-auto">Public</span>
</div>
) : (
<div className="flex flex-row gap-x-1">
<span className="my-auto">Private</span>
<Icons.Lock03 className="my-auto h-3 w-3 stroke-semantic-fg-primary" />
</div>
)}
<Icons.Lock03 className="h-3 w-3 stroke-semantic-fg-primary" />
Private
</Tag>
) : null}
</React.Fragment>
Expand Down
Loading