Skip to content

Commit

Permalink
fix: update About modal by hiding unsupported features on Linux (#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 Nov 11, 2024
1 parent d0f672c commit df31756
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
24 changes: 22 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'
import { isOSNoLongerSupportedByElectron } from '../../lib/get-os'

Expand Down Expand Up @@ -100,6 +100,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 @@ -185,7 +196,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 (__RELEASE_CHANNEL__ === 'development') {
Expand Down Expand Up @@ -257,6 +273,10 @@ export class About extends React.Component<IAboutProps, IAboutState> {
return
}

if (__LINUX__) {
return
}

return (
<div>
<p className="no-padding">Looking for the latest features?</p>
Expand Down
2 changes: 2 additions & 0 deletions app/src/ui/lib/releases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ export const ReleaseNotesUri =
__RELEASE_CHANNEL__ === 'beta'
? 'https://desktop.github.com/release-notes/?env=beta'
: 'https://desktop.github.com/release-notes/'

export const LinuxReleasesUri = 'https://github.com/shiftkey/desktop/releases/'

0 comments on commit df31756

Please sign in to comment.