mirror of
https://github.com/desktop/desktop
synced 2024-10-30 06:03:10 +00:00
Rename unsupported OS banner/dialog
This commit is contained in:
parent
0a97e3d5f2
commit
bdb7ecb1a9
4 changed files with 8 additions and 8 deletions
|
@ -15,7 +15,7 @@ export enum BannerType {
|
|||
SuccessfulSquash = 'SuccessfulSquash',
|
||||
SuccessfulReorder = 'SuccessfulReorder',
|
||||
ConflictsFound = 'ConflictsFound',
|
||||
WindowsVersionNoLongerSupported = 'WindowsVersionNoLongerSupported',
|
||||
OSVersionNoLongerSupported = 'OSVersionNoLongerSupported',
|
||||
}
|
||||
|
||||
export type Banner =
|
||||
|
@ -120,4 +120,4 @@ export type Banner =
|
|||
/** callback to run when user clicks on link in banner text */
|
||||
readonly onOpenConflictsDialog: () => void
|
||||
}
|
||||
| { readonly type: BannerType.WindowsVersionNoLongerSupported }
|
||||
| { readonly type: BannerType.OSVersionNoLongerSupported }
|
||||
|
|
|
@ -170,7 +170,7 @@ import { TestNotifications } from './test-notifications/test-notifications'
|
|||
import { NotificationsDebugStore } from '../lib/stores/notifications-debug-store'
|
||||
import { PullRequestComment } from './notifications/pull-request-comment'
|
||||
import { UnknownAuthors } from './unknown-authors/unknown-authors-dialog'
|
||||
import { UnsupportedOSBannerDismissedAtKey } from './banners/windows-version-no-longer-supported-banner'
|
||||
import { UnsupportedOSBannerDismissedAtKey } from './banners/os-version-no-longer-supported-banner'
|
||||
import { offsetFromNow } from '../lib/offset-from'
|
||||
import { getNumber } from '../lib/local-storage'
|
||||
import { RepoRulesBypassConfirmation } from './repository-rules/repo-rules-bypass-confirmation'
|
||||
|
@ -366,7 +366,7 @@ export class App extends React.Component<IAppProps, IAppState> {
|
|||
|
||||
// Remind the user that they're running an unsupported OS every 90 days
|
||||
if (dismissedAt < offsetFromNow(-90, 'days')) {
|
||||
this.setBanner({ type: BannerType.WindowsVersionNoLongerSupported })
|
||||
this.setBanner({ type: BannerType.OSVersionNoLongerSupported })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import { setNumber } from '../../lib/local-storage'
|
|||
export const UnsupportedOSBannerDismissedAtKey =
|
||||
'unsupported-os-banner-dismissed-at'
|
||||
|
||||
export class WindowsVersionNoLongerSupportedBanner extends React.Component<{
|
||||
export class OSVersionNoLongerSupportedBanner extends React.Component<{
|
||||
onDismissed: () => void
|
||||
}> {
|
||||
private onDismissed = () => {
|
|
@ -18,7 +18,7 @@ import { OpenThankYouCard } from './open-thank-you-card'
|
|||
import { SuccessfulSquash } from './successful-squash'
|
||||
import { SuccessBanner } from './success-banner'
|
||||
import { ConflictsFoundBanner } from './conflicts-found-banner'
|
||||
import { WindowsVersionNoLongerSupportedBanner } from './windows-version-no-longer-supported-banner'
|
||||
import { OSVersionNoLongerSupportedBanner } from './os-version-no-longer-supported-banner'
|
||||
|
||||
export function renderBanner(
|
||||
banner: Banner,
|
||||
|
@ -169,8 +169,8 @@ export function renderBanner(
|
|||
key={'conflicts-found'}
|
||||
></ConflictsFoundBanner>
|
||||
)
|
||||
case BannerType.WindowsVersionNoLongerSupported:
|
||||
return <WindowsVersionNoLongerSupportedBanner onDismissed={onDismissed} />
|
||||
case BannerType.OSVersionNoLongerSupported:
|
||||
return <OSVersionNoLongerSupportedBanner onDismissed={onDismissed} />
|
||||
default:
|
||||
return assertNever(banner, `Unknown popup type: ${banner}`)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue