Skip to content

Commit

Permalink
Use alert icon to convey urgency
Browse files Browse the repository at this point in the history
  • Loading branch information
niik committed Dec 3, 2024
1 parent b29e6d5 commit fda8fc0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
22 changes: 15 additions & 7 deletions app/src/ui/banners/update-available.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,26 @@ export class UpdateAvailable extends React.Component<IUpdateAvailableProps> {
dismissable={!this.props.prioritizeUpdate}
onDismissed={this.props.onDismissed}
>
{!this.props.isUpdateShowcaseVisible && (
<Octicon
className="download-icon"
symbol={octicons.desktopDownload}
/>
)}

{this.renderIcon()}
{this.renderMessage()}
</Banner>
)
}

private renderIcon() {
if (this.props.isUpdateShowcaseVisible) {
return null
}

if (this.props.prioritizeUpdate) {
return <Octicon className="warning-icon" symbol={octicons.alert} />
}

return (
<Octicon className="download-icon" symbol={octicons.desktopDownload} />
)
}

private renderMessage = () => {
if (this.props.isX64ToARM64ImmediateAutoUpdate) {
return (
Expand Down
3 changes: 2 additions & 1 deletion app/styles/ui/banners/_update-available.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#update-available {
.download-icon {
.download-icon,
.warning-icon {
margin-right: var(--spacing);
}

Expand Down

0 comments on commit fda8fc0

Please sign in to comment.