Merge pull request #36 from hashicorp/oss/merge-main-3d0be5ef483e94d4a1f489e3d8d9fc05c5045f8d
[main] OSS to ENT merge of (3d0be5e)
This commit is contained in:
commit
5fb6a90741
2 files changed
+33
-54
No files matched your search
@@ -38,7 +38,10 @@ export default class ApplicationRoute extends Route {
|
||||
if (fromName !== toName && maybeModel?.hasDirtyAttributes) {
|
||||
transition.abort();
|
||||
try {
|
||||
await this.confirm.confirm('abandon', { isAbandonConfirm: true });
|
||||
await this.confirm.confirm(this.intl.t('questions.abandon-confirm'), {
|
||||
title: 'titles.abandon-confirm',
|
||||
confirm: 'actions.discard',
|
||||
});
|
||||
maybeModel?.rollbackAttributes();
|
||||
transition.retry();
|
||||
} catch (e) {
|
||||
|
||||
@@ -91,57 +91,33 @@
|
||||
{{/if}}
|
||||
|
||||
<PendingConfirmations as |confirmation accept deny|>
|
||||
{{#if confirmation.options.isAbandonConfirm}}
|
||||
<Rose::Dialog
|
||||
@heading={{t 'titles.abandon-confirm'}}
|
||||
@dismissButtonText={{t 'actions.cancel'}}
|
||||
@icon='flight-icons/svg/alert-triangle-16'
|
||||
@style='warning'
|
||||
@modal={{true}}
|
||||
@dismiss={{deny}}
|
||||
as |dialog|
|
||||
>
|
||||
<dialog.body>
|
||||
<p>{{t 'questions.abandon-confirm'}}</p>
|
||||
</dialog.body>
|
||||
<dialog.footer>
|
||||
<Rose::Button @style='primary' {{on 'click' accept}}>
|
||||
{{t 'actions.discard'}}
|
||||
</Rose::Button>
|
||||
<Rose::Button @style='secondary' {{on 'click' deny}}>
|
||||
{{t 'actions.cancel'}}
|
||||
</Rose::Button>
|
||||
</dialog.footer>
|
||||
</Rose::Dialog>
|
||||
{{else}}
|
||||
<Rose::Dialog
|
||||
@heading={{if
|
||||
confirmation.options.title
|
||||
(t confirmation.options.title)
|
||||
(t 'actions.confirm')
|
||||
}}
|
||||
@dismissButtonText={{t 'actions.cancel'}}
|
||||
@icon='flight-icons/svg/alert-triangle-16'
|
||||
@style='warning'
|
||||
@modal={{true}}
|
||||
@dismiss={{deny}}
|
||||
as |dialog|
|
||||
>
|
||||
<dialog.body>
|
||||
<p>{{confirmation.text}}</p>
|
||||
</dialog.body>
|
||||
<dialog.footer>
|
||||
<Rose::Button @style='primary' {{on 'click' accept}}>
|
||||
{{if
|
||||
confirmation.options.confirm
|
||||
(t confirmation.options.confirm)
|
||||
(t 'actions.ok')
|
||||
}}
|
||||
</Rose::Button>
|
||||
<Rose::Button @style='secondary' {{on 'click' deny}}>
|
||||
{{t 'actions.cancel'}}
|
||||
</Rose::Button>
|
||||
</dialog.footer>
|
||||
</Rose::Dialog>
|
||||
{{/if}}
|
||||
<Rose::Dialog
|
||||
@heading={{if
|
||||
confirmation.options.title
|
||||
(t confirmation.options.title)
|
||||
(t 'actions.confirm')
|
||||
}}
|
||||
@dismissButtonText={{t 'actions.cancel'}}
|
||||
@icon='flight-icons/svg/alert-triangle-16'
|
||||
@style='warning'
|
||||
@modal={{true}}
|
||||
@dismiss={{deny}}
|
||||
as |dialog|
|
||||
>
|
||||
<dialog.body>
|
||||
<p>{{confirmation.text}}</p>
|
||||
</dialog.body>
|
||||
<dialog.footer>
|
||||
<Rose::Button @style='primary' {{on 'click' accept}}>
|
||||
{{if
|
||||
confirmation.options.confirm
|
||||
(t confirmation.options.confirm)
|
||||
(t 'actions.ok')
|
||||
}}
|
||||
</Rose::Button>
|
||||
<Rose::Button @style='secondary' {{on 'click' deny}}>
|
||||
{{t 'actions.cancel'}}
|
||||
</Rose::Button>
|
||||
</dialog.footer>
|
||||
</Rose::Dialog>
|
||||
</PendingConfirmations>
|
||||
Reference in new issue
Block a user