mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-11 20:05:25 +00:00
[search/browse] link repo name to file browser; link code image to external (#340)
This commit is contained in:
parent
d5dc26cb1f
commit
eb6d58d6d3
2 changed files with 19 additions and 11 deletions
|
|
@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- Changed repository link in search to file tree + move external link to code host logo. [#340](https://github.com/sourcebot-dev/sourcebot/pull/340)
|
||||
|
||||
## [4.2.0] - 2025-06-09
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -223,22 +223,27 @@ export const PathHeader = ({
|
|||
return (
|
||||
<div className="flex flex-row gap-2 items-center w-full overflow-hidden">
|
||||
{info?.icon ? (
|
||||
<Image
|
||||
src={info.icon}
|
||||
alt={info.codeHostName}
|
||||
className={`w-4 h-4 ${info.iconClassName}`}
|
||||
/>
|
||||
): (
|
||||
<a href={info.repoLink} target="_blank" rel="noopener noreferrer">
|
||||
<Image
|
||||
src={info.icon}
|
||||
alt={info.codeHostName}
|
||||
className={`w-4 h-4 ${info.iconClassName}`}
|
||||
/>
|
||||
</a>
|
||||
) : (
|
||||
<LaptopIcon className="w-4 h-4" />
|
||||
)}
|
||||
<Link
|
||||
className={clsx("font-medium", {
|
||||
"cursor-pointer hover:underline": info?.repoLink,
|
||||
<div
|
||||
className="font-medium cursor-pointer hover:underline"
|
||||
onClick={() => navigateToPath({
|
||||
repoName: repo.name,
|
||||
path: '',
|
||||
pathType: 'tree',
|
||||
revisionName: branchDisplayName,
|
||||
})}
|
||||
href={info?.repoLink ?? ""}
|
||||
>
|
||||
{info?.displayName}
|
||||
</Link>
|
||||
</div>
|
||||
{branchDisplayName && (
|
||||
<p
|
||||
className="text-xs font-semibold text-gray-500 dark:text-gray-400 mt-[3px] flex items-center gap-0.5"
|
||||
|
|
|
|||
Loading…
Reference in a new issue