fix: download raw file (#34558)

* fix: download raw file button
This commit is contained in:
Beatrix 2022-04-27 15:11:06 -07:00 committed by GitHub
parent 0b4c594392
commit ccc8cbe663
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -27,6 +27,7 @@ All notable changes to Sourcegraph are documented in this file.
- Code Insights: Fixed line chart data series hover effect. Now the active line will be rendered on top of the others.
- Unverified primary emails no longer breaks the Emails-page for users and Users-page for Site Admin. [#34312](https://github.com/sourcegraph/sourcegraph/pull/34312)
- Button to download raw file in blob page is now working correctly. [#34558](https://github.com/sourcegraph/sourcegraph/pull/34558)
- Searches containing `or` expressions are now optimized to evaluate natively on the backends that support it ([#34382](https://github.com/sourcegraph/sourcegraph/pull/34382)), and both commit and diff search have been updated to run optimized `and`, `or`, and `not` queries. [#34595](https://github.com/sourcegraph/sourcegraph/pull/34595)
### Removed

View File

@ -28,7 +28,13 @@ export class GoToRawAction extends React.PureComponent<Props> {
if (this.props.actionType === 'dropdown') {
return (
<RepoHeaderActionAnchor to={to} onClick={this.onClick.bind(this)} download={true}>
<RepoHeaderActionAnchor
to={to}
target="_blank"
onClick={this.onClick.bind(this)}
download={true}
file={true}
>
<Icon as={FileDownloadOutlineIcon} />
<span>{descriptiveText}</span>
</RepoHeaderActionAnchor>
@ -38,11 +44,13 @@ export class GoToRawAction extends React.PureComponent<Props> {
return (
<RepoHeaderActionAnchor
to={to}
target="_blank"
onClick={this.onClick.bind(this)}
className="btn-icon"
data-tooltip={descriptiveText}
aria-label={descriptiveText}
download={true}
file={true}
>
<Icon as={FileDownloadOutlineIcon} />
</RepoHeaderActionAnchor>