Skip to content

Commit

Permalink
polish About modal for Linux build (#241)
Browse files Browse the repository at this point in the history
Updated the "About GitHub Desktop" model to remove the button to check for updates (since it didn't do anything on Linux) and replace with a link to the linux releases page
  • Loading branch information
jfgordon2 authored and shiftkey committed May 15, 2020
1 parent f3c8da4 commit 413bec0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
20 changes: 18 additions & 2 deletions app/src/ui/about/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Disposable } from 'event-kit'
import { Loading } from '../lib/loading'
import { RelativeTime } from '../relative-time'
import { assertNever } from '../../lib/fatal-error'
import { ReleaseNotesUri } from '../lib/releases'
import { ReleaseNotesUri, LinuxReleasesUri } from '../lib/releases'
import { encodePathAsUrl } from '../../lib/path'

const DesktopLogo = encodePathAsUrl(__dirname, 'static/logo-64x64@2x.png')
Expand Down Expand Up @@ -94,6 +94,17 @@ export class About extends React.Component<IAboutProps, IAboutState> {
return null
}

if (__LINUX__) {
const linuxReleaseLink = (
<LinkButton uri={LinuxReleasesUri}>View Releases</LinkButton>
)
return (
<Row>
<p className="no-padding">{linuxReleaseLink}</p>
</Row>
)
}

const updateStatus = this.state.updateState.status

switch (updateStatus) {
Expand Down Expand Up @@ -169,7 +180,12 @@ export class About extends React.Component<IAboutProps, IAboutState> {

private renderUpdateDetails() {
if (__LINUX__) {
return null
return (
<p>
Please visit the GitHub Desktop for Linux release page for
Linux-specific release notes and to download the latest version.
</p>
)
}

if (
Expand Down
1 change: 1 addition & 0 deletions app/src/ui/lib/releases.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const ReleaseNotesUri = 'https://desktop.github.com/release-notes/'
export const LinuxReleasesUri = 'https://github.com/shiftkey/desktop/releases/'

0 comments on commit 413bec0

Please sign in to comment.