mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
3eaa00bddb
no refs. - Navigating to `/settings/labs/import` opened the modal but also transitioned to a blank page in the background. Restructured content import modal so it's opening on top of the Labs page.
26 lines
755 B
JavaScript
26 lines
755 B
JavaScript
import AdminRoute from 'ghost-admin/routes/admin';
|
|
import ImportContentModal from '../../../components/modal-import-content';
|
|
import {action} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class LabsImportRoute extends AdminRoute {
|
|
@service modals;
|
|
|
|
importModal = null;
|
|
|
|
setupController(controller, model) {
|
|
this.importModal?.close();
|
|
|
|
this.importModal = this.modals.open(ImportContentModal, {}, {
|
|
className: 'fullscreen-modal fullscreen-modal-action fullscreen-modal-import-content',
|
|
beforeClose: this.beforeModalClose
|
|
});
|
|
}
|
|
|
|
@action
|
|
async beforeModalClose() {
|
|
this.router.transitionTo('settings.labs');
|
|
return true;
|
|
}
|
|
}
|