mirror of
https://github.com/desktop/desktop
synced 2024-09-13 21:31:32 +00:00
Merge pull request #18371 from desktop/more-alertdialogs
Turn more dialogs into `alertdialog`
This commit is contained in:
commit
bfa8f0663e
|
@ -84,10 +84,12 @@ export class DiscardChanges extends React.Component<
|
|||
loading={isDiscardingChanges}
|
||||
disabled={isDiscardingChanges}
|
||||
type="warning"
|
||||
role="alertdialog"
|
||||
ariaDescribedBy="discard-changes-confirmation-file-list discard-changes-confirmation-message"
|
||||
>
|
||||
<DialogContent>
|
||||
{this.renderFileList()}
|
||||
<p>
|
||||
<p id="discard-changes-confirmation-message">
|
||||
Changes can be restored by retrieving them from the {TrashNameLabel}
|
||||
.
|
||||
</p>
|
||||
|
@ -130,14 +132,14 @@ export class DiscardChanges extends React.Component<
|
|||
private renderFileList() {
|
||||
if (this.props.files.length > MaxFilesToList) {
|
||||
return (
|
||||
<p>
|
||||
<p id="discard-changes-confirmation-file-list">
|
||||
Are you sure you want to discard all {this.props.files.length} changed
|
||||
files?
|
||||
</p>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<div>
|
||||
<div id="discard-changes-confirmation-file-list">
|
||||
<p>Are you sure you want to discard all changes to:</p>
|
||||
<div className="file-list">
|
||||
<ul>
|
||||
|
|
|
@ -51,10 +51,14 @@ export class WarnForcePushDialog extends React.Component<
|
|||
onSubmit={this.onBegin}
|
||||
backdropDismissable={false}
|
||||
type="warning"
|
||||
role="alertdialog"
|
||||
ariaDescribedBy="warn-force-push-confirmation-title warn-force-push-confirmation-message"
|
||||
>
|
||||
<DialogContent>
|
||||
<p>Are you sure you want to {operation.toLowerCase()}?</p>
|
||||
<p>
|
||||
<p id="warn-force-push-confirmation-title">
|
||||
Are you sure you want to {operation.toLowerCase()}?
|
||||
</p>
|
||||
<p id="warn-force-push-confirmation-message">
|
||||
At the end of the {operation.toLowerCase()} flow, GitHub Desktop
|
||||
will enable you to force push the branch to update the upstream
|
||||
branch. Force pushing will alter the history on the remote and
|
||||
|
|
Loading…
Reference in a new issue