Merge pull request '开源项目无法通过右键新开窗口打开链接' (#735) from Eeeros/forgeplus-react:gitlink_ssr_head into gitlink_ssr_head

1
This commit is contained in:
Eeeros 2024-05-24 10:54:54 +08:00
commit fd2602e2fe
2 changed files with 4 additions and 4 deletions

View File

@ -24,18 +24,18 @@ class IndexItem extends Component {
<div className="p-r-Item" key={key}>
{
item.platform === "educoder" ?
<a href="javascript:void(0)" style={{cursor:"default"}} className="show-user-link">
<a href={`/${item.author && item.author.login}`} style={{cursor:"default"}} className="show-user-link">
<img className="p-r-photo" alt="" src={item.author && item.author.image_url} ></img>
</a>
:
<a href="javascript:void(0)" onClick={() => { window.location.href = `/${item.author && item.author.login}/${item.identifier}` }} className="show-user-link">
<a href={`/${item.author && item.author.login}/${item.identifier}`} className="show-user-link">
<img className="p-r-photo" alt="" src={getImageUrl(`/${item.author && item.author.image_url}`)} ></img>
</a>
}
<div className="p-r-Infos">
<div className="p-r-name">
<AlignCenter>
<a href="javascript:void(0)" onClick={() => { window.location.href = `/${item.author && item.author.login}/${item.identifier}` }} title={`${item.author.name}/${item.name}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 470 }}>
<a href={`/${item.author && item.author.login}/${item.identifier}`} title={`${item.author.name}/${item.name}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 470 }}>
{item.author.name}/{item.name}
</a>
{ !item.is_public && <span className="privateTag">私有</span> }

View File

@ -114,7 +114,7 @@ function Index() {
}
<div className="itemTitle">
<div className="item-title-infos">
<a href="javascript:void(0)" onClick={() => { window.location.href = `/${i.author && i.author.login}/${i.identifier}` }} className="infotitle task-hide">{i.author && i.author.name}/{i.name}</a>
<a href={ `/${i.author && i.author.login}/${i.identifier}` } className="infotitle task-hide">{i.author && i.author.name}/{i.name}</a>
{i.praises_count > 0 ? <span><i className="iconfont icon-xingzhuang mr3 font-14"></i>{i.praises_count}</span> :"" }
{i.forked_count > 0 ? <span><i className="iconfont icon-yifuke_icon mr3 font-14"></i>{i.forked_count}</span>:""}
</div>