Ghost/ghost/admin/app/components/modals/editor/confirm-leave.hbs
Kevin Ansfield 6a43cb27c3 Refactored leave-editor confirmation modal
refs https://github.com/TryGhost/Team/issues/559

- switched to new ember-promise-modals pattern
- simplified `willTransition` handling because we can now wait on the promise returned from opening the modal
  - the modal content was changed to use `{{on "click" (fn @close true)}}` on the "leave" button so we can check for that return value for leave confirmation
2022-01-12 10:18:25 +00:00

21 lines
741 B
Handlebars

<div class="modal-content">
<header class="modal-header">
<h1>Are you sure you want to leave this page?</h1>
</header>
<button class="close" title="Close" type="button" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></button>
<div class="modal-body">
<p>
Hey there! It looks like you're in the middle of writing something and
you haven't saved all of your content.
</p>
<p>Save before you go!</p>
</div>
<div class="modal-footer">
<button class="gh-btn" {{on "click" @close}}><span>Stay</span></button>
<button class="gh-btn gh-btn-red" {{on "click" (fn @close true)}}><span>Leave</span></button>
</div>
</div>