mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 00:15:11 +03:00
715ee08100
refs https://github.com/TryGhost/Team/issues/1111 Extracted functionality for listing, downloading, activating, and deleting from the theme controller/template into separate components and services so that they are more composable/reusable in different situations. - moved theme activation to a new `theme-management` service that uses the `modals` service to open the theme warnings modal or limits upgrade modal as required - the activate process is a task so that consumers can store a reference to the task instance and cancel it to close any related warning/limit modals (eg, when navigating away from the route or closing the modal that kicked off the process) - created new-pattern modals for custom theme limit upgrade, theme errors, and delete confirmation so that we can treat them as promises and close where needed from parent - duplicated theme table component as `<GhThemeTableLabs>` with an actions redesign and a refactor to handle download, activation, and deletion itself making use of the new theme-management service and modals - fixed some oddities with design modal's transition/modal close handling by simplifying the async behaviour and being more explicit - added advanced design modal that contains the new theme table component and linked to it from footer of design modal's sidebar
20 lines
955 B
Handlebars
20 lines
955 B
Handlebars
<div class="modal-content">
|
|
<header class="modal-header" data-test-modal="delete-theme">
|
|
<h1>Are you sure you want to delete this</h1>
|
|
</header>
|
|
<button type="button" class="close" role="button" title="Close" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></button>
|
|
|
|
<div class="modal-body">
|
|
<p>You're about to delete "<strong>{{@data.theme.name}}</strong>". This is permanent! We warned you, k? Maybe <a href="#" {{on "click" this.downloadTheme}}>download your theme before continuing</a></p>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button {{on "click" (fn @close false)}} class="gh-btn" data-test-button="cancel"><span>Stay</span></button>
|
|
<GhTaskButton
|
|
@buttonText="Delete"
|
|
@successText="Deleted"
|
|
@task={{this.deleteThemeTask}}
|
|
@class="gh-btn gh-btn-red gh-btn-icon"
|
|
data-test-button="delete" />
|
|
</div>
|
|
</div> |